newton.ModelFlags#
- class newton.ModelFlags(*values)[source]#
Bases:
IntEnumFlags indicating which parts of the model have been updated.
These flags are used with
notify_model_changed()to specify which properties have changed, allowing the solver to efficiently update only the necessary components.Categories overlap semantically, but each flag has its own bit. The broad
JOINT_DOF_PROPERTIESincludes force, inertial, and reference-pose updates. Testing the broad bit alone does not detect a narrower notification.- ACTUATOR_PROPERTIES = 256#
gains, biases, limits, etc.
- Type:
Indicates actuator property updates
- ALL = 4095#
Indicates all property updates.
- BODY_INERTIAL_PROPERTIES = 8#
body_com, body_inertia, body_inv_inertia, body_mass, body_inv_mass.
- Type:
Indicates body inertial property updates
- BODY_PROPERTIES = 4#
body_q, body_qd, body_flags.
- Type:
Indicates body property updates
- CONSTRAINT_PROPERTIES = 64#
equality constraints (mujoco.equality_constraint_anchor, mujoco.equality_constraint_relpose, mujoco.equality_constraint_polycoef, mujoco.equality_constraint_torquescale, mujoco.equality_constraint_enabled, mujoco.eq_solref, mujoco.eq_solimp), mimic relationships (joint_mimic_coeffs and the deprecated constraint_mimic_coef0, constraint_mimic_coef1, constraint_mimic_enabled arrays), and particle-body attachments (attachment_particle_body_stiffness, attachment_particle_body_damping, attachment_particle_body_enabled).
- Type:
Indicates constraint property updates
- JOINT_DOF_FORCE_PROPERTIES = 512#
friction, damping, target gains/modes, effort limits, passive stiffness, and limit coefficients/bounds. Excludes armature and reference poses.
- Type:
Indicates joint force updates
- JOINT_DOF_INERTIAL_PROPERTIES = 1024#
Indicates joint_armature updates. MuJoCo recomputes constants; use at reset or for domain randomization rather than every step.
- JOINT_DOF_PROPERTIES = 2#
joint_target_ke, joint_target_kd, joint_damping, joint_effort_limit, joint_armature, joint_friction, joint_limit_ke, joint_limit_kd, joint_limit_lower, joint_limit_upper.
- Type:
Indicates all joint DOF updates, including force, armature, and reference-pose properties
- JOINT_PROPERTIES = 1#
joint_q, joint_X_p, joint_X_c, joint_axis.
- Type:
Indicates joint property updates
- JOINT_REFERENCE_POSE_PROPERTIES = 2048#
Indicates joint reference-pose and spring-reference updates. Excludes joint transforms, force parameters, and armature. MuJoCo recomputes constants; use at reset or for domain randomization rather than every step.
- MODEL_PROPERTIES = 32#
gravity and other global parameters.
- Type:
Indicates model property updates
- SHAPE_PROPERTIES = 16#
shape_transform, shape_scale, shape_collision_radius, shape_material_mu, shape_material_ke, shape_material_kd, rigid_contact_mu_torsional, rigid_contact_mu_rolling.
- Type:
Indicates shape property updates
- TENDON_PROPERTIES = 128#
eg tendon_stiffness.
- Type:
Indicates tendon properties