newton.Control#
- class newton.Control#
Time-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.Methods
Attributes
Array of generalized joint forces with shape
(joint_dof_count,)
and typefloat
.Array of joint targets with shape
(joint_axis_count,)
and typefloat
.Array of triangle element activations with shape
(tri_count,)
and typefloat
.Array of tetrahedral element activations with shape with shape
(tet_count,) and type ``float
.Array of muscle activations with shape
(muscle_count,)
and typefloat
.- __init__()#
- 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_f
array where the 6D wrench is defined as(t_x, t_y, t_z, f_x, f_y, f_z)
, wheret_x
,t_y
, andt_z
are the components of the torque vector (angular) andf_x
,f_y
, andf_z
are the components of the force vector (linear). Both linear forces and angular torques applied to free joints are applied in world frame (same asnewton.State.body_f
).
- joint_target: array | None#
Array of joint targets with shape
(joint_axis_count,)
and typefloat
. Joint targets define the target position or target velocity for each actuation-driven degree of freedom, depending on the corresponding joint control mode, seenewton.Model.joint_axis_mode
.The joint targets are defined for any joint type, except for free joints.
- tri_activations: array | None#
Array of triangle element activations with shape
(tri_count,)
and typefloat
.
- tet_activations: array | None#
Array of tetrahedral element activations with shape with shape
(tet_count,) and type ``float
.
- muscle_activations: array | None#
Array of muscle activations with shape
(muscle_count,)
and typefloat
.Note
Support for muscle dynamics is not yet implemented.
- clear()#
Reset the control inputs to zero.