From f2a8e0e2ff0cd4236606b9ffbe61430209eea42d Mon Sep 17 00:00:00 2001 From: 8x54zj-m <8x54zj-m@motrixlab.local> Date: Tue, 30 Jun 2026 15:03:52 +0800 Subject: [PATCH] fix: remove broken feet_air_time override, use base class --- .../src/motrix_envs/locomotion/go1/dreamwaq.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/motrix_envs/src/motrix_envs/locomotion/go1/dreamwaq.py b/motrix_envs/src/motrix_envs/locomotion/go1/dreamwaq.py index 1cdac59..766dd55 100644 --- a/motrix_envs/src/motrix_envs/locomotion/go1/dreamwaq.py +++ b/motrix_envs/src/motrix_envs/locomotion/go1/dreamwaq.py @@ -547,15 +547,8 @@ class DreamWaQTask(Go1WalkTask): # stand_still 在上游被注释掉 } - def _reward_feet_air_time(self, commands, info): - """足部腾空时间奖励——与上游 legged_robot.py 公式一致。""" - first_contact = info.get("first_contact") - air_time = info.get("air_time_at_contact") - if first_contact is None or air_time is None: - return np.zeros(self._num_envs, dtype=np.float32) - rew = np.sum((air_time - 0.5) * first_contact, axis=1) - rew *= np.linalg.norm(commands[:, :2], axis=1) > 0.1 - return rew + # _reward_feet_air_time 使用基类实现(walk_np.py), + # 之前 override 读了不存在的 key 导致 reward 永远为 0 def update_reward(self, state): """存储各项奖励到 TensorBoard + 累计 episode 总和。"""