Sets the state of the environment at the start of each episode. Args: physics: An instance of `Physics`.
(self, physics)
| 150 | super().__init__(random=random) |
| 151 | |
| 152 | def initialize_episode(self, physics): |
| 153 | """Sets the state of the environment at the start of each episode. |
| 154 | |
| 155 | Args: |
| 156 | physics: An instance of `Physics`. |
| 157 | |
| 158 | """ |
| 159 | # Find a collision-free random initial configuration. |
| 160 | penetrating = True |
| 161 | while penetrating: |
| 162 | randomizers.randomize_limited_and_rotational_joints(physics, self.random) |
| 163 | # Check for collisions. |
| 164 | physics.after_reset() |
| 165 | penetrating = physics.data.ncon > 0 |
| 166 | super().initialize_episode(physics) |
| 167 | |
| 168 | def get_observation(self, physics): |
| 169 | """Returns either the pure state or a set of egocentric features.""" |
nothing calls this directly
no test coverage detected