Tune DreamWaQ gait rewards

This commit is contained in:
8x54zj-m
2026-07-22 02:22:04 +08:00
parent 3648551043
commit 00cb6f9857

View File

@@ -124,8 +124,8 @@ class DreamWaQCfg(Go1WalkNpEnvCfg):
"ang_vel_xy": -0.10, # 抑制晃动 "ang_vel_xy": -0.10, # 抑制晃动
"orientation": -0.5, # 强制平稳姿态 "orientation": -0.5, # 强制平稳姿态
"dof_acc": -2.5e-7, "dof_acc": -2.5e-7,
"base_height": -10.0, # 强惩罚身高偏差,避免蹲伏或踮脚 "base_height": -5.0,
"feet_air_time": 0.1, "feet_air_time": 0.03,
"action_rate": -0.01, "action_rate": -0.01,
"joint_power": -2e-5, "joint_power": -2e-5,
"smoothness": -0.02, "smoothness": -0.02,
@@ -768,7 +768,7 @@ class DreamWaQTask(Go1WalkTask):
air_time = info.get("air_time_at_contact") air_time = info.get("air_time_at_contact")
if first_contact is None or air_time is None: if first_contact is None or air_time is None:
return np.zeros(self._num_envs, dtype=np.float32) return np.zeros(self._num_envs, dtype=np.float32)
rew = np.sum((air_time - 0.5) * first_contact, axis=1) rew = np.sum(np.maximum(air_time - 0.25, 0.0) * first_contact, axis=1)
rew *= np.linalg.norm(commands[:, :2], axis=1) > 0.1 rew *= np.linalg.norm(commands[:, :2], axis=1) > 0.1
return rew return rew