transform from bvh to g1_motion csv
''' python src/retarget_to_g1.py /home/vector4d/unitree_dev/unitree_app/mocap_retarget/src/retarget/data/bvh/zyx/motionData_20250512183820_zyx.bvh --frames 200-5000 --output_csv data/motion/g1_motions2.cvs --gui '''
visualize
''' ython bvh_world_coords_zyx.py data/bvh/zyx/motionData_20250512181449_zyx.bvh --frame 200 '''
128行和216行 改为内旋r 95行 不使用0数组 [13, 25, 34, 28, 37, 29, 39, 1, 7, 4, 10, 5, 11] URDF中的Link名称及其索引:
- pelvis_contour_link: 0 - 关节 0 是固定的,跳过。
- left_hip_pitch_link: 1
- left_hip_roll_link: 2
- left_hip_yaw_link: 3
- left_knee_link: 4
- left_ankle_pitch_link: 5
- left_ankle_roll_link: 6
- right_hip_pitch_link: 7
- right_hip_roll_link: 8
- right_hip_yaw_link: 9
- right_knee_link: 10
- right_ankle_pitch_link: 11
- right_ankle_roll_link: 12
- waist_yaw_link: 13
- waist_roll_link: 14
- torso_link: 15
- left_elbow_cllision_link: 16 - 关节 16 是固定的,跳过。
- right_elbow_cllision_link: 17 - 关节 17 是固定的,跳过。
- logo_link: 18 - 关节 18 是固定的,跳过。
- head_link: 19 - 关节 19 是固定的,跳过。
- head_sphere: 20 - 关节 20 是固定的,跳过。
- head_link_o: 21 - 关节 21 是固定的,跳过。
- imu_in_torso: 22 - 关节 22 是固定的,跳过。
- d435_link: 23 - 关节 23 是固定的,跳过。
- mid360_link: 24 - 关节 24 是固定的,跳过。
- left_shoulder_pitch_link: 25
- left_shoulder_roll_link: 26
- left_shoulder_yaw_link: 27
- left_elbow_link: 28
- left_hand_link: 29 - 关节 29 是固定的,跳过。
- left_wrist_roll_link: 30----------对应blender中的Y
- left_wrist_pitch_link: 31
- left_wrist_yaw_link: 32
- left_rubber_hand: 33 - 关节 33 是固定的,跳过。
- right_shoulder_pitch_link: 34
- right_shoulder_roll_link: 35
- right_shoulder_yaw_link: 36
- right_elbow_link: 37
- right_hand_link: 38 - 关节 38 是固定的,跳过。
- right_wrist_roll_link: 39
- right_wrist_pitch_link: 40
- right_wrist_yaw_link: 41
- right_rubber_hand: 42 - 关节 42 是固定的,跳过。
- imu_in_pelvis: 43 - 关节 43 是固定的,跳过。