newton.sim.Control#

class newton.sim.Control[source]#

Bases: object

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.

__init__()#
clear()#

Reset the control inputs to zero.

joint_f: array | None#

Array of generalized joint forces with shape (joint_dof_count,) and type float.

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), where t_x, t_y, and t_z are the components of the torque vector (angular) and f_x, f_y, and f_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 as newton.State.body_f).

joint_target: array | None#

Array of joint targets with shape (joint_dof_count,) and type float. Joint targets define the target position or target velocity for each actuation-driven degree of freedom, depending on the corresponding joint control mode, see newton.Model.joint_dof_mode.

The joint targets are defined for any joint type, except for free joints.

muscle_activations: array | None#

Array of muscle activations with shape (muscle_count,) and type float.

Note

Support for muscle dynamics is not yet implemented.

tet_activations: array | None#

Array of tetrahedral element activations with shape with shape (tet_count,) and type ``float.

tri_activations: array | None#

Array of triangle element activations with shape (tri_count,) and type float.