Commit Graph

2330 Commits

Author SHA1 Message Date
Copybara-Service 39af655c1e Merge pull request #1939 from goncalog:update-humanoid-notebook
PiperOrigin-RevId: 683668357
Change-Id: Id4a65197efc7d6d36e3e1d9885691b432d6114eb
2024-10-08 10:10:20 -07:00
Alessio Quaglino 1f9dca8bc4 Do not expose plugin_slot.
PiperOrigin-RevId: 683215401
Change-Id: Ic64f7221ed83ca3b0c8cca16eb680ea67c67b564
2024-10-07 09:38:01 -07:00
Alessio Quaglino 66faba9aa5 Avoid changing semantics of mjsPlugin.name across XML sections.
The `extension` section used to discard the plugin name and write the instance name in `plugin.name`, while all of the other sections wrote the instance name in `plugin.instance_name` and optionally the plugin name in `plugin.name` (via the function `OnePlugin`). Now all plugin names are in `plugin.plugin_name` and the instance is written in `plugin.name`, so that it is possible to lookup a plugin via its unique instance name.

PiperOrigin-RevId: 683183804
Change-Id: I179ef5d221143b720db24d745b09e327bf1449ef
2024-10-07 07:57:03 -07:00
Kyle Bayes 5bfc7da7de Inline small vector util functions in NativeCCD.
PiperOrigin-RevId: 683121207
Change-Id: Idf83e2d18d725665bf626c2c3269c81048076a1a
2024-10-07 04:11:36 -07:00
Taylor Howell 160ed9bfe2 Add pulley support to spatial tendons in MJX.
PiperOrigin-RevId: 683103659
Change-Id: I22544071a3fc6fbd09f9a59690106701b101ee6a
2024-10-07 03:00:53 -07:00
Copybara-Service bce43b63ed Merge pull request #2120 from hartikainen:fix-2118
PiperOrigin-RevId: 683098606
Change-Id: Ib558bab7aca9042e318056de411ddf1a229d421d
2024-10-07 02:39:29 -07:00
Yuval Tassa d3a1ca72d8 Report memory usage in simulate using percentage rather than decimal fraction.
PiperOrigin-RevId: 683098469
Change-Id: I7310848fb87e040996fcfc24991d45bf55872993
2024-10-07 02:37:58 -07:00
Goncalo Gordo 76a8d01eb9 revert physics_steps_per_control_step 2024-10-05 13:25:47 +01:00
Goncalo Gordo b08d6f4724 revert the solver params 2024-10-05 13:23:47 +01:00
Baruch Tabanpour 0dde0ba4ba Fix external import in colab.
PiperOrigin-RevId: 682514874
Change-Id: I6157c2613464d2f5d3c23a73248913f1a240a9f1
2024-10-04 18:12:43 -07:00
Baruch Tabanpour 0887f54307 Add Franka Panda env to MJX colab tutorial.
PiperOrigin-RevId: 682506877
Change-Id: Ifde31e993f63baa783e973c496e5bd7bd6465393
2024-10-04 17:36:49 -07:00
Kyle Bayes 6be5decf6c Check for OOM errors once per EPA iteration.
PiperOrigin-RevId: 682447186
Change-Id: I55031da8cf2335d5771bb54b32b7e1f696aa80f2
2024-10-04 14:15:29 -07:00
Alessio Quaglino 6e66cafe76 Capture mjs_attach error message in the Python bindings.
PiperOrigin-RevId: 682409212
Change-Id: I391ee48626e7dcd985f65a231370ef5ec16124d7
2024-10-04 12:19:42 -07:00
Copybara-Service 3091665c16 Merge pull request #2122 from hartikainen:update-gitignore
PiperOrigin-RevId: 682388296
Change-Id: I53f208ba9f629f32f9239789387f94818efdc19b
2024-10-04 11:20:26 -07:00
Yuval Tassa 3f3fe92860 Remove unused argument in mju_sqrMatTDSparseInit
PiperOrigin-RevId: 682375566
Change-Id: If05f5d15a2f8925eee9dd0ebc5d485164d90d787
2024-10-04 10:45:33 -07:00
Copybara-Service 7e9481fbeb Merge pull request #2067 from abhihjoshi:documentation
PiperOrigin-RevId: 682364758
Change-Id: I3a5000a2851a560018ae0e04a2b7ad13415cb7c6
2024-10-04 10:15:19 -07:00
Kristian Hartikainen 1d7f511f16 Add MUJOCO_LOG.TXT and .cache to .gitignore 2024-10-04 18:44:01 +03:00
Kyle Bayes eb095b276c Switch to collision boolean only GJK for contacts instead of using S3D.
PiperOrigin-RevId: 682329224
Change-Id: I3db141b0482610a0a88854f47a46b0b7b694b361
2024-10-04 08:25:14 -07:00
Copybara-Service 3ea8be2dcb Merge pull request #2078 from hartikainen:enable-mjb-for-mjx-testspeed
PiperOrigin-RevId: 682328610
Change-Id: I1329d8f7a0a47234e3eda61c457567825c89bd88
2024-10-04 08:22:53 -07:00
Alessio Quaglino 42c1718d57 Restore RecompileCompare test that was deactivated by mistake.
PiperOrigin-RevId: 682310735
Change-Id: I5edf487b194e195de0ff712ad55c2b198de2ef51
2024-10-04 07:20:13 -07:00
Copybara-Service f550aaac62 Merge pull request #2121 from hartikainen:fix-2119
PiperOrigin-RevId: 682271290
Change-Id: If866f3c744054e404b4e208e72da2329a19eb2fd
2024-10-04 04:47:41 -07:00
Kristian Hartikainen 3634bd5063 Fix python namespacing 2024-10-04 11:23:18 +03:00
Kristian Hartikainen 5d46884efe Rename MuJoCo (mjpython).app -> MuJoCo_(mjpython).app 2024-10-04 11:10:28 +03:00
Kyle Bayes dba32e827c Exit recursion gracefully when horizon reaches empty polytope in EPA.
PiperOrigin-RevId: 682050023
Change-Id: I8e04f00e6ab3e15e177d1902889441cdbf11cafd
2024-10-03 15:18:05 -07:00
Kyle Bayes 9d91703871 Replace heap with linear map in EPA.
PiperOrigin-RevId: 681911349
Change-Id: Iffe2d3ff57b9a4cfcc223ea5d5d29e2e6696e1cf
2024-10-03 09:27:02 -07:00
Kyle Bayes a02c37cf12 Use faster cross product in projectOriginPlane for NativeCCD.
PiperOrigin-RevId: 681909044
Change-Id: I5d275a30bce4f24f2e4c205b9a9eb321a5a98b43
2024-10-03 09:20:44 -07:00
Kyle Bayes dc995ad341 Remove unnecessary norm calculation in EPA.
PiperOrigin-RevId: 681906350
Change-Id: Ib6a13ca170a8071adde0771c6ba2b38fb4fd4da4
2024-10-03 09:12:51 -07:00
Taylor Howell c7c2edf758 Add external sphere and cylinder wrapping for spatial tendons to MJX.
PiperOrigin-RevId: 681808698
Change-Id: I37612e2c6b781b759f9009e1bc6ae10b4e861c8d
2024-10-03 03:56:24 -07:00
Alessio Quaglino dfd1f8fefc Fixed a bug causing an early stop of tree traversal.
Fixes #2112.

PiperOrigin-RevId: 681804470
Change-Id: I15a6f010db1a97931438fa6d8fd1d5cda6863c32
2024-10-03 03:38:17 -07:00
Alessio Quaglino 249c4b3f4f Prevent attaching models with different eulerseq, autolimits, or angle options.
PiperOrigin-RevId: 681801855
Change-Id: Iaf107853797768270319e971a3e318db0703bca0
2024-10-03 03:27:47 -07:00
Alessio Quaglino e973dc74dd Yield ownership of char[], vector<string>, and vector<byte> to mjSpec in Python bindings.
PiperOrigin-RevId: 681522091
Change-Id: Icb3788d9ef6e914a307531e39ad8171c24f590af
2024-10-02 11:14:48 -07:00
Alessio Quaglino 36ee89d6da Copy only referenced plugins.
Fixes #2111.

PiperOrigin-RevId: 681486400
Change-Id: I384ac63fa76b27d6e84d91fa857127c42ff52e34
2024-10-02 09:40:48 -07:00
Baruch Tabanpour 1a9d307042 Use mocap pos/quat in smooth.kinematics.
PiperOrigin-RevId: 681136974
Change-Id: I0ece009ed1e68b61b0b96da2e685e86000f7f6b8
2024-10-01 13:12:33 -07:00
Google DeepMind befe4af8f0 Add missing includes necessary after changes in libc++ headers.
Tested:
    TAP train for global presubmit queue
    http://test/OCL:680649491:BASE:680620735:1727746506750:fa29d104
PiperOrigin-RevId: 681090682
Change-Id: I3346ed996d9b6cd0fc7d600c02c41e0cd1b72400
2024-10-01 11:08:01 -07:00
Alessio Quaglino dfe8e45101 Namespace plugin instances when attaching.
Fixes #2112.

PiperOrigin-RevId: 681045462
Change-Id: I2c945c5405fcb91e0f9a1b0b1e94f68d174c84ee
2024-10-01 09:14:37 -07:00
Alessio Quaglino 89aea5e217 Add body.find_all() to Python bindings.
This enables to generate a list of all body children of a given type.

Also, add recursive option to mjs_firstChild and mjs_nextChild. Fixes #2112.

PiperOrigin-RevId: 681039348
Change-Id: Iebbb26fd5ec314150206edfdddd88633baa0bec6
2024-10-01 08:57:25 -07:00
Alessio Quaglino 8a825e6050 Add auto-generated tree element lists to Python bindings.
PiperOrigin-RevId: 680973047
Change-Id: I948151260cba330c6b7218cecf13aae2c7ae92c7
2024-10-01 05:23:03 -07:00
Yuval Tassa 62ec802ec1 Tweaks to benchmarks.
- Modify parse_benchmark_test to not time the first instance of file loading.
- Improve readability of step_benchmark_test.

PiperOrigin-RevId: 680953562
Change-Id: I4569d1b946ecb49b6590ea313f0b598ffc897888
2024-10-01 04:08:40 -07:00
Baruch Tabanpour cb745db412 Ensure ten_wrapnum/wrapadr are int type.
PiperOrigin-RevId: 680709773
Change-Id: Iebc0c796e66e657b8bebcc5fe4b2d347d9bdf42c
2024-09-30 14:02:48 -07:00
Alessio Quaglino 6832df3091 Replace mjs_setActivePlugins with mjs_activatePlugin.
PiperOrigin-RevId: 680613007
Change-Id: Ic03e0dc42a1f5f083e313672bc6e3ccebadc58b3
2024-09-30 09:46:47 -07:00
Yuval Tassa cf13413c0b Clean up dual solver functions.
PiperOrigin-RevId: 680587029
Change-Id: I20c78e96785af94634361d7823b1e5caba08800d
2024-09-30 08:31:40 -07:00
Alessio Quaglino e6e6e3b51b Copy plugins when attaching a model.
Before this CL, the same mjCPlugin objects were referenced by both models.

Fixes #2100.

PiperOrigin-RevId: 680579479
Change-Id: Ida3459f78f9fa4a942cea31b3d5d3e8da2832feb
2024-09-30 08:08:12 -07:00
Kyle Bayes 43a82e08be Add benchmark test for collisions.
PiperOrigin-RevId: 680554813
Change-Id: I0be5b102d68aa1a54b4ceca6b2bd24fbc519f5df
2024-09-30 06:46:25 -07:00
Alessio Quaglino 40b2ae92e5 Reset pending keyframes in source model after attaching.
Fixes #2101.

PiperOrigin-RevId: 680526395
Change-Id: I3bd06db5231d653b1c5bc1c2ba6b03b52e65f288
2024-09-30 05:05:21 -07:00
Alessio Quaglino 58a49bad96 Add nested keyframes attachment test.
This is a no-op change for keyframes but it shows an example of behavior.

Also, fixed two bugs:
- Missing namespace when attaching frames.
- Incorrect body id and subtreedof when attaching a compiled spec. Fixes #2063.

PiperOrigin-RevId: 680289467
Change-Id: I2ddaa7ad2226fa466ec3bbf74a7553d497bb4bb9
2024-09-29 11:57:56 -07:00
Copybara-Service 807ee852d0 Merge pull request #2097 from emotodorov:ui
PiperOrigin-RevId: 679704368
Change-Id: Iae396a134e6019c8cdb935a306f097f9427e134c
2024-09-27 13:16:01 -07:00
Alessio Quaglino 25e4d75a07 Return attached body/frame in mjs_attachBody/Frame.
PiperOrigin-RevId: 679601525
Change-Id: Icdc4616808e14bf0a3ebc17d89392382d084c31b
2024-09-27 08:34:00 -07:00
Yuval Tassa 176345b4e1 Remove meaningless const qualifier for scalar arguments in sparse function signatures.
PiperOrigin-RevId: 679568516
Change-Id: I910626cd9555966c3b0a9ffba4064d263b2c16e1
2024-09-27 06:37:18 -07:00
Taylor Howell 6a6e10d779 Add mju_cholFactorNNZ to compute the number of non-zeros per row for sparse Cholesky factorization.
PiperOrigin-RevId: 679553197
Change-Id: I6f92deec347dae97d2e219cfb5376f92e777da1a
2024-09-27 05:39:08 -07:00
Alessio Quaglino bb6da503dc Make 3 the default number of channels in mjsTexture.
PiperOrigin-RevId: 679521155
Change-Id: Ie6c962e75983c8bf8323170338b3d480be3a1117
2024-09-27 03:33:04 -07:00