(physics)
return specs.BoundedArray(
      shape=(num_actions,), dtype=np.float, minimum=minima, maximum=maxima)
Returns a `BoundedArraySpec` matching the `physics` actuators.
Returns a `BoundedArraySpec` matching the `physics` actuators.
Returns a BoundedArraySpec matching the physics actuators .
def action_spec(physics):
  """Returns a `BoundedArraySpec` matching the `physics` actuators."""
  num_actions = physics.model.nu
  is_limited = physics.model.actuator_ctrllimited.ravel().astype(np.bool)
  control_range = physics.model.actuator_ctrlrange
  minima = np.full(num_actions, fill_value=-constants.mjMAXVAL, dtype=np.float)
  maxima = np.full(num_actions, fill_value=constants.mjMAXVAL, dtype=np.float)
  minima[is_limited], maxima[is_limited] = control_range[is_limited].T

  return specs.BoundedArray(
      shape=(num_actions,), dtype=np.float, minimum=minima, maximum=maxima)
def action_spec ( physics ) : num_actions = physics . model . nu is_limited = physics . model . actuator_ctrllimited . ravel ( ) . astype ( np . bool ) control_range = physics . model . actuator_ctrlrange minima = np . full ( num_actions , fill_value = - constants . mjMAXVAL , dtype = np . float ) maxima = np . full ( num_actions , fill_value = constants . mjMAXVAL , dtype = np . float ) minima [ is_limited ] , maxima [ is_limited ] = control_range [ is_limited ] . T return specs . BoundedArray ( shape = ( num_actions , ) , dtype = np . float , minimum = minima , maximum = maxima )