Skip to content

Commit 293cadc

Browse files
committed
Fix base_com body name mismatch for non-base robots
The base_com event in velocity_env_cfg.py hardcodes body_names="base", but 6 rough envs use different base body names. Override per-env: - a1, go1: set body_names to "trunk" - digit: set body_names to "torso_base" - g1, h1, cassie: disable base_com (consistent with add_base_mass=None) Verified with 300-iter PhysX/Newton parity tests on all 7 working envs.
1 parent 2dfe033 commit 293cadc

6 files changed

Lines changed: 6 additions & 0 deletions

File tree

source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/a1/rough_env_cfg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def __post_init__(self):
5656
self.events.add_base_mass.params["asset_cfg"].body_names = "trunk"
5757
self.events.add_base_mass.params["mass_distribution_params"] = (-1.0, 3.0)
5858
self.events.base_external_force_torque.params["asset_cfg"].body_names = "trunk"
59+
self.events.base_com.default.params["asset_cfg"].body_names = "trunk"
5960

6061
# reduce action scale
6162
self.actions.joint_pos.scale = 0.25

source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/cassie/rough_env_cfg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def __post_init__(self):
8888

8989
# Cassie uses "pelvis" as base body — disable mass randomization for bipeds
9090
self.events.add_base_mass = None
91+
self.events.base_com = None
9192
self.events.base_external_force_torque.params["asset_cfg"].body_names = ".*pelvis"
9293

9394
# actions

source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/digit/rough_env_cfg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ def __post_init__(self):
257257
# Digit uses "torso_base" as base body
258258
self.events.add_base_mass.params["asset_cfg"].body_names = "torso_base"
259259
self.events.base_external_force_torque.params["asset_cfg"].body_names = "torso_base"
260+
self.events.base_com.default.params["asset_cfg"].body_names = "torso_base"
260261

261262
# Override actuator to target only actuated joints. Digit has ball joints (rod constraints)
262263
# that MuJoCo represents with 4 DoFs instead of 3, inflating joint_pos to 74 columns while

source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/g1/rough_env_cfg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ def __post_init__(self):
141141

142142
# G1 uses "torso_link" as base body — disable mass randomization for bipeds
143143
self.events.add_base_mass = None
144+
self.events.base_com = None
144145
self.events.base_external_force_torque.params["asset_cfg"].body_names = "torso_link"
145146

146147
# Rewards

source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/go1/rough_env_cfg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def __post_init__(self):
5656
self.events.add_base_mass.params["asset_cfg"].body_names = "trunk"
5757
self.events.add_base_mass.params["mass_distribution_params"] = (-1.0, 3.0)
5858
self.events.base_external_force_torque.params["asset_cfg"].body_names = "trunk"
59+
self.events.base_com.default.params["asset_cfg"].body_names = "trunk"
5960

6061
# reduce action scale
6162
self.actions.joint_pos.scale = 0.25

source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/h1/rough_env_cfg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def __post_init__(self):
109109

110110
# H1 uses "torso_link" as base body — disable mass randomization for bipeds
111111
self.events.add_base_mass = None
112+
self.events.base_com = None
112113
self.events.base_external_force_torque.params["asset_cfg"].body_names = ".*torso_link"
113114

114115
# Rewards

0 commit comments

Comments
 (0)