Yuval Tassa
d80a847bae
Move CompareModel to a separate library.
...
PiperOrigin-RevId: 927174846
Change-Id: Ia8b8b2c8593133d8910399be755e614282bf3252
2026-06-05 02:44:53 -07:00
Yuval Tassa
9fa3f6f77e
Enable float32 testing for most MuJoCo engine and user tests.
...
PiperOrigin-RevId: 886697701
Change-Id: I4a96fae03ea18494c3fcef8eb17b3b6f0863e9b7
2026-03-20 04:05:06 -07:00
Taylor Howell
52ed96bc3a
Move tendon sparsity fields from mjData to mjModel
...
PiperOrigin-RevId: 875087590
Change-Id: I1a5489d2d2011795ee38b09d547e68acd72e3cc7
2026-02-25 04:32:11 -08:00
Copybara-Service
57c2316b9e
Merge pull request #3080 from kevinzakka:fix-fusestatic-camera-light-crash
...
PiperOrigin-RevId: 872054304
Change-Id: I9eab499002077afa46b236e8eae13100285f362c
2026-02-18 14:53:30 -08:00
Kevin Zakka
f570ab52a8
Fix segfault in FuseStatic when body contains cameras or lights
...
FuseStatic deletes static (joint-less) bodies and reassigns their
children to the parent body. Geoms and sites were reassigned, but
cameras and lights were not, leaving dangling body pointers that
crash in mjCCamera::Compile() / mjCLight::Compile().
Add camera and light reassignment in FuseStatic and FuseReindex.
2026-02-09 14:56:51 -08: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
f8b92410d4
Add test explaining body_rootid and body_weldid semantics
...
PiperOrigin-RevId: 835197910
Change-Id: If85ca80d3b576e2469cf0d9900441ddb9fd64462
2025-11-21 06:25:22 -08:00
Google DeepMind
0e1104768a
No public description
...
PiperOrigin-RevId: 809083979
Change-Id: I5c6641b73c76153c15f5cdf858b788e1433acc81
2025-09-19 10:10:45 -07:00
Google DeepMind
26ea20a21f
No public description
...
PiperOrigin-RevId: 809074980
Change-Id: Ib3e3522addceddba6a057cfef80fcbd30a420b3d
2025-09-19 09:49:07 -07:00
Alessio Quaglino
77e025ea98
Move meshdir and texturedir to mjsCompiler.
...
For backwards compatibility in the Python bindings, both `spec.compiler.meshdir` and `spec.meshdir` are now allowed.
Fixes #2834 .
PiperOrigin-RevId: 809060113
Change-Id: Ie23f1c5dd57de43568312a8e062906f4013bb474
2025-09-19 09:05:44 -07:00
Baruch Tabanpour
3434f5d9c7
Compute convex hull for collision pairs.
...
build / windows-2025 (push) Has been cancelled
build / ubuntu-22.04-clang-13 (push) Has been cancelled
build / ubuntu-22.04-clang-14 (push) Has been cancelled
build / ubuntu-22.04-clang-15 (push) Has been cancelled
build / ubuntu-24.04-clang-16 (push) Has been cancelled
build / ubuntu-24.04-clang-17 (push) Has been cancelled
build / ubuntu-24.04-clang-18 (push) Has been cancelled
build / ubuntu-22.04-gcc-10 (push) Has been cancelled
build / ubuntu-22.04-gcc-11 (push) Has been cancelled
build / ubuntu-22.04-gcc-12 (push) Has been cancelled
build / ubuntu-24.04-gcc-13 (push) Has been cancelled
build / ubuntu-24.04-gcc-14 (push) Has been cancelled
build / macos-15-arm64 (push) Has been cancelled
build / macos-15-x86_64 (push) Has been cancelled
PiperOrigin-RevId: 788074030
Change-Id: I3d4bbe71f824db82e998e374d95a5c49995af806
2025-07-28 10:49:50 -07:00
Alessio Quaglino
594e17074a
Replace name attribute with setters and getters in the C API of mjSpec.
...
PiperOrigin-RevId: 778816015
Change-Id: Ieffb7a5bce37e887ff009f9a02d2434435e79ca1
2025-07-03 02:30:56 -07:00
Yuval Tassa
21bae3a388
Report which body has too-small mass/inertia in compilation error.
...
PiperOrigin-RevId: 776196017
Change-Id: Ib81efb170347a57cdc4b446c14cd7b8f5357958c
2025-06-26 10:40:40 -07:00
Alessio Quaglino
b8768aa1cd
Allow to fusestatic a body if it doesn't generate a referencing error.
...
PiperOrigin-RevId: 769189929
Change-Id: I62f512813ea330da088b28d39373df39be10a602
2025-06-09 10:05:57 -07:00
Alessio Quaglino
a02a27d4a4
Combine all mjs_attach functions into one.
...
PiperOrigin-RevId: 742702092
Change-Id: I89e35c59ada017cd061e2031584eeea71776743d
2025-04-01 08:05:58 -07:00
Tom Power
78a4d2f389
Fix mass/inertia checking for moving bodies with nested children.
...
Previously, we only checked immediate children of moving bodies.
PiperOrigin-RevId: 726999705
Change-Id: I133a557daf86223b8751c6d46e25809781e168a1
2025-02-14 11:26:28 -08:00
Alessio Quaglino
c1ecc50081
Store joint damping and stiffness in the private spec when springdamper is used in the public spec.
...
PiperOrigin-RevId: 724288204
Change-Id: I7341d5d804e1ea73ded48b8b447addd4e124ab97
2025-02-07 03:55:24 -08:00
Alessio Quaglino
c2138c3fb0
Do not copy the spec during attach.
...
Use a reference count for managing the memory.
PiperOrigin-RevId: 716169486
Change-Id: Id270c4858c17b9250115e9544d5ea143584e2d5f
2025-01-16 03:53:17 -08:00
Taylor Howell
a1b18e707a
Compress actuator_moment memory using nJmom <= nu x nv.
...
PiperOrigin-RevId: 698446692
Change-Id: I49c9633e12129a1e690724db82d1f11204e41d9c
2024-11-20 10:53:07 -08:00
Taylor Howell
aae5fd6906
Add nJmom, the number of non-zeros in sparse actuator_moment matrix, to mjModel.
...
PiperOrigin-RevId: 698343986
Change-Id: I3d4a4dea1ec095d4e7b231c2fffc0e6241cee39f
2024-11-20 04:30:47 -08:00
Yuval Tassa
a4a6248a06
Move AsVector utility to fixture.h
...
PiperOrigin-RevId: 690577546
Change-Id: I2cebcffa1f2e3b0789f43e772e364c4762719ab3
2024-10-28 05:52:25 -07:00
Alessio Quaglino
159f23e6b4
Remember compiler options during attach.
...
Note:
- Move compiler options into `mjsCompiler` struct.
- The compiler options from the attached model are not written by mj_SaveXML.
PiperOrigin-RevId: 689391440
Change-Id: I1d63c146a32f87c737b7a55b64a54b0ffe3aecc9
2024-10-24 08:31:15 -07:00
Alessio Quaglino
015bdeb756
Disallow repeated nameless assets that use the same file, except for URDFs.
...
PiperOrigin-RevId: 675114055
Change-Id: I142811ac2d8ef9e12bb8a06d5f3a2fdac02946da
2024-09-16 05:50:50 -07:00
Alessio Quaglino
c77babe046
Fix a bug in MuJoCo's user_mesh.cc that caused meshdir_ to be overwritten when a model was loaded with a nested model.
...
PiperOrigin-RevId: 675092713
Change-Id: Iad6336141749510bf5544cab9c06533ee1589c08
2024-09-16 04:22:13 -07:00
Alessio Quaglino
567793c26f
Store model paths in assets.
...
This enables to preserve the paths of the child spec during `attach`.
PiperOrigin-RevId: 673349237
Change-Id: Ibf075c7ec037ff5d540bc60d6e77c12f60269791
2024-09-11 05:20:14 -07:00
Yuval Tassa
2efbd31762
Add mjSAMEFRAME_BODYROT and mjSAMEFRAME_INERTIAROT frame alignment shortcuts.
...
PiperOrigin-RevId: 666318799
Change-Id: I0af1824d2bd9eaca7b48a9e33e09f873dd33b22d
2024-08-22 06:08:25 -07:00
Yuval Tassa
7e97caaafd
Add a test for lengthrange computation, with and without threading.
...
PiperOrigin-RevId: 650997405
Change-Id: I45c3725dacb6ccf17977953a9ffed717c927b786
2024-07-10 06:39:18 -07:00
Yuval Tassa
8e2f830fd2
Fix type errors in compiler and tests.
...
In preparation for a float32 build of MuJoCo.
PiperOrigin-RevId: 644407674
Change-Id: I60069f0f865ef89fbf613f5a2ca0c336cc63461e
2024-06-18 09:12:44 -07:00
Alessio Quaglino
96844db926
Update BVH during fusestatic. Fixes #1069 and #1577 .
...
PiperOrigin-RevId: 631748750
Change-Id: I4e1ae01207568c90fc49bcd7d9f760f5187f1afa
2024-05-08 04:13:16 -07:00
Alessio Quaglino
d6553ed192
Update contype and conaffinity if fusestatic is true. Fixes #1577 .
...
PiperOrigin-RevId: 628073529
Change-Id: I2fe88736d12ec16d72bbd4dce5d349b930147b50
2024-04-25 07:46:00 -07:00
Alessio Quaglino
1e2e0b3053
Remove all visual-only assets if discardvisual is selected, not only the geoms.
...
PiperOrigin-RevId: 598598250
Change-Id: I12e60ce41ad436d037b4877d197decf6bdce0fc8
2024-01-15 06:39:25 -08:00
Kyle Bayes
9f6be3135e
Modify mjListKeyMap to be a fixed-size array, and add internal object_lists variable to mjCModel to remove redundant code.
...
PiperOrigin-RevId: 590997348
Change-Id: I5f4d7de605f44d40a75eb1e9ceec208325fa3be5
2023-12-14 11:12:01 -08:00
Alessio Quaglino
d12fe594d9
Add suffix to duplicated assets.
...
PiperOrigin-RevId: 588775467
Change-Id: I3a0d2a14601cf018b0c8c56728bd3ae22adb8ec2
2023-12-07 06:46:51 -08:00
Nimrod Gileadi
5322291d38
Add a test for fusestatic
...
PiperOrigin-RevId: 519112654
Change-Id: Ic15f9d572c281efb0e0b23b2f99e11a880275851
2023-03-24 04:48:04 -07:00
Saran Tunyasuvunakool
077acb1c8f
Revert test fixture name in user_{model,objects}_test.cc.
...
These were inadvertently renamed to XMLReaderTest by an overzealous auto-renamer in 58fd72f53d .
PiperOrigin-RevId: 479520906
Change-Id: Ia50ec659f21a92cbcd4b953cde54dd98f0adb67a
2022-10-07 01:42:55 -07:00
Saran Tunyasuvunakool
58fd72f53d
Dynamically allocate contact and efc_ arrays on a new memory arena.
...
- Add private function `mj_arenaAlloc`. This is used internally to allocate memory from the arena.
- Add private function `mj_nefc` to count constraints. This function returns a tight upper bound on `d->nefc`. The number of counted constraints can be slightly bigger than exact `d->nefc` in the case of constraints with empty Jacobian, as when placing a frictional tendon between two world sites.
- Add new `memory` attribute to the `size` XML element for specification of arena memory size. This attribute is mutually exclusive with `nstack` and `njmax` specifications, which are now deprecated (but left around for the time being for legacy compatibility).
- Move `d->stack` to the end of the new arena space. The stack now grows in reverse from the end.
PiperOrigin-RevId: 479341539
Change-Id: Ie019c202e0908577ffc6f833a37920858116f667
2022-10-06 10:03:05 -07:00
Saran Tunyasuvunakool
1913a02b40
Initial open sourcing of MuJoCo.
...
PiperOrigin-RevId: 450374687
Change-Id: Ie3225a46ce095fc28ae8e63c326a640261f562bb
2022-05-23 01:08:49 -07:00