Add mjs_getCompiler C API and compiler property to Python spec elements.

PiperOrigin-RevId: 881488083
Change-Id: I3aa1c0562bf2fd27057b8056048e3156fc1b067c
This commit is contained in:
Sam Haves
2026-03-10 09:56:50 -07:00
committed by Copybara-Service
parent d6aac2041e
commit 6890e133c0
9 changed files with 96 additions and 0 deletions
+9
View File
@@ -4580,6 +4580,15 @@ Find and get utilities
Get spec from body.
.. _mjs_getCompiler:
`mjs_getCompiler <#mjs_getCompiler>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. mujoco-include:: mjs_getCompiler
Get compiler associated with element's origin spec.
.. _mjs_findSpec:
`mjs_findSpec <#mjs_findSpec>`__
+3
View File
@@ -15,6 +15,9 @@ General
``ten_J_colind`` have been moved from :ref:`mjData` to :ref:`mjModel` and are no longer computed at run time by
``mj_tendon`` but at compile time.
- Added :ref:`mjs_getCompiler` C API function and a ``compiler`` read-only property to all Python spec element types.
This allows querying the compiler settings (e.g., ``meshdir``) from any element, with the correct originating spec's
compiler preserved after attachment.
- Added a new ``strain`` :ref:`equality constraint<flexcomp-edge-equality>` type for trilinear and quadratic
:ref:`dofs<body-flexcomp-dof>`.
- Flexes now support collisions with SDF geoms.
+1
View File
@@ -3643,6 +3643,7 @@ mjsTexture* mjs_addTexture(mjSpec* s);
mjsMaterial* mjs_addMaterial(mjSpec* s, const mjsDefault* def);
int mjs_makeMesh(mjsMesh* mesh, mjtMeshBuiltin builtin, double* params, int nparams);
mjSpec* mjs_getSpec(mjsElement* element);
mjsCompiler* mjs_getCompiler(mjsElement* element);
mjSpec* mjs_findSpec(mjSpec* spec, const char* name);
mjsBody* mjs_findBody(mjSpec* s, const char* name);
mjsElement* mjs_findElement(mjSpec* s, mjtObj type, const char* name);