Commit Graph

30 Commits

Author SHA1 Message Date
Yuval Tassa a4e49f2dff Margin and gap redesign (breaking change)
PiperOrigin-RevId: 914329812
Change-Id: I905665e4c1965bdb8b90587e5b1277cfbfe5cce0
2026-05-12 09:43:43 -07:00
Kyle Bayes 229d821915 Enable multiccd for golden data.
PiperOrigin-RevId: 896996806
Change-Id: I7f842d25b4497e135831879e4ac1b268d0307aa6
2026-04-09 03:07:01 -07:00
Yuval Tassa 6419534bad Add actuator and sensor delays. Fixes #1004
PiperOrigin-RevId: 866478839
Change-Id: Id21a6da0f98454c8fa39ea5af8a5e213d6eae497
2026-02-06 08:47:36 -08:00
Haroon Qureshi 32a4412e2b First-pass implementation of a spec loader for zipped assets.
PiperOrigin-RevId: 861625990
Change-Id: I65cf601cd9aa3aab4915a5a247dda00a6a9aa3db
2026-01-27 03:18:30 -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
Haroon Qureshi b17f4b26dc Add more scene golden tests.
PiperOrigin-RevId: 812708484
Change-Id: Icba94b128c89097703611ac4f6974f6d1cb19b4d
2025-09-29 03:19:48 -07:00
Alessio Quaglino 7baaa39846 Add SDF geom to test/testdata/model.xml.
Also, when a mesh has both an octree and a bvh, render only the octree.

PiperOrigin-RevId: 790680831
Change-Id: Iaf3896933f6728af4db1eaa83ff5b06558ab0d19
2025-08-04 03:53:51 -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 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
Yuval Tassa 4c92c60988 Remove time from test model keyframe
PiperOrigin-RevId: 752847956
Change-Id: Iebc28c4c73d39c3d37c5fa7abd53ea8a9e11f7f9
2025-04-29 12:56:40 -07:00
Alessio Quaglino f25fc63f0f Default flex internal contacts to "false".
This function is unusual in the context of soft body simulations and has been a common gotcha for users, see e.g. #2500, #2079, #1900, and #1433. It should be used only if element inversion cannot be prevented otherwise.

PiperOrigin-RevId: 736822983
Change-Id: I76b0965c91c94dd88123826d218d7544ec37a88c
2025-03-14 04:55:09 -07:00
Alessio Quaglino 7cdf180641 Introduce trilinear flex parametrization.
These flexes use only 24 DOFs (3 per vertex of the bounding box), while colliding with the full high resolution mesh.

On an 8x8x8 cube, the performance using DOFs at all vertices is

```
 Simulation time      : 18.74 s
 Steps per second     : 533
 Realtime factor      : 0.53 x
 Time per step        : 1874.4 µs

 Contacts per step    : 114.88
 Constraints per step : 3322.51
 Degrees of freedom   : 1536
```

With the new implementation, it is the following:

```
 Simulation time      : 1.82 s
 Steps per second     : 5507
 Realtime factor      : 5.51 x
 Time per step        : 181.6 µs

 Contacts per step    : 38.84
 Constraints per step : 155.36
 Degrees of freedom   : 24
```

PiperOrigin-RevId: 721008829
Change-Id: I833df027527db578d86667cc4b24295bcf6f7d22
2025-01-29 09:38:22 -08:00
Yuval Tassa 8dd360a2c0 Add some elements to test model.
PiperOrigin-RevId: 710067190
Change-Id: I478085b8177ea8ebfa4190db8eb722c306c9793e
2024-12-27 08:18:46 -08:00
Yuval Tassa a2fd34caee Modify test/testdata/model.xml so the wrapping is stable. Fixes #1795
PiperOrigin-RevId: 653202132
Change-Id: I90ccff840a0b98d44dbee8888cb37ff5195caaa6
2024-07-17 05:46:04 -07:00
Yuval Tassa 91192393a0 Add material and nonzero elevation data to hfield in testdata/model.xml
PiperOrigin-RevId: 617011327
Change-Id: I46f4fdbd67027003a710a365d0ad29f9158ff85f
2024-03-18 18:26:13 -07:00
Yuval Tassa 8afcfd0fa1 Add custom elements to testdata/model.xml
PiperOrigin-RevId: 616752352
Change-Id: Iaaee19657e97f4962d9a2fe6e7671f3ce832264a
2024-03-18 01:58:52 -07:00
Matthew Bennice c0b7b9873d Store paths for hfields, textures, and skins similar to meshes.
PiperOrigin-RevId: 587283093
Change-Id: Ie6d8d2ecb185697a27d1b6f7fca1312df006af12
2023-12-02 03:51:25 -08:00
Alessio Quaglino 4014196c6c Add pin to flex golden data.
Also reduce slightly the resolution of the models to make comparing golden data more readable.

PiperOrigin-RevId: 582990641
Change-Id: I4f935a4ce316c70f4b1641e1c0f2fe49f801b32c
2023-11-16 04:14:58 -08:00
Yuval Tassa 3c6b573f78 Add flex model to test/testdata
PiperOrigin-RevId: 574431067
Change-Id: Ide06b145afeca5df80acfc05e290e7bc54786a8e
2023-10-18 04:11:46 -07:00
Yuval Tassa 22fab04c02 Add keyframe to golden data test model, start simulation from that keyframe.
0. Keyframe was generated by simulating passively for 64 timesteps and then saving from `simulate`.
1. This makes forward.data much more informative. There are more contacts, velocities are not 0.
2. Added non-zero controls to forward.data.
3. 70 timesteps is a lot to integrate, things can change a lot. Since we now start at time = 0.128 = after 64 steps of passive simulation, we continue to integrate for only 6 timesteps.

PiperOrigin-RevId: 570966233
Change-Id: I9538aa44619393ff05ed8c3177e73993e222150a
2023-10-05 03:52:57 -07:00
Yuval Tassa 3e034e38b2 Add constraint island discovery
PiperOrigin-RevId: 557067599
Change-Id: Ic41e1d0efef02b7a79142518afe49cf9d4e74725
2023-08-15 02:30:05 -07:00
Nimrod Gileadi 574ae6ab91 Add an actuator with actearly and dyntype="filterexact" to the test model.
PiperOrigin-RevId: 554441792
Change-Id: Ibd67b2516bf0f01417936ce183856756885002c2
2023-08-07 05:08:46 -07:00
Alessio Quaglino dab49d487c Use mesh BVH for speeding up ray mesh intersection.
PiperOrigin-RevId: 532516008
Change-Id: Ia9cac060279d030221c1a6b4fad457a857701370
2023-05-16 11:10:38 -07:00
Alessio Quaglino 9d1a21f99d Use mesh BVH for speeding up ray mesh intersection.
PiperOrigin-RevId: 532464595
Change-Id: If159c89b93c24e6a7be6310911364cfad7baae81
2023-05-16 08:17:50 -07:00
Yuval Tassa 0036f4e7ee changes to test/testdata/model.xml
PiperOrigin-RevId: 518515153
Change-Id: If645f1799a171a385248fa8196b5c41dddcc4540
2023-03-22 02:43:53 -07:00
Yuval Tassa b5813c60ca Add some geom names to testdata/model.xml.
PiperOrigin-RevId: 502374873
Change-Id: I44a4c82327ed345cd84709d6b2966f54f4dec7bd
2023-01-16 07:08:56 -08:00
Yuval Tassa ed1ca199a7 Add weld constraint to test/testdata/model.xml
PiperOrigin-RevId: 467187914
Change-Id: I87c4788d069ad7a9fbbd1fe38276c38f56e974e0
2022-08-12 05:28:08 -07:00
Yuval Tassa 03c2011463 Enable activation clamping when using implicit integrator.
- Introduced private function `mj_advance()` as single point of state & time advancement.

PiperOrigin-RevId: 456525969
Change-Id: Iae17217e305c7baf07cb5ecd1e1b84b936421097
2022-06-22 08:55:48 -07:00
Alessio Quaglino e050f36b5a Write sensor reftype and refname (if present) to XML file.
PiperOrigin-RevId: 453926332
Change-Id: I61f4aa2dc6186149b22af71eb8bb0fb2ffd84209
2022-06-09 08:03:47 -07:00
DeepMind 64bc6d27b2 Add implicit integrator.
Added analytic derivatives of smooth (unconstrained) dynamics forces, with respect to velocities:
  - Centripetal and Coriolis forces computed by the Recursive Newton-Euler algorithm.
  - Damping and fluid-drag passive forces.
  - Actuation forces.

A new implicit-in-velocity integrator is implemented using the analytic derivatives. This integrator lies between the Euler and Runge Kutta integrators in terms of both stability and computational cost.

PiperOrigin-RevId: 450377010
Change-Id: Ie192b441876c22e732fb749333926f296e0a09cc
2022-05-23 01:22:15 -07:00