fix bugs in actions; update readme.

This commit is contained in:
wertyuilife
2026-03-31 00:19:10 +08:00
parent 89dce4524c
commit fea45ce4bd
3 changed files with 7 additions and 2 deletions

View File

@@ -159,6 +159,8 @@ xml_path: "{ROOT_DIR}/resources/go2/your-custom-scene.xml"
- Different terrain composition - Different terrain composition
- Different tracking reward formulation (fixed sigma vs. dynamic sigma) - Different tracking reward formulation (fixed sigma vs. dynamic sigma)
- Lack domain_rand: randomize_motor_zero_offset
- Lack domain_rand: randomize_motor_strength
--- ---

View File

@@ -64,7 +64,7 @@ class ActionDelayGo2Env(ManagerBasedRLEnv):
self._sim_step_counter += 1 self._sim_step_counter += 1
# determine which envs should apply delayed action at this decimation step # determine which envs should apply delayed action at this decimation step
action_delay_masks = (i <= actions_start_decimation) action_delay_masks = (i < actions_start_decimation)
self.action_manager.process_action_with_delay(action_delay_masks) self.action_manager.process_action_with_delay(action_delay_masks)
# set actions into buffers # set actions into buffers

View File

@@ -9,7 +9,10 @@ class ActionManagerWithDelay(ActionManager):
def reset(self, env_ids: Sequence[int] | None = None) -> dict[str, torch.Tensor]: def reset(self, env_ids: Sequence[int] | None = None) -> dict[str, torch.Tensor]:
super().reset(env_ids) super().reset(env_ids)
if env_ids is None:
self._prev_prev_action.zero_() self._prev_prev_action.zero_()
else:
self._prev_prev_action[env_ids] = 0.0
return {} return {}
def process_action(self, action: torch.Tensor): def process_action(self, action: torch.Tensor):