Yuval Tassa
e143b3dbc0
Allow height-field elevation data to be specified in XML.
...
PiperOrigin-RevId: 602374498
Change-Id: I2d3364d68876a35799b24aca1051e2f5aebdda75
2024-01-29 06:59:28 -08:00
Alessio Quaglino
fb8f77df74
Throw error if qhull is called with NaNs.
...
PiperOrigin-RevId: 601745538
Change-Id: I590673ca7975e4abc171f98704a6c8f8d08f8327
2024-01-26 06:13:27 -08:00
Alessio Quaglino
076db5d366
Copy face_ into facetexcoord_ if not specified and needed.
...
PiperOrigin-RevId: 601732448
Change-Id: Iffe01076db22201dba2611ea36174f808ae00c1e
2024-01-26 04:54:43 -08:00
Kyle Bayes
4f53d9a0d7
Add AddVector and GetVector to user cache.
...
PiperOrigin-RevId: 601485067
Change-Id: I1a31f15c2495de4f057316022dcddf4df39afd64
2024-01-25 10:13:13 -08:00
Kyle Bayes
aede8cf5cf
Rename user_asset_cache to user_cache.
...
PiperOrigin-RevId: 601097322
Change-Id: Iea3d6481cd214028ef63ed72868999ecb0b1eeb4
2024-01-24 06:05:56 -08:00
Kyle Bayes
a1ddbdf7f8
Add an implementation of a cache for assets for compilation speedups.
...
PiperOrigin-RevId: 599850003
Change-Id: I83e299e127058a5657d7b262aa98d36451b530f6
2024-01-19 09:04:01 -08:00
Alessio Quaglino
1e2e0b3053
Remove all visual-only assets if discardvisual is selected, not only the geoms.
...
PiperOrigin-RevId: 598598250
Change-Id: I12e60ce41ad436d037b4877d197decf6bdce0fc8
2024-01-15 06:39:25 -08:00
Yuval Tassa
42515033a7
Fix linter issues in user_objects_test.
...
PiperOrigin-RevId: 597204770
Change-Id: I0b396d4c64684d845dc9baf205800e22c8fac314
2024-01-10 04:00:08 -08:00
Kyle Bayes
9f6be3135e
Modify mjListKeyMap to be a fixed-size array, and add internal object_lists variable to mjCModel to remove redundant code.
...
PiperOrigin-RevId: 590997348
Change-Id: I5f4d7de605f44d40a75eb1e9ceec208325fa3be5
2023-12-14 11:12:01 -08:00
Yuval Tassa
b1a912e9e2
Improve readability of test.
...
PiperOrigin-RevId: 589048504
Change-Id: I5087cfd67481df90103da2d7f5f06e421fc28e11
2023-12-08 01:18:59 -08:00
Alessio Quaglino
1db0a9946f
Fix frame accumulation order for <frame> meta-element.
...
PiperOrigin-RevId: 588803425
Change-Id: Id0289c34d1a6cfb6007540a29cc1f32d879e43ed
2023-12-07 08:37:20 -08:00
Alessio Quaglino
d12fe594d9
Add suffix to duplicated assets.
...
PiperOrigin-RevId: 588775467
Change-Id: I3a0d2a14601cf018b0c8c56728bd3ae22adb8ec2
2023-12-07 06:46:51 -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
Alessio Quaglino
eb9568a48b
Add frame element to MJCF.
...
PiperOrigin-RevId: 585598244
Change-Id: I4c06be3dd586dab5a4458f05faaf1e7f2b615458
2023-11-27 03:32:18 -08:00
Yuval Tassa
493ae95d69
Add stack leak test to WriteReadCompare
...
PiperOrigin-RevId: 572953669
Change-Id: Id6cad3fc86777d68f218119f67c9dc473bdcfcc8
2023-10-12 10:53:24 -07:00
Alessio Quaglino
5a70ad08ab
Add Flex component.
...
PiperOrigin-RevId: 572830650
Change-Id: I6908228087b7b9683be3506c8d9cdc725ed5dcd5
2023-10-12 10:49:35 +01:00
Alessio Quaglino
36d2ffe4f2
Specify camera parameters using standard robotics conventions.
...
PiperOrigin-RevId: 569147555
Change-Id: I3443f95e5de56a17024f5e5c03f33888dd583edb
2023-09-28 05:19:19 -07:00
Saran Tunyasuvunakool
8ed321d469
Rename mesh_assetpathadr to mesh_pathadr and move it to the end of the mesh section.
...
PiperOrigin-RevId: 568911603
Change-Id: I8f21c3d1cc9c73b6a95292a50f262b1a199d0898
2023-09-27 11:32:10 -07:00
Alessio Quaglino
d3d46e16a4
Remove cloth and rope composites and deprecate loop.
...
PiperOrigin-RevId: 568168329
Change-Id: Ida4a5236bef74828c7bf59affdc28adea3db53b1
2023-09-25 03:38:43 -07:00
Matthew Bennice
7f8018a3f3
Update XML parsing to store asset path so that assets can be recovered and sent to external renderers
...
PiperOrigin-RevId: 567347908
Change-Id: I4d8e1abe35be3a67643ff925af709921280856f8
2023-09-21 10:27:52 -07:00
Alessio Quaglino
8064ad59c8
Add camera projection sensor.
...
BEGIN_PUBLIC
Add camera projection sensor.
END_PUBLIC
PiperOrigin-RevId: 564726114
Change-Id: I33b8e5562eff29c21538bf8f38ce3116c7dfc5a9
2023-09-12 08:16:20 -07:00
Matthew Bennice
0ba10cc4f0
Save normalising transform applied to mesh assets in mjModel.mesh_{pos,quat}
...
Fixes #409
PiperOrigin-RevId: 564217402
Change-Id: I53ddeef4e343905021cd7852d548f6769c876474
2023-09-10 15:25:59 -07:00
Kyle Bayes
5fcdae771b
Add content_type attribute that takes a MIME type to specify the file contents for meshes, hfields, and textures.
...
PiperOrigin-RevId: 549302344
Change-Id: I30a8adfef5b5d87bb20479329f3396892f5137ff
2023-07-19 06:51:36 -07:00
Nimrod Gileadi
74747e2ae6
Don't accept NaN geom sizes.
...
PiperOrigin-RevId: 542209911
Change-Id: I80f9728e8e624d19783370ba5072f39624c1bbe7
2023-06-21 04:02:48 -07:00
Alessio Quaglino
dab49d487c
Use mesh BVH for speeding up ray mesh intersection.
...
PiperOrigin-RevId: 532516008
Change-Id: Ia9cac060279d030221c1a6b4fad457a857701370
2023-05-16 11:10:38 -07:00
Alessio Quaglino
9d1a21f99d
Use mesh BVH for speeding up ray mesh intersection.
...
PiperOrigin-RevId: 532464595
Change-Id: If159c89b93c24e6a7be6310911364cfad7baae81
2023-05-16 08:17:50 -07:00
Alessio Quaglino
41a7049920
Use shell inertia to compute mesh aabb and frame if volume is invalid.
...
PiperOrigin-RevId: 530925161
Change-Id: I94b97efc7198e2b750480df8687e91bc047a6fc9
2023-05-10 09:12:11 -07:00
Kyle Bayes
23961e24b7
Refactor user codebase to use LoadResource helper method.
...
* Fix small bug when registering resource providers.
* Add test cases for OS filesystem fallback with VFS.
* Rewrite LoadModelFromString using a resource provider (now can pass custom VFSs).
PiperOrigin-RevId: 526959705
Change-Id: Iee1773e5584535d868aab6b206d1bf362e600c8a
2023-04-25 07:24:45 -07:00
Alessio Quaglino
3db483c248
Print warning and default to computing mesh inertia from convex hull if volume is negative (malformed mesh).
...
PiperOrigin-RevId: 526053615
Change-Id: I3974b3433da513f869b1bdab5e98232e215f6509
2023-04-21 09:01:34 -07:00
Alessio Quaglino
94c4f72907
Specify is volume is too small or negative in mesh error messages. Fixes #799 .
...
PiperOrigin-RevId: 525151156
Change-Id: Ia0e9d8b900b8c372e9229da934a4eb7aeb1a3b7a
2023-04-18 08:16:44 -07:00
Nimrod Gileadi
4b1375297b
Add a test that hfields are loaded and normalised to [0, 1].
...
PiperOrigin-RevId: 525103908
Change-Id: I3a6cc3a339cf31aa40700cd44962038d5c6bcf74
2023-04-18 04:05:04 -07:00
Alessio Quaglino
c943797591
Make shellinertia ignore exactmeshinertia, which is only used for legacy volume computations. Fixes #759 .
...
PiperOrigin-RevId: 524884880
Change-Id: Ia5b64ee33802866f792cdad4acfec6d9baf2a9e9
2023-04-17 10:30:20 -07:00
Nimrod Gileadi
5322291d38
Add a test for fusestatic
...
PiperOrigin-RevId: 519112654
Change-Id: Ic15f9d572c281efb0e0b23b2f99e11a880275851
2023-03-24 04:48:04 -07:00
Alessio Quaglino
9756ed0d80
Read normals and textures from OBJ, do not duplicate vertices.
...
PiperOrigin-RevId: 510461549
Change-Id: I19245d691e722a8371e61153383f275f599353d6
2023-02-17 10:15:25 -08:00
Saran Tunyasuvunakool
5e989d18c3
Enable compiler errors for implicit switch case fallthroughs.
...
Also unify warning options across Clang and GCC and fix minor issues that was surfaced by this.
PiperOrigin-RevId: 508619655
Change-Id: I59b777bf2dfea4422485670e2427c7d3f5cf6405
2023-02-10 03:49:00 -08:00
Alessio Quaglino
6ba4d6f0de
Fix a bug that was causing a mismatch between the orientation of the mesh frame and the vertex coordinates.
...
PiperOrigin-RevId: 502624466
Change-Id: Ib28fd2a118b6572be98fadb078fa2262b21cbfc0
2023-01-17 10:31:50 -08:00
Yuval Tassa
adf71cc6b4
Improve mesh-fitting image in changelog.
...
PiperOrigin-RevId: 500782543
Change-Id: Iecec45abd3cb1e5a06df58ae32ebe1998584024a
2023-01-09 12:40:10 -08:00
Alessio Quaglino
19b6c70e13
Use global coordinates for computing the frame position of a primitive geom fitted to a mesh.
...
PiperOrigin-RevId: 500720200
Change-Id: I0a564aff1fe6943002db14f46f789cfdaef4d2de
2023-01-09 08:29:27 -08:00
Alessio Quaglino
3de2873883
Add deprecation warning for the Rope Composite type.
...
PiperOrigin-RevId: 494985209
Change-Id: I6ce7ca2aeae6f1e798bd4bda9b755852add26a36
2022-12-13 04:35:48 -08:00
Alessio Quaglino
7f459ab8ca
Print vertex IDs when inconsistent face is found.
...
PiperOrigin-RevId: 493311839
Change-Id: I0283d86bc6092fbe4f47b845fa8ec212bffdfa1a
2022-12-06 08:24:46 -08:00
Alessio Quaglino
26f71e2f6c
Check that spacing is greater than geometry size for Composite particles and grid.
...
PiperOrigin-RevId: 491858371
Change-Id: I03a669286c283a72947705463426badcfc9b0bfd
2022-11-30 02:17:42 -08:00
Yuval Tassa
221c63d744
Sensors of type user no longer require objtype and objname. If unspecified, the objtype will be mjOBJ_UNKNOWN. Also, `user sensors datatype default is now "real"`.
...
PiperOrigin-RevId: 489652972
Change-Id: I0a8f21ee1a2f5292e6bbcfe3785536cfd1498b85
2022-11-19 02:05:42 -08:00
Alessio Quaglino
9370039015
Use a non-symmetric tetrahedron for user_mesh_test.
...
PiperOrigin-RevId: 486658331
Change-Id: I96edd3b2aba916f9215661a7ba94271696690807
2022-11-07 07:43:08 -08:00
Alessio Quaglino
3b89b0fd30
Particles with arbitrary geoms and joints.
...
Fixes #553
PiperOrigin-RevId: 486614769
Change-Id: I9a09bf73da97b6b9746800a72ac6c97cce2efa92
2022-11-07 03:22:25 -08:00
Yuval Tassa
36b30e4500
Allow more than 1 activation state per actuator, but only for dyntype user.
...
Fixes #305 .
PiperOrigin-RevId: 486597273
Change-Id: I3eb806f60949e68ebe6cbe35a6e66218a167ed45
2022-11-07 01:43:02 -08:00
Yuval Tassa
893942a729
Allow tendon springlength attribute to take two values between which the spring produces no force (a deadband).
...
If given two non-decreasing values, `springlength` specifies a deadband for spring stiffness, inside of which the force is 0 and outside of which force behaves like a regular spring, with the setpoint corresponding to the nearest value. This can be used to create tendons whose limits are enforced by springs rather than constraints, which are cheaper and easier to analyse. See test/engine/testdata/tendon_springlength.xml example model.
Spring-limited spatial tendons whose lower range value is 0 are rendered as catenaries.
Fixes #520 .
PiperOrigin-RevId: 484509706
Change-Id: I6698e94ee36168f52d501e83057559805e05172d
2022-10-28 05:57:37 -07:00
Yuval Tassa
0eb7f871b9
Remove requirement that stateless actuators come before stateful actuators.
...
PiperOrigin-RevId: 484332415
Change-Id: I1dae92c0f8e027e4ca71c20ea3f68b2926526f53
2022-10-27 13:18:57 -07:00
Alessio Quaglino
f695f55253
Do not infer inertia if geom is not in inertiagrouprange.
...
PiperOrigin-RevId: 483994271
Change-Id: Ia663cd30e93d9c3a2e32408a658f091af4d1ca1a
2022-10-26 09:45:18 -07:00
Saran Tunyasuvunakool
077acb1c8f
Revert test fixture name in user_{model,objects}_test.cc.
...
These were inadvertently renamed to XMLReaderTest by an overzealous auto-renamer in 58fd72f53d .
PiperOrigin-RevId: 479520906
Change-Id: Ia50ec659f21a92cbcd4b953cde54dd98f0adb67a
2022-10-07 01:42:55 -07:00
Saran Tunyasuvunakool
58fd72f53d
Dynamically allocate contact and efc_ arrays on a new memory arena.
...
- Add private function `mj_arenaAlloc`. This is used internally to allocate memory from the arena.
- Add private function `mj_nefc` to count constraints. This function returns a tight upper bound on `d->nefc`. The number of counted constraints can be slightly bigger than exact `d->nefc` in the case of constraints with empty Jacobian, as when placing a frictional tendon between two world sites.
- Add new `memory` attribute to the `size` XML element for specification of arena memory size. This attribute is mutually exclusive with `nstack` and `njmax` specifications, which are now deprecated (but left around for the time being for legacy compatibility).
- Move `d->stack` to the end of the new arena space. The stack now grows in reverse from the end.
PiperOrigin-RevId: 479341539
Change-Id: Ie019c202e0908577ffc6f833a37920858116f667
2022-10-06 10:03:05 -07:00