Sam Haves
3473e4e451
Add group support to mjcPhysics equivalents for sites, geoms, actuators, and joints.
...
PiperOrigin-RevId: 781945497
Change-Id: I5c409f05e6bae33c181a51c273f260daea6004fc
2025-07-11 05:37:41 -07:00
Yuval Tassa
365cac49f8
Add benchmarks for mjSORT macro.
...
PiperOrigin-RevId: 781555531
Change-Id: Ia33b5512fbf65b08931037859d8c6062b018d760
2025-07-10 09:00:46 -07:00
Sam Haves
fbea72d767
Remove MjcActuatorAPI in favor of typed MjcTransmission.
...
PiperOrigin-RevId: 781498554
Change-Id: Ib6ce5038645f6ca08638a9d316b0347dc121bc62
2025-07-10 05:58:58 -07:00
Sam Haves
e7212d86bc
Add maxhullvert attribute to mjcPhysics MeshCollisionAPI.
...
PiperOrigin-RevId: 781482346
Change-Id: I0d53f9ad99ac842629243b0375907b2f91bd3b61
2025-07-10 04:59:18 -07:00
Alessio Quaglino
cef02fabea
Remove sdflib plugin and move interpolation to engine_collision_sdf.
...
Before:
```
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
```
After:
```
Simulation time : 1.41 s
Steps per second : 7093
Realtime factor : 14.19 x
Time per step : 141.0 µ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: 781087896
Change-Id: Iaf69dccc5e95af5bac862344683c74f962162186
2025-07-09 09:29:47 -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
Sam Haves
14972d2490
Add mj_loadUSD function. Change simulate to use that instead of manual spec compilation.
...
PiperOrigin-RevId: 780608874
Change-Id: I333238c756fe76b371518a7cdf9452b93da3540a
2025-07-08 10:04:08 -07:00
Sam Haves
be3c3ef8a9
Add missing gravity attribute authoring to Mjcf SdfFileFormat plugin.
...
PiperOrigin-RevId: 779239797
Change-Id: I039b1089e5b436498d14df384c1aee830fd4b48a
2025-07-04 11:25:49 -07:00
Robin Alazard
e69b6cc5f3
Fix wrong extent authoring for Cube.
...
PiperOrigin-RevId: 779230125
Change-Id: I96c3d5daa7a760cd87a714a14ea74a15faf3d7db
2025-07-04 10:39:32 -07:00
Robin Alazard
21a852504c
Make sure we never apply the ArticulationRoot API more than once.
...
PiperOrigin-RevId: 779185190
Change-Id: If441d0e2ba24191883839977b46864db2b4b8204
2025-07-04 07:36:05 -07:00
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
69ce5dbd05
Consolidate tree traversal tests in the C and Python APIs.
...
PiperOrigin-RevId: 778883024
Change-Id: I0d30ed011e60a6da7148cebc1f715895fd0c6fd6
2025-07-03 07:25:23 -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
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
9dc67b50cd
Write new Mujoco-specific JointAPI data to USD.
...
PiperOrigin-RevId: 778035661
Change-Id: I945aa38fc58973023d78ab0ab5fad7783d23e1ef
2025-07-01 07:35:34 -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
1c98dfd86e
Remove unused header
...
PiperOrigin-RevId: 777505320
Change-Id: I39d4ccf47a49bfb6f74090e59c68373e76a0bcf5
2025-06-30 04:09:10 -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
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
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
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
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
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
e23b39fbfa
Increase test tolerance in engine_solver_test
...
PiperOrigin-RevId: 773647308
Change-Id: I11605518c4bb1d257763b7f3334de358bacc194c
2025-06-20 04:48:09 -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
f1b3897ea7
Fix missing namespace in test_utils.
...
PiperOrigin-RevId: 773354912
Change-Id: Ic19ba6f1ed4c3ae37a9c143f64da8b7ddc3b3e86
2025-06-19 08:29:34 -07:00
Alessio Quaglino
d2501eff68
Use procedural model creation in plugin tests.
...
This will be useful for simplifying the mjSpec API for plugins.
PiperOrigin-RevId: 772505558
Change-Id: I8eb57d7e129e0f6430fb4c610a543e0dc0f3b295
2025-06-17 09:30:54 -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
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
Alessio Quaglino
5f42078dc1
Do not write nameless frames whose class is "main".
...
PiperOrigin-RevId: 769685151
Change-Id: I3d993d7521db2b2adbf611c3e4eb5b4b293bdc30
2025-06-10 10:15:43 -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
fe81373ffe
Enable WriteReadCompare for models with assets.
...
PiperOrigin-RevId: 765500742
Change-Id: I119dbea11ed6771839b5e81d04070e95a51d3ed0
2025-05-31 00:56:27 -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
Alessio Quaglino
7932b4b202
Accumulate inertial in mjs_bodyToFrame.
...
PiperOrigin-RevId: 765129145
Change-Id: Ib7caca42ef4272ebe762655eee9380dae471be7f
2025-05-30 04:10:38 -07:00
Sam Haves
b2e8589e7a
Add support for actuators to Mujoco USD interop.
...
PiperOrigin-RevId: 764740692
Change-Id: Ib045653fee840087bc3891ee7e770bdaac08548c
2025-05-29 08:29:46 -07:00
Robin Alazard
fc69ef1084
Fix authoring type mismatch for geoms sizes attributes.
...
Fixes wrong sizes being displayed in usdview.
Also introduce a new test to ensure we catch as many of those kinds of errors as possible in the future.
PiperOrigin-RevId: 764388588
Change-Id: Id3c878edd054fe5272c42c9f960c65c850655559
2025-05-28 13:21:19 -07:00
Alessio Quaglino
287f46b220
Ensure last XML is freed after tests.
...
This fixes undetected memory leaks in tests calling mj_loadXML.
Additionally, a specific test for `mj_freeLastXML` is introduced.
PiperOrigin-RevId: 764294041
Change-Id: I8b5a5683d8431ed920cdd52b06ad3515d8e19e14
2025-05-28 09:26:46 -07:00
Kyle Bayes
56b88b59f0
Support 0-simplex in GJK code, and refactor code for efficiency and readability.
...
PiperOrigin-RevId: 764197889
Change-Id: Ie0d57474060a34a6b908be0386094f442cda448a
2025-05-28 04:19:13 -07:00
Google DeepMind
568620dd2f
Add texture attribute to lights.
...
PiperOrigin-RevId: 763739805
Change-Id: I333ed2ac68f30f79f688ca01d7b5fd6bf2d836c9
2025-05-27 05:04:01 -07:00
Sam Haves
441ca838a1
Add support for inertia and mass to Mujoco USD interop.
...
PiperOrigin-RevId: 763737956
Change-Id: I6cdf267d76536a26aeb6327ce90165842e32bd8a
2025-05-27 04:58:09 -07:00
Sam Haves
76ddc30072
Make MJCF SdfFileFormat plugin create hierarchy reflecting MJCF instead of sibling rigidbodies.
...
PiperOrigin-RevId: 762117447
Change-Id: Id13f7a4f4e383a0c9e670e5272836f2fb1099830
2025-05-22 14:04:58 -07:00
Sam Haves
62a9d5b98d
Add MjcPhysicsSceneAPI support.
...
Still missing compiler settings but will follow up in a future CL. Tried to add full coverage for testing setting of attributes to non-default values.
PiperOrigin-RevId: 761636862
Change-Id: Id4b9486645b2600931556cdcb8dc71f28ec309cd
2025-05-21 13:03:46 -07:00