newton.Control#
- class newton.Control[source]#
Bases:
objectTime-varying control data for a
Model.Time-varying control data includes joint torques, control inputs, muscle activations, and activation forces for triangle and tetrahedral elements.
The exact attributes depend on the contents of the model. Control objects should generally be created using the
newton.Model.control()function.- __init__()#
- clear()#
Reset the control inputs to zero.
- joint_f: array | None#
Array of generalized joint forces with shape
(joint_dof_count,)and typefloat.The degrees of freedom for free joints are included in this array and have the same convention as the
newton.State.body_farray where the 6D wrench is defined as(f_x, f_y, f_z, t_x, t_y, t_z), wheref_x,f_y, andf_zare the components of the force vector (linear) andt_x,t_y, andt_zare the components of the torque vector (angular). For free joints, the wrench is applied in world frame with the body’s center of mass (COM) as reference point.Note
The Featherstone solver currently applies free-joint forces in the body-origin frame instead of the center-of-mass frame, which can lead to unexpected rotation when applying linear force to a body with a non-zero COM offset.
- joint_target_pos: array | None#
Per-DOF position targets, shape
(joint_dof_count,), typefloat(optional).
- joint_target_vel: array | None#
Per-DOF velocity targets, shape
(joint_dof_count,), typefloat(optional).
- muscle_activations: array | None#
Array of muscle activations with shape
(muscle_count,)and typefloat.Note
Support for muscle dynamics is not yet implemented.