The editor panel allows you to add, remove, and modify spec elements
as well as recompiling and loading the spec.
Also includes utilities for handling vertically split panels.
PiperOrigin-RevId: 875658785
Change-Id: I18b10971d587db5eb1e65a033e1dc042faac7f1d
- Simplified constraint tree discovery with a unified iterator.
- Filling in a new `efc_tree` array to avoid calling tree discovery again in the constraint phase.
- Implemented dof skipping in the dense case for efficiency.
PiperOrigin-RevId: 875440387
Change-Id: Id44a5a6fe2a80edaaf30935506a023a307e21303
There are enough differences between how the two are structured that
having separate implementations makes things easier to implement
despite some minor code duplication.
PiperOrigin-RevId: 875287973
Change-Id: Id49e089e5e1944291ce79e79f8cb71d048a942cc
This change updates the Emscripten build to output files named `mujoco.js`, `mujoco.wasm`, and `mujoco.d.ts` instead of `mujoco_wasm.*`. The internal CMake target name remains `mujoco_wasm` to avoid conflicts. The package name in `package.json` is also updated to `mujoco`. New enum tests are added.
PiperOrigin-RevId: 875140314
Change-Id: Ie03e0d1db2d03dd8582d5bfcb260b3d33549c2c9
Rename stubs.cc to mjr_compat.cc. This library acts like a
"compatibility layer" that allows the filament renderer to
be implemented behind the mjr API.
PiperOrigin-RevId: 875114054
Change-Id: I5c47581cacbcadff4c78d2ad15728cc1c3a394ad
The `mjCOctree::ComputeSdfCoeffs` function has been replaced by `mjCOctree::ComputeSdf`. The new implementation removes the dependency on the `triangle_mesh_distance` library. Instead, it uses a provided `mjCBoundingVolumeHierarchy` to perform closest point queries on the mesh. The signed distance is computed by finding the closest triangle face via the BVH and determining the sign based on the dot product of the vector from the closest point on the triangle to the octree vertex and the triangle's normal.
Optional Laplacian smoothing has been added to the SDF coefficients. This helps smooth out potential discontinuities at octree level boundaries.
PiperOrigin-RevId: 875093374
Change-Id: I6fa53243a2dda107ccf255bc6b876ca5a4554d4f
This change introduces methods to cache and load the computed stiffness matrix and nodal masses for flex elements. The cache key is generated based on material properties (Young's modulus, Poisson's ratio), interpolation order, and the bounding box of the flex. This avoids redundant expensive computations when compiling models with identical flex definitions.
PiperOrigin-RevId: 874689771
Change-Id: I6d1e299baf294a984b507e2a2602b2c068610536
Display all other elements under "Elements" or "Assets" group.
Show properties for mjSpec, mjModel, and mjData for selected
elements.
PiperOrigin-RevId: 874614195
Change-Id: I128c2bec844983ac5d35a3a0b1e58b8a5b0109cb
The logic for computing Signed Distance Function (SDF) coefficients using TriangleMeshDistance is moved from `mjCPlugin::Make` in `user_mesh.cc` to a new method `mjCOctree::ComputeSdfCoeffs` in `user_objects.cc`. This encapsulates the SDF computation within the octree class.
PiperOrigin-RevId: 874572414
Change-Id: Ia2365c9c4527a252ff1d1bb43fe2c2593761e471
MujocoTest now loads plugins from MUJOCO_PLUGIN_DIR if set.
PluginTest is removed; all tests use MujocoTest directly.
testspeed binary loads plugins from MUJOCO_PLUGIN_DIR.
This is in preparation for moving common asset format parsing (obj, msh, stl, etc.) where we will always want to load those plugins.
PiperOrigin-RevId: 874194428
Change-Id: Id90805a9ba5de4627911b56d8b9c4ab4e1b29310
The reduced dense factorization for flex interpolation now considers all DOFs in the kinematic chain of the body containing the flex, using mj_bodyChain, instead of only the DOFs directly associated with that body. This is necessary for correctly handling pinned flexes when their parent body is part of a larger kinematic structure.
PiperOrigin-RevId: 872854468
Change-Id: Idbe9fb459084dde9e8eb1076c70dbb685c1b0bdb
Add a simple GUI for it that allows users to enable/disable
the key binding as well as control some parameters.
PiperOrigin-RevId: 872816645
Change-Id: I8abb2803e17b4f6195d447220c436d4701b24db8