Case Study: Looking into robot_lab
Last updated
JOINT_POS_FILENAME = "/home/tk/Downloads/robot_lab/exts/robot_lab/robot_lab/third_party/amp_utils/datasets/keypoint_datasets/ai4animation/dog_walk00_joint_pos.txt"
joint_pos_data = np.loadtxt(JOINT_POS_FILENAME, delimiter=",")0: pelvis
1:
2:
3: neck
4:
5:
6: hip
7:
8:
9:
10: toe
11: hip
12:
13:
14:
15: toe
16: hip
17:
18:
19: toe
20: hip
21:
22:
23: toe
24:
25:
26:# joint_pos_data: (40, 81), float64joint_pos_data = joint_pos_data.reshape(joint_pos_data.shape[0], -1, POS_SIZE)
# joint_pos_data: (40, 27, 3), float64 # 对数据进行坐标变换
for i in range(joint_pos_data.shape[0]):
joint_pos_data[i] = process_ref_joint_pos_data(joint_pos_data[i])# 1. Rotates the point around the reference coordinate system
curr_pos = pose3d.QuaternionRotatePoint(curr_pos, REF_COORD_ROT)
# REF_COORD_ROT = rotation of 90 degrees around X axis (0.5 * pi)
# 2. Applies a root rotation to align the motion
curr_pos = pose3d.QuaternionRotatePoint(curr_pos, REF_ROOT_ROT)
# REF_ROOT_ROT = rotation of ~85 degrees around Z axis (0.47 * pi)
# 3. Scales the position and adds an offset
curr_pos = curr_pos * config.REF_POS_SCALE + REF_POS_OFFSET# retargeted_frame: (39, 61)curr_pose: 31
root_pos: 3
root_rot: 4
joint_pose: 12
tar_toe_pos_local: 12
LINEAR_VEL_SIZE: 3
ANGULAR_VEL_SIZE: 3
JOINT_POS_SIZE: 12
TAR_TOE_VEL_LOCAL_SIZE: 12