Skip to content

novaphy.actuators.Actuator

Composed actuator that writes ControllerPD effort into control.joint_f for the configured DOF indices.

Actuator(indices, controller: ControllerPD)

Methods

Method Description
step(sim_state, sim_control, current_act_state=None, next_act_state=None, dt=None) Compute effort and write to sim_control.joint_f.

Example

from novaphy import actuators
ctrl = actuators.ControllerPD(kp=[10.0], kd=[0.5])
actuator = actuators.Actuator(indices=[0], controller=ctrl)

control.joint_f.fill_zero()
actuator.step(state, control)
solver.step(state, state, control, contacts, dt)

step() adds into joint_f; clear or restore that channel before calling it when effort should not accumulate. The same indices select joint_q and joint_qd, so this helper is intended for coordinates with matching q/qd indices (commonly 1-DOF joints), not general nq != nv layouts. It currently uses NumPy and requires CPU-resident buffers.

See Also