Commit Graph

2355 Commits

Author SHA1 Message Date
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
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