Google DeepMind
ecfe65242f
Add nullable attribute to AST nodes for function parameters in API introspection. Fixes #309
...
This change introduces an `nullable` flag to `ArrayType`, `PointerType`, and `FunctionParameterDecl`. The code generation process now parses function comments from `mujoco.h` to identify parameters marked as "Nullable" and sets this flag accordingly.
PiperOrigin-RevId: 797870883
Change-Id: Ic7cac5a7a9c14177fbf97b8655c5c4809d4ef683
2025-08-21 12:35:10 -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
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
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
Yuval Tassa
705ec6d7fb
Adds built-in superellipsoid mesh.
...
PiperOrigin-RevId: 791196831
Change-Id: I1d864f6e620870f016377a4d9e2e26d1a23fd77e
2025-08-05 07:02:52 -07:00
Yuval Tassa
a5d4d1000e
Add built-in supertoroid mesh.
...
PiperOrigin-RevId: 791180080
Change-Id: I3a70f50ff4a52a1bd4b88fc30334a574895145b4
2025-08-05 06:06:43 -07:00
Yuval Tassa
a5a6379f83
Add built-in cone mesh type.
...
Also delete `prism` type since it is subsumed by cone.
PiperOrigin-RevId: 790992343
Change-Id: I7a9c6f2a4377489173acd64b23086c748d2cee8e
2025-08-04 19:35:32 -07:00
Yuval Tassa
32c7d3f085
Tag nullable arguments in main header. Fixes #309
...
Nullable arguments will be added to the `introspect` datastructures in a future change.
PiperOrigin-RevId: 789350522
Change-Id: I0bfd12fab5121f94b937264570f907593b63cf64
2025-07-31 08:39:16 -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
Alessio Quaglino
51babec9c5
Move tactile sensor to the engine.
...
PiperOrigin-RevId: 788863133
Change-Id: I3172ebb7641fa8146469da25cba7db794760e7b1
2025-07-30 05:27:44 -07:00
Alessio Quaglino
89f4789085
Add mjs_makeMesh to create a builtin mesh.
...
PiperOrigin-RevId: 788538127
Change-Id: I999733399a1a0da07b0f915f34d31364ab8b3b52
2025-07-29 11:31:18 -07:00
Yuval Tassa
46dc67b7eb
Add function mjs_sensorDim to user API.
...
Note: change to (unreleased) contact sensor mjSpec API
PiperOrigin-RevId: 788507423
Change-Id: Ie639afb7ed01dc3f7bab43a3e812e8e0b0c67d07
2025-07-29 10:20:27 -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
Yuval Tassa
d0e4771c8c
Add contact sensor.
...
PiperOrigin-RevId: 783011982
Change-Id: Ica56fe9d520fa1d1ee7338e09148b1a55a049912
2025-07-14 13:03:35 -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
Yuval Tassa
e6c5715903
Add insidesite sensor for detecting when an object is inside the volume of a site.
...
PiperOrigin-RevId: 780993257
Change-Id: I2dcfc840d222680adc3b934344a0819f4d78b6eb
2025-07-09 04:56:42 -07:00
Alessio Quaglino
564c51ddb9
Check for duplicated names when setting element names.
...
PiperOrigin-RevId: 778827590
Change-Id: I77a208c1571cf735cae80840ea830aa347681f71
2025-07-03 03:20:55 -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
18d5d5d03f
Improve documentation related to mjSpec element deletion.
...
PiperOrigin-RevId: 775677830
Change-Id: I02e51b57956b0b6a20c654326b54e001b498dd96
2025-06-25 07:23:51 -07:00
Alessio Quaglino
a00bfa819c
Raise error when binding to a removed element.
...
PiperOrigin-RevId: 774462737
Change-Id: I820c0e1c010ae9fbf6d9667c3364d4b65bf21002
2025-06-22 10:15:31 -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
Alessio Quaglino
0488d9f4eb
Replace mjs_detachBody and mjs_detachDefault with mjs_detach.
...
In a follow-up, mjs_detach will be changed to only remove without deleting an element.
PiperOrigin-RevId: 773637351
Change-Id: I9ee4d3584ba88ccc225591337cf036bab806e25c
2025-06-20 04:12:27 -07:00
Alessio Quaglino
f75772587a
Add functions for setting an mjsActuator to a specific shortcut type.
...
PiperOrigin-RevId: 769049331
Change-Id: If5bb04966bd29a57569a2c17d712b9ae3d33324d
2025-06-09 02:17:02 -07:00
Alessio Quaglino
84ad22a590
Add mj_copyBack for copying real-valued arrays from mjModel back to mjSpec.
...
Also add `SaveAndReadXML` function to test fixture using `mjSpec` as input.
PiperOrigin-RevId: 765393821
Change-Id: Ic257addd2fc89678fc11b226c168c077626cc51e
2025-05-30 17:17:14 -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
Yuval Tassa
89e39dc0a7
Expose mj_makeM as a sub-component.
...
PiperOrigin-RevId: 763662068
Change-Id: I55ced456dca751c1de09fb35e2f73c60ffc0d626
2025-05-27 00:35:55 -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
Yuval Tassa
ced630181d
Replace mjv_sceneState and related code with mjv_copy{Model,Data}
...
PiperOrigin-RevId: 760662776
Change-Id: I512bda9187fbc19ade6924b91d5cb2275078de42
2025-05-19 09:51:58 -07:00
Yuval Tassa
8268c6d1ff
Add mjv_copyData
...
PiperOrigin-RevId: 760642972
Change-Id: I16227fd91bf42618fda684b15b3650758ae29b13
2025-05-19 08:59:43 -07:00
Yuval Tassa
e8c566bee1
Remove use of diagnum in solver
...
PiperOrigin-RevId: 759021147
Change-Id: I9e5c85b6542380780fc487781398f406ddaad51b
2025-05-15 00:39:28 -07:00
Alessio Quaglino
71bdd915f7
Move bending stiffness from plugin to the compiler.
...
PiperOrigin-RevId: 758677644
Change-Id: I7d5c5140ba6948002bfa4ae9d6b4bf0f6de0e39b
2025-05-14 07:39:24 -07:00
Yuval Tassa
dd28b887d4
Rename C sparse structure to M in mjdata, improve docstrings.
...
PiperOrigin-RevId: 758636638
Change-Id: If78acc423601d2911f514929b27f7b6d0af9ef58
2025-05-14 05:26:19 -07:00
Google DeepMind
fa95fe0c59
Add intensity and range parameters to lights.
...
PiperOrigin-RevId: 758603199
Change-Id: I74e88bdfeedd9224e84d953f237d68eca79e6cb7
2025-05-14 03:28:03 -07:00
Alessio Quaglino
34e8ff1aad
Add flex edge flap connectivity to mjModel.
...
PiperOrigin-RevId: 758593152
Change-Id: I79836df961972c9eae8037e5fcbfc3d0122645de
2025-05-14 02:50:37 -07:00
Yuval Tassa
79c74d7eae
Add mjData.M, not yet used.
...
PiperOrigin-RevId: 758351796
Change-Id: I0786966b2f2c2e699db845cda6940a8821b23f49
2025-05-13 13:28:03 -07:00
Yuval Tassa
1e02d66c3d
Remove M matrix structure from mjData.
...
Introduced in March 2025 as a temporary measure, this is not considered a breaking change.
PiperOrigin-RevId: 758311298
Change-Id: Ia08857c18b791f6a62a2d8d136b45fc075507b93
2025-05-13 11:47:18 -07:00
Yuval Tassa
627fffdef9
Switch mjData.{qH,qLD} from full ("M") to reduced ("C") inertia matrix structure.
...
PiperOrigin-RevId: 758273074
Change-Id: If1a2e663ea70044694af985e0119afd6d58115ac
2025-05-13 10:20:32 -07:00
Yuval Tassa
755564a348
Remove unused code related to legacy island implementation.
...
Also fix a docstring.
PiperOrigin-RevId: 757939564
Change-Id: I3a970fd38c63886d34cd23b1fb45617a9ce5c147
2025-05-12 15:39:16 -07:00