LeCAR-Lab / human2humanoid

[IROS 2024] Learning Human-to-Humanoid Real-Time Whole-Body Teleoperation. [CoRL 2024] OmniH2O: Universal and Dexterous Human-to-Humanoid Whole-Body Teleoperation and Learning
https://omni.human2humanoid.com/
157 stars 6 forks source link

Script grad_fit_h1_shape.py Missing #1

Closed Mrsirovo closed 5 days ago

Mrsirovo commented 1 week ago

Thank you for sharing the great work! In motion retargeting, I discovered one missing script: human2humanoid/scripts/data_process/grad_fit_h1_shape.py.

TairanHe commented 1 week ago

Thank you for letting us know. We will add this file ASAP

ZhengyiLuo commented 5 days ago

Released!

lzpyx commented 4 days ago

Released!

Thank you for your excellent work! I ran into a few problems running grad_fit_h1_shape.py, the first was that there were still parts of the code that imported uhc, so I brought uhc into the codebase and installed mujoco. After that, I encountered another problem:

Exception has occurred: ValueError
'left_ankle_link' is not in list
  File "/home/human2humanoid/scripts/data_process/grad_fit_h1_shape.py", line 68, in <listcomp>
    h1_joint_pick_idx = [ h1_joint_names_augment.index(j) for j in h1_joint_pick]
  File "/home/human2humanoid/scripts/data_process/grad_fit_h1_shape.py", line 68, in <module>
    h1_joint_pick_idx = [ h1_joint_names_augment.index(j) for j in h1_joint_pick]
ValueError: 'left_ankle_link' is not in list
lzpyx commented 3 days ago

Released!

Thank you for your excellent work! I ran into a few problems running grad_fit_h1_shape.py, the first was that there were still parts of the code that imported uhc, so I brought uhc into the codebase and installed mujoco. After that, I encountered another problem:

Exception has occurred: ValueError
'left_ankle_link' is not in list
  File "/home/human2humanoid/scripts/data_process/grad_fit_h1_shape.py", line 68, in <listcomp>
    h1_joint_pick_idx = [ h1_joint_names_augment.index(j) for j in h1_joint_pick]
  File "/home/human2humanoid/scripts/data_process/grad_fit_h1_shape.py", line 68, in <module>
    h1_joint_pick_idx = [ h1_joint_names_augment.index(j) for j in h1_joint_pick]
ValueError: 'left_ankle_link' is not in list

There were some minor issues with grad_fit_h1_shape.py and grad_fit_h1.py, which I was able to run successfully by modifying the following sections: For grad_fit_h1_shape.py

  1. change h1_joint_names from h1-2 to h1 h1_joint_names = ['pelvis', 'left_hip_yaw_link', 'left_hip_roll_link', 'left_hip_pitch_link', 'left_knee_link', 'left_ankle_link', 'right_hip_yaw_link', 'right_hip_roll_link', 'right_hip_pitch_link', 'right_knee_link', 'right_ankle_link', 'torso_link', 'left_shoulder_pitch_link', 'left_shoulder_roll_link', 'left_shoulder_yaw_link', 'left_elbow_link', 'right_shoulder_pitch_link', 'right_shoulder_roll_link', 'right_shoulder_yaw_link', 'right_elbow_link']
  2. dof_pos = torch.zeros((1, 19))
  3. joblib.dump(shape_new.detach(), “data/h1/shape_optimized_v1.pkl”)

For grad_fit_h1.py

  1. copy amass_copycat_take6_train.pkl from phc repository
  2. Comment out the following code in the fk_batch function(and remember to recover after retargeting)
    #wbody_pos = wbody_pos[... , :-self._remove_idx, :]
    #wbody_mat = wbody_mat[... , :-self._remove_idx, :, :]
    #wbody_rot = wbody_rot[... , :-self._remove_idx, :]
  3. replace joblib.load(“data/h1/amass_test.pkl”) with save code

Please let me know if I've made any inappropriate changes, thanks!

TongZhangTHU commented 1 day ago

@lzpyx Your modification was really helpful! Could you let me know where we can find the file amass_copycat_take6_train.pkl? I wasn't able to locate it in the PHC repository.

lzpyx commented 1 day ago

@lzpyx Your modification was really helpful! Could you let me know where we can find the file amass_copycat_take6_train.pkl? I wasn't able to locate it in the PHC repository.

You should follow the "Data Processing AMASS" in PHC. After that, you could find the file in sample_data/amass_copycat_take6_train.pkl

TongZhangTHU commented 18 hours ago

@lzpyx Thanks so much for your help! It works perfectly. By the way, it seems that running grad_fit_h1.py takes over 25 hours. Is that normal?

lzpyx commented 13 hours ago

I think so. It's gonna take quite a while.

@lzpyx Thanks so much for your help! It works perfectly. By the way, it seems that running grad_fit_h1.py takes over 25 hours. Is that normal?