Yuval Tassa
a04b0c5b97
Add boolean flags for gravity compensation and surface velocity in mjModel.
...
These fields (`flg_gravcomp` and `flg_surfacevel`) replace the fast-path checks originally guarded by `ngravcomp` and (recently) `nsurfacevel`. Since the engine uses these integers only as flags (zero vs non-zero), migrating them to actual booleans makes them writeable from the Python bindings at runtime without violating size/dimension constraints.
The legacy integer field `ngravcomp` is marked as deprecated and will be removed in a future release.
PiperOrigin-RevId: 949779204
Change-Id: Ifab1f026063a4239302e6ad689663b611b59dda8
2026-07-17 15:05:26 -07:00
Yuval Tassa
7e9ac58ff9
Migrate mjd_inverseFD mass Jacobian from qM to M
...
PiperOrigin-RevId: 942268237
Change-Id: I0ecfe161867ce9930cd6366d778077df2cd3197f
2026-07-03 15:35:52 -07:00
Taylor Howell
c3adb50898
_realloc_island
...
PiperOrigin-RevId: 941618362
Change-Id: Idef1deb0ff4976de42aa585993988ae3363cd1fc
2026-07-02 04:21:43 -07:00
Yuval Tassa
58f6d52491
Introduce new logging API, fixes #858
...
PiperOrigin-RevId: 930744288
Change-Id: I6ec1203b55c031390f3eef23192e2337508ce886
2026-06-11 14:36:57 -07:00
Yuval Tassa
df6942eb39
Support float32 precision for mjtNum in Python bindings.
...
PiperOrigin-RevId: 922959317
Change-Id: I384b3bdeabdc4d3f66c71cae41dabfaf51387be7
2026-05-28 13:56:58 -07:00
Yuval Tassa
71d1014e70
Add mjENBL_DIAGEXACT for exact constraint diagonal. Fixes #2472
...
PiperOrigin-RevId: 916932908
Change-Id: Id23ac39b5cd996afc52990719a4e07c0cc7de600
2026-05-17 16:47:54 -07:00
Matej Aleksandrov
863a084d7f
Adjust refcount expectations for Python 3.14
...
PiperOrigin-RevId: 903813225
Change-Id: Ieb529f2a850e697b643e5023554341c0718ac0e1
2026-04-22 06:33:48 -07:00
Kyle Bayes
6cb6e5a93f
Enable multiccd by default.
...
PiperOrigin-RevId: 902752921
Change-Id: I8e2085ff17db0ac0db1641b8837415c458e5eca4
2026-04-20 12:00:10 -07:00
Yuval Tassa
efae9157a7
Polynomial stiffness and damping https://youtu.be/aKa3ZlEF9_Y
...
PiperOrigin-RevId: 884607673
Change-Id: If8088dbf37fed1055304778a7eb84dec52cba920
2026-03-16 13:25:25 -07:00
Yuval Tassa
6419534bad
Add actuator and sensor delays. Fixes #1004
...
PiperOrigin-RevId: 866478839
Change-Id: Id21a6da0f98454c8fa39ea5af8a5e213d6eae497
2026-02-06 08:47:36 -08:00
Yuval Tassa
218226fc95
Breaking change: Add surface normal output to MuJoCo raycast functions.
...
PiperOrigin-RevId: 855781592
Change-Id: Id96b1ca7eaf722e260cc69d7706c28dc51f52d92
2026-01-13 10:22:21 -08:00
Yuval Tassa
d7e4038be8
Expose mj_copyData in Python bindings.
...
This allows calling `mujoco.mj_copyData(dest, model, src)` to copy data between existing `mjData` instances.
PiperOrigin-RevId: 855150139
Change-Id: If122cb7acf590846e25ee15f9770c3c087147169
2026-01-12 03:21:15 -08:00
Yuval Tassa
888d3a7b07
Add mj_copyState
...
PiperOrigin-RevId: 836588419
Change-Id: I7609e121dc0ac697d4d015d4244bdd5962650def
2025-11-25 03:10:30 -08:00
Yuval Tassa
252a0d73df
Add sleep related data structures
...
PiperOrigin-RevId: 829055431
Change-Id: I1ccbd77a57044a754ae7db611b4c2c0010fbda53
2025-11-06 12:10:55 -08:00
Yuval Tassa
ad49733db2
Improve error message for insufficient arena memory in _realloc_con_efc.
...
PiperOrigin-RevId: 826845370
Change-Id: I09467dd44a6f9f01b89ff6c1d74cde493e84eb1c
2025-11-01 05:54:56 -07:00
Sam Haves
6320b95957
Add mju_getXMLDependencies that given an MJCF file returns filepaths to all of it's dependencies.
...
PiperOrigin-RevId: 814203235
Change-Id: Ib5c2e2f4dd42224a768c88d76473544190c72bc0
2025-10-02 06:14:48 -07:00
Yuval Tassa
b092563cab
Remove mjDSBL_PASSIVE, split it into mjDSBL_SPRING and mjDSBL_DAMPING.
...
PiperOrigin-RevId: 800870384
Change-Id: I273e0ceec090901e2620febb67e57914928e94bb
2025-08-29 06:06:28 -07:00
Yuval Tassa
ec94bb49aa
Make constraint island discovery on by default.
...
Also fix latent bug in mjData serialization.
PiperOrigin-RevId: 799505349
Change-Id: I299e7cc8133fa2ec0b339a7ff3d02543e06778b1
2025-08-26 04:27:24 -07:00
Yuval Tassa
1447711037
Rename spec to sig in state-related API functions.
...
(to avoid confusion with mjSpec)
PiperOrigin-RevId: 795848898
Change-Id: I0b64eb85f5c7a3ee889a746c751d9f5561650277
2025-08-16 08:38:25 -07:00
Google DeepMind
4f43a7d08e
fix typo in bindings_test.py
...
PiperOrigin-RevId: 785536018
Change-Id: I06dd65c65c12e92d354d900a8046b38c0c5de8d3
2025-07-21 12:37:23 -07:00
Erik Frey
49c33716a1
Allow _realloc_con_efc to also allocate new nJ arrays.
...
PiperOrigin-RevId: 761252071
Change-Id: Idce822c6f2b8f2d81a5d43228f5dc35281c5ad07
2025-05-20 15:26:04 -07:00
Yuval Tassa
93251f07d9
Install timers by default in Python bindings
...
PiperOrigin-RevId: 744663306
Change-Id: Ia322ace94d1f269ff9b0275567b2e453acc94843
2025-04-07 03:54:24 -07:00
Copybara-Service
a7a8a68be5
Merge pull request #2496 from jjyyxx:patch-1
...
PiperOrigin-RevId: 736457846
Change-Id: I3b4b1554dd15e9ca73abee5c31d4758f694f5b44
2025-03-13 04:33:45 -07:00
Kyle Bayes
ed16f2daf2
Set nativeccd as default.
...
PiperOrigin-RevId: 731343200
Change-Id: I315779017b676f3d118e0d38ee53a515272f50b8
2025-02-26 09:15:15 -08:00
Alessio Quaglino
90049343b9
Fix texture indexing bug in bindings.
...
Fixes #2341 .
PiperOrigin-RevId: 713667648
Change-Id: I7fa5da1506306c5374febf762ce54aff9146079b
2025-01-09 07:38:22 -08:00
Yuval Tassa
2691887500
Add engine-internal convenience macro for allocating typed arrays, improve error message.
...
PiperOrigin-RevId: 705126655
Change-Id: I2bd8fada6d33a919d2fb82297f93ac57958355a4
2024-12-11 09:04:44 -08:00
Baruch Tabanpour
f3b3024291
Add pyink and isort config. Reformat.
...
PiperOrigin-RevId: 704533915
Change-Id: I37e9fd51261bd166b725c7460fc65d02fed2b391
2024-12-09 21:10:50 -08:00
Taylor Howell
f47840e57c
Add mju_dense2sparse to public API.
...
PiperOrigin-RevId: 691125900
Change-Id: Id9b7c739ee14bff2317168da258b1a3acbdafdbe
2024-10-29 12:47:48 -07:00
Yuval Tassa
e14aebfd16
Expose mju_sparse2dense to public API.
...
PiperOrigin-RevId: 688985153
Change-Id: I9559f1d47363d0afada80c86abdc729cd1910b63
2024-10-23 09:01:25 -07:00
Yuval Tassa
ee7b994021
Remove Newton Cholesky factor from mjData arena, rollback of b66da3d369.
...
PiperOrigin-RevId: 685726867
Change-Id: Ic2afd0dd35e38f403164d2cbe4618286abfa51ab
2024-10-14 09:07:22 -07:00
Yuval Tassa
5dcc31a6aa
Fix read-from-uninitialized-memory in bindings_test.py
...
PiperOrigin-RevId: 684082155
Change-Id: I6f3030559ebda4eda28c17ab866c7502c74e5862
2024-10-09 10:14:26 -07:00
Yuval Tassa
9a0dc20821
Move Newton Hessian memory allocation from stack to arena.
...
PiperOrigin-RevId: 684054446
Change-Id: I4be0b216810ebbd9d7fa119c6a84eb08d3c16b83
2024-10-09 08:54:54 -07:00
Yuval Tassa
b1941708dd
Add some arena-allocated attributes to compare in mjData pickle/unpickle test.
...
PiperOrigin-RevId: 684025320
Change-Id: Ic3282eaae74e43a33c2ed5f1b25ad38884487829
2024-10-09 07:15:52 -07:00
Nimrod Gileadi
9a27fc14c2
Raise appropriate errors for mj_addBufferVFS in Python bindings.
...
When loading models in the XML bindings, different issues with the asset dictionary were all reported as "assets dict is too big".
PiperOrigin-RevId: 670960339
Change-Id: I2e47d91a6b433fd90ebdf9960a9b5b47413af410
2024-09-04 07:20:25 -07:00
Kyle Bayes
0bffd744f9
Add nativeccd flag. When this flag is enabled, general convex collision detection is handled natively, as opposed to using libccd.
...
PiperOrigin-RevId: 663859009
Change-Id: Ife18bb1de62f2154e4725fdf764484a18586b836
2024-08-16 14:08:35 -07:00
Nimrod Gileadi
e7301edd20
Copy arena contents in mj_copyData.
...
Fixes #1710 .
PiperOrigin-RevId: 651351384
Change-Id: I56e3204b30bb18f48278117e85e90464177da973
2024-07-11 03:54:44 -07:00
Kyle Bayes
57e6760ec9
Re-implement VFS internals in C++, removing the constraints of the previous implementation.
...
PiperOrigin-RevId: 649433087
Change-Id: Icaa3e6b7f2ef14f56b04fef2f4360b46d8b5f022
2024-07-04 09:22:23 -07:00
Yuval Tassa
c9bcf8371e
Add mj_setKeyframe function to save current state in k-th model keyframe.
...
Fixes #1719 .
Also improve documentation of `mju_sigmoid`, was previously only documented in changelog.
PiperOrigin-RevId: 642637458
Change-Id: I811a0bf8f881c8b76c9a62d2faec8fdec4e7585b
2024-06-12 09:22:52 -07:00
Yuval Tassa
02d015458c
Add mj_geomDistance API function and sensors for geometric distance, normal direction and segment between between two geoms. Fixes #51
...
PiperOrigin-RevId: 632458301
Change-Id: I65b7e5bb0df59008028114cf4a07e0d6365ff3d3
2024-05-10 04:52:43 -07:00
Yuval Tassa
5a365603f8
Add mju_euler2Quat.
...
PiperOrigin-RevId: 623469398
Change-Id: Ia86b29a764018cd4c3bc57d23616bed7393081f5
2024-04-10 06:02:50 -07:00
Yuval Tassa
5d26b50fce
Remove native sensor noise sampling.
...
PiperOrigin-RevId: 620075316
Change-Id: I6a0a1d63834e7c8bfd290f89d86fea791d794739
2024-03-28 15:33:03 -07:00
Copybara-Service
6b7d714291
Merge pull request #1450 from v-r-a:angmomMat
...
PiperOrigin-RevId: 612835207
Change-Id: I8e7b01cc433563556a3ae4bbdd0c53612cc15e97
2024-03-05 07:35:15 -08:00
Yuval Tassa
982760a63b
Improve bindings for mjd_subQuat.
...
- Accept `None` for optional arguments.
- Accept 3x3 matrices for matrix arguments.
PiperOrigin-RevId: 611000820
Change-Id: Id28cdb2ae574f372ff251f94ab4557d9d2eaa80b
2024-02-27 23:55:19 -08:00
Saran Tunyasuvunakool
abf6d41b7f
Fix incorrect data types in Python bindings of certain arrays.
...
The mismatch between the `py::array_t` template argument and the type of the MuJoCo struct member being wrapped caused the `py::array_t` to be constructed via an unintended constructor overload, which in turn triggered `use-after-poison` under asan.
This bug affected the `geom`, `flex`, `elem`, and `vert` arrays in `mjContact`, and all array members in `mjrContext`.
PiperOrigin-RevId: 608632860
Change-Id: Ic227f691041b004a0fcf0cb6fa3d62c44861d9aa
2024-02-20 09:26:19 -08:00
Yuval Tassa
4c066a26b5
Change mjVISSTRING of connect and weld equality constraints from "Constraint" to "Equality". This is more consistent with the 'E' shortcut key and with mjDISABLESTRING ("constraint" means all constraints, "equality" means bilateral constraints).
...
Also remove unused ampersands from `mjVISSTRING` names, these are a remnant from a very old version of the UI framework.
PiperOrigin-RevId: 593469811
Change-Id: I0f6f73c9f5d2c61b2280f395f76434b0710ce4f3
2023-12-24 12:06:59 -08:00
Yuval Tassa
38fa756a20
Add mjGEOM_LINEBOX, used in visualization of collision trees.
...
PiperOrigin-RevId: 591224734
Change-Id: I09ad8c4b711021ff4dd5548ba5381d25d5a3d7f8
2023-12-15 05:36:35 -08:00
Alessio Quaglino
9ae40e718e
Define mj_multiRay bindings explicitly.
...
Fixes #1184 .
PiperOrigin-RevId: 581956413
Change-Id: I6c611ac7537442a65e6961430ec724326ee6095a
2023-11-13 07:31:22 -08:00
Nimrod Gileadi
084facc9ab
Python bindings: Store a reference to MjModel in MjDataWrapper.
...
Before this change, MjDataWrapper contained a custom data structure called MjDataMetadata, which contained the sizes of various arrays needed to create MjData. This was used for serialization and deserialization, as well as copying MjData instances.
This worked fine for native MuJoCo models, but as soon as plugins were used, there was information in the model that was needed and not available in MjDataMetadata. Since plugins are so general, keeping MjDataMetadata was untenable.
PiperOrigin-RevId: 578205355
Change-Id: I11b9ee797d1da5aaf1fecbbe170b3b0f1f1a3e6c
2023-10-31 09:16:40 -07:00
Alessio Quaglino
5a70ad08ab
Add Flex component.
...
PiperOrigin-RevId: 572830650
Change-Id: I6908228087b7b9683be3506c8d9cdc725ed5dcd5
2023-10-12 10:49:35 +01:00
Alessio Quaglino
36d2ffe4f2
Specify camera parameters using standard robotics conventions.
...
PiperOrigin-RevId: 569147555
Change-Id: I3443f95e5de56a17024f5e5c03f33888dd583edb
2023-09-28 05:19:19 -07:00