Commit Graph

2519 Commits

Author SHA1 Message Date
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
Yuval Tassa 13d3bdedad Add debugging method for printing matrices to stderr to fixture.h
PiperOrigin-RevId: 702301299
Change-Id: I01738b6634a91cde6b146475d06731471dcf3764
2024-12-03 05:20:54 -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 0f64959e27 Update the version of eigen3 ahead of the 3.2.6 release
PiperOrigin-RevId: 702026493
Change-Id: Ibb0447b7106e9b873386c153283c81685583350f
2024-12-02 11:12:39 -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 82b6dbeb40 Copy attached spec before attaching anything else.
Spec were copied after bodies are attached, so the reference to the source spec got lost during mj_copySpec().

PiperOrigin-RevId: 701287267
Change-Id: I55eff53c7ae9d42b03957be48ea506b80d274e03
2024-11-29 07:41:49 -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
Baruch Tabanpour f2e9e38edf Set geom_matid as a jax.Array for visual domain randomization.
PiperOrigin-RevId: 700706160
Change-Id: I13ef4da8cd3a671446e4bdd186dcacb4d0b3fb00
2024-11-27 08:13:36 -08:00
Levi Burner e6eab04dd0 rollout fixups and correctly initialize unspecified controls 2024-11-27 07:04:23 -05:00
Levi Burner 41b325785a fix creation of std::vector 2024-11-26 16:42:08 -05:00
Alessio Quaglino 203602b01f Move computation of flex_vert0 to user_mesh.cc.
This removes the dependency of flex_vert0 from mj_flex and mjData.

PiperOrigin-RevId: 700382297
Change-Id: I0b6d023c2e1ba14fa92417b65bfc288f37c223ae
2024-11-26 10:17:16 -08:00
Levi Burner 5ba4d58497 replace array on stack with std::vector 2024-11-26 13:16:05 -05:00
Taylor Howell b716837395 Modify MJX solver to support elliptic friction cones with condim=3 and condim=4.
PiperOrigin-RevId: 700306231
Change-Id: I50fd20cd367ecab11b23c03c0e0080266cc404e6
2024-11-26 05:22:48 -08: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
Copybara-Service 6e129a5ab2 Merge pull request #2246 from aftersomemath:remove-nroll
PiperOrigin-RevId: 700128273
Change-Id: If9c5b5b0a18483730c8b4cf0bd6788ef1e021a29
2024-11-25 16:05:29 -08: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
Balint-H e9a2f055f0 Copybara import of the project:
--
9d63ebca419496e36f94fbfec6f97f0227846cf5 by Balint-H <bkh16@ic.ac.uk>:

Throw exception if OBJ file is referenced in MJCF when loading in Unity

--
a50486c19a3483cd914e7957d7d4a5efaab9d977 by Balint-H <bkh16@ic.ac.uk>:

Adjust line length

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/2248 from Balint-H:fix/unity-obj-warning a50486c19a3483cd914e7957d7d4a5efaab9d977
PiperOrigin-RevId: 699962619
Change-Id: I2edff691fd5cedf79e2564f2ac5f2115393a4bf6
2024-11-25 06:39:15 -08:00
Copybara-Service 38e4c4812f Merge pull request #2231 from Balint-H:fix/unity-tendon-import
PiperOrigin-RevId: 699962497
Change-Id: I6284c0a3da4ecc907551c948290229f796448800
2024-11-25 06:38:09 -08:00
Alessio Quaglino c6ba8f27fd Add bind() method to MjModel and MjData.
This method allows users to bind a spec to a model or data object, making it less verbose to access its arrays.

PiperOrigin-RevId: 699952211
Change-Id: I6b71a88d5a6968bc0f902bd49db7c568b46a4dfb
2024-11-25 05:53:58 -08:00
Alessio Quaglino 13b6055098 Add material namespacing to sites.
Fixes #2243.

PiperOrigin-RevId: 699713625
Change-Id: I1b45e43f2a6ccfa64c46489c9426fcc2acdc94c3
2024-11-24 08:39:29 -08:00
Alessio Quaglino f909d63cdf Enable to attach a spec to a frame.
PiperOrigin-RevId: 699703988
Change-Id: Idbddcbce1e68286248458eb0bd24d5080451a58a
2024-11-24 07:35:14 -08:00
Alessio Quaglino 3a12db9ad2 Remove id attribute from mjSpec objects in Python bindings.
Using ids is error prone in scenarios of repeated attachment and detachment. Python users are encouraged to use names for unique identification of model elements.

PiperOrigin-RevId: 699227286
Change-Id: Ifd83e6d85d36ff72ea43caf8b82eab9e4d552440
2024-11-22 11:05:14 -08:00
Yuval Tassa 1d64362adc Add mjv_copyModel to copy mjModel, skipping large arrays not required for abstract visualization.
This functionality is meant for fast copying of `mjModel` when synchronizing the visualization state, as in the Python passive viewer.

PiperOrigin-RevId: 699199743
Change-Id: I13a5160063eb09139ec1aee9c4969bc1c6f547f1
2024-11-22 09:38:08 -08:00
Yuval Tassa 74dcd51d83 Update changelog with Python 3.13 support (upcoming release)
PiperOrigin-RevId: 699127095
Change-Id: I098d1e91e59642f27a764d055c6ae9b77a8b1000
2024-11-22 04:34:33 -08:00
Alessio Quaglino 38ee55a957 Remove unused userfacenormal field from mjSpec.
PiperOrigin-RevId: 698739284
Change-Id: I6407356ac12ad49454d15ecf9056f2c0bef713d5
2024-11-21 05:08:39 -08:00
Yuval Tassa cedd602bc1 Compress dense rows in mjData.actuator_moment
PiperOrigin-RevId: 698516133
Change-Id: Idd861c2b63d77748a6282d72f8241eaeeb88006c
2024-11-20 14:10:28 -08:00
Yuval Tassa 1767c11d46 Direct assignment of mjData.moment_rownnz
This allows for better sanitizer coverage, errors will be caught upon read rather than upon use.

PiperOrigin-RevId: 698458735
Change-Id: I3003f3a122b83bbf42a6510260abbb8353c56a40
2024-11-20 11:24:36 -08:00
Taylor Howell a1b18e707a Compress actuator_moment memory using nJmom <= nu x nv.
PiperOrigin-RevId: 698446692
Change-Id: I49c9633e12129a1e690724db82d1f11204e41d9c
2024-11-20 10:53:07 -08:00
Taylor Howell aae5fd6906 Add nJmom, the number of non-zeros in sparse actuator_moment matrix, to mjModel.
PiperOrigin-RevId: 698343986
Change-Id: I3d4a4dea1ec095d4e7b231c2fffc0e6241cee39f
2024-11-20 04:30:47 -08:00
Kyle Bayes cd84011d7b Default to nativeccd for geomDistance test.
PiperOrigin-RevId: 698340192
Change-Id: I814286903e1726462b24390eb2c3dc5b3b76899e
2024-11-20 04:14:24 -08:00
Kyle Bayes 867e8b8adb Fix ARM issues with tests with nativeccd.
Note: frameless_contact_hfield.xml doesn't work with libccd nor nativeccd on ARM as expected.
PiperOrigin-RevId: 698317464
Change-Id: I4c57e04639b9870b416c67d79a16a313c5276cf6
2024-11-20 02:30:15 -08:00
Saran Tunyasuvunakool 34c6f9b76b Update build_requirements_usd.txt.
PiperOrigin-RevId: 698138884
Change-Id: I8a3d093b460bd4acad1fa18806a59c29aaffd4c6
2024-11-19 14:07:21 -08:00
Yuval Tassa 58d68d08d3 Refactor CopyPlugins() out of TryCompile()
PiperOrigin-RevId: 698072233
Change-Id: I2138d9d8383838328611eef463448fe2f15bd173
2024-11-19 10:46:53 -08:00
Alessio Quaglino 821f1d3f98 Do not namespace empty actuator strings during attach.
Fixes #2233.

PiperOrigin-RevId: 698070772
Change-Id: I19613acfd407ba6a8ede40dad85324a70db480a8
2024-11-19 10:42:24 -08:00
Saran Tunyasuvunakool e18567545b Update various requirements.txt files.
PiperOrigin-RevId: 698009096
Change-Id: Iaa2cdadaf31c16c580ce5c2060c8bf2b8377956e
2024-11-19 07:32:00 -08:00
Yuval Tassa 5c23ae11ef Fix bug in material texrepeat attribute, fixes #2223.
Was mistakenly cast from float to int, bug introduced in 3.2.0

PiperOrigin-RevId: 697993181
Change-Id: I643a07e2b0866a4af56d7cbd3344e764a7caf56f
2024-11-19 06:30:55 -08:00
Saran Tunyasuvunakool 072039ac60 Update Google Benchmark library to v1.9.0.
The old version doesn't build under LLVM 19 with -Werror.

PiperOrigin-RevId: 697919386
Change-Id: I6cfa64936af9e2ea3b2c03e724b33f5bde7c799a
2024-11-19 01:27:36 -08:00
Baruch Tabanpour 1feaf8fd67 Add *rgba fields as jax.Arrays for visual domain rando.
PiperOrigin-RevId: 697038459
Change-Id: Ic6eae248e916329daa8fbbeb0770cf689f06b87b
2024-11-15 16:55:44 -08:00
Kyle Bayes 0cb35a0fe1 Populate missing fields in mjCCDStatus in GJK code.
PiperOrigin-RevId: 696965759
Change-Id: Idf0799a44876e95fc8d688dd39663a34f1808b27
2024-11-15 12:24:37 -08:00
Kyle Bayes f91588a171 Fallback to polytope3 if tetrahedron from GJK has the origin on a face (most likely due to a numerical issue).
PiperOrigin-RevId: 696872633
Change-Id: I58edb0fdc30ad472c8f1338df728e8d42c25fc39
2024-11-15 06:53:00 -08:00
Silvia Cruciani 386662106b Reshape arrays for LQR notebooks for Mujoco sparse2dense
Without reshape the collabs results in an error due to incompatible function arguments

PiperOrigin-RevId: 696554177
Change-Id: Id4317ee6fccbe2ac912af7a8b07228ddebebbbcf
2024-11-14 09:42:37 -08:00
Balint-H 6b3d34d9be Fix swapped params in tendons on XML import 2024-11-14 17:32:28 +00:00
Kyle Bayes 0a0de6615d Back out of gjkIntersect when convergence fails due to algorithm oscillating between two support points. Also, fix related bug in box support function.
PiperOrigin-RevId: 696482893
Change-Id: Icedaf5489b761b8bf03ec30558b5d1128668a647
2024-11-14 05:12:32 -08:00
Yuval Tassa 536c60a0ac Print arena usage percentage in mjData print.
PiperOrigin-RevId: 696464274
Change-Id: Ib794148e037521118138bd72c021dbe086c9681a
2024-11-14 03:52:41 -08:00