newton.actuators.DrivePD#
- class newton.actuators.DrivePD(kp, kd, const_effort=None, *, output_space=DriveOutputSpace.EFFORT)[source]#
Bases:
DriveBaseStateless proportional-derivative actuator drive.
Effort law:
effort = const_effort + feedforward + kp * (target_pos - current_pos) + kd * (target_vel - current_vel)
- evaluate_force(q, qd, target_q, target_qd, feedforward, params, i)#
Uniform force entry point for the implicit solver (params = [kp, kd, const]).
- classmethod resolve_arguments(args)#
- __init__(kp, kd, const_effort=None, *, output_space=DriveOutputSpace.EFFORT)#
Initialize the PD drive.
- Parameters:
kp (wp.array[wp.float32]) – Proportional gains [N/m or N·m/rad]. Shape
(N,).kd (wp.array[wp.float32]) – Derivative gains [N·s/m or N·m·s/rad]. Shape
(N,).const_effort (wp.array[wp.float32] | None) – Constant bias in the selected output units. Shape
(N,).Noneto skip.output_space (DriveOutputSpace) – EFFORT or DUTY. Gains and feedforward must produce these units; DUTY gains use duty in place of N or N·m above.
- bind_params()#
- compute(positions, velocities, target_pos, target_vel, feedforward, pos_indices, vel_indices, target_pos_indices, target_vel_indices, output, state, dt, device=None, *, custom_inputs=None)#
- is_graphable()#
- is_stateful()#