parameters: (self)
return_statement: return np.array(self._get_observation()), reward, done, {}
docstring: Make the robot stand up to its two legs when started on 4 legs.
  
      This method is similar to the step function, but instead of using the action
      provided, it uses a hand-coded policy to make the robot stand up to its
      two legs. Once the robot is vertical enough it exits and leaves the
      environment to the typical step function that uses agent's actions.
  
      Returns:
        observations: The angles, velocities and torques of all motors.
        reward: The reward for the current state-action pair.
        done: Whether the episode has ended.
        info: A dictionary that stores diagnostic information.
docstring_summary: Make the robot stand up to its two legs when started on 4 legs.
docstring_tokens: Make the robot stand up to its two legs when started on 4 legs .
function: def _stand_up(self):
      """Make the robot stand up to its two legs when started on 4 legs.
  
      This method is similar to the step function, but instead of using the action
      provided, it uses a hand-coded policy to make the robot stand up to its
      two legs. Once the robot is vertical enough it exits and leaves the
      environment to the typical step function that uses agent's actions.
  
      Returns:
        observations: The angles, velocities and torques of all motors.
        reward: The reward for the current state-action pair.
        done: Whether the episode has ended.
        info: A dictionary that stores diagnostic information.
      """
      for t in range(5000):
        if self._is_render:
          base_pos = self.minitaur.GetBasePosition()
          self._pybullet_client.resetDebugVisualizerCamera(self._cam_dist, self._cam_yaw,
                                                           self._cam_pitch, base_pos)
        state = self._get_true_observation()
        action = self._policy_flip(t, state[24:28])
        self.minitaur.ApplyAction(action)
        self._pybullet_client.stepSimulation()
        self.minitaur.ReceiveObservation()
        if self._is_render:
          time.sleep(self._time_step)
        self._env_step_counter += 1
        reward = self._reward()
        if reward > 0.9:
          break
      done = self._termination()
      return np.array(self._get_observation()), reward, done, {}
function_tokens: def _stand_up ( self ) : for t in range ( 5000 ) : if self . _is_render : base_pos = self . minitaur . GetBasePosition ( ) self . _pybullet_client . resetDebugVisualizerCamera ( self . _cam_dist , self . _cam_yaw , self . _cam_pitch , base_pos ) state = self . _get_true_observation ( ) action = self . _policy_flip ( t , state [ 24 : 28 ] ) self . minitaur . ApplyAction ( action ) self . _pybullet_client . stepSimulation ( ) self . minitaur . ReceiveObservation ( ) if self . _is_render : time . sleep ( self . _time_step ) self . _env_step_counter += 1 reward = self . _reward ( ) if reward > 0.9 : break done = self . _termination ( ) return np . array ( self . _get_observation ( ) ) , reward , done , { }