Commit Graph

2096 Commits

Author SHA1 Message Date
Taylor Howell 6db96e07e4 Add position-dependent sensors to MJX: magnetometer, ballquat, subtreecom, framepos, framexaxis, frameyaxis, framezaxis, and clock.
PiperOrigin-RevId: 663668212
Change-Id: Ifc9adc6bff4544172ab22572da04a093aebfdbd4
2024-08-16 03:10:24 -07:00
Copybara-Service 6c76678167 Merge pull request #1906 from michael-ahn:fix-face-circumradius
PiperOrigin-RevId: 663667230
Change-Id: I61774565c2e453f9a25f1c81e3e898f2f22fd554
2024-08-16 03:06:24 -07:00
Michael Ahn 9924d9ca89 Fixed incorrect mesh face circumradius calculation
- In 8e2f830, this was changed from `mju_norm3` to `mjuu_normvec`, but the
  latter will mutate its input to be normalized instead of just
returning the norm (the former was likely mistaken as `mju_normalize3`
which does mutate its input).
2024-08-15 20:53:57 -07:00
Taylor Howell a74c184f9d Add efc_pos to MJX.
fixes #1388

PiperOrigin-RevId: 663358494
Change-Id: I63885f9208d12edbaa4b7d123ce4c6d16f40dcbe
2024-08-15 10:33:44 -07:00
Alessio Quaglino e0e134ca63 Add plugin tests for mjSpec.
Fixes #1903.

PiperOrigin-RevId: 663352920
Change-Id: I3a9e17aec5694e49c20b542f4b0a4402f88a2f17
2024-08-15 10:19:53 -07:00
Kyle Bayes 64575f399b Add heightfield collision support for GJK + EPA implementation.
PiperOrigin-RevId: 663321119
Change-Id: I01a85ae15386c997bff4e9c6d71555a4380dfffe
2024-08-15 08:50:09 -07:00
Alessio Quaglino 4b88e9bebf Do not delete keyframes during mjs_detachBody.
PiperOrigin-RevId: 663281082
Change-Id: I6eedf8c5a3a422bcd78086f2fe30c2099f0b9d16
2024-08-15 06:10:43 -07:00
Yuval Tassa b2018ff506 Replace function with static array in engine_forward.c
PiperOrigin-RevId: 663268322
Change-Id: Ibd161a8eda55fc04cf37e465f0d0ac0adcfc7847
2024-08-15 05:11:38 -07:00
Kyle Bayes 7f09a7d8c6 Fix bug in S2D and improve readability of GJK + EPA code.
PiperOrigin-RevId: 663261102
Change-Id: Ibb1d801078cc02bc7ccec246be6dc50fa4f2be18
2024-08-15 04:35:15 -07:00
Yuval Tassa 1f5f9a8a67 Improve variable naming in xml_native_reader.cc
PiperOrigin-RevId: 663236609
Change-Id: I0a3af8432054172a3fe687867706eeef14a2529d
2024-08-15 02:42:30 -07:00
Yuval Tassa d932faa1d4 Flip order of cases in user_objects.cc (readability)
PiperOrigin-RevId: 663040865
Change-Id: I27d06a6a769d5bfc41189d270021b4fc1d4b5932
2024-08-14 13:49:11 -07:00
Alessio Quaglino 4c64e6f036 Add mocap state to SaveState/RestoreState and attached keyframes.
PiperOrigin-RevId: 662975257
Change-Id: I3edb44f34426525813033902caf31db16ad7b2ab
2024-08-14 10:42:49 -07:00
Alessio Quaglino 5927b3d4d9 Add time to attached keyframes.
PiperOrigin-RevId: 662886533
Change-Id: If9118a226250d2e806d184c9715c7e6a1390fd95
2024-08-14 05:47:43 -07:00
Alessio Quaglino 7be4df7e03 Add ctrl to attached keyframes.
PiperOrigin-RevId: 662878508
Change-Id: Ie273fae0220c8b257766cbbd90a880d44b901725
2024-08-14 05:14:49 -07:00
Alessio Quaglino afd7c73f44 Attach multiple keyframes.
Still missing: support for ctrl, mocap, and time.

PiperOrigin-RevId: 662871569
Change-Id: I8a418c4007663e3063d7146bd72db4eba78ddc5d
2024-08-14 04:42:54 -07:00
Yuval Tassa 2cb601c98d Improve documentation w.r.t smoothness, differentiability and finite-differencing.
PiperOrigin-RevId: 662848709
Change-Id: Icb7dc03a2c53d43d0d3a9e4ac95d963e5bc6853c
2024-08-14 03:11:38 -07:00
Yuval Tassa 7efd690471 Document where mesh transforms are saved, fixes #1894
PiperOrigin-RevId: 662836678
Change-Id: I060e3b1f29e82c6c3c188e730657cda7b99f63e9
2024-08-14 02:24:46 -07:00
Saran Tunyasuvunakool 1141b4abbc Force dtype of mjx.Contact.{geom1,geom2,geom} to int32.
This improves compatibility with MuJoCo.

PiperOrigin-RevId: 662655282
Change-Id: I2a336d9453f40cf0bfa85a7203b55709e23a07fe
2024-08-13 14:34:43 -07:00
Alessio Quaglino 19aa68c2b2 Add keyframe support to attach.
Limitations:
- Supports attaching a single keyframe. If multiple keyframes are present in the child, only the first one will be attached.
- Does not support time, ctrl, mpos, mquat.
- If mjs_detachBody is used, all keyframes are removed.
PiperOrigin-RevId: 662517666
Change-Id: If6e3839471e1884afc14e1a75e7ce1957c2f3581
2024-08-13 08:00:01 -07:00
Copybara-Service 98cd49d529 Merge pull request #1827 from abhihjoshi:open3d-removal
PiperOrigin-RevId: 662510404
Change-Id: I79b356eecddb3402c444cb16a305516bd724aef6
2024-08-13 07:33:23 -07:00
Kyle Bayes 39896f8064 Restructure mjCMesh for caching.
PiperOrigin-RevId: 662496475
Change-Id: I4c3a58a63ef2c3b1196b3e6b30eb556b5528ff7f
2024-08-13 06:40:36 -07:00
Copybara-Service 4ebf381b4d Merge pull request #1899 from saran-t:saran-t-patch-5
PiperOrigin-RevId: 662454010
Change-Id: Ie3d6c59dd787aefa3c95869a91451387783b6057
2024-08-13 03:51:18 -07:00
Saran Tunyasuvunakool 1132632627 Fix for benign UBsan signed-integer-overflow complaints.
When counting nl and nc, the nnz is optionally also counted when in sparse mode. However, the functions mj_nl and mj_nc unconditionally counts nnz into a temporary accumulator, then only afterwards check whether the output nnz pointer is NULL.

When not in sparse mode, ten_J_rownnz does not get initialized by mj_tendon, however mj_nl and mj_nc are accumulating potentially spurious data from ten_J_rownnz into the temporary accumulator. While the spurious result eventually gets discarded, UBsan nevertheless detects an integer overflow in the temporary accumulator.

PiperOrigin-RevId: 662443910
Change-Id: I78a9a088d4db7f16be779c7d669167d6fb3e4401
2024-08-13 03:08:41 -07:00
Alessio Quaglino e3814be8e6 Remove duplicated title from the changelog.
PiperOrigin-RevId: 662443493
Change-Id: Idf6d36aba168488f2752d7e167ed13c599acbd91
2024-08-13 03:06:31 -07:00
Saran Tunyasuvunakool acab66d799 Remove superfluous break statements. 2024-08-13 10:46:35 +01:00
Alessio Quaglino 851bb6eef4 Add option to mjspec for creating a texture directly from a buffer.
PiperOrigin-RevId: 662186527
Change-Id: I469c876681d52964ac971c0bb2ec3517224d3a3d
2024-08-12 12:29:08 -07:00
Kyle Bayes 20cae556ee Encapsulate BVH class members.
PiperOrigin-RevId: 662141171
Change-Id: Ica202d31dacc9cc500d0aeecded941b79002b9a1
2024-08-12 10:27:03 -07:00
Alessio Quaglino 648fd56ed1 Preserve time when recompiling a model.
Fixes #1890.

PiperOrigin-RevId: 662084324
Change-Id: I6aed40761cee5044e63426935d102123db295b25
2024-08-12 08:00:36 -07:00
Yuval Tassa d3a976e10d Fix indent.
PiperOrigin-RevId: 662035313
Change-Id: I30ec124e8144b8130623daa6b0802a46de124aec
2024-08-12 04:23:48 -07:00
Yuval Tassa d45d13e5ad Remove uses of mjtNum-typed functions from user_objects.cc
PiperOrigin-RevId: 662026275
Change-Id: Idfb2b6ced6eac4b4b60079e219aac63fc1d00b89
2024-08-12 03:45:43 -07:00
Yuval Tassa 02ffaa8248 Yet another GCC-related fix.
PiperOrigin-RevId: 661595661
Change-Id: Ib66a0d891533be50451adc850d7350532fc39d67
2024-08-10 05:32:28 -07:00
Yuval Tassa d72f01bad4 Add break statements in user_objects.cc to appease persnickety GCC
PiperOrigin-RevId: 661590599
Change-Id: I2d167ca92cc4d5230922d221c9267a2e8d018b40
2024-08-10 04:56:18 -07:00
Yuval Tassa e397fcb5a5 Add return values to private mjJCJoint methods.
PiperOrigin-RevId: 661438758
Change-Id: I08a77eb878703610ead526040d86f3f3fccb080b
2024-08-09 16:09:17 -07:00
Taylor Howell 466368efc6 Add shellinertia support for primitives: sphere, capsule, cylinder, ellipsoid, and box.
PiperOrigin-RevId: 661407997
Change-Id: Icddac58c540c71ea26ac7a3be874788443bd1122
2024-08-09 14:40:13 -07:00
Alessio Quaglino ec43ec7c30 Remove hard-coded nPOS and nVEL from mjCModel.
PiperOrigin-RevId: 661370196
Change-Id: Ib2c1876dfea55dbf496e2358000f24bbde29fc52
2024-08-09 12:53:55 -07:00
Alessio Quaglino da15aa6a0e Improve error message for fullinertia and orientation specifiers.
Fixes #1888.

PiperOrigin-RevId: 661359190
Change-Id: Ibe38e88024b4a43922352b42347abf1026f168a2
2024-08-09 12:20:27 -07:00
Kyle Bayes ebd8615554 Internal change.
PiperOrigin-RevId: 661267364
Change-Id: If2249eb1658c5b877a43a4d3c29ebf88d2a42d5a
2024-08-09 08:16:41 -07:00
Kyle Bayes 1c9d609b5b Make mj_gjkPenetration have the same signature as LibCCD penetration functions.
PiperOrigin-RevId: 661256774
Change-Id: If0ae95e27900a9d7b9c63f189837f1315fbbb987
2024-08-09 07:40:17 -07:00
Erik Frey 35a834f0ba Fix engine_sort_test compile error.
PiperOrigin-RevId: 660975517
Change-Id: I6e3d1b041fe60b1ec202391903eff340f787b46d
2024-08-08 14:11:35 -07:00
Taylor Howell ebf887e14d Add sensors to MJX. Implements jointpos and actuatorpos as examples.
PiperOrigin-RevId: 660891329
Change-Id: Ie6c282a397de2f52843775ec747495e9be46d307
2024-08-08 10:33:19 -07:00
Taylor Howell 2c56946547 Increase mjVERSIONSTRING to 3.2.3 after release.
PiperOrigin-RevId: 660891033
Change-Id: I2bda69d11cab60a83b0c77bb53214240eacaea62
2024-08-08 10:31:57 -07:00
Taylor Howell 82c27165f2 mjQUICKSORT uses std::sort with C++.
fixes #1638

PiperOrigin-RevId: 660887790
Change-Id: Ia3b493feda98b246d963aa749bc81b96c42fddaa
2024-08-08 10:24:34 -07:00
Taylor Howell 5383d1cd44 Update changelog for MuJoCo 3.2.2 release.
PiperOrigin-RevId: 660823679
Change-Id: I983220b7e0314bdb2476a48b68399b0921834747
2024-08-08 07:12:08 -07:00
Nimrod Gileadi c486f62cb7 Fix some broken links in documentation.
Remove references to deleted sample Makefiles.

PiperOrigin-RevId: 660753375
Change-Id: Iaed2d893e1c03b1c6d348a54e7d7f834db7f6089
2024-08-08 02:41:08 -07:00
Nimrod Gileadi 157040f743 Refer to tex_data in docs instead of tex_rgb.
PiperOrigin-RevId: 660412293
Change-Id: I164099ecc36833e20d5adc2c7345aff351fc4561
2024-08-07 09:07:20 -07:00
Gabe Oppenheimer ebc48d2783 Update the MuJoCo version to v3.2.2 following the 3.2.1 release.
PiperOrigin-RevId: 660036707
Change-Id: I7e649e5a0ce6db863bcb99dc4fc1aa851b3f5140
2024-08-06 11:39:30 -07:00
Yuval Tassa fd892ee8f5 Fix some documentation bugs
PiperOrigin-RevId: 660010085
Change-Id: I0e4d7bef6acc4e432545266c6301f7ca08e6b883
2024-08-06 10:34:08 -07:00
Kyle Bayes 5287359022 Update docs for VFS.
PiperOrigin-RevId: 659968022
Change-Id: I3b6c9befc8ca0dacaee5ef6da34d537dd439b7f3
2024-08-06 08:33:21 -07:00
Kyle Bayes a1d9b47e2f Initial (unoptimized) implementation of EPA.
PiperOrigin-RevId: 659938320
Change-Id: I72c6c6bd7504bce36e4788d90b06b2cb3849b4db
2024-08-06 06:53:55 -07:00
Nimrod Gileadi 9db9df7380 Increase material count limit to 1000.
The texture limit used to be 1000, but when materials with multiple textures were introduced in 3.2.0, the limit was reduced to 100. Since there are model out there that already have more than 100 and fewer than 1000 textures/materials, we should maintain backwards compat.

Fixes #1877

PiperOrigin-RevId: 659901629
Change-Id: If0f6d0500d1d808bc3ec2d87d4a3faf24007da59
2024-08-06 04:20:51 -07:00