Skip to content

Commit

Permalink
fixing observation history shuffling bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xbpeng authored Jan 9, 2023
1 parent da6cf2e commit de18a56
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ase/env/tasks/humanoid_amp.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,11 @@ def _set_env_state(self, env_ids, root_pos, root_rot, dof_pos, root_vel, root_an

def _update_hist_amp_obs(self, env_ids=None):
if (env_ids is None):
self._hist_amp_obs_buf[:] = self._amp_obs_buf[:, 0:(self._num_amp_obs_steps - 1)]
for i in reversed(range(self._amp_obs_buf.shape[1] - 1)):
self._amp_obs_buf[:, i + 1] = self._amp_obs_buf[:, i]
else:
self._hist_amp_obs_buf[env_ids] = self._amp_obs_buf[env_ids, 0:(self._num_amp_obs_steps - 1)]
for i in reversed(range(self._amp_obs_buf.shape[1] - 1)):
self._amp_obs_buf[env_ids, i + 1] = self._amp_obs_buf[env_ids, i]
return

def _compute_amp_observations(self, env_ids=None):
Expand Down

0 comments on commit de18a56

Please sign in to comment.