(physics, actuator_names)
Removes any stateless actuators from the list of actuator names.
Removes any stateless actuators from the list of actuator names.
Removes any stateless actuators from the list of actuator names .
def _filter_stateful_actuators(physics, actuator_names):
  """Removes any stateless actuators from the list of actuator names."""
  if physics.model.na:
    # MuJoCo requires that stateful actuators always come after stateless
    # actuators in the model, so we keep actuator names only if their
    # corresponding IDs are >= to the total number of stateless actuators.
    num_stateless_actuators = physics.model.nu - physics.model.na
    return [
        name for name in actuator_names
        if physics.model.name2id(name, 'actuator') >= num_stateless_actuators]
  else:
    return []
def _filter_stateful_actuators ( physics , actuator_names ) : if physics . model . na : # MuJoCo requires that stateful actuators always come after stateless # actuators in the model, so we keep actuator names only if their # corresponding IDs are >= to the total number of stateless actuators. num_stateless_actuators = physics . model . nu - physics . model . na return [ name for name in actuator_names if physics . model . name2id ( name , 'actuator' ) >= num_stateless_actuators ] else : return [ ]