Refactor mj_fullM. This change is part of the deprecation of mjData.qM.
PiperOrigin-RevId: 925669464 Change-Id: I4889c66591bc1df4c31135a13776052aad491f7a
This commit is contained in:
committed by
Copybara-Service
parent
49211a05c5
commit
7b9b88060e
@@ -601,14 +601,7 @@ Get name of object with the specified :ref:`mjtObj` type and id, returns ``NULL`
|
||||
|
||||
.. mujoco-include:: mj_fullM
|
||||
|
||||
Convert sparse inertia matrix ``M`` into full (i.e. dense) matrix.
|
||||
|br| ``dst`` must be of size ``nv x nv``, ``M`` must be of the same structure as ``mjData.qM``.
|
||||
|
||||
The ``mjData`` members ``qM`` and ``M`` represent the same matrix in different formats; the former is unique to
|
||||
MuJoCo, the latter is standard Compressed Sparse Row (lower triangle only). The :math:`L^T D L` factor of the inertia
|
||||
matrix ``mjData.qLD`` uses the same CSR format as ``mjData.M``. See
|
||||
`engine_support_test <https://github.com/google-deepmind/mujoco/blob/main/test/engine/engine_support_test.cc>`__ for
|
||||
pedagogical examples.
|
||||
Convert sparse inertia matrix into full (i.e. dense) matrix.
|
||||
|
||||
.. _mj_mulM:
|
||||
|
||||
|
||||
@@ -342,17 +342,6 @@ found, the function will return ``distmax`` and ``fromto``, if given, will be se
|
||||
As explained in :ref:`Collision Detection<coDistance>`, distances are inaccurate when using the
|
||||
:ref:`legacy CCD pipeline<coCCD>`, and its use is discouraged.
|
||||
|
||||
.. _mj_fullM:
|
||||
|
||||
Convert sparse inertia matrix ``M`` into full (i.e. dense) matrix.
|
||||
|br| ``dst`` must be of size ``nv x nv``, ``M`` must be of the same structure as ``mjData.qM``.
|
||||
|
||||
The ``mjData`` members ``qM`` and ``M`` represent the same matrix in different formats; the former is unique to
|
||||
MuJoCo, the latter is standard Compressed Sparse Row (lower triangle only). The :math:`L^T D L` factor of the inertia
|
||||
matrix ``mjData.qLD`` uses the same CSR format as ``mjData.M``. See
|
||||
`engine_support_test <https://github.com/google-deepmind/mujoco/blob/main/test/engine/engine_support_test.cc>`__ for
|
||||
pedagogical examples.
|
||||
|
||||
.. _mj_mulM:
|
||||
|
||||
This function multiplies the joint-space inertia matrix stored in ``mjData.M`` by a vector.
|
||||
|
||||
@@ -30,6 +30,12 @@ General
|
||||
the :math:`A` ("Delassus") matrix.
|
||||
- The deprecated functions ``mju_{error,warning}_{i,s}`` have been removed.
|
||||
|
||||
- Changed the signature of :ref:`mj_fullM` from ``mj_fullM(m, dst, M)`` to ``mj_fullM(m, d, dst)`` as part of the
|
||||
planned deprecation of ``mjData.qM`` in favor of the CSR-format ``mjData.M``.
|
||||
|
||||
**Migration:** For inertia matrix conversion, replace ``mj_fullM(m, dst, d->qM)`` with ``mj_fullM(m, d, dst)`` or
|
||||
``mju_sym2dense(dst, d->M, m->nv, m->M_rownnz, m->M_rowadr, m->M_colind)``.
|
||||
|
||||
Bug fixes
|
||||
^^^^^^^^^
|
||||
- Fixed a bug in the ``mjz`` :ref:`decoder <mjpDecoder>` where unnormalized paths would fail to be read.
|
||||
|
||||
@@ -3320,7 +3320,7 @@ void mj_jacDot(const mjModel* m, const mjData* d, mjtNum* jacp, mjtNum* jacr,
|
||||
void mj_angmomMat(const mjModel* m, mjData* d, mjtNum* mat, int body);
|
||||
int mj_name2id(const mjModel* m, int type, const char* name);
|
||||
const char* mj_id2name(const mjModel* m, int type, int id);
|
||||
void mj_fullM(const mjModel* m, mjtNum* dst, const mjtNum* M);
|
||||
void mj_fullM(const mjModel* m, const mjData* d, mjtNum* dst);
|
||||
void mj_mulM(const mjModel* m, const mjData* d, mjtNum* res, const mjtNum* vec);
|
||||
void mj_mulM2(const mjModel* m, const mjData* d, mjtNum* res, const mjtNum* vec);
|
||||
void mj_addM(const mjModel* m, mjData* d, mjtNum* dst, int* rownnz, int* rowadr, int* colind);
|
||||
|
||||
Reference in New Issue
Block a user