Copybara-Service
e4359c04df
Merge pull request #1253 from Balint-H:feature/unity-hmap
...
PiperOrigin-RevId: 588420615
Change-Id: I2340f2fc025017133644eeedacf94b5c83e04669
2023-12-06 07:32:45 -08:00
Yuval Tassa
762371c3e4
Add kv damping attribute to position and intvelocity actuator shortcuts.
...
PiperOrigin-RevId: 588377097
Change-Id: I8ded2ff982e52ed8673019979e29b706ef65c743
2023-12-06 04:28:30 -08:00
Erik Frey
b3ccf67ebf
Cleanup MJX tests and migrate them to put_model/put_data.
...
PiperOrigin-RevId: 588304729
Change-Id: I58075383e6eed64ae00cea305a568eba6465b0b0
2023-12-05 23:08:05 -08:00
Kevin Zakka
899ba4b7ec
Add missing period in documentation.
...
PiperOrigin-RevId: 588127219
Change-Id: Ib39808f303cebb6c619d1119024e9a1352326473
2023-12-05 11:02:26 -08:00
Nimrod Gileadi
5e9906be84
s/paramters/parameters/
...
PiperOrigin-RevId: 588113325
Change-Id: I1b7e754c747baedb8d2b154c3dc395a7062e8fc5
2023-12-05 10:20:04 -08:00
Nimrod Gileadi
3c05f9fafc
Add a note to future change log about releasing 10.16 macOS wheels.
...
This change relates to #1213 , and should fix it when we push the next release.
PiperOrigin-RevId: 588099974
Change-Id: Ic1c4164f8a6400e92b5f509c3e03ff9fbc1c6033
2023-12-05 09:39:52 -08:00
Alessio Quaglino
8c7c39a211
Lock the sim mutex in PhysicsLoop and PhysicsThread.
...
This prevents an invalid memory access when the stack is used in engine_vis.
Fixes #1219 .
PiperOrigin-RevId: 588017796
Change-Id: I1ee18c5aa5e96ccaeebb0a467cd384355882b80b
2023-12-05 03:56:52 -08:00
Nimrod Gileadi
c062a8db19
Allow multiple actuators to use the same PID plugin.
...
Maintain separate state for each actuator in the Plugin object.
PiperOrigin-RevId: 587760569
Change-Id: I633a1b94f0dde9377120145066a26aef6a4033b8
2023-12-04 10:08:07 -08:00
Nimrod Gileadi
236dcb4ffd
Fix a bug with PID actuators, when plugin definition order differs from actuator order.
...
PiperOrigin-RevId: 587729879
Change-Id: If71c7e374f36ef08c5147e7316066d6f5365925f
2023-12-04 08:31:45 -08:00
Bálint Hodossy
f5a2879f9d
Fix braces convention
2023-12-04 14:00:24 +00:00
Bálint Hodossy
8ec1e4e2b8
Add heightfield geom type with Unity terrain, import not yet supported
2023-12-04 13:55:38 +00:00
Matthew Bennice
c0b7b9873d
Store paths for hfields, textures, and skins similar to meshes.
...
PiperOrigin-RevId: 587283093
Change-Id: Ie6d8d2ecb185697a27d1b6f7fca1312df006af12
2023-12-02 03:51:25 -08:00
Erik Frey
67fa7c1dc2
Add put_model, put_data, and get_data to MJX.
...
These io functions replace device_put, device_get_into. These new functions correctly copy intermediate fields such as efc_J, which the old functions could not.
PiperOrigin-RevId: 586712273
Change-Id: Ia3a4104af17db2ebd41b41a2ca501c5de9ac5d05
2023-11-30 10:14:46 -08:00
Alessio Quaglino
4c8ffb44bf
Extend SDF outside the bounding box for SdfLib plugin.
...
SdfLib returns the sum of the distance from a given point to the bounding box and a saved minimum distance from the surface over the whole box boundary. This underestimates the true distance and can cause spurious contacts and jittering. This CL performs a box projection of points outside the bounding box and adds the distance of the original point from the box to the distance of the projected point to the surface. This overestimates the true distance and avoids spurious collisions.
PiperOrigin-RevId: 586701933
Change-Id: I22eecb9757fa22359440156ef6433135648fa3ff
2023-11-30 09:43:06 -08:00
Nimrod Gileadi
a306e32707
Add new hash for scipy in mjx/requirements.txt
...
PiperOrigin-RevId: 586674164
Change-Id: Idcda8f57addbce331da04cc1510e01ff91563040
2023-11-30 07:48:45 -08:00
Alessio Quaglino
33bd2a986a
Use mesh_pos, mesh_quat instead of geom_pos, geom_mat in ray_sdf.
...
PiperOrigin-RevId: 586632872
Change-Id: I39f99945ccdd6c54f7867adfe06a379d00dc8002
2023-11-30 04:26:07 -08:00
Yuval Tassa
b39cca725a
Move headlight pos/dir computation from mjr_render to mjv_updateScene.
...
PiperOrigin-RevId: 586630110
Change-Id: Ia44ea944016ccfe081682375cdb975342695d826
2023-11-30 04:15:05 -08:00
Yuval Tassa
822b03446c
Improve pipeline documentation, expose mj_implicit function to public header.
...
PiperOrigin-RevId: 586380774
Change-Id: I3fafa563ebc852e17e1233288455b96f4499027b
2023-11-29 10:18:57 -08:00
Erik Frey
2f37147fc0
Guard against NaNs in MJX solver when no cost is imposed. Fixes #1225 .
...
PiperOrigin-RevId: 586020958
Change-Id: I82f398b1538d2c3801a35c80c862e49be3b110a2
2023-11-28 10:12:17 -08:00
Alessio Quaglino
e1669b568b
Change default values of flex visualization flags.
...
Deactivated vertices, edges, faces and activated skins. The skin is less precise but faster to render and more importantly when the wireframe is active it allows to look inside the body much more easily.
PiperOrigin-RevId: 585970250
Change-Id: Icb6c0ff6266e552cffce9b0c810f634f9a29a55e
2023-11-28 07:27:54 -08:00
Copybara-Service
9075f2cb74
Merge pull request #1222 from Balint-H:fix/ball-joint-tooltip
...
PiperOrigin-RevId: 585964341
Change-Id: I59fca025b1005317279f43b8f621e62b0f80fe62
2023-11-28 07:04:50 -08:00
Alessio Quaglino
7d8d4d398e
Make elasticity plugins compatible with flex pins. Fixes #1235 .
...
Before change:
poncho 18.20s
poncho_flex 44.60s
floppy 4.70s
floppy_flex 6.43s
After change:
poncho 18.23s
poncho_flex 44.62s
floppy 4.67s
floppy_flex 6.57s
PiperOrigin-RevId: 585952587
Change-Id: I0e7c1513f64c7ab1e6ad71e2168b4467c042b46f
2023-11-28 06:13:43 -08:00
Alessio Quaglino
7cb84d45c1
Prevent integer overflow in history buffer for large models.
...
PiperOrigin-RevId: 585949038
Change-Id: Iabec5feedd1632b635583a608a5488b39e6bb9a2
2023-11-28 06:04:00 -08:00
Yuval Tassa
51d80564fa
Don't initialize plugins during model compilation.
...
PiperOrigin-RevId: 585701389
Change-Id: I4e5e34276f404abadf6f5d4d9764ca717304ee34
2023-11-27 11:01:08 -08:00
Nimrod Gileadi
6412c95a37
Remove the use of plugin_state from PID plugin.
...
The plugin was storing a boolean to indicate whether the previous ctrl value was set in `act`. Use d->time == 0 instead.
PiperOrigin-RevId: 585692686
Change-Id: I95335cebdb5716bd6fad81f463a4f248406c80ec
2023-11-27 10:32:07 -08:00
Baruch Tabanpour
35c90844ae
Add sites to MJX.
...
PiperOrigin-RevId: 585691582
Change-Id: I6cc594daf436231f91534f137ff259e7b39811d9
2023-11-27 10:28:50 -08:00
Yuval Tassa
37bb03f435
Move humanoid geoms to group 1
...
PiperOrigin-RevId: 585632746
Change-Id: I832804b9c0d090506c3b4ed5c0eeeb5e4cae412a
2023-11-27 06:23:54 -08:00
Yuval Tassa
21334ea704
Delete local frame members from MJC objects.
...
PiperOrigin-RevId: 585629699
Change-Id: I12dbd235dee49223fa7b1a097f04561da69550a0
2023-11-27 06:07:53 -08:00
Yuval Tassa
ca046cbf64
Fix rendering bug in changelog.
...
PiperOrigin-RevId: 585627863
Change-Id: I238b9d7eb13dbc8660f15f45efe6a84ccbb84c66
2023-11-27 05:59:53 -08:00
Yuval Tassa
25ddb3e6e8
simulate: Add states to history when stepping with right arrow key.
...
PiperOrigin-RevId: 585613870
Change-Id: I7fb051946e8a91a900442e3d7048dfa8b8bd7c5c
2023-11-27 04:45:51 -08:00
Alessio Quaglino
eb9568a48b
Add frame element to MJCF.
...
PiperOrigin-RevId: 585598244
Change-Id: I4c06be3dd586dab5a4458f05faaf1e7f2b615458
2023-11-27 03:32:18 -08:00
Alessio Quaglino
8010aad7be
Add flex_elemlayer to mjvSceneState. Fixes #1193 and #1219 .
...
PiperOrigin-RevId: 585581657
Change-Id: Iec4da74437544184c19765a2feee1cca4c368d34
2023-11-27 02:25:05 -08:00
Kevin Zakka
e33adaca9c
Fix typos in mju_boxQP documentation.
...
PiperOrigin-RevId: 585462325
Change-Id: Ib1c15c3d5af8475ec1a62b50c66b729579a23e60
2023-11-26 11:23:52 -08:00
Nimrod Gileadi
002b427a32
PID Controller as an actuator plugin.
...
Implement a configurable PID controller.
PiperOrigin-RevId: 585282014
Change-Id: I2d884554629101a0a25b5e0979ffb1ff8ed9cab4
2023-11-25 08:41:01 -08:00
Alessio Quaglino
d070b1893e
Improved SDF objective function.
...
For two colliding SDFs `A` and `B`, the function is `(A+B)+abs(max(A,B))`. This can also be written as `clearance + abs(intersection)`. This function has the following properties:
- On the penetrating surface, it is equal to `A+B`, i.e. the clearance field which is the penetration depth.
- The object boundary is a set of local minima in 3D space, since `abs(max(A, B))>0` away from the surface.
- Along the penetrating surface, the maximum penetration is a local minimum of the clearance since this field is orthogonal to the midsurface field `A-B`, which acts as a support plane for the contact.
[Level sets of the improved function for two colliding circles](https://www.wolframalpha.com/input?i=plot+sqrt%28x%5E2%2By%5E2%29-1+%2B+sqrt%28%28x-1%29%5E2%2B%28y-1%29%5E2%29-1+%2B+max%28max%28sqrt%28x%5E2%2By%5E2%29-1%2C+sqrt%28%28x-1%29%5E2%2B%28y-1%29%5E2%29-1%29%2C+0%29+-+min%28max%28sqrt%28x%5E2%2By%5E2%29-1%2C+sqrt%28%28x-1%29%5E2%2B%28y-1%29%5E2%29-1%29%2C+0%29+ ).
PiperOrigin-RevId: 585106580
Change-Id: I5b18a1ef262ceb0a1ab8abcad8acfd6dc1992e2c
2023-11-24 09:07:17 -08:00
Yuval Tassa
6a83b86553
Update M1 Pro with M3 Max benchmarks in MJX docs
...
PiperOrigin-RevId: 584918133
Change-Id: I442972cdc1f19020e6b5bbc7ff3e98fd556cf125
2023-11-23 10:46:54 -08:00
Nimrod Gileadi
f2025c6abf
Allow plugin actuators to have activation state.
...
Accept new attributes on the plugin/actuator tag:
- dyntype
- dynprm
- actlimited
- actrange
- actearly
This addresses some of the requests in #1098 .
PiperOrigin-RevId: 584866281
Change-Id: I4f7559e446888216093efba4ced9119cfc0528a4
2023-11-23 05:14:03 -08:00
Bálint Hodossy
d37881d241
Fix wrong units indicated in ball joint tooltip.
2023-11-23 11:38:21 +00:00
Copybara-Service
20eeb75086
Merge pull request #1187 from tmplt:ref/cmake-system-pybind
...
PiperOrigin-RevId: 584560576
Change-Id: I1c16fbf80e3ba7175cf4d1d89a459e817100e1f8
2023-11-22 02:20:02 -08:00
Yuval Tassa
b41f6d0942
Correct documentation of eulerseq attribute w.r.t URDF conventions.
...
PiperOrigin-RevId: 584394256
Change-Id: I0afcb6ced81b98898988cc66f46742175a9a55c5
2023-11-21 12:11:05 -08:00
Yuval Tassa
2bc2bc902f
Clarify that the contact disable flag also disables collision detection.
...
PiperOrigin-RevId: 584300974
Change-Id: I740fd6833b2ea1b77bdb70dc210a1bd1f7eb6f17
2023-11-21 05:57:51 -08:00
Yuval Tassa
cd56a41f83
Fix bug in Cartesian actuation with movable refsite.
...
PiperOrigin-RevId: 584035818
Change-Id: I005f6bbbe02f8b36d287ecada0406a6ae4d720ba
2023-11-20 08:37:29 -08:00
Alessio Quaglino
8ca51b5318
Backtracking line search for SDF collisions.
...
Increased tolerance above zero in nutbolt.xml since now the two parts lock otherwise. Measured speedup of 2x in this example.
This solves the issue of scale-dependent step sizes. Tested on gears with 10cm diameter and 2cm thickness.
PiperOrigin-RevId: 584009449
Change-Id: Ied2f62dbbbc592470b91cf910f3553802a57c752
2023-11-20 06:33:01 -08:00
Viktor Sonesten
0ea316ed71
cmake: support system-wide pybind11
...
Original behavior remains.
2023-11-20 14:43:46 +01:00
Alessio Quaglino
dbf44fe2b4
New SDF objective function.
...
This solves the jittery behavior observed with the gear example in the case of small applied torques (~0.5).
The new quadratic option has the form max(A, 0)^2/2 + max(B, 0)^2/2 - min(A, 0)*min(B, 0). This function has a minimum in the intersections of two SDFs A and B, while avoiding the flat areas which would be generated if only the clearance field A+B were employed. See for example [the function resulting from two colliding circles](https://www.wolframalpha.com/input?i=minimize+max%28sqrt%28x%5E2%2By%5E2%29-1%2C0%29%5E2+%2B+max%28sqrt%28%28x-1%29%5E2%2B%28y-1%29%5E2%29-1%2C0%29%5E2+-+2*min%28sqrt%28x%5E2%2By%5E2%29-1%2C0%29*min%28sqrt%28%28x-1%29%5E2%2B%28y-1%29%5E2%29-1%2C0%29 )
PiperOrigin-RevId: 583992855
Change-Id: I135a1b5931cd136d7d33cc275f8d361a8b7e290c
2023-11-20 05:06:33 -08:00
Yuval Tassa
98082ae7f9
Add description of eq_active state variable to documentation. Fixes #1208 .
...
PiperOrigin-RevId: 583712793
Change-Id: I6f4adca5692fd181bb8f6c0f34ae09a756a84fc1
2023-11-18 20:06:33 -08:00
Matthew Bennice
d3eee0316c
Small changes to Kuka IIWA7 Biarm
...
PiperOrigin-RevId: 583412101
Change-Id: Icee1c5f1f2a9354425d8f6c311322903e1e0af83
2023-11-17 09:37:26 -08:00
Copybara-Service
b03d312cbf
Merge pull request #1205 from Balint-H:fix/memory-default
...
PiperOrigin-RevId: 583393024
Change-Id: Ia553d67ddf5c94e482a453bd9f6f23aa3be04b9d
2023-11-17 08:19:01 -08:00
Bálint Hodossy
4fb1787a3b
Use default value of memory option if not present in imported XML
2023-11-17 12:46:55 +00:00
Baruch Tabanpour
4d2a176a8a
Modify name of mjx integration tests.
...
PiperOrigin-RevId: 583108693
Change-Id: If972c376181ca98201ff61ff06d200c82d214e2b
2023-11-16 11:24:07 -08:00