Commit Graph

1056 Commits

Author SHA1 Message Date
Google DeepMind df48624d0d Place mjx tutorial correctly in copybara excludes.
PiperOrigin-RevId: 571390140
Change-Id: I8d0b9ac7b30391e4abaa1ba03fd941e028fd2991
2023-10-06 11:29:54 -07:00
Yuval Tassa 7b7cf5e86c Add cards.xml model.
PiperOrigin-RevId: 571341445
Change-Id: I3a02bb01099cacb62e0c599e6198ed90b48baad0
2023-10-06 08:13:33 -07:00
Yuval Tassa a9b761ee1b Add double underscore suffix to all links in the changelog.
PiperOrigin-RevId: 571304907
Change-Id: Ie726f3d703421f9d13a5d16f2282123c71c2b530
2023-10-06 05:01:09 -07:00
Yuval Tassa d61d0349b8 Fix mju_eig3 declarations.
PiperOrigin-RevId: 571296456
Change-Id: Ic05f44c8c0883fe96e5671d71fe9b447c2e91162
2023-10-06 04:10:44 -07:00
Matthew Bennice 071af3b015 Implement threading for island constraint solving.
Humanoids22 No threads:
 Benchmark Execution Time: 9.475905812s

Humanoids22 with 10 Threads:
 Benchmark Execution Time: 4.871352s

PiperOrigin-RevId: 571214307
Change-Id: I1f4f2c761b4ae6bc8fac1f28c6c695f6c499f339
2023-10-05 21:05:19 -07:00
Google DeepMind 06670155c4 Add MJX training colab.
PiperOrigin-RevId: 571066455
Change-Id: I8b0638181cdc751cf9fbacfb84c1ac551d7ce4bd
2023-10-05 10:45:36 -07:00
Saran Tunyasuvunakool 991aa97bc4 Make the doc search text readable in dark theme.
Currently it's dark blue text on dark grey background.

PiperOrigin-RevId: 570985075
Change-Id: I7dc97163babd4d6c2f99fa600b259274e69fdd8b
2023-10-05 05:33:55 -07:00
Yuval Tassa 22fab04c02 Add keyframe to golden data test model, start simulation from that keyframe.
0. Keyframe was generated by simulating passively for 64 timesteps and then saving from `simulate`.
1. This makes forward.data much more informative. There are more contacts, velocities are not 0.
2. Added non-zero controls to forward.data.
3. 70 timesteps is a lot to integrate, things can change a lot. Since we now start at time = 0.128 = after 64 steps of passive simulation, we continue to integrate for only 6 timesteps.

PiperOrigin-RevId: 570966233
Change-Id: I9538aa44619393ff05ed8c3177e73993e222150a
2023-10-05 03:52:57 -07:00
Yuval Tassa e9613f0cc9 Rename simulate.fully_managed_ to simulate.is_passive_ with flipped semantics.
PiperOrigin-RevId: 570815258
Change-Id: Iaffdb0e52bcdb31cff7bd29cb820913e3838f0ee
2023-10-04 14:49:52 -07:00
Yuval Tassa 3e12f0d50c Add history scrubbing mechanism to simulate.
[screen capture](https://www.youtube.com/watch?v=YSvWn_poqWs)

PiperOrigin-RevId: 570676968
Change-Id: Id9a1fccc9418b851e007ddcf3fa89acd4edff3e9
2023-10-04 06:36:34 -07:00
Yuval Tassa 1e94c12cdd Fix typos in docs.
PiperOrigin-RevId: 570643723
Change-Id: I20a999c7a5ff79bdb67ced209105cca6751a50dc
2023-10-04 03:32:49 -07:00
Yuval Tassa ee78b8f76b Added mjData.eq_active user input variable, for enabling/disabling the state of equality constraints.
Renamed `mjModel.eq_active` to `mjModel.eq_active0`, which now has the semantic of "initial value of `mjData.eq_active`".

Fixes #876.

PiperOrigin-RevId: 570410643
Change-Id: Id03171e751377c7cc453f143abee64239ee2e2ed
2023-10-03 09:32:24 -07:00
Yuval Tassa 177aec68dc Add overlay positions in the center of viewport edges, move PAUSE and LOADING... overlays to the top center.
PiperOrigin-RevId: 570054949
Change-Id: If0046df382e67ad3a48e7138a75e9e200c0626b9
2023-10-02 07:05:50 -07:00
Yuval Tassa 639e77876d Improved unpause behavior in simulate.
PiperOrigin-RevId: 570030315
Change-Id: I5822f8686ba2fd7c5c59a9fa73fc29000a8406ec
2023-10-02 05:00:40 -07:00
Yuval Tassa e1549376f6 Use body AABB for torque perturbation visualisation, if available.
PiperOrigin-RevId: 569579715
Change-Id: I62c1083fb868520832746ca1f28fab2bf1d679cc
2023-09-29 13:50:02 -07:00
Yuval Tassa ebded4747f Replace fruitfly image with a more dynamic pose.
PiperOrigin-RevId: 569481337
Change-Id: I00246c4ed8264252a89b979a118463d8b35fa8ce
2023-09-29 07:01:00 -07:00
Saran Tunyasuvunakool c2f73ee755 Fix broken Bash substitution on macOS and only nofify failures.
PiperOrigin-RevId: 569428932
Change-Id: Id23501c3e8dd8b615dc6f2677fb7e21a1b0b0b34
2023-09-29 02:08:47 -07:00
Saran Tunyasuvunakool d70266fd55 Fix chat notification in GitHub Actions workflow.
PiperOrigin-RevId: 569337051
Change-Id: I510ddebc5b08858eb3a40903659c9868f67f4da5
2023-09-28 17:38:58 -07:00
Saran Tunyasuvunakool d223f40eef Fix broken build.yml.
PiperOrigin-RevId: 569232412
Change-Id: Ic8d9dc96284825595461bbf9396d6525673efb1f
2023-09-28 11:01:38 -07:00
Saran Tunyasuvunakool 7e5711ad36 Notify team chat of GitHub Actions runs.
PiperOrigin-RevId: 569231063
Change-Id: I9e66b90ff944e9a6a0898e336c7f049a07c3609d
2023-09-28 10:57:30 -07:00
Saran Tunyasuvunakool 8e00f8029e Disable -Wmaybe-uninitialized in GCC versions 12 and later.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109561

PiperOrigin-RevId: 569204628
Change-Id: I34ccb84a0afc60ccfcc47c820438d15dfa0a5f42
2023-09-28 09:25:27 -07:00
Saran Tunyasuvunakool 107b76490a Update GitHub Actions config.
PiperOrigin-RevId: 569154469
Change-Id: Ifc208d2e7a900359b5926002a31a15ba01787659
2023-09-28 05:59:04 -07:00
Alessio Quaglino 36d2ffe4f2 Specify camera parameters using standard robotics conventions.
PiperOrigin-RevId: 569147555
Change-Id: I3443f95e5de56a17024f5e5c03f33888dd583edb
2023-09-28 05:19:19 -07:00
Saran Tunyasuvunakool ca60de79c8 Change sz to 64-bit integer in mj_setPtrData.
PiperOrigin-RevId: 569123159
Change-Id: If16777f06a2b0ea08083261d1b77c95fc14f2751
2023-09-28 03:20:18 -07:00
Yuval Tassa 772326e9eb Fix potential out-of-range write in solver statistics saving.
PiperOrigin-RevId: 569094007
Change-Id: I2e596a7c03d76523359cae7ae7f4501b06256a38
2023-09-28 00:58:13 -07:00
Copybara-Service b8a91a00ce Merge pull request #1070 from aftersomemath:simulate-load-message
PiperOrigin-RevId: 568995214
Change-Id: Iac7644c4b35a916aa6a7d1bb158ba15a024b43ac
2023-09-27 16:36:40 -07:00
Yuval Tassa ac74c72657 Fix issue where unpausing the simulation (especially under slowdown) causes a jump in simulation time, in both native simulate and Python viewer.
PiperOrigin-RevId: 568948943
Change-Id: I2f401508555e272f348e97627aeb85cb3e9cf017
2023-09-27 13:46:19 -07:00
Levi Burner e7d1f2f110 simulate: fix display of loading message 2023-09-27 16:04:36 -04:00
Saran Tunyasuvunakool 8ed321d469 Rename mesh_assetpathadr to mesh_pathadr and move it to the end of the mesh section.
PiperOrigin-RevId: 568911603
Change-Id: I8f21c3d1cc9c73b6a95292a50f262b1a199d0898
2023-09-27 11:32:10 -07:00
Matthew Bennice 0dfeedb320 fix open source build failure by switching C's _Alignof for C++'s alignof
PiperOrigin-RevId: 568400917
Change-Id: I90eff5e149d491f181370d72e43fdee9d4a3a20e
2023-09-25 20:43:59 -07:00
Matthew Bennice ff4158efff Modify memory allocation in MuJoCo to be thread safe:
1) protect mj_arenaAllocBytes with mutexes
2) create shards for each thread in the stack and update mj_stackAllocBytes to allocate memory within each shard for a given thread

PiperOrigin-RevId: 568315726
Change-Id: I0dee6694f2a5200fa4df22ade0e68dfaebf637fc
2023-09-25 13:53:28 -07:00
Chengrui Zhu dff0bc2683 Copybara import of the project:
--
3add02bc2e20eb2895fdcaedfdf6be271decb448 by Chengrui Zhu <jewelry.zju@gmail.com>:

correct spelling "Bunding" to "Bounding"

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/1068 from JewelryForge:main 3add02bc2e20eb2895fdcaedfdf6be271decb448
PiperOrigin-RevId: 568207690
Change-Id: I3262d459bfdbac6ebf097ddffc10c4d74b388946
2023-09-25 07:06:59 -07:00
Alessio Quaglino d3d46e16a4 Remove cloth and rope composites and deprecate loop.
PiperOrigin-RevId: 568168329
Change-Id: Ida4a5236bef74828c7bf59affdc28adea3db53b1
2023-09-25 03:38:43 -07:00
Saran Tunyasuvunakool cbb07a4c32 Bump Python dependencies.
PiperOrigin-RevId: 567908445
Change-Id: I6be821afda655e3461c9904cfdcbcdcb11ef23b6
2023-09-23 15:24:24 -07:00
Saran Tunyasuvunakool 81c5e61b1e Correct OpenGL library path on macOS.
Although the path doesn't exist on disk, dlopen seems to be previously redirecting to the correct file, but this stopped working in macOS 14.

PiperOrigin-RevId: 567684115
Change-Id: I21894302e87803d06bfd27ba123eacbdfec0ec56
2023-09-22 12:09:31 -07:00
Matthew Bennice 7f8018a3f3 Update XML parsing to store asset path so that assets can be recovered and sent to external renderers
PiperOrigin-RevId: 567347908
Change-Id: I4d8e1abe35be3a67643ff925af709921280856f8
2023-09-21 10:27:52 -07:00
Matthew Bennice 4f34cacf35 Add maxuse_threadstack to mjData
PiperOrigin-RevId: 567334177
Change-Id: Ifd772350042e548a63ab269fd68fb5e5fef55831
2023-09-21 09:41:00 -07:00
Saran Tunyasuvunakool be75dda8d1 Fix arena memory leak in _realloc_con_efc.
PiperOrigin-RevId: 567093603
Change-Id: I0a00da461b495cc13e54381862d740333a43f82b
2023-09-20 15:16:04 -07:00
Alessio Quaglino dd5a7115cf Add shell plugin.
- Add bending passive force
- Add two examples (plate and poncho)
- Add stretching constraints for particles using tendons on mesh edges

PiperOrigin-RevId: 566980584
Change-Id: Id0cd8e1084c05560f1008518a8afbd5311d563e2
2023-09-20 09:00:20 -07:00
Yuval Tassa c54aba15f9 Fix typo in docs.
PiperOrigin-RevId: 566957533
Change-Id: I39ebafaf3ad938837d864b3272ae2c4af6510583
2023-09-20 07:29:16 -07:00
Yuval Tassa 35e7bb354d Add documentation of ellipsoid-based fluid drag model.
PiperOrigin-RevId: 566935233
Change-Id: I45980ea2def06d5ffd9091c49543b737b864701d
2023-09-20 05:41:44 -07:00
Yuval Tassa dfd48dd821 Replace mjMIN and mjMAX with mju_min and mju_max, where possible.
PiperOrigin-RevId: 566602924
Change-Id: I2d24183d0d9df3e647bb2d7d7544473582f38128
2023-09-19 05:40:41 -07:00
Yuval Tassa 9cf1f6eba4 Remove mjOption.collision and associated option/collision attribute.
PiperOrigin-RevId: 566427090
Change-Id: I6e5873b8db707586820b17b53c7ab4bbff0f0b2b
2023-09-18 15:15:54 -07:00
Yuval Tassa 9902b73502 Rename mj_stackAlloc to mj_stackAllocByte.
PiperOrigin-RevId: 566351365
Change-Id: I91541168e83b05a730113661cc9f07985ac9ff0c
2023-09-18 10:53:35 -07:00
Yuval Tassa 812e617fe9 Clear mjData.actuator_moment more selectively.
PiperOrigin-RevId: 566324919
Change-Id: Ie453f8de059d39fa1ebd5248f33a18758ee748af
2023-09-18 09:27:03 -07:00
Alessio Quaglino 6ca8a7bdf7 Make SdfLib dependency on args and stb_image optional.
PiperOrigin-RevId: 566309916
Change-Id: I74880781848b7e5235cdf5d723b0c8805827a4c8
2023-09-18 08:31:53 -07:00
Yuval Tassa ee8da5babe Fix indentation bugs in docs, improve attribute order in schema.
PiperOrigin-RevId: 566230568
Change-Id: I0f536a2048d3e35d8ee510d86b6eba7a74c4e80a
2023-09-18 01:48:14 -07:00
Yuval Tassa 63fd23a934 Remove mjTIMER_ACCELERATION, add mjTIMER_ADVANCE.
- mjTIMER_ACCELERATION is not very useful, it's usually very tiny (0.5% for humanoid, 1% for 22humanoids). It basically times a single call to `mj_solveM`.

- Added `mjTIMER_ADVANCE` to time `mj_Euler` and `mj_implicit` (which can be significant).

- Moved `mj_transmission` to `mjTIMER_KINEMATICS` where it belongs (and used to be).

PiperOrigin-RevId: 565936880
Change-Id: I26b8a067133594e5500ca1c809beb3518b4a8d9c
2023-09-16 08:03:45 -07:00
Alessio Quaglino e76e1c72f9 Fix SdfLib relative path.
PiperOrigin-RevId: 565884473
Change-Id: I77e25b55a5062ec089bbb643bd722ec2fbc7b211
2023-09-16 00:41:28 -07:00
Alessio Quaglino 0b700ce1e2 Add libsdf to github actions.
PiperOrigin-RevId: 565691982
Change-Id: Ia1bfa4242c0af4d37f6cd660c3404605439d9ffd
2023-09-15 08:59:36 -07:00