(self, index2joint, joint_order)
Initializes a new Amcvals2qpos instance.

    Args:
      index2joint: List of joint angles in .amc file.
      joint_order: List of joint names in MuJoco MJCF.
Initializes a new Amcvals2qpos instance.
Initializes a new Amcvals2qpos instance .
def __init__(self, index2joint, joint_order):
    """Initializes a new Amcvals2qpos instance.

    Args:
      index2joint: List of joint angles in .amc file.
      joint_order: List of joint names in MuJoco MJCF.
    """
    # Root is x,y,z, then quat.
    # need to get indices of qpos that order for amc default order
    self.qpos_root_xyz_ind = [0, 1, 2]
    self.root_xyz_ransform = np.array(
        [[1, 0, 0], [0, 0, -1], [0, 1, 0]]) * CONVERSION_LENGTH
    self.qpos_root_quat_ind = [3, 4, 5, 6]
    amc2qpos_transform = np.zeros((len(index2joint), len(joint_order)))
    for i in range(len(index2joint)):
      for j in range(len(joint_order)):
        if index2joint[i] == joint_order[j]:
          if 'rx' in index2joint[i]:
            amc2qpos_transform[i][j] = 1
          elif 'ry' in index2joint[i]:
            amc2qpos_transform[i][j] = 1
          elif 'rz' in index2joint[i]:
            amc2qpos_transform[i][j] = 1
    self.amc2qpos_transform = amc2qpos_transform
def __init__ ( self , index2joint , joint_order ) : # Root is x,y,z, then quat. # need to get indices of qpos that order for amc default order self . qpos_root_xyz_ind = [ 0 , 1 , 2 ] self . root_xyz_ransform = np . array ( [ [ 1 , 0 , 0 ] , [ 0 , 0 , - 1 ] , [ 0 , 1 , 0 ] ] ) * CONVERSION_LENGTH self . qpos_root_quat_ind = [ 3 , 4 , 5 , 6 ] amc2qpos_transform = np . zeros ( ( len ( index2joint ) , len ( joint_order ) ) ) for i in range ( len ( index2joint ) ) : for j in range ( len ( joint_order ) ) : if index2joint [ i ] == joint_order [ j ] : if 'rx' in index2joint [ i ] : amc2qpos_transform [ i ] [ j ] = 1 elif 'ry' in index2joint [ i ] : amc2qpos_transform [ i ] [ j ] = 1 elif 'rz' in index2joint [ i ] : amc2qpos_transform [ i ] [ j ] = 1 self . amc2qpos_transform = amc2qpos_transform