Commit Graph

966 Commits

Author SHA1 Message Date
Yuval Tassa b2d353d062 Document default visible geom groups in XMLreference.
PiperOrigin-RevId: 717050528
Change-Id: I0414495d2f5a17ac2d8ba35c9353ecf0b7e8a18d
2025-01-18 12:42:01 -08:00
Yuval Tassa 463bc47633 Clarify that equality constraints defined using the body-based semantic are assumed to be satisfied at `mjData.qpos0`.
PiperOrigin-RevId: 717050088
Change-Id: I02e82cab5a60f0af48f7f921ba9bca11837f8063
2025-01-18 12:39:40 -08:00
Yuval Tassa 69c66aa1bb Fix typo.
PiperOrigin-RevId: 716820809
Change-Id: I51f8608f0c01f4fc8016b4be779d98c8972bc913
2025-01-17 15:39:56 -08:00
Yuval Tassa 240a7afdee Add sensors for potential and kinetic energy.
PiperOrigin-RevId: 716775375
Change-Id: Ic8ab7f1a51df970ab551dabe7c797cde13cd97fd
2025-01-17 13:10:12 -08:00
Yuval Tassa 71e5e376bc Remove units from zero valued size in CSS, fix a typo.
PiperOrigin-RevId: 716345043
Change-Id: I22b28e8e1d6db8ae4e482541169f1ffc46d3db34
2025-01-16 12:55:21 -08:00
Saran Tunyasuvunakool 26bac8c8af Fix changelog.
PiperOrigin-RevId: 716194356
Change-Id: I23e1717867847c342d7bac82d2fae7d26df48473
2025-01-16 05:21:35 -08:00
Alessio Quaglino c2138c3fb0 Do not copy the spec during attach.
Use a reference count for managing the memory.

PiperOrigin-RevId: 716169486
Change-Id: Id270c4858c17b9250115e9544d5ea143584e2d5f
2025-01-16 03:53:17 -08:00
Gabe Oppenheimer 6436055c6c Update the version number to 3.2.8 following the 3.2.7 release.
PiperOrigin-RevId: 715870970
Change-Id: I9fc9a09d959043f3029faa7296a717ea56f75c89
2025-01-15 11:13:27 -08:00
Alessio Quaglino 05d4c3d670 Add mjs_getParent to retrieve the parent body of an object.
PiperOrigin-RevId: 715794859
Change-Id: Ib9792787cdb966f579938dde3f94ebabca8ef1fc
2025-01-15 07:42:43 -08:00
Gabe Oppenheimer 61973a33c9 Update eigen3 and the changelog ahead of the 3.2.7 release.
PiperOrigin-RevId: 715467319
Change-Id: I4a6a168bc981c976890c46b784e94805afc86323
2025-01-14 11:51:12 -08:00
Yuval Tassa d4ca66a47b Allocate dual-solver memory inside mj_projectConstraint, no more than required.
PiperOrigin-RevId: 714093658
Change-Id: Id7e710c5dffd24871019a72a7bf2aa6eb3f7a36e
2025-01-10 10:19:13 -08:00
Yuval Tassa 2409a6e537 Add mjData.nA the number of non-zeros in the constraint inverse inertia matrix.
PiperOrigin-RevId: 714076988
Change-Id: I4c323a6e81dfb23f7972b662719bbcb688bacf4a
2025-01-10 09:23:55 -08:00
Copybara-Service 6f7fba794b Merge pull request #2336 from xela-95:patch-2
PiperOrigin-RevId: 713991183
Change-Id: I0869a068f463513e89fe2f88bca4b82177cfffa3
2025-01-10 03:46:20 -08:00
Copybara-Service d3a0c28457 Merge pull request #2334 from jjyyxx:patch-3
PiperOrigin-RevId: 713952754
Change-Id: Ic388f4dc05389fbe3e5a20b365b27f800d4147ab
2025-01-10 01:12:43 -08:00
Yuval Tassa b0f885ead0 Minor edits to the Programming/Simulation docs page.
PiperOrigin-RevId: 713952376
Change-Id: I5b7230a001bd49954d401846f40cd122ee4e748c
2025-01-10 01:11:27 -08:00
Saran Tunyasuvunakool 40ef08c8ed Don't pollute the global namespace when using mjpython.
Fixes #2265

PiperOrigin-RevId: 713442833
Change-Id: If155d9f57d4deef8b848478ebd8077a00417d5c5
2025-01-08 15:48:20 -08:00
Alessio Quaglino 6654d63438 Add spec lookup in the attached spec array using the compiler option pointer.
This enables to find the spec associated with the compiler option stored in the objects, which do not necessarily belong to the model that owns them.

PiperOrigin-RevId: 713259419
Change-Id: I579c770147ff07ed2a5edd20e7a795ee7cc27147
2025-01-08 05:44:00 -08:00
Alessandro Croci 7a6bf06706 Update simulation.rst
Add missing backticks to `mjData.xfrc_applied`
2025-01-08 14:27:46 +01:00
Alessandro Croci 661c3e01dc Update simulation.rst
Add missing backticks to `mjData.mocap_quat` in simulation.rst
2025-01-08 14:21:24 +01:00
Yuxuan Jiang df1d15fa38 Fix typo in modeling.rst 2025-01-08 09:53:36 +08:00
Alessio Quaglino f607d9554e Check that there are no pending keyframes while writing a spec.
This can happen when a body is detached without compiling or recompiling.

Also added error catching when trying to delete a body instead of detaching it.

Fixes #2327

PiperOrigin-RevId: 712526730
Change-Id: I4b48df83120fca12d475c85b3a54893841449653
2025-01-06 07:50:30 -08:00
Yuval Tassa b5df2c10bf Remove mjData.C_diag, no longer required as C is now lower triangular.
PiperOrigin-RevId: 712514204
Change-Id: I8293f65ebc09c6a8fed76b0e59d2e2a667e01a43
2025-01-06 06:58:19 -08:00
Alessio Quaglino ee6f4837f3 Auto-generate 3D mesh from convex OBJ if dim=3 in flex.
This requires the user to explicitly specify an origin.

PiperOrigin-RevId: 712483526
Change-Id: Ie316a5eccb676bb918d4bb746795019145c10f5b
2025-01-06 04:35:59 -08:00
Yuval Tassa 69c9ac074a Remove mjData.qLDiagSqrtInv, add corresponding argument to mj_solveM2.
- `qLDiagSqrtInv` is only required for the dual solvers. It is now computed as-needed rather than unconditionally.
- `mj_solveM2` now requires a new input array `sqrtInvD` which contains the square root of the inverse diagonal D (formerly saved in `qLDiagSqrtInv`).

PiperOrigin-RevId: 710805133
Change-Id: I0622d6a8da3882916824e9c10bad9223c122c321
2024-12-30 15:24:36 -08:00
Yuval Tassa ec322641b7 Fix bug in mj_mulM2.
PiperOrigin-RevId: 710756899
Change-Id: I30c0725859ba0f1a59750dc89eebb9eba84fa71b
2024-12-30 11:14:56 -08:00
Yuval Tassa 8cb253b6ca Fix typos.
PiperOrigin-RevId: 710678815
Change-Id: Iab6f603f8f4d782ac7f34140add39e1f37625167
2024-12-30 04:15:29 -08:00
Yuval Tassa e67599f517 Add weak deprecation notice include in XMLreference.
PiperOrigin-RevId: 710300945
Change-Id: I5a3dd066ef643d606d97ec36ffe1e797bb628659
2024-12-28 08:50:31 -08:00
Kristian Hartikainen edec8c5e3a Copybara import of the project:
--
0e1aae484a1a6d2d52d0b99bf62f116d42ed9a1f by Kristian Hartikainen <kristian.hartikainen@gmail.com>:

Fix typo in `changelog.rst`

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/2298 from hartikainen:patch-1 0e1aae484a1a6d2d52d0b99bf62f116d42ed9a1f
PiperOrigin-RevId: 707528220
Change-Id: Ie3bc28cf7a8456e4ba8bfc405ab7190a84d5a69e
2024-12-18 06:31:09 -08:00
Levi Burner a7eb6efd4e Copybara import of the project:
--
3a95b62f59e81bfef0f076afb173ecc14b27943d by Levi Burner <leviburner@gmail.com>:

rollout prototype native threadpool for comparing to python threads

--
efd8be1124ac839b902de45973a3ca8b9f2215e6 by Levi Burner <leviburner@gmail.com>:

copy mjpcs threadpool into python bindings

--
75603eea3e8362e354a9675e8a6cd14e56ec3d28 by Levi Burner <leviburner@gmail.com>:

rollout use threadpool as translation unit

--
06b90febd021663f6cc81fd7895e4d6e2008ed97 by Levi Burner <leviburner@gmail.com>:

rollout add chunk_divisor parameter

--
298ab2f3c0d6e12530832c3cdbf784dd92d54806 by Levi Burner <leviburner@gmail.com>:

rollout add native threading test

--
169cf9978e7abad6edd1392b8e6aab995e4f8f10 by Levi Burner <leviburner@gmail.com>:

rollout exchange chunk_divisor arg for chunk_size

--
265af851d74432d261277d3dbda11cdef1841bc8 by Levi Burner <leviburner@gmail.com>:

rollout fix cosmetics

--
1e8bffa88bf36190501b334bef31147e23db39f7 by Levi Burner <leviburner@gmail.com>:

make native rollout a class instead of a function

--
ba788214b047577f58c41ce0ab6c62c277cd8b0d by Levi Burner <leviburner@gmail.com>:

rollout update docs and changelog

--
e4cb7732319e04cba2ab2c2ad848c659f6309808 by Levi Burner <leviburner@gmail.com>:

rollout don't register atexit handler for Rollout objects

--
5a08d2efdbbbb01d4b1231ff9a36a1dc44f4d9ee by Levi Burner <leviburner@gmail.com>:

rollout nthread kwarg, rename shutdown_pool to close, fixups

--
f622378543596a208339af0208fa3a70bf2a8007 by Levi Burner <leviburner@gmail.com>:

rollout add missing .close() calls

--
50f3ebca43c53eac03f03943c34bb1e46967bd4f by Levi Burner <leviburner@gmail.com>:

rollout return immediately

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/2282 from aftersomemath:rollout-threaded 50f3ebca43c53eac03f03943c34bb1e46967bd4f
PiperOrigin-RevId: 706744277
Change-Id: I1ab2263b7d6ce30cf1908aec8fd5f2eb976a19e6
2024-12-16 09:57:08 -08:00
Yuval Tassa b26d6f0466 Disable tendon catenary visualization when tendon is actuated. Add note about catenary visualization.
PiperOrigin-RevId: 706161179
Change-Id: Ifaf571e039306309869078d1a0bcf9a69f1fe9de
2024-12-14 01:54:40 -08:00
Yuval Tassa a7fed25fdd Document how to save MjSpec to XML. Fixes #2075
PiperOrigin-RevId: 704712337
Change-Id: I51c1a14c5c48ffc8e37d9e31162a3e70a3b10313
2024-12-10 08:05:01 -08:00
Taylor Howell bd1d94c282 Fix mjx.rst.
PiperOrigin-RevId: 704301576
Change-Id: Ia663f5b7fe224ca3e7865829744379eac38fac3e
2024-12-09 08:47:46 -08:00
Yuval Tassa 3a14ada308 Store index of diagonal element for C and D in mjData.
PiperOrigin-RevId: 704287869
Change-Id: I15d1faa0b5c3ff54721f692ec6329726456ec318
2024-12-09 08:01:30 -08:00
Copybara-Service 15cb1fdfb4 Merge pull request #2271 from xela-95:patch-1
PiperOrigin-RevId: 703493322
Change-Id: I5034ecdbc2e129986bb1e61930637fd2c24b96a6
2024-12-06 07:26:47 -08:00
Yuval Tassa f547d58351 Fix typo in docs
PiperOrigin-RevId: 703449955
Change-Id: I3a5764278406dea4ff013ff82872cc27f5440f5e
2024-12-06 04:16:16 -08:00
Alessandro Croci 342a72839a Fix typo in mjx.rst 2024-12-06 09:16:37 +01:00
Jake Harmon fb8e40208c Update references to JAX's GitHub repo
JAX has moved from https://github.com/google/jax to https://github.com/jax-ml/jax

PiperOrigin-RevId: 703126479
Change-Id: Ie50003b4620db767663f2f95be40557cfe0b8dd3
2024-12-05 08:37:01 -08:00
Yuval Tassa 0e7d2ef6df Fix bug in box-sphere collider. Fixes #2206
PiperOrigin-RevId: 702627603
Change-Id: Ie6015b7fa6f8507459325d692581b0f5f83aa159
2024-12-04 01:19:27 -08:00
Yuval Tassa ec9986dcb7 Clean up changelog.
PiperOrigin-RevId: 702369712
Change-Id: I44293f18de54ddc65af31f64c40dfbe608278b6d
2024-12-03 09:39:14 -08:00
Taylor Howell a793a3417a Raise error in mjx.rne_postconstraint for currently unsupported connect and weld constraints and raise error in mjx.put_model for unsupported sensor and equality constraint combinations.
PiperOrigin-RevId: 702119449
Change-Id: I034363db41629f19ef98bea79ec89140052a7a3c
2024-12-02 16:28:23 -08:00
Gabe Oppenheimer c90a63a926 Update the version number to 3.2.7 following the 3.2.6 release.
PiperOrigin-RevId: 702103729
Change-Id: Id5581cc823a17360e7bb98ac0aa4342020c1aefa
2024-12-02 15:30:52 -08:00
Gabe Oppenheimer bbedc7f339 Update the chancelog for the v3.2.6 release
PiperOrigin-RevId: 702021093
Change-Id: I1c748581ad63ae934b043f56b929d7a5a362bb23
2024-12-02 10:56:29 -08:00
Alessio Quaglino 300450f8b8 Add circle to flexcomp and remove rope and loop from composite.
Add pulley example to show a circle use case.

Switch on flex edge rendering by default (no effect when flex skin is rendered).

PiperOrigin-RevId: 700738379
Change-Id: I8469bbf194de01c8dab66c9a51c49879013df141
2024-11-27 10:14:25 -08:00
Copybara-Service 85c6fc1bdb Merge pull request #2250 from aftersomemath:rollout-list
PiperOrigin-RevId: 700715697
Change-Id: Ia3af7c6af8a9fe1eb8b020efedd1755ae606f77b
2024-11-27 08:52:17 -08:00
Levi Burner e6eab04dd0 rollout fixups and correctly initialize unspecified controls 2024-11-27 07:04:23 -05:00
Levi Burner bd361447bb merge items in changelog 2024-11-26 08:22:28 -05:00
Alessio Quaglino e310c23267 Fix return value of mj_saveXML and mj_saveXMLString, fixes #2247
PiperOrigin-RevId: 700269761
Change-Id: Ifb7e9c66c70eac7d681cfcf106712d47291cf9e2
2024-11-26 02:32:50 -08:00
Levi Burner 943eb6bc7e rollout accepts a list of models of length nroll 2024-11-25 21:29:14 -05:00
Levi Burner 96a8f002bc Remove nroll argument from rollout
nroll can always be implied from the other arguments of rollout.

Add tests for nroll inference.
2024-11-25 14:10:42 -05:00
Alessio Quaglino 7e46e21ef3 Add mju_mat2Rot.
This function extracts the 3D rotation from an arbitrary 3x3 matrix by refining the input quaternion. It is based on the paper "A robust method to extract the rotational part of deformations" by Müller, Matthias, Jan Bender, Nuttapong Chentanez, and Miles Macklin.

PiperOrigin-RevId: 700006006
Change-Id: I77550993233dea9cdf68601762a3ae7ded749bdf
2024-11-25 09:19:10 -08:00