Commit Graph

2343 Commits

Author SHA1 Message Date
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
Alessio Quaglino a26ba2012e Return 0 on success from mjs_activatePlugin instead of using mju_error.
PiperOrigin-RevId: 684102823
Change-Id: I86b7702094ae886539e1dfb6294381952d507bc1
2024-10-09 11:09:33 -07:00
Yuval Tassa 5dcc31a6aa Fix read-from-uninitialized-memory in bindings_test.py
PiperOrigin-RevId: 684082155
Change-Id: I6f3030559ebda4eda28c17ab866c7502c74e5862
2024-10-09 10:14:26 -07:00
Yuval Tassa 9a0dc20821 Move Newton Hessian memory allocation from stack to arena.
PiperOrigin-RevId: 684054446
Change-Id: I4be0b216810ebbd9d7fa119c6a84eb08d3c16b83
2024-10-09 08:54:54 -07:00
Taylor Howell 356d172f56 Update MJX SolverType docstring with Newton.
PiperOrigin-RevId: 684040839
Change-Id: I27bc87b387b6b405f5c76350438d1fdd6867450a
2024-10-09 08:08:36 -07:00
Yuval Tassa b1941708dd Add some arena-allocated attributes to compare in mjData pickle/unpickle test.
PiperOrigin-RevId: 684025320
Change-Id: Ic3282eaae74e43a33c2ed5f1b25ad38884487829
2024-10-09 07:15:52 -07:00
Yuval Tassa 395129bbd3 Improvements to lighting and replication logic in humanoid.xml and 22_humanoids.xml.
Minor fix to memory usage printing in simulate.

PiperOrigin-RevId: 683787943
Change-Id: I0a42dacc8af0e659c3817df57bceb76d9e4d5ae3
2024-10-08 15:36:22 -07:00
Baruch Tabanpour fa22e6d001 Add sphere-ellipsoid, sphere-cylinder. #2126
PiperOrigin-RevId: 683747371
Change-Id: Ic11803bb395944380d25ce848d9fbcf19afaad77
2024-10-08 13:37:00 -07:00
Alessio Quaglino 8256546432 Fix bug in xml_native_writer that was causing frames to be skipped.
PiperOrigin-RevId: 683721505
Change-Id: I8622f4ea42ecda934fbc805c429de40e7717fdef
2024-10-08 12:23:17 -07:00
Yuval Tassa b66da3d369 Add mjData.L, sparse Cholesky factor of Newton solver Hessian.
PiperOrigin-RevId: 683669555
Change-Id: I18d7530b5d68d1d48cb95d4faa0150c434109638
2024-10-08 10:13:08 -07:00
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