| 124 | return torch.clamp(self.task.states_buf, -self.clip_obs, self.clip_obs).to(self.rl_device) |
| 125 | |
| 126 | def step(self, actions): |
| 127 | actions_tensor = torch.clamp(actions, -self.clip_actions, self.clip_actions) |
| 128 | |
| 129 | self.task.step(actions_tensor) |
| 130 | |
| 131 | return torch.clamp(self.task.obs_buf, -self.clip_obs, self.clip_obs).to(self.rl_device), self.task.rew_buf.to(self.rl_device), self.task.reset_buf.to(self.rl_device), self.task.extras |
| 132 | |
| 133 | def reset(self): |
| 134 | actions = 0.01 * (1 - 2 * torch.rand([self.task.num_envs, self.task.num_actions], dtype=torch.float32, device=self.rl_device)) |