1. Create an arena for the mjData instance used by the passive viewer visualization.
When using the passive viewer, stuff gets copied from the real mjData into a minimal struct.
That struct didn't have a stack, and now visualization for Flex does stack allocs.
2. Add missing a missing field in scene state for flex visualization.
3. Fix a memory leak where mjvScene wasn't released on exit in the passive viewer.
4. Add some locks in places where the render thread and Simulate::Sync collide.
This fixes#1280.
PiperOrigin-RevId: 591891676
Change-Id: I592f286cab9719c8d9af84e42f9756ea1f9f1971
That change removed some spurious contacts returned by mjc_BoxBox, but also removed some desirable contacts that occur during very deep penetration of two boxes (when one box is completely inside another box). This is now fixed.
PiperOrigin-RevId: 591036252
Change-Id: I84b51f2179fd6fe29618a4e908e86934c6fc6941
Before this change:
- User-modified values of `mjModel.stat.{meanmass, meaninertia}` would not be saved to XML.
- Non-user-modified values of `mjModel.stat.{meansize, extent, center}` would always get saved to XML.
After this change values are saved to XML only if provided by the user, either in the XML or by changing values in `mjModel` before saving.
PiperOrigin-RevId: 589473351
Change-Id: I4dcf4892ef61c35edf424226e731232d861bad8d
The box-box collider sometimes outputs bad contact points which are far outside one of the two boxes. This happens at configurations which are very rare numerically, but rare configurations (e.g. perfect box alignment) are often induced by the designer and the physics, making them actually not-so-rare.
Since the box collision functions are very difficult to understand, we circumvent the issue by extending the post processing code to detect and remove such contacts.
PiperOrigin-RevId: 589178197
Change-Id: I82b8a888ef04f9196111c960757e3314d0ab6d8e
Accept new attributes on the plugin/actuator tag:
- dyntype
- dynprm
- actlimited
- actrange
- actearly
This addresses some of the requests in #1098.
PiperOrigin-RevId: 584866281
Change-Id: I4f7559e446888216093efba4ced9119cfc0528a4
Also reduce slightly the resolution of the models to make comparing golden data more readable.
PiperOrigin-RevId: 582990641
Change-Id: I4f935a4ce316c70f4b1641e1c0f2fe49f801b32c
Added `option-actuatorgroupdisable` attribute and associated `mjOption.disableactuator` integer bitfield, used to disable sets of actuators at runtime according to their group.
- The first 6 actuator groups are toggleable in the `simulate` viewer.
- Minor refactor and cleanup of actuator documentation.
https://youtu.be/H9qG9Zf2W44Fixes#1092.
PiperOrigin-RevId: 578335600
Change-Id: I4cf663b90ea768e4380acfa2fe3b8c15c7cbb568
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