Alessio Quaglino
af7d20c035
Change mjs_nextChild to be DFS to match XML parsing.
...
PiperOrigin-RevId: 778915232
Change-Id: I5e290f47b7d2530597bb6c85b66ff2ae807e5510
2025-07-03 10:07:13 -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
Sam Haves
d2840ce665
Add missing files to mjusd cmake.
...
PiperOrigin-RevId: 778800306
Change-Id: I1bd5766108c59fb05a6a2c6c8b3207476aca60ea
2025-07-03 01:27:12 -07:00
Sam Haves
1d613b9b9a
Add support for mjcPhysics keyframes to USD interop.
...
PiperOrigin-RevId: 778552679
Change-Id: I04026599f7a2836e3fe1cf0d553bcc86a5795f98
2025-07-02 10:17:41 -07:00
Robin Alazard
072b327430
Fix the parsing of USD scenes that use ResetXformStack
...
Also add a new test for it
PiperOrigin-RevId: 778114814
Change-Id: Ib019768ac45ecf7ec6d437199a3d1427557b2f06
2025-07-01 11:07:07 -07:00
Robin Alazard
50de1b3c2c
Read new Mujoco-specific JointAPI when converting USD.
...
PiperOrigin-RevId: 778037519
Change-Id: Idd81dc5dc14e2dfb40ba7db4404fd09f9ff50a9f
2025-07-01 07:40:23 -07:00
Robin Alazard
9dc67b50cd
Write new Mujoco-specific JointAPI data to USD.
...
PiperOrigin-RevId: 778035661
Change-Id: I945aa38fc58973023d78ab0ab5fad7783d23e1ef
2025-07-01 07:35:34 -07:00
Robin Alazard
862436f9b3
Add JointAPI schema in mjcPhysics.
...
PiperOrigin-RevId: 778030981
Change-Id: I22a4bf2a550fb78e47bef0ff171b10ce5912887e
2025-07-01 07:22:05 -07:00
Nimrod Gileadi
3db03dcce5
Don't output a warning about duplicate geom names for unnamed geoms in URDF.
...
PiperOrigin-RevId: 777998616
Change-Id: Id87533e30567fe5a0e372220ba57819383d42236
2025-07-01 05:36:17 -07:00
Taylor Howell
9eb0745968
Fix comment typo in getimpedance.
...
PiperOrigin-RevId: 777997980
Change-Id: I0fe87196360e6771db10f4d9b08d43448ea5f54e
2025-07-01 05:33:47 -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
Sam Haves
106df98946
Create Keyframe schema in mjcPhysics.
...
PiperOrigin-RevId: 777568003
Change-Id: I036fd54e2926c138f9ca8de87040b263b8427df3
2025-06-30 07:48:48 -07:00
Yuval Tassa
57b3d6d0f4
Make island discovery compatible with flex
...
PiperOrigin-RevId: 777490642
Change-Id: Iae2f4e8297cc24bded833e04ebfe32895f3a5460
2025-06-30 03:16:57 -07:00
Yuval Tassa
c945247e7c
Don't write limited and actuatorfrclimited attributes when "true" is not a valid value.
...
Saved XMLs are filled with
```
<joint type="free" limited="false" actuatorforcelimited="false"/>
```
but since these are hardcoded to "false" at compile time, there is no point in saving them to XML.
PiperOrigin-RevId: 776606516
Change-Id: Iac61c5126231f776077a8c265be732f9215fbfbb
2025-06-27 09:07:30 -07:00
Sam Haves
e80a62c6d5
Allow loading USD files into simulate.
...
PiperOrigin-RevId: 776584803
Change-Id: I66a5277b3752d69ba5d44ed419204951edb18d41
2025-06-27 07:59:21 -07:00
Alessio Quaglino
e97e5d31d0
Replace box SDF with a smooth approximation.
...
This approximation is equivalent to the exact SDF on the surface and externally, but it is smooth on the inside, rotating the gradient from radial at the box center to normal to the faces at the surface, and interpolated linearly (using two Euler angles) in between. This enables stable contact gradients for deeper penetrations.
PiperOrigin-RevId: 776574022
Change-Id: I562976e9f0535b0067aa12b2bc9d48eccb6472e9
2025-06-27 07:21:30 -07:00
Robin Alazard
931ea6938c
Add parsing tests for joints.
...
Also remove the not properly supported SphericalJoint (ball joint).
PiperOrigin-RevId: 776550199
Change-Id: I863dfa89c4cb564cf453e57c19df563ddade92b8
2025-06-27 06:01:19 -07:00
Robin Alazard
8f6a13aa8f
Add support for displayColor/Opacity (convert to rgba)
...
PiperOrigin-RevId: 776488857
Change-Id: I34713748ac553b5fdfad736801cdaa7dc2b7f1b0
2025-06-27 02:16:49 -07:00
Sam Haves
24789f8fe5
Apply articulation API to the correct body when converting to USD.
...
PiperOrigin-RevId: 776206773
Change-Id: I84b5687a9900b42fd208124414ac98feaaa9f8c4
2025-06-26 11:07:11 -07:00
Sam Haves
1e319aebed
Support joint actuator authoring in Mjcf SdfFileFormat plugin.
...
PiperOrigin-RevId: 776202325
Change-Id: I8503dd98c1b64502550b879e70039ae568517508
2025-06-26 10:55:49 -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
Sam Haves
afc35451a0
Expose ability to go from USD stage to MjSpec.
...
PiperOrigin-RevId: 776184388
Change-Id: I0325b347c9896183d148a196897e1e5d0c4bbde2
2025-06-26 10:09:55 -07:00
Sam Haves
672746f509
Use brackets for USD schema code.
...
PiperOrigin-RevId: 776157077
Change-Id: Id8c55a98dc695348430a99ca59ec509a6db26403
2025-06-26 08:54:55 -07:00
Robin Alazard
3441e0aa03
mj_usd plugin: add joints export.
...
Note that ball joint is missing, will come later.
PiperOrigin-RevId: 776057523
Change-Id: I8d13c3ea9e7f3d894af73a4640eb93202f8a2a03
2025-06-26 03:02:17 -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
Google DeepMind
da831f5d3e
Add support for separate occlusion, roughness and metallic textures
...
PiperOrigin-RevId: 775632047
Change-Id: I40ba0b3d4ecb0c0a03534b8d93f85d279febbc9c
2025-06-25 04:37:19 -07:00
Google DeepMind
81d16b7ccc
Add some comments to the material construction code
...
Grouped similar lines together, since they have become separated.
PiperOrigin-RevId: 775595031
Change-Id: Id75e87e07eb2e6b745698a57ea048daaff34f35c
2025-06-25 02:22:42 -07:00
Sam Haves
9089059517
Move headers from src/experimental/usd to include/experimental/usd
...
PiperOrigin-RevId: 775269423
Change-Id: Ifca6c3ead32b9fb3f02784ed38a9efae300be410
2025-06-24 09:33:26 -07:00
Google DeepMind
78df2ae7fa
Add support mjcf emissive layer materials
...
Mujoco supports emission as a constant coefficient, and emissive, an rgb texture. This cl supports the rgb emissive texture for usd.
PiperOrigin-RevId: 775236677
Change-Id: I0e2ce1d9f68d79b6e9d2c28eecab22b2692f061c
2025-06-24 08:06:32 -07:00
Sam Haves
a0614fff1f
Fix tinyxml2 includes.
...
PiperOrigin-RevId: 775204246
Change-Id: Ia5c692eb29b2a670cb01e3efdeb85fd6e1474b99
2025-06-24 06:18:00 -07:00
Taylor Howell
862300def5
Fix comment typo in _resetData.
...
PiperOrigin-RevId: 774705647
Change-Id: Id933cae9a219798eae266b36bd3efba2a3b88163
2025-06-23 03:49:55 -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
2707eadc00
Refactor mj_crb and mj_tendonArmature to use CSR M.
...
PiperOrigin-RevId: 774077388
Change-Id: Id57118a5d66c074766f5c69fd3b889ebc625cbf7
2025-06-21 04:49:06 -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
7dc7a349c5
Move detach from mjs_delete to mjs_detach.
...
PiperOrigin-RevId: 773686024
Change-Id: Ida2c032a6329104df80ed134cf904dde7259bd1e
2025-06-20 07:04:12 -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
Yuval Tassa
4ce6293217
Fix bug in inverse dynamics when tendon armature is present.
...
PiperOrigin-RevId: 773604419
Change-Id: Iaffe3d831c6a5aba8a0a99c05aa76cbd862745f5
2025-06-20 02:25:04 -07:00
Sam Haves
2ca9602d3c
Remove crank site from ActuatorAPI generated code.
...
The generated code was stale and no longer reflected the current schema.
PiperOrigin-RevId: 773369007
Change-Id: Ife3fa373309e668430453351f6fd10998edfdd8a
2025-06-19 09:31:10 -07:00
Sam Haves
86e6a0415b
Add missing PLUG_INFO_LIBRARY_PATH to mjcPhysics plugInfo.json
...
This gets replaced during build installation time to have the actual path to the plugin shared lib.
PiperOrigin-RevId: 773354944
Change-Id: Ib4a78d6308f97654fdd995460ac05c1c4cfbd70f
2025-06-19 08:31:05 -07:00
Yuval Tassa
335a9ce0c2
Use early-exit to improve readability of mj_instantiateEquality.
...
PiperOrigin-RevId: 772917213
Change-Id: I106402d063a8fd0e95154bd8608eb4359d4dfdab
2025-06-18 07:45:23 -07:00
Alessio Quaglino
92bc486558
Make mjs_findElement find textures by file name.
...
This is done if the model is uncompiled and their name is empty.
PiperOrigin-RevId: 772885774
Change-Id: I827d5b679637fa0571cfb0a69833ed688df16304
2025-06-18 05:54:12 -07:00
Nimrod Gileadi
9e2c21a17d
Return stricter type from mjCModel::operator+=(mjDef&).
...
PiperOrigin-RevId: 772871198
Change-Id: I4c840389b38e2d8d6bcf92311fad3242324fa3af
2025-06-18 05:00:46 -07:00
Nimrod Gileadi
d9aae1521a
Remove confusing operator overload in user_api.cc
...
Explicitly add const_cast. This doesn't change the previous behaviour, just makes it explicit.
PiperOrigin-RevId: 772486471
Change-Id: I942bd4effed93a366089411ca18461cad52bff88
2025-06-17 08:34:33 -07:00
Yuval Tassa
998769a995
Return the total non-zeros from mju_sqrMatTDSparseCount.
...
PiperOrigin-RevId: 772414653
Change-Id: Ic1cac868af0034196f33d08b2456be77c72cbd50
2025-06-17 04:27:15 -07:00
Google DeepMind
ea949f1cee
Add support for ORM maps in mujoco file format plugin
...
The ORM texture is a packed-channel map, with ambient occlusion in Red, roughness in Green, and metallic in Blue channel.
PiperOrigin-RevId: 772367369
Change-Id: I88a4dee2477daa1e3c0b00197bfbe2b276ba9937
2025-06-17 01:45:10 -07:00
Nimrod Gileadi
e2e2932fe6
Mark all single-argument constructors in user_objects.h as explicit.
...
This avoids accidental implicit conversions.
Also included some constructors with multiple arguments, where default values mean that the single-argument constructor is valid.
PiperOrigin-RevId: 772117936
Change-Id: I57e54a373593080e9d68961b00488c7a70f1aff8
2025-06-16 12:00:51 -07:00
Google DeepMind
1f0e4891c2
Add some autoformatting changes to mujoco_to_usd.cc
...
PiperOrigin-RevId: 772032458
Change-Id: I94a80e7f7928b2956e76268c0d89fb862a228c41
2025-06-16 08:15:00 -07:00
Google DeepMind
bb1b2db3a9
Add support for normal maps in mujoco file format plugin
...
PiperOrigin-RevId: 771992722
Change-Id: Ifeae9e12f1071018112e697402361caa84095ff2
2025-06-16 06:01:18 -07:00
Google DeepMind
3969cac614
Fix tinyxml include
...
This came up as a code suggestion, presumably for consistency.
PiperOrigin-RevId: 771966921
Change-Id: Ic29afc9a9eb1e0b87dd7d9ac04a5ad9790f86f0d
2025-06-16 04:26:41 -07:00