Also:
- Renamed recently introduced `mjvPerturb` member `reflocalpos` -> `refselpos` and corrected docstring.
- Added `mjvPerturb.localmass`: body spatial inertia at selection point.
- Removed `const` qualifier to `mjData` argument of `mjv_initPerturb()`, to facilitate spatial inertia computation.
- Improved `mj_Object{Velocity, Acceleration}` docstrings, clarifying that rotational velocities precede linear velocities.
- Removed redundant const qualifiers from non pointer arguments to `mju_dot` and `mju_writeNumBytes`.
PiperOrigin-RevId: 511002168
Change-Id: I27400f497947f330072d4abb7c9bf7e71e6c5d49
Significantly reduced joint-level damping, introduced damping in the actuators themselves. This reduces dynamics artifacts by matching the space in which damping and actuation forces are applied.
PiperOrigin-RevId: 509574523
Change-Id: Id99b69aea4562509c48ed1a24fb9ea3e008c0b69
mj_contactFilter removed geom pairs where their bodies share the same weldid, but this check can be applied at broadphase instead of at geom-geom level.
PiperOrigin-RevId: 507435848
Change-Id: Ia37c741071dc5e1c26686dd319f42c9bd334d305
Sometimes broadphase returns the same body pair multiple times. In those cases, avoid creating every contact twice.
PiperOrigin-RevId: 499869235
Change-Id: I58606168b0723d40b4fdd43b1fafad79bf35d76d
The `reset` function is called inside `mj_resetData`, before any physics forwarding call has been made. It is therefore an error to read anything from mjData at this stage.
The only valid operation on mjData during `reset` is for a plugin to write into its own state variable slots and data struct. We modify the function signature to only provide access to these.
PiperOrigin-RevId: 495032492
Change-Id: Ic6d2967d2571a9083cbca1ba239ca70a8a51f474
- Memory heuristic rounds up to the nearest MB.
- `simulate` reports total memory currently allocated in the info box.
- All example models use `<size memory/>` rather than legacy attributes.
- Regenerated `example_saved.xml` and reformatted original model in [overview chapter](https://mujoco.readthedocs.io/en/latest/overview.html?#examples).
- `<size>` top-level section does not get written if empty.
PiperOrigin-RevId: 486702670
Change-Id: I0306e335f32344c59562ba606664ec9d2101f8a8
- Also change signatures of `mju_fill` and `mju_symmetrize` to conform to standard.
PiperOrigin-RevId: 485613824
Change-Id: I8dd618bac92ef40aa6c76380fa73302e81968687
If given two non-decreasing values, `springlength` specifies a deadband for spring stiffness, inside of which the force is 0 and outside of which force behaves like a regular spring, with the setpoint corresponding to the nearest value. This can be used to create tendons whose limits are enforced by springs rather than constraints, which are cheaper and easier to analyse. See test/engine/testdata/tendon_springlength.xml example model.
Spring-limited spatial tendons whose lower range value is 0 are rendered as catenaries.
Fixes#520.
PiperOrigin-RevId: 484509706
Change-Id: I6698e94ee36168f52d501e83057559805e05172d
- Added new `cable` composite type:
* The `initial` parameter specifies the joint at the starting boundary: `free`, `ball`, or `none`.
* The boundary bodies are exposed with the names:`B_left` and `B_right`.
* The vertex initial positions can be specified directly in the XML with the parameter `vertex`.
* The orientation of the body frame **is** the orientation of the material frame of the curve.
- Added new `cable` passive force plugin:
* Twist and bending stiffness can be set separately with the parameters `twist` and `bend`.
* The stress-free configuration can be set to be the initial one or flat with the flag `flat`.
* New cable example showing the formation of plectoneme.
* New coil example.
* New belt example showing interaction between twist and anisotropy.
* Added test using cantilever exact solution.
PiperOrigin-RevId: 480033694
Change-Id: I491271bce8fccb185961477e903e5a72d172c8a3
- Before this change, an asymmetric Hessian would lead to solver failure. After this change the Hessian is symmetric by definition (upper triangle is ignored).
- API documentation was updated to reflect this contract.
PiperOrigin-RevId: 477135411
Change-Id: I60d011d36853afebac26c359771c217baf101360
The use of __attribute__((constructor)) made the previous commit fail to build in MSVC.
PiperOrigin-RevId: 474891117
Change-Id: I86a71bb8f3226ee49a8b5e8c07adc613623042b3
This is an amendment to 4bfc2c0311.
Add an autolimits compiler option. When true, *limited will be inferred from the presence of the *range attributes.
When false, models where limited is not specified, and range is will fail to compile.
PiperOrigin-RevId: 472438650
Change-Id: I489098e879ee695030f44e0d8cd969787e75fb90