Commit Graph

2536 Commits

Author SHA1 Message Date
Silvio Traversaro 376dc59ea0 GitHub Actions: Use macos-13 image instead of deprecated macos-12 2024-12-07 17:25:19 +01:00
Baruch Tabanpour c1d97d4a22 Fix #2237.
PiperOrigin-RevId: 703547316
Change-Id: I279876a299e56a16f8d5227fc1d0f64265477853
2024-12-06 10:46:38 -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
Saran Tunyasuvunakool fa8af0eea9 Add MuJoCo sparsification fields to MJX data structures.
PiperOrigin-RevId: 703482996
Change-Id: I981bfc80825a9d4d6597d54035bc40a4f4ae068a
2024-12-06 06:40:56 -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
Alessio Quaglino 41968f1527 Support body.find_all("joint") in bindings.
PiperOrigin-RevId: 703071822
Change-Id: I6457ca0561c794447cc06aab29dcd0aac82c49a0
2024-12-05 04:54:42 -08:00
Alessio Quaglino a729acb4fa Add spec find_sensor, find_actuator functions.
PiperOrigin-RevId: 703054696
Change-Id: Ie384f1a31de3ecd9b22b7f4be43234d452e7bb88
2024-12-05 03:42:26 -08:00
Alessio Quaglino f882f4b065 Remove requirement to specify a name prefix or suffix during attach.
PiperOrigin-RevId: 703049862
Change-Id: I5fd6da0581331b1b716110292a8160ae16934157
2024-12-05 03:19:57 -08:00
Alessio Quaglino 503e5e1815 Change site.attach to accept a spec instead of a body.
Add site.attach_body for attaching a body to a site.

PiperOrigin-RevId: 703047770
Change-Id: Ibc1f916f8741872135220461cda7cebc4b418913
2024-12-05 03:10:17 -08:00
Alessio Quaglino 10239a673b Change from parent ID to parent pointer in mjCBody.
This is required to have parent body info during attach and during body to frame tranformation for uncompiled models.

PiperOrigin-RevId: 703038426
Change-Id: Ib482059ba419a020860c649d6ea1b1088045f2e1
2024-12-05 02:32:56 -08:00
Alessio Quaglino 977fb913cf Remove hanging vertex from flexcomp circle type.
PiperOrigin-RevId: 702777882
Change-Id: I3ce09c0ed81a9b153c606debc8c22fbb47c93e8b
2024-12-04 10:37:42 -08:00
Alessio Quaglino a3b9f986c0 Add spec.find_site().
PiperOrigin-RevId: 702733068
Change-Id: I4cc7fd2b9b59185a4458fdac8537f8287af1f295
2024-12-04 08:20:57 -08:00
Alessio Quaglino d1b02556ef Allow keyword arguments in attach.
PiperOrigin-RevId: 702718597
Change-Id: I1f1a5e9c88c8e102d5cbe5984511e7923ec7be3e
2024-12-04 07:32:31 -08:00
Alessio Quaglino afc86ac1b3 Associate children of deleted body to the newly created frame in mjs_bodyToFrame.
Also associate all children that need a parent body to the parent of the deleted body.

This is a bug that was causing the former children of the body that gets transformed to a frame to not be children of the new frame.

PiperOrigin-RevId: 702702853
Change-Id: I36d48f0446bc87c665b18d34e0b0609d82c70f51
2024-12-04 06:30:21 -08:00
Yuval Tassa 0ba717a653 Print supernode values in mj_printData
PiperOrigin-RevId: 702677257
Change-Id: Icecc5dd8604fcadc02bba5fc69c9fd5fd4fbd825
2024-12-04 04:41:10 -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
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