newton.actuators.ClampingDCMotor#
- class newton.actuators.ClampingDCMotor(saturation_effort, velocity_limit, max_motor_effort)[source]#
Bases:
ClampingBaseDC motor four-quadrant effort-speed saturation.
Clips drive 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 bymax_motor_effort). As velocity approachesvelocity_limit, available effort in the direction of motion drops to zero.- evaluate_clamp(value, q, qd, params, i, base)#
Implicit-solve entry point; params row is
[saturation, velocity_limit, max_effort].Inside the implicit solve
qdis the predicted end-of-step velocity, so the effort-speed envelope is enforced self-consistently.
- classmethod resolve_arguments(args)#
- __init__(saturation_effort, velocity_limit, max_motor_effort)#
Initialize DC motor saturation.
- Parameters:
saturation_effort (wp.array[wp.float32]) – Peak motor effort at stall [N·m or N]. Shape
(N,).velocity_limit (wp.array[wp.float32]) – Maximum joint velocity [rad/s or m/s] for the effort-speed curve. Shape
(N,).max_motor_effort (wp.array[wp.float32]) – Effort limit for the effort-speed curve [N·m or N]. Shape
(N,).
- bind_params(block)#
- modify_forces(src_forces, dst_forces, positions, velocities, pos_indices, vel_indices, device=None)#
- param_width()#
- property corner_velocity: wp.array[wp.float32]#
Deprecated. Velocity at which the envelope reaches
max_motor_effort.Deprecated since version 1.6: Kept for compatibility and computed on access from the current parameters. It used to be stored at construction, which went stale when a parameter was retuned, so the clamp now derives it in-kernel and never reads this attribute.