fix(g1): enable MuJoCo navigation with GR00T policy#2261
fix(g1): enable MuJoCo navigation with GR00T policy#2261raulbastidas1203 wants to merge 6 commits into
Conversation
Greptile SummaryThis PR fixes the G1 MuJoCo simulation navigation stack by wiring
Confidence Score: 5/5Safe to merge — all changes are scoped to MuJoCo simulation, hardware paths are untouched, and the two previously-flagged observation-vector issues are resolved. The navigation wiring fix is minimal and well-tested via blueprint assertions. The GR00T controller correctly addresses both the linear-velocity slot that was previously zero and the actuator-count mismatch; its PD torque math, observation layout, and dual-policy switching are all consistent with the stated design. The self-point filter uses the correct robot-local frame rotation (verified against the yaw-tracking test) and matches MuJoCo's free-joint quaternion convention. No regressions to existing Go1 or default G1 paths were introduced. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant KB as Keyboard Teleop
participant Nav as ReplanningAStarPlanner
participant MM as MovementManager
participant G1 as G1SimConnection
participant MJ as MuJoCo Process
participant PC as Point Cloud Publisher
KB->>MM: tele_cmd_vel
Nav->>MM: nav_cmd_vel
MM->>G1: cmd_vel (muxed)
G1->>MJ: SHM command write
MJ->>MJ: policy.get_control(model, data)
Note over MJ: G1GrootOnnxController or G1OnnxController
MJ->>MJ: filter_g1_self_points(combined_points, base_pos, base_quat)
MJ->>PC: filtered PointCloud2
PC->>Nav: /point_cloud (no self-obstacles)
Nav->>MM: nav_cmd_vel (goal tracking)
Reviews (4): Last reviewed commit: "Merge branch 'main' into feat/g1-mujoco-..." | Re-trigger Greptile |
|
Real G1 hardware validation is still pending, and I’ll try to complete it next week and update the PR with the results. |
Summary
unitree-g1-basic-simnavigation wiring by addingMovementManager, so keyboard teleop and map-selected goals are muxed into thecmd_velstream consumed byG1SimConnection.--mujoco-g1-policy groot.mujoco_g1_policy=default) and add tests for blueprint wiring, policy selection, and G1 self-point filtering.Why
In G1 MuJoCo simulation, keyboard commands and clicked map goals could publish upstream, but the basic sim stack did not include the movement manager that bridges
tele_cmd_vel/nav_cmd_velintocmd_vel. As a result, the robot did not follow keyboard or map navigation commands as expected.After wiring the movement manager, keyboard teleop worked, but map-selected navigation could still stop early because the MuJoCo depth/lidar output could include parts of the humanoid itself. Those self-points polluted the global map/costmap, causing the local planner to report an obstacle ahead and cancel/replan.
The GR00T policy is included as an optional simulation locomotion backend because it tracks velocity commands better for the humanoid G1 in MuJoCo while preserving the same DimOS navigation interface.
Scope
Simulation only. This PR does not change the real G1 hardware path, and hardware validation is still pending.
How to Test
source .venv/bin/activate ruff check dimos/core/global_config.py \ dimos/robot/unitree/g1/blueprints/basic/unitree_g1_basic_sim.py \ dimos/robot/unitree/g1/blueprints/basic/test_unitree_g1_basic_sim.py \ dimos/simulation/mujoco/model.py \ dimos/simulation/mujoco/mujoco_process.py \ dimos/simulation/mujoco/policy.py \ dimos/simulation/mujoco/test_model_policy_selection.py \ dimos/simulation/mujoco/test_mujoco_process.py pytest dimos/simulation/mujoco/test_mujoco_process.py \ dimos/robot/unitree/g1/blueprints/basic/test_unitree_g1_basic_sim.py \ dimos/simulation/mujoco/test_model_policy_selection.py \ dimos/navigation/movement_manager/test_movement_manager.py \ dimos/robot/test_all_blueprints_generation.py -qManual sim check:
Verified locally in simulation that:
/clicked_pointgoal producesFound path,path_following, andArrived at goal;Contributor License Agreement