Added mjData.eq_active user input variable, for enabling/disabling the state of equality constraints.
Renamed `mjModel.eq_active` to `mjModel.eq_active0`, which now has the semantic of "initial value of `mjData.eq_active`". Fixes #876. PiperOrigin-RevId: 570410643 Change-Id: Id03171e751377c7cc453f143abee64239ee2e2ed
This commit is contained in:
committed by
Copybara-Service
parent
177aec68dc
commit
ee78b8f76b
@@ -3854,8 +3854,8 @@ geoms volumes of either body. This constraint can be used to define ball joints
|
||||
|
||||
:at:`active`: :at-val:`[false, true], "true"`
|
||||
If this attribute is set to "true", the constraint is active and the constraint solver will try to enforce it. The
|
||||
corresponding field in mjModel is mjData.eq_active. This field can be used at runtime to turn specific constraints on
|
||||
an off.
|
||||
field :ref:`mjModel.eq_active0<mjModel>` corresponds to this value, and is used to initialize
|
||||
:ref:`mjData.eq_active<mjData>`, which is user-settable at runtime.
|
||||
|
||||
.. _equality-connect-solref:
|
||||
|
||||
@@ -3920,7 +3920,8 @@ of the other body, without any joint elements in the child body.
|
||||
|
||||
:at:`body2`: :at-val:`string, optional`
|
||||
Name of the second body. If this attribute is omitted, the second body is the world body. Welding a body to the world
|
||||
and changing the corresponding component of mjModel.eq_active at runtime can be used to fix the body temporarily.
|
||||
and changing the corresponding component of :ref:`mjData.eq_active<mjData>` at runtime can be used to fix the body
|
||||
temporarily.
|
||||
|
||||
.. _equality-weld-relpose:
|
||||
|
||||
|
||||
+17
-11
@@ -88,25 +88,31 @@ General
|
||||
|
||||
**Migration:** Users should use the :at:`cable` and :at:`shell` elasticity plugins.
|
||||
|
||||
12. Added a new :ref:`dyntype<actuator-general-dyntype>`, ``filterexact``, which updates first-order filter states with
|
||||
12. Added :ref:`mjData.eq_active<mjData>` user input variable, for enabling/disabling the state of equality
|
||||
constraints. Renamed ``mjModel.eq_active`` to :ref:`mjModel.eq_active0<mjModel>`, which now has the semantic of
|
||||
"initial value of `mjData.eq_active`". Fixes `#876 <https://github.com/google-deepmind/mujoco/issues/876>`__
|
||||
|
||||
**Migration:** Replace uses of ``mjModel.eq_active`` with ``mjData.eq_active``.
|
||||
|
||||
13. Added a new :ref:`dyntype<actuator-general-dyntype>`, ``filterexact``, which updates first-order filter states with
|
||||
the exact formula rather than with Euler integration.
|
||||
13. Added an actuator attribute, :ref:`actearly<actuator-general-actearly>`, which uses semi-implicit integration for
|
||||
14. Added an actuator attribute, :ref:`actearly<actuator-general-actearly>`, which uses semi-implicit integration for
|
||||
actuator forces: using the next step's actuator state to compute the current actuator forces at the current timestep.
|
||||
14. Renamed ``actuatorforcerange`` and ``actuatorforcelimited``, introduced in the previous version to
|
||||
15. Renamed ``actuatorforcerange`` and ``actuatorforcelimited``, introduced in the previous version to
|
||||
:ref:`actuatorfrcrange<body-joint-actuatorfrcrange>` and
|
||||
:ref:`actuatorfrclimited<body-joint-actuatorfrclimited>`, respectively.
|
||||
15. Added the flag :ref:`eulerdamp<option-flag-eulerdamp>`, which disables implicit integration of joint damping in the
|
||||
16. Added the flag :ref:`eulerdamp<option-flag-eulerdamp>`, which disables implicit integration of joint damping in the
|
||||
Euler integrator. See the :ref:`Numerical Integration<geIntegration>` section for more details.
|
||||
16. Added the flag :ref:`invdiscrete<option-flag-invdiscrete>`, which enables discrete-time inverse dynamics for all
|
||||
17. Added the flag :ref:`invdiscrete<option-flag-invdiscrete>`, which enables discrete-time inverse dynamics for all
|
||||
:ref:`integrators<option-integrator>` other than ``RK4``. See the flag documentation for more details.
|
||||
17. Added :ref:`ls_iterations<option-ls_iterations>` and :ref:`ls_tolerance<option-ls_tolerance>` options for adjusting
|
||||
18. Added :ref:`ls_iterations<option-ls_iterations>` and :ref:`ls_tolerance<option-ls_tolerance>` options for adjusting
|
||||
linesearch stopping criteria in CG and Newton solvers. These can be useful for performance tuning.
|
||||
18. Added ``mesh_pos`` and ``mesh_quat`` fields to :ref:`mjModel` to store the normalizing transformation applied to
|
||||
19. Added ``mesh_pos`` and ``mesh_quat`` fields to :ref:`mjModel` to store the normalizing transformation applied to
|
||||
mesh assets. Fixes `#409 <https://github.com/google-deepmind/mujoco/issues/409>`__ .
|
||||
19. Added camera :ref:`resolution<body-camera-resolution>` attribute and :ref:`camprojection<sensor-camprojection>`
|
||||
20. Added camera :ref:`resolution<body-camera-resolution>` attribute and :ref:`camprojection<sensor-camprojection>`
|
||||
sensor. If camera resolution is set to positive values, the camera projection sensor will report the location of a
|
||||
target site, projected onto the camera image, in pixel coordinates.
|
||||
20. Added :ref:`camera<body-camera>` calibration attributes:
|
||||
21. Added :ref:`camera<body-camera>` calibration attributes:
|
||||
|
||||
- The new attributes are :ref:`resolution<body-camera-resolution>`, :ref:`focal<body-camera-focal>`,
|
||||
:ref:`focalpixel<body-camera-focalpixel>`, :ref:`principal<body-camera-principal>`,
|
||||
@@ -119,13 +125,13 @@ General
|
||||
Python bindings
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
21. Fixed `#870 <https://github.com/google-deepmind/mujoco/issues/870>`__ where calling ``update_scene`` with an invalid
|
||||
22. Fixed `#870 <https://github.com/google-deepmind/mujoco/issues/870>`__ where calling ``update_scene`` with an invalid
|
||||
camera name used the default camera.
|
||||
|
||||
Bug fixes
|
||||
^^^^^^^^^
|
||||
|
||||
22. Fixed a bug that was causing :ref:`geom margin<body-geom-margin>` to be ignored during the construction of
|
||||
23. Fixed a bug that was causing :ref:`geom margin<body-geom-margin>` to be ignored during the construction of
|
||||
midphase collision trees.
|
||||
|
||||
|
||||
|
||||
+13
-10
@@ -25,18 +25,20 @@ typedef enum mjtState_ { // state elements
|
||||
mjSTATE_CTRL = 1<<5, // control
|
||||
mjSTATE_QFRC_APPLIED = 1<<6, // applied generalized force
|
||||
mjSTATE_XFRC_APPLIED = 1<<7, // applied Cartesian force/torque
|
||||
mjSTATE_MOCAP_POS = 1<<8, // positions of mocap bodies
|
||||
mjSTATE_MOCAP_QUAT = 1<<9, // orientations of mocap bodies
|
||||
mjSTATE_USERDATA = 1<<10, // user data
|
||||
mjSTATE_PLUGIN = 1<<11, // plugin state
|
||||
mjSTATE_EQ_ACTIVE = 1<<8, // enable/disable constraints
|
||||
mjSTATE_MOCAP_POS = 1<<9, // positions of mocap bodies
|
||||
mjSTATE_MOCAP_QUAT = 1<<10, // orientations of mocap bodies
|
||||
mjSTATE_USERDATA = 1<<11, // user data
|
||||
mjSTATE_PLUGIN = 1<<12, // plugin state
|
||||
|
||||
mjNSTATE = 12, // number of state elements
|
||||
mjNSTATE = 13, // number of state elements
|
||||
|
||||
// convenience values for commonly used state specifications
|
||||
mjSTATE_PHYSICS = mjSTATE_QPOS | mjSTATE_QVEL | mjSTATE_ACT,
|
||||
mjSTATE_FULLPHYSICS = mjSTATE_PHYSICS | mjSTATE_TIME | mjSTATE_PLUGIN,
|
||||
mjSTATE_USER = mjSTATE_CTRL | mjSTATE_QFRC_APPLIED | mjSTATE_XFRC_APPLIED |
|
||||
mjSTATE_MOCAP_POS | mjSTATE_MOCAP_QUAT | mjSTATE_USERDATA,
|
||||
mjSTATE_EQ_ACTIVE | mjSTATE_MOCAP_POS | mjSTATE_MOCAP_QUAT |
|
||||
mjSTATE_USERDATA,
|
||||
mjSTATE_INTEGRATION = mjSTATE_FULLPHYSICS | mjSTATE_USER | mjSTATE_WARMSTART
|
||||
} mjtState;
|
||||
typedef enum mjtWarning_ { // warning types
|
||||
@@ -191,6 +193,7 @@ struct mjData_ {
|
||||
mjtNum* ctrl; // control (nu x 1)
|
||||
mjtNum* qfrc_applied; // applied generalized force (nv x 1)
|
||||
mjtNum* xfrc_applied; // applied Cartesian force/torque (nbody x 6)
|
||||
mjtByte* eq_active; // enable/disable constraints (neq x 1)
|
||||
|
||||
// mocap data
|
||||
mjtNum* mocap_pos; // positions of mocap bodies (nmocap x 3)
|
||||
@@ -207,8 +210,8 @@ struct mjData_ {
|
||||
mjtNum* sensordata; // sensor data array (nsensordata x 1)
|
||||
|
||||
// plugins
|
||||
int* plugin; // copy of m->plugin, required for deletion (nplugin x 1)
|
||||
uintptr_t* plugin_data; // pointer to plugin-managed data structure (nplugin x 1)
|
||||
int* plugin; // copy of m->plugin, required for deletion (nplugin x 1)
|
||||
uintptr_t* plugin_data; // pointer to plugin-managed data structure (nplugin x 1)
|
||||
|
||||
//-------------------- POSITION dependent
|
||||
|
||||
@@ -1124,7 +1127,7 @@ struct mjModel_ {
|
||||
int* eq_type; // constraint type (mjtEq) (neq x 1)
|
||||
int* eq_obj1id; // id of object 1 (neq x 1)
|
||||
int* eq_obj2id; // id of object 2 (neq x 1)
|
||||
mjtByte* eq_active; // enable/disable constraint (neq x 1)
|
||||
mjtByte* eq_active0; // initial enable/disable constraint state (neq x 1)
|
||||
mjtNum* eq_solref; // constraint solver reference (neq x mjNREF)
|
||||
mjtNum* eq_solimp; // constraint solver impedance (neq x mjNIMP)
|
||||
mjtNum* eq_data; // numeric data for constraint (neq x mjNEQDATA)
|
||||
@@ -2112,7 +2115,6 @@ struct mjvSceneState_ {
|
||||
int* eq_type;
|
||||
int* eq_obj1id;
|
||||
int* eq_obj2id;
|
||||
mjtByte* eq_active;
|
||||
mjtNum* eq_data;
|
||||
|
||||
int* tendon_num;
|
||||
@@ -2170,6 +2172,7 @@ struct mjvSceneState_ {
|
||||
|
||||
mjtNum* ctrl;
|
||||
mjtNum* xfrc_applied;
|
||||
mjtByte* eq_active;
|
||||
|
||||
mjtNum* sensordata;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user