(self, body_names, orientation=True)
Returns positions and/or orientations of bodies.
Returns positions and/or orientations of bodies.
Returns positions and / or orientations of bodies .
def body_2d_pose(self, body_names, orientation=True):
    """Returns positions and/or orientations of bodies."""
    if not isinstance(body_names, str):
      body_names = np.array(body_names).reshape(-1, 1)  # Broadcast indices.
    pos = self.named.data.xpos[body_names, ['x', 'z']]
    if orientation:
      ori = self.named.data.xquat[body_names, ['qw', 'qy']]
      return np.hstack([pos, ori])
    else:
      return pos
def body_2d_pose ( self , body_names , orientation = True ) : if not isinstance ( body_names , str ) : body_names = np . array ( body_names ) . reshape ( - 1 , 1 ) # Broadcast indices. pos = self . named . data . xpos [ body_names , [ 'x' , 'z' ] ] if orientation : ori = self . named . data . xquat [ body_names , [ 'qw' , 'qy' ] ] return np . hstack ( [ pos , ori ] ) else : return pos