- 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
mj_makeModel returns NULL if any of the array sizes are negative. Callers of the function need to handle that case.
PiperOrigin-RevId: 457948558
Change-Id: I9a5c8c0d3293ed0a92c5791f00d3ed34c848e024
List all valid names in the error message.
Fix an off-by-one error when accessing elements by numeric index (rather than name).
PiperOrigin-RevId: 457702283
Change-Id: I6e4f1518b4ecd9ca91ac9b0bf6b0963fc0a9bd18
- 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
BEGIN PUBLIC
Add Related Software section to README.md.
Fixes#312.
END_PUBLIC
PiperOrigin-RevId: 456528399
Change-Id: Icf97a31a5ea16e93edf9856f70dec650c7b70791
- Introduced private function `mj_advance()` as single point of state & time advancement.
PiperOrigin-RevId: 456525969
Change-Id: Iae17217e305c7baf07cb5ecd1e1b84b936421097
When using MSAN, mjData->buffer is marked as poisoned, despite being initialized with zeroes.
This is useful for catching computations that accidentally use uninitialized values.
However, when using engine_print, it's OK to assume the buffer is initialized to zeros.
PiperOrigin-RevId: 456085776
Change-Id: I9d85e37fa82958eb54ac413140543a6581aa46ad
This will allow us to add fields that can't be cast to int or double, without breaking print.
PiperOrigin-RevId: 456005913
Change-Id: I1fccfd11466f4745f69172af0ae61be07642927c
This allows us to sign and notarize the bundle with mujoco.tbd in place, which is required for AppleClang to be able to build against the embedded framework.
PiperOrigin-RevId: 455952502
Change-Id: I366f1c17e7a6c06d956467ced6f16f3c37aebf6a
The C++ standard library `std::istringstream` is not guaranteed to parse "inf" and "nan" as valid floating point numbers. In our testing, libc++ does this, but libstdc++ and MSVCRT do not.
PiperOrigin-RevId: 455435431
Change-Id: I99c00303b08c2e4e62acfa3ca52a21a3008f4545
Somehow tests load these libs twice, and construct/destruct globals twice.
Can be preproduced even without sanitizers with logging from GlobalModel::~GlobalModel.
themodel does not need to be visible. If it's static each instance will have own a copy.
_mjMap does not need to use string and avoid lifecycle issues at all.
PiperOrigin-RevId: 454678814
Change-Id: I8fca5e1f06cbc2b413beabcece1219445482c0ed
d8880e9a12 introduced measuring performance of a fixed batch of 50 steps, with a fixed starting state.
The Google Benchmark library has a more direct API for doing this, which ends up with nicer looking reported numbers.
PiperOrigin-RevId: 454133316
Change-Id: I368b985dc871084b9ed8c41a87016408719b53ad
Using fabs with int arguments broke the clang build on GitHub Actions, with a `-Wabsolute-value` error.
PiperOrigin-RevId: 453872474
Change-Id: I5c1278e9e628b0ea3d6f26c7ee7d6925c6276850