- `distance` constraints were not very useful and increased the contact buffer within the constraint solver, violating a core design principle. Therefore they have been removed.
- The enum value `mjEQ_DISTANCE` is retained, but errors will be thrown in the parser and engine if these constraints are selected.
PiperOrigin-RevId: 467050101
Change-Id: Ie72a07e4fe338eea5107004a9fc0f5e47eb0c3b7
- Add `azimuth` and `elevation` to `visual.global`.
- Add `mjv_defaultFreeCamera`.
- Use `mjv_defaultFreeCamera` in `simulate`.
PiperOrigin-RevId: 465505244
Change-Id: I61e60f14a990d4e2d220958adb75c325001978ee
- Adhesion actuators using contact normals as force transmission mechanism.
- Related video: https://youtu.be/HdBue4MUZysCloses#229
PiperOrigin-RevId: 464389367
Change-Id: I9f69b3cd152d957e8f65870d208788463c036a6d
- Add sections about the state and derivatives to the Computation chapter.
PiperOrigin-RevId: 459032736
Change-Id: I0b69401688f24c84d5747f1b49980e38e19a54a3
- Never modify `d->ctrl`:
- `ctrl` values which are outside their respective `ctrlrange` are clamped internally, but `d->ctrl` itself is unmodified.
- Similarly, if `mjWARN_BADCTRL` is raised (NaNs or huge values), `ctrl` is cleared internally, but `d->ctrl` itself is unmodified.
- `mjWARN_BADCTRL` is no longer raised for `d->ctrl` values that are larger in absolute value than `mjMAXVAL`, if clamping makes them smaller than that.
- Added `mju_clip()` utility function.
- Added missing warning string for `case mjWARN_BADCTRL`.
PiperOrigin-RevId: 459025950
Change-Id: Ifbf974f9c02c3d70afdaa3114018fc81dfd746d3
- Add basic test for keyframes.
- Add missing documentation for keyframe mocap positions and quaternions.
PiperOrigin-RevId: 459021649
Change-Id: I91cf7ecbddc6262e8c72a868eeb82d627f389fb3
- Add `qH` and `qHDiagInv` to `mjData` to save factorized modified inertia.
- Add `mj_EulerSkip`, `mj_implicitSkip`, to `engine_forward.c`.
- Using the above functions, implement `mj_stepSkip` in `engine_derivative.c`.
- Add `mjd_stepFD` and `mjd_transitionFD` to `engine_derivative.c` to compute `mj_step` Jacobians.
- Exploit "Skip" functionality for speed.
- Correctly handle quaternion derivatives.
- Handle warmstarts and control limits.
PiperOrigin-RevId: 456584811
Change-Id: Iee8541f11e7b66feb8f431cb102d9bbe65461f79
The introduction of additional mjData arrays for the implicit integrator caused in a shift in data alignment in memory. In certain combinations of machines and models, this change resulted in ~5% performance regression that appears to be attributable to L2 cache misses.
This change aligns all arrays in mjData to the boundary of a typical L2 cache line size. Benchmarking shows that this resolves the performance regression on a Broadwell machine.
PiperOrigin-RevId: 451652783
Change-Id: I4ed2c2d03453a83a0b4a9b8e224e2fd7c0dadea9
This PR added necessary annotations, following what we did for mjData
and mjModel for length of the given array.
This is useful because my parser used to generate Swift interface:
https://github.com/liuliu/swift-mujoco/blob/main/Sources/codegen/main.swift#L297
such that the access to underlying array is bound-checked.
Please let me know if this makes sense. After this change, I can
successfully generate all mj* struct interfaces in Swift without problem
(with notable exception of mjui): https://github.com/liuliu/swift-mujoco/tree/main/Sources
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
This commit requires a new binary build, and therefore breaks compatibility with version 2.1.3.
Fixes#217.
Change-Id: I1e08b6fd2c468e3845e2166a1e4cc9d265de64de
This is useful when writing or modifying collision functions, when the actual direction of the x and y axes of a contact can be important.
PiperOrigin-RevId: 437256700
Change-Id: I5eab737fc98018399e151552778c6109088bf614
- Fix typos and broken links.
- Add documentation for functions introduced in 2.1.1.
- Add copyright header to `FLV.m` and remove `hello.c`.
- Update documentation for `mj_ray` and `mj_contactForce`.
- Delete out-of-date comments in `XMLreference.rst`.
- Add geom:size table to `XMLreference.rst`.
PiperOrigin-RevId: 425318966
This commit explicitly moves files around without modifying any content
so that Git can track them correctly.
Change-Id: I087d6d61d4e2d82ce06ad9ac0adf7327db94dd9c