-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add G1 29dof Locomotion task #4268
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
base: main
Are you sure you want to change the base?
Conversation
Greptile SummaryThis PR adds a G1 29DOF locomotion task for the Unitree G1 humanoid robot, addressing the hardware-simulation mismatch discussed in issue #4064. Key Changes
Issues Found
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Env as G1 Environment
participant Cmd as CommandManager
participant Phase as PhaseCommand
participant Vel as UniformLevelVelocityCommand
participant Robot as G1 Robot (29DOF)
participant Reward as RewardManager
participant Term as TerminationManager
Env->>Robot: Initialize with UNITREE_G1_29DOF_CFG
Env->>Cmd: Setup commands (velocity + gait phase)
loop Every Episode
Env->>Cmd: Reset commands
Cmd->>Phase: Resample gait period
Cmd->>Vel: Resample velocity targets
loop Every Step
Cmd->>Phase: Update phase (0 to 1)
Phase-->>Cmd: Return current phase
Cmd->>Vel: Update velocity command
Vel-->>Cmd: Return velocity target
Env->>Robot: Apply actions
Robot-->>Env: Return state (positions, velocities, contacts)
Env->>Reward: Calculate rewards
Reward->>Reward: Track velocity (lin/ang)
Reward->>Reward: Check foot orientation (roll/pitch/yaw)
Reward->>Reward: Evaluate gait phase matching
Reward->>Reward: Apply variable posture regularization
Reward-->>Env: Return total reward
Env->>Term: Check terminations
Term->>Term: Check root_height_below_minimum_adaptive
Term->>Term: Check bad orientation
Term-->>Env: Return done flags
end
end
|
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.
Additional Comments (3)
-
source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/mdp/commands/velocity_command.py, line 49 (link)logic: checking
goal_vel_visualizerinstead ofgoal_linvel_visualizer -
source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/mdp/commands/velocity_command.py, line 141 (link)logic: duplicate
prim_pathbetweencurrent_angvel_visualizer_cfgandcurrent_linvel_visualizer_cfgwill cause collision -
source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/mdp/terminations.py, line 68-70 (link)logic:
body_idsundefined -asset_cfg.body_idsnot populated when onlybody_namesprovided in configthe termination config uses
body_names=".*_ankle_roll_link"but accessesbody_idsdirectly. did you test this termination function with the G1 config?
28 files reviewed, 3 comments
Description
This PR creates Unitree G1 29dof locomotion task.
The issue is mentioned in #4064 where current G1 USD file is different from actual hardware.
Type of change
New file
g1_29doftask in manager_based envChange to existing files
source/isaaclab_assets/isaaclab_assets/robots/unitree.pysource/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/mdp/commandsroot_height_below_minimum_adaptivefunction insource/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/mdp/terminations.pyUSD asset
source/isaaclab_assets/dataand unzip it.unitree.zip
Performance
The current implementation achieves up to 3.0m/s running.
Joint regularization, foot orientation regularization, and gait tracking reward need a bit more tuning in my opinion.
I used
rsl_rlfor policy training/inference.g1_run.mp4
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there