Sam Haves
c2820941aa
Convert UsdPhysicsRevoluteJoint from degres to radians if compiler option is set.
...
PiperOrigin-RevId: 784574716
Change-Id: I58f65816edb782fcb41bbc721f7bed5a27741639
2025-07-18 07:18:17 -07:00
Sam Haves
46b713ef2d
Remove pedantic designated initializers in USD parsing.
...
PiperOrigin-RevId: 784544836
Change-Id: Ie36136b2a0b8105ccb4a4679883120638ec80699
2025-07-18 05:10:12 -07:00
Sam Haves
e92ce30732
Account for scale authored on UsdMesh prims.
...
PiperOrigin-RevId: 784231423
Change-Id: I82b363c6c40940982ebeb0b1949e0e1e8f92199d
2025-07-17 10:29:31 -07:00
Sam Haves
c597434fc9
When UsdCollisionAPI is applied but collisionEnabled is false, treat it as a visual gprim.
...
PiperOrigin-RevId: 784219782
Change-Id: If87e1cd7e1cc10b27a3d432585466e3aece71d26
2025-07-17 09:59:37 -07:00
Sam Haves
f5df466ee5
Add support for visual gprims to USD parsing.
...
PiperOrigin-RevId: 784197335
Change-Id: I8eb155b7942209f372487f8268ad76310cf510ac
2025-07-17 08:51:50 -07:00
Sam Haves
2e13c64308
Simplify parsing from USD stage to kinematic tree for mjSpec population.
...
Summary of changes:
- Move stage parsing from usd_to_mjspec to kinematic_tree
- A Node now has lists of paths for prims that we support parsing.
- When parsing the stage, we create a list of all the Nodes that we will place in our tree.
- Removed the need for expensive SdfPath maps and sorting of bodies in favor of indexed integer arrays.
- Simplifies usd_to_mjspec parsing as we can process each node and it's owned prims one at a time.
PiperOrigin-RevId: 784187799
Change-Id: I4907cfa1137014af21c45b10fa29ac53a49b6dac
2025-07-17 08:20:10 -07:00
Alessio Quaglino
e23226509c
Tidy up of touch stress plugin.
...
PiperOrigin-RevId: 784186240
Change-Id: I47298ff2b7676a540781561817670c5f00c1b63a
2025-07-17 08:14:49 -07:00
Alessio Quaglino
bca5d0c671
Update all references after attaching a plugin with multiple references.
...
PiperOrigin-RevId: 783784916
Change-Id: I11da14f11f9206b466bce424979264659bf9a819
2025-07-16 09:22:55 -07:00
Sam Haves
3cc8d7f58a
Fix typo in mjcPhysics MjcMaterialAPI
...
PiperOrigin-RevId: 783750052
Change-Id: Ib829ae7ead7a33572e94ee0fe221da778b623f10
2025-07-16 07:31:09 -07:00
Alessio Quaglino
549a21c9c2
Add box-triangle projection tests to octree construction.
...
Number of octree nodes for cow example:
Before change 45217
After change 28921
PiperOrigin-RevId: 783748606
Change-Id: I278ac7bc969dc1463d6dd0f7cdc8b267b7ce6c92
2025-07-16 07:24:59 -07:00
Sam Haves
6144a508b5
In Mujoco USD interop, only consider dynamic friction when writing to and parsing from USD.
...
PiperOrigin-RevId: 783741987
Change-Id: I23c47a6e95c160c5c7d5c513e268c79e4236e2e4
2025-07-16 07:00:18 -07:00
Sam Haves
b99d9e8f12
Fix inherit range pulling from act early attribute when parsing USD to MjSpec.
...
PiperOrigin-RevId: 783735573
Change-Id: I988f16cd16e47caa84a30009c36a932ec3672429
2025-07-16 06:35:10 -07:00
Sam Haves
ac0701d582
Add mujoco compiler settings to MjcSceneAPI in mjcPhysics.
...
PiperOrigin-RevId: 783729333
Change-Id: Ic1c3e4fb47a901de4eebdc2e987d276f4202d9ed
2025-07-16 06:09:36 -07:00
Alessio Quaglino
5069534a5c
Small (~10%) performance improvement in touch sensor by avoiding a transpose.
...
PiperOrigin-RevId: 783682096
Change-Id: I8311ee8fe9f64996db852969a70398c66fca4e48
2025-07-16 03:05:05 -07:00
Baruch Tabanpour
27bb74d7df
Set MJX minimum friction value to mjMINMU.
...
PiperOrigin-RevId: 783381620
Change-Id: I353a4fa39956ecb0ed0e1b2bbcaff651e8c68606
2025-07-15 10:22:27 -07:00
Sam Haves
cdf5bcb693
Add inheritrange attribute to mjcPhysics MjcActuator
...
PiperOrigin-RevId: 783363012
Change-Id: I7d0476aae70c3acc3ed4808a8741b7eb12948dba
2025-07-15 09:30:16 -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
14a8880d0d
Add plane collision test between box and triangle to Octree construction.
...
Number of octree nodes for the cow example:
Before change 57849
After change 45217
PiperOrigin-RevId: 783338447
Change-Id: I0e5178a4aa5bbe066f2a0ac1eb965b84e541dfd4
2025-07-15 08:13:44 -07:00
Alessio Quaglino
4ea778f2d3
Add octree support to MJX API.
...
Also, enable the touch sensor to use the octree SDF.
PiperOrigin-RevId: 783313462
Change-Id: I0032c2a7164f4770aa10a3612db3fd70bea954db
2025-07-15 06:44:43 -07:00
Yuval Tassa
ad0dc0de5e
Document change in inertia calculation.
...
PiperOrigin-RevId: 783249303
Change-Id: I93b24d6601c46073df2a18fbc24c52f8f7dfb915
2025-07-15 02:35:19 -07:00
Yuval Tassa
576a34bcf2
Add netforce reduction to contact sensor.
...
PiperOrigin-RevId: 783020713
Change-Id: I0d11ccc4e1fd16d07e6f116d64a26485346d9cf1
2025-07-14 13:27:43 -07:00
Yuval Tassa
d0e4771c8c
Add contact sensor.
...
PiperOrigin-RevId: 783011982
Change-Id: Ica56fe9d520fa1d1ee7338e09148b1a55a049912
2025-07-14 13:03:35 -07:00
Sam Haves
e441868dad
Add missing attributes to MjcCollisionAPI USD schema.
...
PiperOrigin-RevId: 783006362
Change-Id: I02d51190d62bb9460863025cd16360427afc70c4
2025-07-14 12:47:24 -07:00
Yuval Tassa
ef013a0633
Add mjPARTIAL_SORT macro to engine_sort.h
...
PiperOrigin-RevId: 782999687
Change-Id: I986aec0e1faedae90f1891b5f3233d5262d167f3
2025-07-14 12:26:36 -07:00
Taylor Howell
2a700c98aa
Check MJX with JAX backend for flex.
...
PiperOrigin-RevId: 782964265
Change-Id: I744d114569738ad0d5c4ee11ffba90bd50ef25ed
2025-07-14 10:49:30 -07:00
Alessio Quaglino
6e7aaacb85
Do not rely on global object lists in mjCBody::NextChild().
...
PiperOrigin-RevId: 782963753
Change-Id: I0afecbab4b7796f077963ba66eb7140d8f83ad89
2025-07-14 10:47:45 -07:00
Yuval Tassa
5187a712be
Standardize exit codes for samples.
...
Fixes #909 #910
PiperOrigin-RevId: 782951003
Change-Id: I093c0032f665bf34fecf71a75012b2b0c4c22aba
2025-07-14 10:15:46 -07:00
Alessio Quaglino
9a41d385c1
Add needsdf flag to mjsMesh.
...
PiperOrigin-RevId: 782949528
Change-Id: Iaa96326a91795c3469c991bd8def53560b38e4f0
2025-07-14 10:13:05 -07:00
Sam Haves
92bcbeb5d3
Add support for UsdPhysicsMaterialAPI and create MjcMaterialAPI for missing attributes.
...
PiperOrigin-RevId: 782942169
Change-Id: I344b5e47d1d63c9d4e50173cb6a96d0af177ec9e
2025-07-14 09:53:13 -07:00
Yuval Tassa
7d5b360dea
Add clarifying comments to mju_transformSpatial
...
PiperOrigin-RevId: 782842640
Change-Id: I1e6fc27a860b4afc3a00ab4be6d5cb2897b4426b
2025-07-14 04:03:14 -07:00
Sam Haves
11e695b4c2
Rename MjcTransmission to MjcActuator in mjcPhysics schema.
...
PiperOrigin-RevId: 782352356
Change-Id: I4b74e3131b0fed925c506742c22038231f848909
2025-07-12 09:39:01 -07:00
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
Alessio Quaglino
bbb265da4a
Do not draw touch sensor grid if contact point vis flag is disabled.
...
PiperOrigin-RevId: 781908115
Change-Id: Id42206b1d8b6766352071e20150e2a4047895bf7
2025-07-11 03:11:26 -07:00
Rishi Krishnan
3c99705f85
Update MuJoCo's version number following the 3.3.4 release.
...
PiperOrigin-RevId: 781596261
Change-Id: Iac050c4b9cb65542b52fa6b8c54ff2537bc6a648
2025-07-10 10:47:26 -07:00
Robin Alazard
723960a1f3
Fix plane size
...
Mujoco uses half-sizes so we must divide USD sizes by 2.
Also added a test for geom primitive sizes.
PiperOrigin-RevId: 781595650
Change-Id: If8a84dd942905c367590eafffac61cc23b1c407d
2025-07-10 10:45:43 -07:00
Yuval Tassa
58c95219dc
Modify mjSORT to remove some unnecessary copies.
...
PiperOrigin-RevId: 781573097
Change-Id: I60148bc88fb64ea6dfee9390efb3fd161ad3f1d8
2025-07-10 09:51:40 -07:00
Yuval Tassa
365cac49f8
Add benchmarks for mjSORT macro.
...
PiperOrigin-RevId: 781555531
Change-Id: Ia33b5512fbf65b08931037859d8c6062b018d760
2025-07-10 09:00:46 -07:00
Yuval Tassa
0b11e3e3fa
Fix typo in changelog
...
PiperOrigin-RevId: 781550866
Change-Id: I960ac501bac04c5f3cc342aea808a390b20443c4
2025-07-10 08:45:40 -07:00
Robin Alazard
1f8f3a5004
Add capsule axis rotation for USD->MJ.
...
PiperOrigin-RevId: 781546484
Change-Id: Ie6613de8faac406664ca22cb246fe7db2a728317
2025-07-10 08:32:07 -07:00
Robin Alazard
1bb6391d9c
Replace SetRotateInto with pxr::GfRotation(from, to) constructor directly
...
Also remove duplicate line with no effect
PiperOrigin-RevId: 781540954
Change-Id: I1e161c2ed0b6e3209697c9551ad30e3371e44865
2025-07-10 08:14:32 -07:00
Alessio Quaglino
d81ab17bf5
Cache SDF octree.
...
PiperOrigin-RevId: 781500550
Change-Id: I0077d41f13be0243bff292534cc6bce2bdc1caa4
2025-07-10 06:05:28 -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
Alessio Quaglino
2d69610abd
Use the geom frame for SDF collisions.
...
Also disables mesh reorientation for meshes autogenerated with marching cubes from analytic SDFs.
PiperOrigin-RevId: 781487195
Change-Id: I36b66384f240a764823c489f78f22ba9fe32f15f
2025-07-10 05:16:51 -07:00
Sam Haves
7e57a6bc30
Add missing actuatorgroupdisable default to mjcPhysics schema.
...
PiperOrigin-RevId: 781487140
Change-Id: I7b0ff3a015e0c6b229e5409455a648f6d2399617
2025-07-10 05:15:27 -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
Yuval Tassa
243c011ea0
Add note about performance and release builds.
...
PiperOrigin-RevId: 781460349
Change-Id: I7defa9bf31376afa31b32f26523e8ebd9da3fc0e
2025-07-10 03:40:25 -07:00
Sam Haves
270017f9ba
Spurious formatting errors for gravity attr authoring in Mjcf SdfFileFormat plugin.
...
PiperOrigin-RevId: 781175798
Change-Id: Ic3b3a14280c051859db7c38af0e271a1878acdb8
2025-07-09 13:02:19 -07:00
Alessio Quaglino
26a42e2848
Add sdflib changelog item.
...
PiperOrigin-RevId: 781106659
Change-Id: If4f151468f65095916d76cea2627779640bd5d29
2025-07-09 10:15:52 -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
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