-
Notifications
You must be signed in to change notification settings - Fork 14
Description
I encountered a physics instability issue during the initialization of the Go1 robot. The robot tends to be "flung" into the air or causes the physics engine to crash immediately upon spawning.
Root Cause Analysis
After investigation, I found a conflict between the initial base position and the joint pose configuration:
Low Initial Position: The code loads the default initial position from the XML model file (approx. 0.28m), which corresponds to the robot lying on the ground.
Standing Pose: However, the code enforces a "standing" joint configuration from the config file (expecting a hip height of approx. 0.42m).
Consequence: When the simulation starts, the robot's limbs are forced into a standing pose while the base is still at ground level. This causes the legs to spawn inside the ground geometry. The physics engine resolves this interpenetration by applying massive reaction forces, causing the robot to fly off or the simulation to break.
Proposed Solution
I modified motrix_envs/locomotion/go1/walk_np.py to enforce the correct initial height defined in the configuration file before the simulation steps begin.
File: motrix_envs/locomotion/go1/walk_np.py
Modification:
self._init_dof_pos = self._model.compute_init_dof_pos() self._init_dof_pos[0:3] = cfg.init_state.pos self._init_buffer()
This ensures the robot spawns at the correct height (0.42m) matching its standing pose, resolving the physics conflict.