Also, when a mesh has both an octree and a bvh, render only the octree.
PiperOrigin-RevId: 790680831
Change-Id: Iaf3896933f6728af4db1eaa83ff5b06558ab0d19
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
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
Also reduce slightly the resolution of the models to make comparing golden data more readable.
PiperOrigin-RevId: 582990641
Change-Id: I4f935a4ce316c70f4b1641e1c0f2fe49f801b32c
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
- Introduced private function `mj_advance()` as single point of state & time advancement.
PiperOrigin-RevId: 456525969
Change-Id: Iae17217e305c7baf07cb5ecd1e1b84b936421097
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