(self)
| 108 | return torch.clamp(self.obs_tensor, -self.clip_obs, self.clip_obs), self.rewards_tensor, self.resets_tensor, [] |
| 109 | |
| 110 | def reset(self): |
| 111 | actions = 0.01 * (1 - 2 * torch.rand([self.task.num_envs, self.task.num_actions], dtype=torch.float32, device=self.rl_device)) |
| 112 | actions_tensor = gymtorch.unwrap_tensor(actions) |
| 113 | |
| 114 | # step the simulator |
| 115 | self.task.step(actions_tensor) |
| 116 | |
| 117 | return torch.clamp(self.obs_tensor, -self.clip_obs, self.clip_obs) |
| 118 | |
| 119 | |
| 120 | # Python CPU/GPU Class |