fix bugs in actions; update readme.
This commit is contained in:
@@ -64,7 +64,7 @@ class ActionDelayGo2Env(ManagerBasedRLEnv):
|
||||
self._sim_step_counter += 1
|
||||
|
||||
# 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)
|
||||
|
||||
# set actions into buffers
|
||||
|
||||
@@ -9,7 +9,10 @@ class ActionManagerWithDelay(ActionManager):
|
||||
|
||||
def reset(self, env_ids: Sequence[int] | None = None) -> dict[str, torch.Tensor]:
|
||||
super().reset(env_ids)
|
||||
self._prev_prev_action.zero_()
|
||||
if env_ids is None:
|
||||
self._prev_prev_action.zero_()
|
||||
else:
|
||||
self._prev_prev_action[env_ids] = 0.0
|
||||
return {}
|
||||
|
||||
def process_action(self, action: torch.Tensor):
|
||||
|
||||
Reference in New Issue
Block a user