(joint)
return joint.root.actuator.add(
      'velocity',
      joint=joint,
      name=joint.name,
      kv=_VELOCITY_GAIN,
      ctrllimited=True,
      ctrlrange=(-max_velocity, max_velocity),
      forcelimited=True,
      forcerange=(-max_torque, max_torque))
Adds a velocity actuator to a joint, returns the new MJCF element.
Adds a velocity actuator to a joint, returns the new MJCF element.
Adds a velocity actuator to a joint returns the new MJCF element .
def _add_velocity_actuator(joint):
  """Adds a velocity actuator to a joint, returns the new MJCF element."""

  if joint.name in _LARGE_JOINTS:
    max_torque = _LARGE_JOINT_MAX_TORQUE
    max_velocity = _LARGE_JOINT_MAX_VELOCITY
  elif joint.name in _SMALL_JOINTS:
    max_torque = _SMALL_JOINT_MAX_TORQUE
    max_velocity = _SMALL_JOINT_MAX_VELOCITY
  else:
    raise ValueError('`joint.name` must be one of {}, got {!r}.'
                     .format(_ALL_JOINTS, joint.name))
  return joint.root.actuator.add(
      'velocity',
      joint=joint,
      name=joint.name,
      kv=_VELOCITY_GAIN,
      ctrllimited=True,
      ctrlrange=(-max_velocity, max_velocity),
      forcelimited=True,
      forcerange=(-max_torque, max_torque))
def _add_velocity_actuator ( joint ) : if joint . name in _LARGE_JOINTS : max_torque = _LARGE_JOINT_MAX_TORQUE max_velocity = _LARGE_JOINT_MAX_VELOCITY elif joint . name in _SMALL_JOINTS : max_torque = _SMALL_JOINT_MAX_TORQUE max_velocity = _SMALL_JOINT_MAX_VELOCITY else : raise ValueError ( '`joint.name` must be one of {}, got {!r}.' . format ( _ALL_JOINTS , joint . name ) ) return joint . root . actuator . add ( 'velocity' , joint = joint , name = joint . name , kv = _VELOCITY_GAIN , ctrllimited = True , ctrlrange = ( - max_velocity , max_velocity ) , forcelimited = True , forcerange = ( - max_torque , max_torque ) )