newton.ActuatorMode#

class newton.ActuatorMode(value)[source]#

Bases: IntEnum

Enumeration of actuator modes for joint degrees of freedom.

This enum manages UsdPhysics compliance by specifying whether joint_target_pos/vel inputs are active for a given DOF. It determines which actuators are installed when using solvers that require explicit actuator definitions (e.g., MuJoCo solver).

Note

MuJoCo general actuators (motor, general, etc.) are handled separately via custom attributes with “mujoco:actuator” frequency and control.mujoco.ctrl, not through this enum.

static from_gains(target_ke, target_kd, force_position_velocity=False, has_drive=False)#

Infer actuator mode from position and velocity gains.

Parameters:
  • target_ke (float) – Position gain (stiffness).

  • target_kd (float) – Velocity gain (damping).

  • force_position_velocity (bool) – If True and both gains are non-zero, forces POSITION_VELOCITY mode instead of just POSITION.

  • has_drive (bool) – If True, a drive/actuator is applied to the joint. When True but both gains are 0, returns EFFORT mode. When False, returns NONE regardless of gains.

Returns:

  • NONE: No drive applied

  • EFFORT: Drive applied but both gains are 0 (direct torque control)

  • POSITION: Only position gain is non-zero

  • VELOCITY: Only velocity gain is non-zero

  • POSITION_VELOCITY: Both gains non-zero (or forced)

Return type:

The inferred ActuatorMode based on which gains are non-zero

EFFORT = 4#

A drive is applied but no gains are configured. No MuJoCo actuator is created for this DOF. The user is expected to supply force via joint_f.

NONE = 0#

No actuators are installed for this DOF. The joint is passive/unactuated.

POSITION = 1#

Only a position actuator is installed for this DOF. Tracks joint_target_pos.

POSITION_VELOCITY = 3#

Both position and velocity actuators are installed. Tracks both joint_target_pos and joint_target_vel.

VELOCITY = 2#

Only a velocity actuator is installed for this DOF. Tracks joint_target_vel.