Kyle Bayes
708fd83a49
Remove goto statement from engine collision code.
...
PiperOrigin-RevId: 688539516
Change-Id: I29b5dd39acccde59df2dbcaf5e866eb6a0406c43
2024-10-22 07:22:18 -07:00
Alessio Quaglino
bfa78614c8
Require prefix for the attach tag.
...
For `mjs_attachFrame` and `mjs_attachBody`, require either a prefix or suffix.
It is tempting for users to not use a prefix (see #2162 ), but this causes issues. For example, it creates a duplicate "main" default class in the parent as a child of the already existing "main" default.
PiperOrigin-RevId: 688535755
Change-Id: I653181ca35943f1e4eb89c70fca8b5289818324e
2024-10-22 07:08:33 -07:00
Taylor Howell
94e9912d28
Add mju_mulMatTVecSparse to multiply transposed sparse matrix and dense vector.
...
PiperOrigin-RevId: 688535240
Change-Id: I0bacf1e911cde99014b2dcb0a1434e61a4f41d51
2024-10-22 07:06:29 -07:00
Kyle Bayes
2b0629d75f
Replace mjQUICKSORT with faster, native sorting function. fixes #1638
...
PiperOrigin-RevId: 688519096
Change-Id: I05ab1576703c2458968ef81915ac682a8beac391
2024-10-22 06:05:12 -07:00
Alessio Quaglino
9e1aa37b55
Do not self-attach custom tags.
...
Fixes #2162 .
PiperOrigin-RevId: 688518165
Change-Id: Iad90e159514c96635676a8dd53fca41e3998d8fc
2024-10-22 06:04:07 -07:00
Copybara-Service
1802d9b1a7
Merge pull request #2069 from squarefk:main
...
PiperOrigin-RevId: 688255285
Change-Id: Id33ad1fb826a590e95f48bf366f1d19d1f2ac2a4
2024-10-21 13:37:29 -07:00
Saran Tunyasuvunakool
98478f8811
Minor changes to inline comments in mjModel and mjData headers.
...
PiperOrigin-RevId: 688231631
Change-Id: Iae5430142cab256a73a0fb8c698992ceba21b28c
2024-10-21 12:31:15 -07:00
Yuval Tassa
aa91f3c047
Fix bug in slider-crank transmission.
...
The associated row in `actuator_moment` was not cleared before being updated.
PiperOrigin-RevId: 688207085
Change-Id: I2f925e984c5c493e64ead66667aef57c4844acfe
2024-10-21 11:21:15 -07:00
Alessio Quaglino
a70aea918c
Prevent duplicated pairs in active_pugins vector.
...
Fixes #2150
PiperOrigin-RevId: 688164615
Change-Id: I9a5434a9dda28a399ffccfe0c4b31fa64400b85f
2024-10-21 09:30:27 -07:00
Yuval Tassa
90bc4b555d
Add box-box collision to collection of collision performance benchmark models.
...
Cosmetic tweaks to existing models.
PiperOrigin-RevId: 688133030
Change-Id: I8085b8288d67b75e1cbcbcac0dfa68fccc7d63ca
2024-10-21 07:45:54 -07:00
Taylor Howell
36e8845599
Add actuator_moment Jacobian sparsity pattern to mjData.
...
PiperOrigin-RevId: 688124236
Change-Id: Ieccc8131d0046100ec9a2783ffb43dd784f0a63b
2024-10-21 07:11:25 -07:00
Taylor Howell
b00a7c6705
Add touch sensor to MJX.
...
PiperOrigin-RevId: 688056696
Change-Id: I50b0ebf3141aab0a5b07e5ae770101ff8b7737d4
2024-10-21 02:48:36 -07:00
Baruch Tabanpour
680fb3e5dd
Add more public support functions for MJX.
...
PiperOrigin-RevId: 687469475
Change-Id: I4218cc2f6d51d3f2f63b1a9a96953d550a5503a5
2024-10-18 17:15:18 -07:00
Alessio Quaglino
dcf2816543
Remove copy_back from Python bindings and mj_copyBack from the C API.
...
PiperOrigin-RevId: 687377331
Change-Id: I355493d92857418b08b5aa90ea38cebe5c475314
2024-10-18 11:55:04 -07:00
Saran Tunyasuvunakool
62c0ef4262
[introspect] Extract struct array extents from comments.
...
PiperOrigin-RevId: 687254268
Change-Id: Ia70dca073eaa4a99c60f76b7c69c730856193512
2024-10-18 04:35:31 -07:00
Baruch Tabanpour
43a7493d17
Fix embarrassing bug with ckpt.
...
PiperOrigin-RevId: 686679906
Change-Id: I61126ce94214b5f7b25b31e343a243d1a1dbb9f4
2024-10-16 16:23:54 -07:00
Google DeepMind
ffdb800e45
Update the MuJoCo version for the 3.2.5 release following the 3.2.4 release.
...
PiperOrigin-RevId: 686641388
Change-Id: I68d5183c9d369b7617f692ab97c12c53f0d2504c
2024-10-16 14:24:06 -07:00
Alessio Quaglino
8740533644
Check obj and ref types before casting them to a geom.
...
PiperOrigin-RevId: 686616350
Change-Id: I43b14344df6324b371c6bb2447c63197b88178d5
2024-10-16 13:16:01 -07:00
Gabe Oppenheimer
c2024ef6d1
Update the MuJoCo version for the 3.2.4 release.
...
PiperOrigin-RevId: 686261295
Change-Id: Ib59e44a6829a79fd480f2822a68cb05f94c38732
2024-10-15 15:34:09 -07:00
Google DeepMind
d1e004aa97
Update version hashes in MuJoCo CMake files ahead of the 3.2.4 release.
...
PiperOrigin-RevId: 686208889
Change-Id: I19d3e6566e76c44e199f427aed984b9a530f4262
2024-10-15 13:03:13 -07:00
Alessio Quaglino
11af1e2a95
Fix a bug in mj_recompile.
...
The qposadr_ and dofadr_ variables of the joints were not being reset to -1 when a joint is copied. This could lead to errors when calling mj_recompile after attaching a compiled spec.
PiperOrigin-RevId: 686152004
Change-Id: I9e058089ce87ea0d8e51a7f43475bc48c6527a26
2024-10-15 10:24:32 -07:00
Yuval Tassa
d646ba8de1
Update MuJoCo changelog with a video of the 100_humanoids model.
...
Improve the model's rendering FPS by reducing the number of shadow-casting lights from 7 to 2.
https://youtu.be/e8lUuykQPGs
PiperOrigin-RevId: 686118052
Change-Id: If376564fdc23ad8d754dac1e5825079c0b806063
2024-10-15 08:40:06 -07:00
Yuval Tassa
0ffaeb4d56
Improve comments in mju_cholFactorNNZ, clarify that this function reads from the upper triangle of the source matrix.
...
PiperOrigin-RevId: 686113654
Change-Id: I029f9279d177f4cb9ff60396a26d64821aee3a6c
2024-10-15 08:26:07 -07:00
Taylor Howell
096853e192
Add JOINTINPARENT actuator transmission type to MJX.
...
PiperOrigin-RevId: 686083761
Change-Id: I5159d050812d32e15ced06df132d3e434fced814
2024-10-15 06:38:02 -07:00
Kyle Bayes
5a95d601ed
Use GJK for geom distance when the nativeccd flag is enabled.
...
PiperOrigin-RevId: 686035648
Change-Id: Ib6121394b420df4ba431c38443479d33eeaf1dd9
2024-10-15 03:25:18 -07:00
Nimrod Gileadi
6881ce2437
Remove support for Python 3.8.
...
Python 3.8 has been deprecated upstream, and any tests depending on Homebrew already stopped working. Following our support policy, we are removing support for 3.8 from our packages, too.
PiperOrigin-RevId: 686012836
Change-Id: Ibd220eb9c10e9a74bbd4443c1d7286a1fde9e5e5
2024-10-15 01:54:18 -07:00
Yuval Tassa
400d2edc21
Clean up mj_transmission.
...
PiperOrigin-RevId: 685770636
Change-Id: I03d46d136118a5e6da61f6924ccae65bf0d81dfb
2024-10-14 11:15:06 -07:00
Kyle Bayes
8d84b5f693
Disable hfields for collision sensors.
...
PiperOrigin-RevId: 685730321
Change-Id: Ib1d4a90b7b31ca388e018076a274e25c40409080
2024-10-14 09:19:11 -07:00
Yuval Tassa
ee7b994021
Remove Newton Cholesky factor from mjData arena, rollback of b66da3d369.
...
PiperOrigin-RevId: 685726867
Change-Id: Ic2afd0dd35e38f403164d2cbe4618286abfa51ab
2024-10-14 09:07:22 -07:00
Yuval Tassa
7ec94f46d4
Refactor Newton solver: move Hessian from arena back to the stack.
...
The changes in 9a0dc20821 , moving the Hessian from the stack to the arena, should be rolled back: they prevent future threading over islands. Unlike the stack, arena allocations are not thread-friendly. The reason for the original move was to save memory, but the savings are small: `O(ctx->nH)` and only linear in `nv`. The significant reduction of the Cholesky factor, from quadratic in `nv` to quadratic in the largest dof island — the reduction afforded by 2dd518734f — remains in place.
Also refactor and improve readability.
PiperOrigin-RevId: 685717356
Change-Id: Ia9ec3e44a62d459a3b9cffb578cf6479d5aa1d7f
2024-10-14 08:34:16 -07:00
Taylor Howell
ac91a7639d
Add tendon velocity sensor to MJX.
...
PiperOrigin-RevId: 685689974
Change-Id: Ib5e65b19c20b74e20cffa66c6baca0d8faaaf3ae
2024-10-14 06:47:59 -07:00
Alessio Quaglino
1e7c109887
Raise warning when attaching a spec with pending keyframes to a different spec.
...
PiperOrigin-RevId: 685677622
Change-Id: Iba522c523ebd2afe64d6ab28c6b6b4b3cd399cf8
2024-10-14 05:54:18 -07:00
Alessio Quaglino
c84f35b425
Do not delete pending keyframes during body detachment.
...
PiperOrigin-RevId: 685670895
Change-Id: Iadd0ba8ca7e74a280559168ac0ac855405a1cfd9
2024-10-14 05:23:46 -07:00
Alessio Quaglino
c5a677a9de
Fix load error message. Fixes #2135
...
PiperOrigin-RevId: 685668168
Change-Id: Ieac7ccca5bee695cf55fc74bd33fadf77a025cb9
2024-10-14 05:10:58 -07:00
Taylor Howell
1945926351
Fix computation of tangential contact forces in MJX _decode_pyramid.
...
PiperOrigin-RevId: 685665382
Change-Id: Icdbba4a3ee5fec804340d73d525a36ee570c2aa8
2024-10-14 05:01:00 -07:00
Alessio Quaglino
766cd20273
Add mjs_bodyToFrame() to convert a body to a frame.
...
Also add test for attaching the world body.
PiperOrigin-RevId: 685603933
Change-Id: I3cfe7d226d6f032b5a587e44d0f4f18207977188
2024-10-14 00:39:20 -07:00
Alessio Quaglino
52a0149cd1
Resizes keyframes before storing them during attach/detach.
...
Improve keyframe tests.
PiperOrigin-RevId: 685450257
Change-Id: I97aa129c4d7a66f613290605b85657e8081700b6
2024-10-13 10:02:35 -07:00
Yuval Tassa
534aedd47d
Improve documentation of joint/armature.
...
See Drake [discussion](https://github.com/RobotLocomotion/drake/pull/21967 ) for more context.
PiperOrigin-RevId: 685428316
Change-Id: I80e8d4f097697f28529f5891a763979390c59e99
2024-10-13 07:25:15 -07:00
Taylor Howell
99259eb0d3
Fix typos in engine_ray.c.
...
PiperOrigin-RevId: 685273762
Change-Id: I6812a83ef2d84fa07a42812acb87c363a3e1a11d
2024-10-12 16:05:43 -07:00
Taylor Howell
78ade58aff
Remove rootid from touch sensor (unused).
...
PiperOrigin-RevId: 685196948
Change-Id: Ifd574165717f07a58a13ae187bc1c63527c986e7
2024-10-12 08:10:09 -07:00
Taylor Howell
223892c051
Add tendon position sensor to MJX.
...
PiperOrigin-RevId: 684851437
Change-Id: Ica0a30762a9cb3d612357b40b6f87cd2fc544fdb
2024-10-11 08:47:52 -07:00
Yuval Tassa
5fe2b88726
Print ASCII sparse matrix structures in mj_printData.
...
Also: don't print sparse matrices if they have more than 300 rows.
PiperOrigin-RevId: 684843230
Change-Id: If91d0b56cbbb6565904c3ee55857999e21b0cc62
2024-10-11 08:17:25 -07:00
Kyle Bayes
70d6655434
Add faster support functions for NativeCCD.
...
PiperOrigin-RevId: 684809392
Change-Id: I5125d4bb74c167d370aa919befba9d356c7162da
2024-10-11 05:59:30 -07:00
Yuval Tassa
2dd518734f
Stop over-allocating memory in Newton solver.
...
PiperOrigin-RevId: 684797464
Change-Id: I3389416cb69a8564b5119f6e3944b579893ea511
2024-10-11 05:09:33 -07:00
Yuval Tassa
9aca4bccac
Fix stack usage reporting under ASAN.
...
PiperOrigin-RevId: 684790558
Change-Id: Ifc206bb0653c1fa3052621f0d3d80cb10671b77f
2024-10-11 04:37:12 -07:00
Kyle Bayes
1d57099e98
Add internal return codes in polytope2 and polytope3 to make debugging in NativeCCD easier.
...
PiperOrigin-RevId: 684776411
Change-Id: Ie0ab278b449ded0ec67ddc89569443d542bf93e0
2024-10-11 03:36:18 -07:00
Alessio Quaglino
ae9ec24d3a
Add dm_control creature example to mjSpec tutorial.
...
PiperOrigin-RevId: 684764674
Change-Id: If7f8b7b29587f9c50e2cb8e155484bc7f3f18b0f
2024-10-11 02:46:25 -07:00
Alessio Quaglino
cdb167f275
Add mjs_attachToSite for attaching a body to a site.
...
PiperOrigin-RevId: 684432183
Change-Id: I7100bebfb6521f9dbfbb07f31490b2b9298bf18c
2024-10-10 07:12:49 -07:00
Mohammad Hamid
694bdebc19
Fixed a bug that caused dim to be necessary in flexcomp even when it was inferred from GMSH files.
...
Fixes #2107 .
Co-authored-by: Alessio Quaglino <quaglino@google.com >
PiperOrigin-RevId: 684419740
Change-Id: Ia73e719bd37503563223ed92f4dbe0ae07eef300
2024-10-10 06:20:43 -07:00
Baruch Tabanpour
22e4f7fc31
Fix bug in MJX frictionloss.
...
PiperOrigin-RevId: 684198925
Change-Id: I5f6575759729712550bcb8d7659aaa7a657c66fc
2024-10-09 15:50:58 -07:00