Yuval Tassa
4d4b0bb2c3
Don't normalize mjData->qpos quaternions in-place.
...
PiperOrigin-RevId: 647927542
Change-Id: I13b0be55498d1da3af2cdc414cfed4c3908a6fe1
2024-06-29 03:07:10 -07:00
Yuval Tassa
8c380e7ba4
Don't print the fixed name ("main") of the top-level default class when saving XMLs.
...
Also insert newlines between top level sections in saved XML.
PiperOrigin-RevId: 646802227
Change-Id: If16b93409bda88aee8ef75f4a78d7ba0419fcfae
2024-06-26 03:22:22 -07:00
Kyle Bayes
5e39fc0564
Improvements to GJK implementation:
...
- Fix various bugs
- Improve readability
- Add support for recovering witness points.
PiperOrigin-RevId: 646515019
Change-Id: I295cf90d885e32013e595ea7aad07ed6c1869239
2024-06-25 10:00:58 -07:00
Yuval Tassa
d8b85245a7
Informative error if mis-naming the top-level default class.
...
Also:
- Move the the top-level default class name into the mjCModel constructor.
- Fix bug in default class propagation in frame elements.
PiperOrigin-RevId: 646384669
Change-Id: Icc6154124361a234b84a07e2b5ecaa7c8b18ebf7
2024-06-25 01:46:18 -07:00
Kyle Bayes
1e8454820d
Implement initial GJK algorithm.
...
PiperOrigin-RevId: 645368315
Change-Id: I40a1e1023fd9f14a59e11a9dcc6ac22df241b6ae
2024-06-21 06:17:43 -07:00
Nimrod Gileadi
73cd15344e
Fix a couple of mjtNum build errors.
...
PiperOrigin-RevId: 645024056
Change-Id: Id283f550a4e2d927c214a86e77d42b90fb02824e
2024-06-20 07:31:28 -07:00
Kyle Bayes
18634b6726
Add missing mj_deleteVFS to user unit tests.
...
PiperOrigin-RevId: 645001843
Change-Id: I671514ea4cb7786e5d1f7f55404d4925e446a262
2024-06-20 06:04:32 -07:00
Yuval Tassa
8e2f830fd2
Fix type errors in compiler and tests.
...
In preparation for a float32 build of MuJoCo.
PiperOrigin-RevId: 644407674
Change-Id: I60069f0f865ef89fbf613f5a2ca0c336cc63461e
2024-06-18 09:12:44 -07:00
Yuval Tassa
6067048537
Deprecate mju_rotVecMat and mju_rotVecMatT in favor of mju_mulMatVec3 and mju_mulMatTVec3.
...
These functions names and argument ordering are more consistent with the rest of the API.
PiperOrigin-RevId: 643788290
Change-Id: I783eda8021b80b82098e23ed95669b102bb82508
2024-06-16 10:02:36 -07:00
Yuval Tassa
86ef1746b0
Add convex collision test models.
...
PiperOrigin-RevId: 643567019
Change-Id: I233553f04ea7d67216a2440f834362965d9e8c58
2024-06-15 01:38:13 -07:00
Yuval Tassa
c9bcf8371e
Add mj_setKeyframe function to save current state in k-th model keyframe.
...
Fixes #1719 .
Also improve documentation of `mju_sigmoid`, was previously only documented in changelog.
PiperOrigin-RevId: 642637458
Change-Id: I811a0bf8f881c8b76c9a62d2faec8fdec4e7585b
2024-06-12 09:22:52 -07:00
Baruch Tabanpour
5ed464b489
Support spherical joint in URDF.
...
PiperOrigin-RevId: 642326650
Change-Id: Iec766800bc9ab7e022bd586fc5881df576d01331
2024-06-11 11:08:00 -07:00
Yuval Tassa
07fc95ca9a
Add orthographic cameras.
...
Orthographic cameras are specified by setting the `orthographic` attribute of the `<camera>` element. The `fovy` attribute is still used to specify the field-of-view, but its semantic is different for orthographic cameras. For orthographic cameras, the field-of-view is expressed in units of length, rather than degrees.
Other related changes:
* Fix bug in the ordering of `cam_xxx` elements in `mjModel`.
* Make camera visualization translucent only when the frustum is visualized.
* Added a button to `simulate` to toggle between perspective and orthographic free cameras.
https://youtu.be/ZXBTEIDWHhs
PiperOrigin-RevId: 642293435
Change-Id: Id090a421ad88ab404b5b27ddbbd6bfc81ad49bc5
2024-06-11 09:23:18 -07:00
Alessio Quaglino
7a06bcfdaf
Make model editing API public, fixes #364
...
Still missing:
- Detailed documentation.
- Python bindings.
PiperOrigin-RevId: 641445626
Change-Id: I20e67b707cf1bebae7e0cc94d17f7b76a89171f0
2024-06-07 22:28:01 -07:00
Baruch Tabanpour
ace0c8f0a3
Add maxhullvert.
...
PiperOrigin-RevId: 641092710
Change-Id: Ib4fa828a9c82531614f0a67de9990340dbb25406
2024-06-06 19:05:16 -07:00
Alessio Quaglino
ba8a2d4c8a
Dynamic model editing.
...
PiperOrigin-RevId: 640838852
Change-Id: I559b1d60f2a3a2d866788d4006be31757454c619
2024-06-06 03:30:59 -07:00
Saran Tunyasuvunakool
40755e165d
Reduce VeryLargeMemory test memory allocation in engine_io_test.cc
...
An upcoming LLVM update is due to make this test fail under msan, since msan touches most of the memory allocated for the mjData arena. This causes an OOM failure on memory-limited testing infrastructure.
An 8G allocation is sufficient to catch errors that arise from the use of 32-bit integers to handle sizes.
PiperOrigin-RevId: 640504620
Change-Id: Ia1949b04a1428f01e1075e26b421facb3babedb6
2024-06-05 06:27:01 -07:00
Alessio Quaglino
b35ae973e1
Add mj_parseXML and mj_saveXML to xml_api.
...
PiperOrigin-RevId: 640099466
Change-Id: I75f763523c5bc8f6f7c2f2de6806d82ba37ebd4e
2024-06-04 15:28:14 +01:00
Kyle Bayes
ba93a9b5d6
Remove mj_makeEmptyFileVFS in favor of mj_addBufferVFS from MuJoCo codebases.
...
build / windows-2022 (push) Has been cancelled
build / macos-12 (push) Has been cancelled
build / ubuntu-20.04-clang-10 (push) Has been cancelled
build / ubuntu-20.04-clang-11 (push) Has been cancelled
build / ubuntu-20.04-clang-12 (push) Has been cancelled
build / ubuntu-22.04-clang-13 (push) Has been cancelled
build / ubuntu-22.04-clang-14 (push) Has been cancelled
build / ubuntu-22.04-gcc-10 (push) Has been cancelled
build / ubuntu-22.04-gcc-11 (push) Has been cancelled
build / ubuntu-22.04-gcc-12 (push) Has been cancelled
build / ubuntu-22.04-gcc-9 (push) Has been cancelled
PiperOrigin-RevId: 639824744
Change-Id: I7746c71b0be88a61e76c4622d605356701881563
2024-06-03 10:08:36 -07:00
Yuval Tassa
2830a4071f
Add dampratio attribute to position and intvelocity actuators.
...
PiperOrigin-RevId: 639745135
Change-Id: I94ba4c346d2750c6c454a60a568f2e6f6bce19d4
2024-06-03 05:28:35 -07:00
Yuval Tassa
8fa0fea02d
Allow partial specification of polycoef attribute of equality constraints.
...
- Usually the user only wants to tweak `polycoef[1]`, after this change `"0 2"` is equivalent to `"0 2 0 0 0"`.
- Also improve documentation of this attribute.
- Tighten margins of documentation display equations.
PiperOrigin-RevId: 639720742
Change-Id: Ibafa0e093cebe1c1c75bf2e47ff3bd2ad7619414
2024-06-03 03:43:13 -07:00
Alessio Quaglino
14a3ce5ffa
Add tree traversal utilities to C API.
...
PiperOrigin-RevId: 639285787
Change-Id: Ieb52da87fb5e1c674985f03c9ff2b18783d1d657
2024-06-01 01:28:13 -07:00
Alessio Quaglino
dec55b59fa
Allow detaching from a compiled model.
...
PiperOrigin-RevId: 638299270
Change-Id: I944d2a24578b63463eddfa55d89f39fcfbafd2b4
2024-05-29 08:47:30 -07:00
Kyle Bayes
50aab2dd48
Move engine/engine_vfs.{c,h} to user/user_vfs.{c,h}.
...
PiperOrigin-RevId: 636219666
Change-Id: I820de511948e82256784edb0893f209a73b221e6
2024-05-22 10:44:53 -07:00
Tom Erez
727893f0f2
Add timeconst attribute to position actuator.
...
PiperOrigin-RevId: 635018979
Change-Id: I919573f4241ecb4a4c61c3b8b6641b31aa79eca4
2024-05-18 03:38:20 -07:00
Yuval Tassa
875823ba96
Speed up slow test.
...
PiperOrigin-RevId: 635014612
Change-Id: Ifb7fe174827f59647bb254a3ece25abbd57962ca
2024-05-18 03:07:30 -07:00
Yuval Tassa
02d015458c
Add mj_geomDistance API function and sensors for geometric distance, normal direction and segment between between two geoms. Fixes #51
...
PiperOrigin-RevId: 632458301
Change-Id: I65b7e5bb0df59008028114cf4a07e0d6365ff3d3
2024-05-10 04:52:43 -07:00
Yuval Tassa
39601b0f52
Fix bug in compiler error string construction.
...
PiperOrigin-RevId: 632404023
Change-Id: I79e24e44fc4eec67b76fbf62b053b169ba3070a3
2024-05-10 00:40:07 -07:00
Mohammad Hamid
d6bc8c7781
BEGIN_PUBLIC
...
Replaced "shark" test models with lighter models to speed up tests.
END_PUBLIC.
- procedurally generated light cube
- replaced shark GMSH with cube for all tests with extension GMSH
- Reduced size of shark model used for tests with extension Ftetwild
PiperOrigin-RevId: 631776421
Change-Id: I66f6b4058b86338a10d06c39bc93bef1c6fbdab6
2024-05-08 06:15:18 -07:00
Alessio Quaglino
96844db926
Update BVH during fusestatic. Fixes #1069 and #1577 .
...
PiperOrigin-RevId: 631748750
Change-Id: I4e1ae01207568c90fc49bcd7d9f760f5187f1afa
2024-05-08 04:13:16 -07:00
Kyle Bayes
61a651c63a
Fix uninitialized variable error in asset cache.
...
PiperOrigin-RevId: 630491063
Change-Id: If5ac05beaee28b38975845682b92a9cb767f009b
2024-05-03 14:00:59 -07:00
Kyle Bayes
dc68bc6c13
Add another unit test for caching PNG decoded images verifying that when a PNG file is updated the stale cached asset is not used.
...
PiperOrigin-RevId: 629748520
Change-Id: I6935a3d172ac1459602d3d82ac548adeb08a7b11
2024-05-01 09:39:40 -07:00
Alessio Quaglino
7eb8c4b9f4
Set all flex edges to rigid when the flex is rigid.
...
PiperOrigin-RevId: 629740153
Change-Id: Ib2fb6f64e3d160268d2521d63830f41e44d03b20
2024-05-01 09:06:01 -07:00
Mohammad Hamid
131b1745db
Added support for GMSH22 surface loading
...
PiperOrigin-RevId: 629734063
Change-Id: I6a250b81de4e7c8f7520795bfe74a81d719dfb50
2024-05-01 08:44:05 -07:00
Alessio Quaglino
57b1dbac65
Fixed bug with error printing in user_api_test.
...
PiperOrigin-RevId: 629728927
Change-Id: I9eeae8c6abf469776c59d1ea6b3cb01f923dcef9
2024-05-01 08:20:13 -07:00
Yuval Tassa
6f97f42458
Geoms of type mesh with zero density don't trigger the check for valid mesh volume.
...
PiperOrigin-RevId: 629416817
Change-Id: I23eaa0d61a703988a4eb96a3cad09e562384035e
2024-04-30 08:12:40 -07:00
Alessio Quaglino
26f23066d1
Add replicate element to MJCF. Fixes #553
...
PiperOrigin-RevId: 629393578
Change-Id: Ia1db1b9e47eba8868117b0f7b85edcd0cc1b6d79
2024-04-30 06:29:18 -07:00
Alessio Quaglino
6a5bbb5157
Exclude shark models from testspeed_test.
...
PiperOrigin-RevId: 629386360
Change-Id: Ie8f0a6725dc9b21e2a702ffc481ded00235e55b7
2024-04-30 06:01:00 -07:00
Alessio Quaglino
618d879904
Make BVH generation robust to very small perturbations.
...
PiperOrigin-RevId: 629070367
Change-Id: I62b91a572cd59a51ed85e4e97aea53fdb2da1986
2024-04-29 08:06:32 -07:00
Alessio Quaglino
d6553ed192
Update contype and conaffinity if fusestatic is true. Fixes #1577 .
...
PiperOrigin-RevId: 628073529
Change-Id: I2fe88736d12ec16d72bbd4dce5d349b930147b50
2024-04-25 07:46:00 -07:00
Yuval Tassa
027c26a153
Improve error reporting of sensorized objects.
...
Also remove duplication of element name and id from most error messages.
PiperOrigin-RevId: 628065116
Change-Id: Idd962fbab7aeba09e3a70c6c9d044b23db94cf23
2024-04-25 07:13:54 -07:00
Yuval Tassa
cbb048ff00
Allow parent targeting for cameras and lights.
...
PiperOrigin-RevId: 628002614
Change-Id: I047dd3d62cfbc6432a3ec53fe6465afc52ca615b
2024-04-25 02:10:35 -07:00
Yuval Tassa
80810391ab
Add defaults to attach tests.
...
PiperOrigin-RevId: 627526669
Change-Id: I5fc7955bacc459c637fce8e88e9da7bbfd7fb011
2024-04-23 15:40:54 -07:00
Yuval Tassa
546a27ca72
Fix memory allocation error when memory size is larger than 2G. Fixes #1606
...
PiperOrigin-RevId: 627058355
Change-Id: Iebef647a0107d1f112a876d705f5b3ea888b4a41
2024-04-22 09:15:46 -07:00
Yuval Tassa
caf215e342
Add metallic and roughness scalar attributes to materials.
...
Rename `light_radius` -> `light_bulbradius`, make the default value 0.02.
PiperOrigin-RevId: 627032170
Change-Id: I1e01e2eca028c0aefc2e7dc384e8b34abac184aa
2024-04-22 07:39:06 -07:00
Alessio Quaglino
cc78db41f4
Add mjs_detachBody to C API.
...
PiperOrigin-RevId: 626947850
Change-Id: I7c897048098ecd4f2247725ef2d378dbd00ef4a0
2024-04-22 01:11:13 -07:00
Yuval Tassa
4b7b40d329
Add test for saving and loading binary models.
...
PiperOrigin-RevId: 626019520
Change-Id: I1e349921b3408bee288c52d9e52b29006ff3fda4
2024-04-18 06:55:07 -07:00
Alessio Quaglino
c331d18a6e
Support nested frames in mjs_attachFrame.
...
PiperOrigin-RevId: 626001651
Change-Id: I3dc52baa6aad875504dd4c7d969a4091f52c4c16
2024-04-18 05:37:12 -07:00
Alessio Quaglino
81feadad5c
Add mjs_attachFrame to user_api.
...
PiperOrigin-RevId: 625648309
Change-Id: I4d6dfc4d38ad6ce688df83eb7cc2c34676076193
2024-04-17 05:25:16 -07:00
Alessio Quaglino
4b6c07cd7d
Prevent bodies from overwriting the frame names in xml_native_writer.
...
PiperOrigin-RevId: 625632369
Change-Id: If3bd048ac40e116fcb97beb3dca3d99826fe4ad0
2024-04-17 04:07:50 -07:00