(self, physics)
return obs
Returns either features or only sensors (to be used with pixels).
Returns either features or only sensors (to be used with pixels).
Returns either features or only sensors ( to be used with pixels ) .
def get_observation(self, physics):
    """Returns either features or only sensors (to be used with pixels)."""
    obs = collections.OrderedDict()
    obs['arm_pos'] = physics.bounded_joint_pos(_ARM_JOINTS)
    obs['arm_vel'] = physics.joint_vel(_ARM_JOINTS)
    obs['touch'] = physics.touch()
    if self._fully_observable:
      obs['hand_pos'] = physics.body_2d_pose('hand')
      obs['object_pos'] = physics.body_2d_pose(self._object)
      obs['object_vel'] = physics.joint_vel(self._object_joints)
      obs['target_pos'] = physics.body_2d_pose(self._target)
    return obs
def get_observation ( self , physics ) : obs = collections . OrderedDict ( ) obs [ 'arm_pos' ] = physics . bounded_joint_pos ( _ARM_JOINTS ) obs [ 'arm_vel' ] = physics . joint_vel ( _ARM_JOINTS ) obs [ 'touch' ] = physics . touch ( ) if self . _fully_observable : obs [ 'hand_pos' ] = physics . body_2d_pose ( 'hand' ) obs [ 'object_pos' ] = physics . body_2d_pose ( self . _object ) obs [ 'object_vel' ] = physics . joint_vel ( self . _object_joints ) obs [ 'target_pos' ] = physics . body_2d_pose ( self . _target ) return obs