newton.actuators.ClampingDCMotor#

class newton.actuators.ClampingDCMotor(saturation_effort, velocity_limit, max_motor_effort)[source]#

Bases: Clamping

DC motor four-quadrant effort-speed saturation.

Clips controller output using the linear effort-speed characteristic:

effort_max(vel) = min(saturation_effort * (1 - vel / velocity_limit),  max_motor_effort)
effort_min(vel) = max(saturation_effort * (-1 - vel / velocity_limit), -max_motor_effort)

At zero velocity the motor can produce up to ±saturation_effort (capped by max_motor_effort). As velocity approaches velocity_limit, available effort in the direction of motion drops to zero.

classmethod resolve_arguments(args)#
__init__(saturation_effort, velocity_limit, max_motor_effort)#

Initialize DC motor saturation.

Parameters:
  • saturation_effort (wp.array(dtype=wp.float32, ndim=1)) – Peak motor effort at stall [N·m or N]. Shape (N,).

  • velocity_limit (wp.array(dtype=wp.float32, ndim=1)) – Maximum joint velocity [rad/s or m/s] for the effort-speed curve. Shape (N,).

  • max_motor_effort (wp.array(dtype=wp.float32, ndim=1)) – Effort limit for the effort-speed curve [N·m or N]. Shape (N,).

modify_forces(src_forces, dst_forces, positions, velocities, pos_indices, vel_indices, device=None)#