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
70bc7be4bc
Add additional data fields that can be reported by rangefinder sensors.
...
PiperOrigin-RevId: 848316991
Change-Id: Idbf7ba81b4da711a22c23302c8782ab2b0b98d82
2025-12-23 15:33:00 -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
Google DeepMind
477a14dcb2
Add WASM binding for mj_compile.
...
It does not support model assets management via VFS yet.
PiperOrigin-RevId: 844864882
Change-Id: I422d7896ed024fc6f5c3fa923a58cdc9059f3bee
2025-12-15 11:58:26 -08:00
Yuval Tassa
1ff74ba810
Change the type of state signature arguments from unsigned int to int
...
PiperOrigin-RevId: 843162492
Change-Id: I51d3324f088e8055898e115bdd32267c5950a412
2025-12-11 04:34:36 -08:00
Yuval Tassa
19e2d0ae2f
Add mj_fwdKinematics and a table improving documentation of the MuJoCo computation pipeline structure.
...
PiperOrigin-RevId: 838768130
Change-Id: I1a22d5cdca7db704ba4cea1667fcbecb16b87005
2025-12-01 07:39:00 -08:00
Google DeepMind
8a5c52d395
Use a dedicated function for wrapper struct names
...
This change introduces a `wrapper_struct_name` function in `structs.py` to consistently generate the name of the C++ wrapper struct from a C struct name. All call sites in `functions.py` and `structs.py` that previously used `common.capitalize` for this purpose now call `wrapper_struct_name`.
PiperOrigin-RevId: 837544242
Change-Id: Ibe5fea8294283dae63bb8d064fd8beb8cfd3f2fe
2025-11-27 08:42:33 -08:00
Matija Kecman
05f194c412
Reorganization of the WASM bindings.cc template
...
* Move all bindings into a single EMSCRIPTEN_BINDINGS block
* Move all auto generated bindings line to the start of the block
* Alphabetically sort the constants binding lines
PiperOrigin-RevId: 837142009
Change-Id: I218a37dbc0ca6c6f16a455718889c08fe1b41d56
2025-11-26 08:43:51 -08:00
Matija Kecman
181dcab6be
Combine markers and content and reorganize parts of the WASM template file
...
PiperOrigin-RevId: 836729951
Change-Id: Ib3bb25a23325cfbd84fd0439243db37ca8236bf3
2025-11-25 10:40:44 -08:00
Google DeepMind
6e59f61c70
Make WASM codegen output to be alphabetically ordered.
...
PiperOrigin-RevId: 836680575
Change-Id: I7ddb7267c0db4911b2e84528f948dee6fccdf81d
2025-11-25 08:29:30 -08:00
Yuval Tassa
888d3a7b07
Add mj_copyState
...
PiperOrigin-RevId: 836588419
Change-Id: I7609e121dc0ac697d4d015d4244bdd5962650def
2025-11-25 03:10:30 -08:00
Google DeepMind
711a388b3d
Sort and generate optional struct bindings in WASM.
...
PiperOrigin-RevId: 836273537
Change-Id: I2af2401969a4780f593df86dc9336adcc285fd1b
2025-11-24 10:18:09 -08:00
Matija Kecman
ee8dbd4347
Simplify enum WASM bindings generator
...
PiperOrigin-RevId: 834725472
Change-Id: I278447145cd8dcdd145f0d50bc3bae649ea2b440
2025-11-20 05:52:02 -08:00
Matija Kecman
a0d49ade1b
More simplification to functions.py in WASM bindings
...
PiperOrigin-RevId: 834643175
Change-Id: Iff873f6f0916e0039ff6a44468afd9b4d8f98f37
2025-11-20 01:06:29 -08:00
Google DeepMind
49394d57d9
Rename WASM binding wrapper functions and reorder generated code.
...
PiperOrigin-RevId: 834265965
Change-Id: I58e7d572dcae4f1ca262ae5d876fcd8353af183c
2025-11-19 06:26:03 -08:00
Google DeepMind
10fe5ff07f
Generate MjVisual, MjModel, MjData and MjSpec structs declaration
...
PiperOrigin-RevId: 834264723
Change-Id: Id33d7568a1f9f0cfb1271cf9dd2d8713c00eee34
2025-11-19 06:22:28 -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
a66cf303f8
Clean up ray functions
...
PiperOrigin-RevId: 833299985
Change-Id: I30aabe889ccc5900ff0e50a578e98e176d3effa4
2025-11-17 05:47:44 -08:00
Matias Manevi
53e254b715
Generate using declarations for anonymous structs in WASM bindings.
...
PiperOrigin-RevId: 832359379
Change-Id: Ie5913c584c5605f512dbe423524a829043179b6f
2025-11-14 10:03:12 -08:00
Matias Manevi
a36f452250
Refactor MuJoCo WASM bindings functions code generation and auto-generate functions requiring argument boundchecks.
...
PiperOrigin-RevId: 832333773
Change-Id: Id2e1a59e8d366baa2ee044d693f76aadcd1dfd32
2025-11-14 08:51:18 -08:00
Haroon Qureshi
6c15c711ee
Make mjv_cameraFrame and mjv_cameraFrustum public.
...
PiperOrigin-RevId: 832187804
Change-Id: I74d05d7fe03bc81bd05a823c7c9791bca12e3079
2025-11-14 00:03:18 -08:00
Yuval Tassa
042c5223a6
Change mj_sizeModel return type to mjtSize.
...
PiperOrigin-RevId: 831768095
Change-Id: I079fbadc403b32a3ce8a73fe21b2cd66391401c3
2025-11-13 02:32:18 -08:00
Matias Manevi
fa79276290
Remove destructors from Mjs wrapper structs.
...
PiperOrigin-RevId: 831001833
Change-Id: I54550737a4c1cb504bf62b9bfed12d7a70434233
2025-11-11 11:31:21 -08:00
Matias Manevi
54661ab140
Fully generate Emscripten bindings for MuJoCo functions.
...
PiperOrigin-RevId: 830975595
Change-Id: Ie4d0d16c80f490abaa5ae8218628ac1b3d32c0ef
2025-11-11 10:32:04 -08:00
Google DeepMind
ff037f2e78
Make Emscripten binding module names consistent
...
PiperOrigin-RevId: 830902834
Change-Id: I64e004559cbfdb14fb84bc548f05b1ab49e94d4d
2025-11-11 07:20:45 -08:00
Google DeepMind
5b859327cc
Remove unused manually added structs from WASM bindings.
...
PiperOrigin-RevId: 830901766
Change-Id: If0104a59f7e06a96733feb31f1ce9a93ba3fde42
2025-11-11 07:17:37 -08:00
Matias Manevi
6fb4394701
Refactor array initialization for mjData and mjvScene in MuJoCo WASM bindings.
...
PiperOrigin-RevId: 829406147
Change-Id: Ib93c49e938086fb277e4959ade1f25e6ced5c70d
2025-11-07 06:12:14 -08:00
Yuval Tassa
252a0d73df
Add sleep related data structures
...
PiperOrigin-RevId: 829055431
Change-Id: I1ccbd77a57044a754ae7db611b4c2c0010fbda53
2025-11-06 12:10:55 -08:00
Matija Kecman
7dfd92098f
Simplified struct field handling in the WASM bindings
...
PiperOrigin-RevId: 829003969
Change-Id: I139f9c0dad96e1664b1bd054f09fcdf58aff260e
2025-11-06 10:10:18 -08:00
Matias Manevi
06ecdd6ba1
Refactor: Generate all struct bindings within the codegen.
...
PiperOrigin-RevId: 828973537
Change-Id: I3f371d2f88e1cd9b1bb5c0a9c6a5ace7a21673fb
2025-11-06 08:49:48 -08:00
Google DeepMind
b807d5f852
Remove MjVFS from generated Emscripten bindings.
...
PiperOrigin-RevId: 828943991
Change-Id: I681079854c71059392518c328a4488bb47127433
2025-11-06 07:20:11 -08:00
Google DeepMind
3577c98f82
Refactor Emscripten bindings generation for MuJoCo structs.
...
PiperOrigin-RevId: 828550215
Change-Id: Iab0bf3a9fbaca4d7774f89a4d8977e762aa57629
2025-11-05 11:14:29 -08:00
Google DeepMind
8104235f8e
Generate wrappers for anonymous structs within mjVisual.
...
PiperOrigin-RevId: 828548681
Change-Id: I07f8b407157b91ac24b38604b20826541e20e23e
2025-11-05 11:10:52 -08:00
Google DeepMind
fe1b6b7c80
Refactor: Group autogenerated structs source in bindings.cc
...
This change modifies the code generation for structs in `bindings.cc`. Instead of placing each struct's constructor and member functions under individual markers, all autogenerated struct source code is now grouped together under a single `// {{ AUTOGENNED_STRUCTS_SOURCE }}` marker. This improves the organization of the generated file and simplifies the template.
Future work would move the rest of the structs into this pattern
PiperOrigin-RevId: 828390272
Change-Id: Iee9d0e8766db86b2c1d4296a37ac7a8e6e05428b
2025-11-05 03:26:09 -08:00
Matija Kecman
29c1a3a0a5
Cleanup WASM bindings generators so they all have a similar interface
...
PiperOrigin-RevId: 827965451
Change-Id: I657fc4d3a480fbc62124c84fe9ddc0900a91183f
2025-11-04 07:32:32 -08:00
Matija Kecman
776fc32eb4
Cleanup WASM bindings struct generation
...
PiperOrigin-RevId: 827949686
Change-Id: I4115e397f64963244e3c30a7eaff5be7534aadf2
2025-11-04 06:44:02 -08:00
Matija Kecman
4b79a58fa0
Add convenience methods to CodeBuilder and cleanup some WASM bindings code generation
...
PiperOrigin-RevId: 827916844
Change-Id: Ie382f2a5af3d7e3ec2c81cde5d6b768835da2365
2025-11-04 05:02:59 -08:00
Matija Kecman
34e5eecba5
Autogenerate more of mjVFS and mjvGeom WASM bindings
...
PiperOrigin-RevId: 827898643
Change-Id: I95f9eaa129f663cbeb3606d286c2080c47cfbcc4
2025-11-04 04:00:13 -08:00
Matija Kecman
10130297c0
Consolidate WASM bindings into a single C++ file.
...
PiperOrigin-RevId: 827850819
Change-Id: I23e099d4e72557d79354339953246ac4eeee7ca3
2025-11-04 01:37:32 -08:00
Matias Manevi
4086261714
Add JavaScript bindings and WASM support
...
Co-authored-by: Matija Kecman <matijak@google.com >
Co-authored-by: Sebastian Noreña Rendón <sebas.norena@creativa77.com.ar >
Co-authored-by: Kyle Bayes <kylebayes@google.com >
PiperOrigin-RevId: 826479070
Change-Id: I25acf36e6c20b091d8492e10798d028ae66f6733
2025-10-31 07:21:18 -07:00
Matija Kecman
f2badc05ac
Add JavaScript bindings and WASM support
...
Co-authored-by: Matija Kecman <matijak@google.com >
Co-authored-by: Sebastian Noreña Rendón <sebas.norena@creativa77.com.ar >
Co-authored-by: Kyle Bayes <kylebayes@google.com >
PiperOrigin-RevId: 826109484
Change-Id: I327fd54122762bd2e239cc31c602a3eb73051c26
2025-10-30 11:11:52 -07:00
Matias Manevi
76e64d96bb
Add JavaScript bindings and WASM support
...
Co-authored-by: Matija Kecman <matijak@google.com >
Co-authored-by: Sebastian Noreña Rendón <sebas.norena@creativa77.com.ar >
Co-authored-by: Kyle Bayes <kylebayes@google.com >
PiperOrigin-RevId: 826094938
Change-Id: Id2658a187bc078056f4410c71202696753319e64
2025-10-30 10:38:16 -07:00