fix: remove broken feet_air_time override, use base class
This commit is contained in:
@@ -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 总和。"""
|
||||
|
||||
Reference in New Issue
Block a user