change joint_pos_penalty_l1's weight to -0.01 due to better performance; add default actuator-level action delay in GO2_CFG_UNITREE.

This commit is contained in:
wertyuilife
2026-05-05 00:35:22 +08:00
parent 0cdd3b9ac1
commit 84b7c1e3bd
2 changed files with 13 additions and 8 deletions

View File

@@ -145,6 +145,8 @@ GO2_CFG_UNITREE = UnitreeArticulationCfg(
stiffness=25.0, stiffness=25.0,
damping=0.5, damping=0.5,
friction=0.01, friction=0.01,
min_delay=0,
max_delay=4,
), ),
}, },
# fmt: off # fmt: off

View File

@@ -360,15 +360,18 @@ class RewardsCfg:
) )
lin_vel_z_l2 = RewTerm(func=mdp.lin_vel_z_l2, weight=-2.0) lin_vel_z_l2 = RewTerm(func=mdp.lin_vel_z_l2, weight=-2.0)
ang_vel_xy_l2 = RewTerm(func=mdp.ang_vel_xy_l2, weight=-0.05) ang_vel_xy_l2 = RewTerm(func=mdp.ang_vel_xy_l2, weight=-0.05)
# The dof_acc reward is not implemented on the same scale in Gym and Lab.
# In Lab, it is computed at the physics-step level, # The joint_acc reward is not computed on the same scale in Gym and Lab.
# and because the L2 term is more sensitive to outliers, it can produce a larger penalty. # In Gym, it is computed at the policy-step level,
# Thus, we need to use a smaller weight for the dof_acc_l2 term in Lab compared to Gym. # while in Lab, it is computed at the physics-step level.
dof_acc_l2 = RewTerm( # In Lab, the reward calculation is more precise, and because the L2 term is more sensitive to outliers.
func=mdp.joint_acc_l2, # Thus, the reward value is overall higher, so we need to decrease the weights to be suitable for Lab.
joint_acc_l2 = RewTerm(
func=mdp.joint_acc_l2,
weight=-1.0e-7, weight=-1.0e-7,
params={"asset_cfg": SceneEntityCfg("robot", joint_names=JOINT_NAMES)} params={"asset_cfg": SceneEntityCfg("robot", joint_names=JOINT_NAMES)}
) )
joint_power = RewTerm( joint_power = RewTerm(
func=mdp.joint_power, func=mdp.joint_power,
weight=-2e-5, weight=-2e-5,
@@ -421,7 +424,7 @@ class RewardsCfg:
) )
joint_pos_penalty_l1 = RewTerm( joint_pos_penalty_l1 = RewTerm(
func=mdp.joint_pos_penalty_l1, func=mdp.joint_pos_penalty_l1,
weight=-0.02, weight=-0.01,
params={ params={
"command_name": "base_velocity", "command_name": "base_velocity",
"asset_cfg": SceneEntityCfg("robot", joint_names=".*_(thigh|calf)_joint"), "asset_cfg": SceneEntityCfg("robot", joint_names=".*_(thigh|calf)_joint"),
@@ -429,7 +432,7 @@ class RewardsCfg:
"velocity_threshold": 0.1, "velocity_threshold": 0.1,
"command_threshold": 0.1, "command_threshold": 0.1,
}, },
) )
@configclass @configclass
class TerminationsCfg: class TerminationsCfg: