(self, physics)
return obs
Returns either the pure state or a set of egocentric features.
Returns either the pure state or a set of egocentric features.
Returns either the pure state or a set of egocentric features .
def get_observation(self, physics):
    """Returns either the pure state or a set of egocentric features."""
    obs = collections.OrderedDict()
    if self._pure_state:
      obs['position'] = physics.position()
      obs['velocity'] = physics.velocity()
    else:
      obs['joint_angles'] = physics.joint_angles()
      obs['head_height'] = physics.head_height()
      obs['extremities'] = physics.extremities()
      obs['torso_vertical'] = physics.torso_vertical_orientation()
      obs['com_velocity'] = physics.center_of_mass_velocity()
      obs['velocity'] = physics.velocity()
    return obs
def get_observation ( self , physics ) : obs = collections . OrderedDict ( ) if self . _pure_state : obs [ 'position' ] = physics . position ( ) obs [ 'velocity' ] = physics . velocity ( ) else : obs [ 'joint_angles' ] = physics . joint_angles ( ) obs [ 'head_height' ] = physics . head_height ( ) obs [ 'extremities' ] = physics . extremities ( ) obs [ 'torso_vertical' ] = physics . torso_vertical_orientation ( ) obs [ 'com_velocity' ] = physics . center_of_mass_velocity ( ) obs [ 'velocity' ] = physics . velocity ( ) return obs