mujoco_mpc icon indicating copy to clipboard operation
mujoco_mpc copied to clipboard

Add Unitree H1 Walk task

Open AntoSave opened this issue 1 year ago • 4 comments

This PR adds a new task to make the Unitree H1 humanoid robot walk towards a given setpoint with MJPC. Some remarks on this PR:

  • As for the robot model, I used the one provided by Menagerie
  • The obtained results are moderately satisfying as the robot successfully completes the task without "strange" behaviors overall, however there is still room from improvement
  • Goal is given with a marker (a body with disabled collisions) similarly to the QuadrupedFlat task
  • I am getting good results with up to 20% real-time on my machine (Ryzen 9 7950x), and I would like suggestions on how to further reduce the planning time

Here is a video that showcases the agent's performances:

https://github.com/user-attachments/assets/c1e93c3f-f943-44a8-93c9-65d1fa03b4a1

I would like to get some feedback on the overall implementation as well as any modification needed to merge this PR. Thanks for your time!

AntoSave avatar Aug 04 '24 10:08 AntoSave

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Aug 04 '24 10:08 google-cla[bot]

This is a great task, thanks for the contribution!

Things to improve performance:

  • shorten the planning horizon: <numeric name="agent_horizon" data="0.35" />
  • change the integrator to implicitfast: <numeric name="agent_integrator" data="3"/>
  • modify the model (see the MJX humanoid example)
    • change the solver settings
    • reduce the number of contacts to only include the feet (when we merge #307 it will be possible to have a separate planning and simulation model)

Additionally, can you please sign the CLA? Thanks!

thowell avatar Aug 04 '24 21:08 thowell

Have you tried this task with the G1 model?

thowell avatar Aug 04 '24 21:08 thowell

Thank you for the time you spent on reviewing the PR, I really appreciate it.

This is a great task, thanks for the contribution!

Things to improve performance:

  • shorten the planning horizon: <numeric name="agent_horizon" data="0.35" />

  • change the integrator to implicitfast: <numeric name="agent_integrator" data="3"/>

  • modify the model (see the MJX humanoid example)

I managed to get a ~30% speed gain by moving to the implicitfast integrator and reducing the agent's horizon to 0.4s. I am reluctant to go lower as I experienced some instability, but I will surely try to reduce the number of contatcts to see if that helps.

Additionally, can you please sign the CLA? Thanks!

Signed it

Have you tried this task with the G1 model?

Not yet, but I'm going to. However, for the time being I will focus on H1 tasks as it is part of my master's thesis.

AntoSave avatar Aug 09 '24 21:08 AntoSave