Add -Wgnu-empty-initializer to Clang builds to catch this issue in the future. Initialising arrays with empty braces is not part of the C standard and fails on MSVC. This commit should catch the issue earlier by detecting it in Clang.
PiperOrigin-RevId: 517373961
Change-Id: I518006e84151e8d5b45a7fe00ba7675dfb031ca0
The bug was introduced in 2f0fb1e4ef. The glfwSwapBuffers call should occur on the main UI thread, not the CoreVideo DisplayLink thread.
PiperOrigin-RevId: 517172202
Change-Id: I2491f2194765019748198cd0cc61ca9263331b01
Also unify warning options across Clang and GCC and fix minor issues that was surfaced by this.
PiperOrigin-RevId: 508619655
Change-Id: I59b777bf2dfea4422485670e2427c7d3f5cf6405
- Before this change, the y-axis scale had only one digit, leading to user confusion. Small changes in senor values could appear as if the values remained at the nearest integer value, while in fact the y-axis itself was changing, but this was not evident in the GUI due to the reduced precision.
- Fixes#719.
PiperOrigin-RevId: 506841881
Change-Id: I583036bba389cef8d9ecf1c1bbcfb573ef2285e6
Note that The GLFW adapter currently assumes that a GPU is always present, so this new code path is never reached at the moment.
PiperOrigin-RevId: 504617048
Change-Id: I04a323c33d9cff73686d39e4a6676ca6a4484c98
Change atomic_bool to atomic_int to make sure that the compiler will try the best to
generate machine code, instead of relying on an external atomic library
Current users only get a cryptic "Illegal instruction" crash.
Context: https://github.com/deepmind/mujoco/issues/611
PiperOrigin-RevId: 491705647
Change-Id: I1285897a36e858300ee3d125957e90754be9a7f7
This helps distro packagers avoid having to create a directory with the generic `plugin` name in system locations.
Context: https://github.com/deepmind/mujoco/issues/552
PiperOrigin-RevId: 489011386
Change-Id: Ie9f1748cbb4f2b9dc8c328064caaeb50c88fdec3
- 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
Since upgrading to Clang 15, abseil fails to build, because of abseil/abseil-cpp#1201.
PiperOrigin-RevId: 486190797
Change-Id: Ibaa1c03b8d21ae4a83c3825c8d56363aa2f89505
- Add private function `mj_arenaAlloc`. This is used internally to allocate memory from the arena.
- Add private function `mj_nefc` to count constraints. This function returns a tight upper bound on `d->nefc`. The number of counted constraints can be slightly bigger than exact `d->nefc` in the case of constraints with empty Jacobian, as when placing a frictional tendon between two world sites.
- Add new `memory` attribute to the `size` XML element for specification of arena memory size. This attribute is mutually exclusive with `nstack` and `njmax` specifications, which are now deprecated (but left around for the time being for legacy compatibility).
- Move `d->stack` to the end of the new arena space. The stack now grows in reverse from the end.
PiperOrigin-RevId: 479341539
Change-Id: Ie019c202e0908577ffc6f833a37920858116f667
Also update the README banner so that the background grid lines scale more reliably to different screen PPI.
PiperOrigin-RevId: 473598837
Change-Id: I43434b35333714922128f8fd625aa6eb62521a7f
- Improved time-sync logic readability in `PhysicsLoop`.
- Fixed unattainable condition for breaking from stepping loop if data was reset.
- Added measurement of actual real-time tracking.
- Moved slowdown overlay to top left.
- Report slowdown as % of real-time, rather than fraction.
- Report actual slowdown if different than requested (very small timestep, PhysicsLoop cannot keep up) by more than 10%.
- Replaced slowdown increments of 2 with decimal-rounded increments of 10^(1/10). This is a finer-grained scale (approximately 3x as fine) and well suited for decimal percentage representation.
- Maximum slowdown increased to 1000.
- Added `Simulate.refreshrate` with a default of 60Hz, in case videomode refreshrate is 0 (can occur e.g. when forwarding over X11).
- Remove realtime reporting from regular info overlay.
- Various cleanups.
PiperOrigin-RevId: 471547481
Change-Id: Idd2514a4defb1dc431617f3a515cc747c4fd8971
This allows us to use GLFW without needing to introduce a link-time dependency on the library, which in turn enables us to get GLFW through Python.
PiperOrigin-RevId: 470100999
Change-Id: I27c84ad3310afdbebd582ab0033b6a963ba6307e