-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Unitree H1 Walk task #336
base: main
Are you sure you want to change the base?
Conversation
[ADD] Add Unitree H1 Walk baseline task
…into google-deepmind-main
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the file links to your machine. You can replace them with something generic like the other .patch files.
</actuator> | ||
-</mujoco> | ||
+</mujoco> | ||
\ No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The xml file should have a new line at the end.
diaginertia="0.0490211 0.0445821 0.00824619"/> | ||
<freejoint/> | ||
<geom class="visual" mesh="pelvis"/> | ||
- <body name="left_hip_yaw_link" pos="0 0.0875 -0.1742"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe check to see if this diff can be smaller?
mjpc/tasks/h1/walk/task.xml
Outdated
<custom> | ||
<!-- agent --> | ||
<numeric name="agent_planner" data="2" /> | ||
<numeric name="agent_horizon" data="0.6" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly reduce the planning horizon.
mjpc/tasks/h1/walk/walk.cc
Outdated
mju_scl3(&residual[counter], &residual[counter], 0.1 * standing); | ||
counter += 3; | ||
// ----- posture up ----- // | ||
mju_copy(&residual[counter], data->qpos + 17, model->nq - 17); //First 7 are freejoint coord, the other 10 are lower body joints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a space after '//'.
mjpc/tasks/h1/walk/walk.cc
Outdated
mju_copy(&residual[counter], data->qpos + 17, model->nq - 17); //First 7 are freejoint coord, the other 10 are lower body joints | ||
counter += model->nq - 17; | ||
// ----- posture down ----- // | ||
mju_copy(&residual[counter], data->qpos + 7, model->nq - 16); //First 7 are freejoint coord, the other 10 are lower body joints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a space after '//'.
mjpc/tasks/h1/walk/walk.cc
Outdated
mju_sub(forward_target, goal_point, torso_position, 2); | ||
mju_normalize(forward_target, 2); | ||
|
||
// com vel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't use this term, let's remove it.
mjpc/tasks/h1/walk/walk.cc
Outdated
return mju_abs(value) < 1e-6 ? 0.0 : value; | ||
} | ||
|
||
} // namespace mjpc::h1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format this file, see this reference.
p.start() | ||
while True: | ||
action = agent.get_action() | ||
q.put(action) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format: pyink h1_walk.py --pyink-indentation 2 --line-length 80
This is a great task, thanks for the contribution! Things to improve performance:
Additionally, can you please sign the CLA? Thanks! |
Have you tried this task with the G1 model? |
Thank you for the time you spent on reviewing the PR, I really appreciate it.
I managed to get a ~30% speed gain by moving to the
Signed it
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. |
…ter reaching position reference (mocap position) - [REF] Improved leg cross detection in cost function
- [REF] Split "Posture up" residual in "Posture arms" and "Posture torso" for a better control on the task - [FIX] Reduced "Leg cross" weight to 1 as it produced unwanted behaviors - [REM] Removed unused residual "Posture down"
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:
QuadrupedFlat
task20%
real-time on my machine (Ryzen 9 7950x), and I would like suggestions on how to further reduce the planning timeHere is a video that showcases the agent's performances:
h1_walk_3.mp4
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!