Add usd_decoder to mujoco/plugin.
- Previously was src/experimental/usd/usd_to_mjspec.cc, now that same spec is returned by the plugin.
PiperOrigin-RevId: 854350962
Change-Id: Ia980190a557c50ce8197980922a2594b613859b4
Before this change, a model which took more than 1/4 seconds to load caused the simulation to pause, which is a behavior that is only supposed to occur for models that loaded with a warning.
PiperOrigin-RevId: 665786861
Change-Id: Ie3a6c8d18a6abbb425a0bbcc5a8e55d5fd7a0c72
This CL does not change the default build behavior of MuJoCo. To use single-precision floating-point, build MuJoCo with `-DmjUSESINGLE`.
PiperOrigin-RevId: 644782648
Change-Id: Ie815df9916798ca8054306437b39a33f84ce9e08
Noise injection was occurring at every iteration of the physics thread, rather than before every call to `mj_step`, leading to time-step-dependent noise rate.
- Moved the logic from main.cc to a `Simulate::` method, called before `mj_step`.
- Reduced the maximum time-scale slider value back to 4 seconds (recent increase was due to this bug).
PiperOrigin-RevId: 643350296
Change-Id: I96832905e6614f92ac725298b16fcabe64ea1df1
- Use `ctrl` as filter state rather than external preallocated buffer.
- Scale and clip to control ranges.
- Exponential decay to the middle of the range.
- Scale is now [0 1] (scaled to range).
- Rate is now [0 20].
PiperOrigin-RevId: 642586333
Change-Id: Id45a0420736a6edcf09be1db53d9320e7df2c668
This prevents an invalid memory access when the stack is used in engine_vis.
Fixes#1219.
PiperOrigin-RevId: 588017796
Change-Id: I1ee18c5aa5e96ccaeebb0a467cd384355882b80b
The following dependencies are disabled with a cmake patch file.
- Enoki
- OpenMP
- Assimp
- FCPW
PiperOrigin-RevId: 565352386
Change-Id: Icff9de68408e0afa2032bb83b24491fc4e41d181
This change also requires user scripts to explicitly synchronize changes to physics state to the viewer. The Simulate class was reconfigured so that certain UI events are handled during this sync operation, outside of the render loop on the main thread. These correspond to operations that require access to the full mjModel/mjData.
To support other, more interactive operations (e.g. camera movements), a new mjvSceneState struct is introduced which captures only the portion of the physics state required for scene re-rendering. The mjvSceneState is updated from mjModel/mjData during the viewer sync operation, and is significantly cheaper than a full mj_copyModel and mj_copyData.
Fixes https://github.com/deepmind/mujoco/issues/796
PiperOrigin-RevId: 525723636
Change-Id: Id08d0210a2c067d5afe85e2bf104f276aeddd75e
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
- 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
Fix name of glew library
Move simulate to new directory and refactor to use C++ conventions
Wrap simulate in mujoco namespace
fix namespaces, convert struct to class, use std::lock_guard
use GetMutex to better handle destruction ordering
rename mjSimulate to Simulate
nit: space before public and typo
move startup print
use nullptr instead of NULL
use GetInstance() to get simulate object
convert init to default constructor