Yuval Tassa
55f300b78c
Fix typo
...
PiperOrigin-RevId: 862781462
Change-Id: I88844e2148e821ec92e37aa8aab3554c132a4d43
2026-01-29 09:57:09 -08:00
Yuval Tassa
5fb47df197
Add mjData flags marking lazily evaluated pipeline stages
...
PiperOrigin-RevId: 861763477
Change-Id: Ib613c56949264573a16306800658f868d2aa7665
2026-01-27 09:45:06 -08:00
Alessio Quaglino
ba32568138
Move flex vertex-edge adjacency to mjModel.
...
PiperOrigin-RevId: 861717037
Change-Id: I2ad8090b0318cb04b43d13966cb42260c82ef930
2026-01-27 07:41:47 -08:00
Yuval Tassa
30b903b6c0
Migrate mjModel size fields from int to mjtSize.
...
This change updates all size-related members within the `mjModel` struct from `int` to `mjtSize`. This allows MuJoCo to handle models with a larger number of elements. Corresponding changes were made to macros, function signatures, and I/O routines to accommodate the new `mjtSize` type.
PiperOrigin-RevId: 860144595
Change-Id: I701c6d607715d240766b6210a9773cd9e4258c59
2026-01-23 09:41:49 -08:00
Alessio Quaglino
54dd623650
Add vertex-based flex constraints (dim=2).
...
PiperOrigin-RevId: 859552050
Change-Id: I61d4b9dc40f041c5b930e5f8810a803e8bccb87a
2026-01-22 04:54:53 -08:00
Alessio Quaglino
e56b31e98f
Reduce flexedge_J size from nflexedge x nv to the effective sparse size.
...
PiperOrigin-RevId: 856290141
Change-Id: Ide297d1b6f0e3aa07e3e20bf9ab44b6501097695
2026-01-14 11:18:41 -08:00
Alessio Quaglino
a49576e469
Move flexedge sparse Jacobian indices to mjModel.
...
PiperOrigin-RevId: 855718305
Change-Id: Ic136f4efa6735b934288f65c332d71ee8b0f6da5
2026-01-13 07:33:17 -08:00
Yuval Tassa
608115ab95
Add output attribute to camera elements.
...
This attribute allows specifying the intended output types (e.g., RGB, depth, normal) for each camera in the XML. The output types are stored as bit flags in `mjModel`.
PiperOrigin-RevId: 853316261
Change-Id: I1ad2e94102593cf402756f8f4c80509371ca86d2
2026-01-07 10:22:27 -08:00
Yuval Tassa
f2e9097ed6
Change mjsCamera.resolution type from float to int.
...
Resolution is inherently an integer quantity (pixels).
PiperOrigin-RevId: 848276456
Change-Id: I92ee1aa88fd552fd42cb3871442f020f26d6fa6a
2025-12-23 13:14:32 -08:00
Yuval Tassa
b8a4ac5d48
Refactor camera orthographic attribute to projection enum.
...
PiperOrigin-RevId: 847069028
Change-Id: I7f686fe654e9b56519cab8bd2f37c9cc40091d3f
2025-12-20 03:28:29 -08:00
Haroon Qureshi
7190bd4912
Add flag for depth rendering.
...
PiperOrigin-RevId: 846203691
Change-Id: I5ec494446bcfc1f7c81536a87dd24f9967973563
2025-12-18 04:36:26 -08:00
Yuval Tassa
c2e9bfa3e8
Clarify semantic of body_rootid and body_weldid
...
PiperOrigin-RevId: 834827589
Change-Id: I562e0aa374ce59d8b769e8d003e4c63ee434a1fc
2025-11-20 10:54:59 -08:00
Alessio Quaglino
62872fecd1
Reduce size of mjsTexture.gridlayout (was 13, should be 12)
...
PiperOrigin-RevId: 833764817
Change-Id: I2655a729d38a8871be2024492ce2a971fc8a0372
2025-11-18 04:49:05 -08:00
Yuval Tassa
252a0d73df
Add sleep related data structures
...
PiperOrigin-RevId: 829055431
Change-Id: I1ccbd77a57044a754ae7db611b4c2c0010fbda53
2025-11-06 12:10:55 -08:00
Sam Haves
57f7145806
Create mjpDecoder, mj_parse, and mju_decodeResource
...
- plugin system similar to mjpResourceProvider, but instead of loading a resource it converts an existing mjResource into an mjSpec.
- The returned spec is then composed into the referencing spec.
- This enables different file types to generate arbitrary specs, and allows us to separate format parsing from compilation code.
Follow up CLs will move some of the logic in src/engine for PNG, USD, KTX, OBJ loading into decoders.
The mj_parse function MjSpec from a given file, it's a more generic version of mj_parseXML.
In it's implementation, mj_parse as opposed to mj_parseXML will look for any registered decoder and
not assume we are striclty dealing with MJCF.
PiperOrigin-RevId: 826149497
Change-Id: I0ece26904280cb94bd5ded6dd5a565c539d60254
2025-10-30 12:54:40 -07:00
Copybara-Service
d971e5c2df
Merge pull request #2908 from davidhozic:doc/fix-comments
...
PiperOrigin-RevId: 824546229
Change-Id: I9961e7f39d0549ff8b15a1007fb20832a0014bbd
2025-10-27 09:16:01 -07:00
Sam Haves
59f14485e0
Move mjCWrap type to mjsWrap.
...
PiperOrigin-RevId: 821851540
Change-Id: I53382a8a21312a96aea46eec130f43e7cad70f92
2025-10-20 16:28:41 -07:00
David Hozic
b19644bec9
Fix spelling errors
2025-10-21 01:21:47 +02:00
Yuval Tassa
414888b716
Mark some mjData fields as mutable.
...
PiperOrigin-RevId: 815819490
Change-Id: I1a62fda556b4197aec451f2747c69f34bab13220
2025-10-06 11:43:38 -07:00
Yuval Tassa
431f96572e
Remove unused mjOption.apirate.
...
PiperOrigin-RevId: 815633571
Change-Id: Ib98f3eb2df47f96fa1fe6e987a3a0cd23a9479f6
2025-10-06 02:51:17 -07:00
Sam Haves
32e08f9507
Expose userfacenormal to mjsMesh
...
PiperOrigin-RevId: 814253177
Change-Id: I644974feea0722f03e7c3b01be7b702dba233f0a
2025-10-02 08:53:42 -07:00
Haroon Qureshi
70d03adc71
Store the status of the scene in the scene itself.
...
PiperOrigin-RevId: 813119377
Change-Id: Iebff9e7796ca9809ea22902522982bfd96eeba06
2025-09-30 00:06:00 -07: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
Haroon Qureshi
017e7d5a73
Add light ids.
...
PiperOrigin-RevId: 805755907
Change-Id: I92a1b1ea4ce1495c2746fd518f33ab2d1ad81399
2025-09-11 03:20:44 -07:00
Kyle Bayes
ea660f4c13
Expose minimal asset cache API.
...
PiperOrigin-RevId: 803126923
Change-Id: Iabf63802572f7cb86864b5ece85f44b3f15a4ec0
2025-09-04 12:18:36 -07:00
Alessio Quaglino
8acd83f317
Add passive collision mode for flexes.
...
PiperOrigin-RevId: 801754907
Change-Id: I4147af2ee2596519d42cb9a03cf8d5488f0bc3e8
2025-09-01 04:13:58 -07:00
Sam Haves
1fb1810b07
Add ability to specify a material assignment to a mesh asset.
...
This extends both the spec and the XML definition to allow specification of a material name on a mesh. This material acts as a fallback in the case that the referencing geom element does not specify a material of it's own.
PiperOrigin-RevId: 798232378
Change-Id: Iaf300c727732744ea1b613e64334ee505ac6e209
2025-08-22 09:11:31 -07:00
Yuval Tassa
2f28473bc1
Remove transposed Jacobian fields from mjData
...
No longer computed unconditionally, only ad-hoc where required.
PiperOrigin-RevId: 797753297
Change-Id: I2030fc342c98ff33575b0526dd72e2110c4fcb74
2025-08-21 07:21:24 -07:00
Alessio Quaglino
b66175eba6
Bending stiffness for curved shells in flex.
...
PiperOrigin-RevId: 796361841
Change-Id: I105ea235fe2a8e1bcbde67276d77fa92eed214a1
2025-08-18 04:13:18 -07:00
Yuval Tassa
6b41fbe72a
Use CSR matrices for dof-dof index mappings
...
PiperOrigin-RevId: 795895311
Change-Id: I1000e0ee98906ef35990e73236e85d6354487b82
2025-08-16 13:06:32 -07:00
Yuval Tassa
c0096b51a4
Move ntree to mjModel allocator sizes
...
PiperOrigin-RevId: 795855203
Change-Id: Idab185294d53dced9ebf073b782969dc5643b95a
2025-08-16 09:16:41 -07:00
Yuval Tassa
977f94e9df
Delete sparsity structures from mjData, use the ones in mjModel
...
PiperOrigin-RevId: 795067950
Change-Id: If4f52e40ac49f7c6986b33ef9c8b534199dfd21a
2025-08-14 09:13:02 -07:00
Yuval Tassa
7eb13777f8
Put sparsity structures in mjModel, don't use them yet.
...
PiperOrigin-RevId: 795032051
Change-Id: I75c69e881980ff9c308acf00bb3a65f4b2ef12f5
2025-08-14 07:37:42 -07:00
Yuval Tassa
249b0cd87d
Improve field order and comments in mjdata.h
...
PiperOrigin-RevId: 792642328
Change-Id: I59330e228a111edec9e86d93d5cdf646b0fab00e
2025-08-08 08:52:35 -07:00
Matija Kecman
23fa7c00d5
Remove usage of size_t types in mjModel, use mjtSize (uint64_t) instead to improve portabilty of MJB files to WASM.
...
PiperOrigin-RevId: 789321991
Change-Id: Ic25fab876c347fc75f5ca24cad09e8fd972f035f
2025-07-31 07:08:33 -07:00
Yuval Tassa
a771fc6c09
Increase mjNSENS to 3
...
PiperOrigin-RevId: 788468705
Change-Id: Id22f131bebb6accc9a29c9aa285efa75fa8b2c16
2025-07-29 08:38:13 -07:00
Yuval Tassa
83435361fa
Increase max points in 2D plot from 1000 to 1001.
...
PiperOrigin-RevId: 787513580
Change-Id: I573c779932fa7411b132020213637a25fa859844
2025-07-26 12:46:31 -07:00
Yuval Tassa
5e666635f6
Remove mjtVisFlag.mjVIS_FLEXBVH and mjvOption.oct_depth
...
PiperOrigin-RevId: 783355711
Change-Id: I1e11999d5c533925f1d07266aeca95598a5691ba
2025-07-15 09:08:22 -07:00
Alessio Quaglino
9a41d385c1
Add needsdf flag to mjsMesh.
...
PiperOrigin-RevId: 782949528
Change-Id: Iaa96326a91795c3469c991bd8def53560b38e4f0
2025-07-14 10:13:05 -07:00
Alessio Quaglino
96118da08b
Move SDF precomputation to the mujoco compiler.
...
Before:
```
Simulation time : 2.24 s
Steps per second : 4472
Realtime factor : 8.94 x
Time per step : 223.6 µs
Newton iters / step : 2.47
Contacts / step : 3.37
Constraints / step : 13.49
Degrees of freedom : 12
Dynamic memory usage : 0.2% of 14M
```
After:
```
Simulation time : 1.71 s
Steps per second : 5854
Realtime factor : 11.71 x
Time per step : 170.8 µs
Newton iters / step : 2.19
Contacts / step : 3.45
Constraints / step : 13.79
Degrees of freedom : 12
Dynamic memory usage : 0.2% of 14M
```
PiperOrigin-RevId: 781075182
Change-Id: Ie509047ff581ab0df4b10bbd394c27d350ab5a13
2025-07-09 08:57:09 -07:00
Yuval Tassa
a3d251f552
Add mjModel.sensor_intprm, integer parameters of sensors
...
PiperOrigin-RevId: 781053754
Change-Id: I90e5ef1cab3f87b894dbc70dccfc8bf0046ce1b6
2025-07-09 08:00:21 -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
Alessio Quaglino
5c1f1f9dba
Add octree to meshes of SDF geoms.
...
PiperOrigin-RevId: 777634862
Change-Id: I3210c2f8d73fd30ceecb0a11abd1d82e086b3d5d
2025-06-30 10:50:15 -07:00
Yuval Tassa
14dc7c2a60
Add "cameraid" attribute to visual/global specifying the default camera to use at model load.
...
PiperOrigin-RevId: 773783069
Change-Id: I2fff2abdceedc982d89cee8d14b95abceea1c113
2025-06-20 11:41:27 -07:00
Google DeepMind
568620dd2f
Add texture attribute to lights.
...
PiperOrigin-RevId: 763739805
Change-Id: I333ed2ac68f30f79f688ca01d7b5fd6bf2d836c9
2025-05-27 05:04:01 -07:00
Yuval Tassa
ccc912c3b0
Improve docstring in mjvGeom, fixes #2629
...
PiperOrigin-RevId: 763693102
Change-Id: Icb9a3168691690ccf086adb5a20358b3952d6717
2025-05-27 02:17:24 -07:00
Google DeepMind
74cc904edc
Convert light directional boolean into a type enum.
...
PiperOrigin-RevId: 761983728
Change-Id: Id5bf93c103e5358d9c5cd9f1176532a978e0b3a8
2025-05-22 08:51:18 -07:00
Google DeepMind
3e9bc79b54
Adds color space to textures.
...
PiperOrigin-RevId: 761907261
Change-Id: Iec546d1d5907a15e57ef809ec31850640fc52915
2025-05-22 04:33:40 -07:00