(self)
return np.hstack(positions)
Returns end effector positions in egocentric frame.
Returns end effector positions in egocentric frame.
Returns end effector positions in egocentric frame .
def extremities(self):
    """Returns end effector positions in egocentric frame."""
    torso_frame = self.named.data.xmat['thorax'].reshape(3, 3)
    torso_pos = self.named.data.xpos['thorax']
    positions = []
    for side in ('l', 'r'):
      for limb in ('hand', 'foot'):
        torso_to_limb = self.named.data.xpos[side + limb] - torso_pos
        positions.append(torso_to_limb.dot(torso_frame))
    return np.hstack(positions)
def extremities ( self ) : torso_frame = self . named . data . xmat [ 'thorax' ] . reshape ( 3 , 3 ) torso_pos = self . named . data . xpos [ 'thorax' ] positions = [ ] for side in ( 'l' , 'r' ) : for limb in ( 'hand' , 'foot' ) : torso_to_limb = self . named . data . xpos [ side + limb ] - torso_pos positions . append ( torso_to_limb . dot ( torso_frame ) ) return np . hstack ( positions )