(self, physics)
Sets the state of the environment at the start of each episode.

    Args:
      physics: An instance of `Physics`.
Sets the state of the environment at the start of each episode.
Sets the state of the environment at the start of each episode .
def initialize_episode(self, physics):
    """Sets the state of the environment at the start of each episode.

    Args:
      physics: An instance of `Physics`.

    """
    # Find a collision-free random initial configuration.
    penetrating = True
    while penetrating:
      randomizers.randomize_limited_and_rotational_joints(physics, self.random)
      # Check for collisions.
      physics.after_reset()
      penetrating = physics.data.ncon > 0
    super().initialize_episode(physics)
def initialize_episode ( self , physics ) : # Find a collision-free random initial configuration. penetrating = True while penetrating : randomizers . randomize_limited_and_rotational_joints ( physics , self . random ) # Check for collisions. physics . after_reset ( ) penetrating = physics . data . ncon > 0 super ( ) . initialize_episode ( physics )