novaphy.Control¶
Caller-owned per-step joint control buffer. Allocate via model.control()
and pass into solver.step(state_in, state_out, control, contacts, dt).
Passing control=None uses the defaults baked into the Model where the
solver supports them. Body-level external forces and torques live on
SimState.body_f, not on Control.
Channels¶
| Channel | Description |
|---|---|
joint_f |
Per-DOF feedforward generalized force / torque inputs. |
joint_target_pos |
Per-DOF target positions. Read by solvers whose joint support includes target drives. |
joint_target_vel |
Per-DOF target velocities. Read by solvers whose joint support includes target drives. |
joint_act |
Per-DOF actuation values for mode-dependent solver paths. |
Drive mode and static gains are model data (model.joint_target_mode,
model.joint_target_ke, model.joint_target_kd, etc.), usually configured
through JointDofConfig before
ModelBuilder.finalize().
Methods¶
| Method | Description |
|---|---|
clear() |
Zero all control channels in-place. |
Example¶
control = model.control()
control.clear()
# Feedforward effort for a 1-DOF joint.
control.joint_f[0] = tau
# Per-step target override. The joint drive mode / gains come from the Model.
control.joint_target_pos[0] = q_des
solver.step(state, state, control, contacts, dt)