(self, num_action_repeat, sim_step=0.001)
Sets the time step of the environment.

    Args:
      num_action_repeat: The number of simulation steps/action repeats to be
        executed when calling env.step().
      sim_step: The simulation time step in PyBullet. By default, the simulation
        step is 0.001s, which is a good trade-off between simulation speed and
        accuracy.

    Raises:
      ValueError: If the num_action_repeat is less than 1.
Sets the time step of the environment.
Sets the time step of the environment .
def set_time_step(self, num_action_repeat, sim_step=0.001):
    """Sets the time step of the environment.

    Args:
      num_action_repeat: The number of simulation steps/action repeats to be
        executed when calling env.step().
      sim_step: The simulation time step in PyBullet. By default, the simulation
        step is 0.001s, which is a good trade-off between simulation speed and
        accuracy.

    Raises:
      ValueError: If the num_action_repeat is less than 1.
    """
    if num_action_repeat < 1:
      raise ValueError('number of action repeats should be at least 1.')
    self._sim_time_step = sim_step
    self._num_action_repeat = num_action_repeat
    self._env_time_step = sim_step * num_action_repeat
    self._num_bullet_solver_iterations = (_NUM_SIMULATION_ITERATION_STEPS /
                                          self._num_action_repeat)
    self._pybullet_client.setPhysicsEngineParameter(
        numSolverIterations=int(np.round(self._num_bullet_solver_iterations)))
    self._pybullet_client.setTimeStep(self._sim_time_step)
    self._robot.SetTimeSteps(self._num_action_repeat, self._sim_time_step)
def set_time_step ( self , num_action_repeat , sim_step = 0.001 ) : if num_action_repeat < 1 : raise ValueError ( 'number of action repeats should be at least 1.' ) self . _sim_time_step = sim_step self . _num_action_repeat = num_action_repeat self . _env_time_step = sim_step * num_action_repeat self . _num_bullet_solver_iterations = ( _NUM_SIMULATION_ITERATION_STEPS / self . _num_action_repeat ) self . _pybullet_client . setPhysicsEngineParameter ( numSolverIterations = int ( np . round ( self . _num_bullet_solver_iterations ) ) ) self . _pybullet_client . setTimeStep ( self . _sim_time_step ) self . _robot . SetTimeSteps ( self . _num_action_repeat , self . _sim_time_step )