Alessio Quaglino
693e3c66c8
Add copy constructors and assignments to user_objects.
...
All of the constructors and assignments operators are declared by this CL, but only those that are currently used are implemented here.
PiperOrigin-RevId: 615369559
Change-Id: I9f8cc4a7cd2070362baba04f2af4c5567a696596
2024-03-13 04:50:05 -07:00
Alessio Quaglino
9ac048e262
Add recompilation test to user_api_test.
...
PiperOrigin-RevId: 613192683
Change-Id: Ibb44e1c2d63ac0afb7b5f3a15dff26378deb6c82
2024-03-06 06:27:28 -08:00
Alessio Quaglino
1f2d673c7b
Add missing global fields to mjmModel.
...
PiperOrigin-RevId: 610415124
Change-Id: I07f284804bf73cb67703597973b50b8c00ea8deb
2024-02-26 08:25:08 -08:00
Alessio Quaglino
5fe3e169ab
Remove mjm_finalize.
...
PiperOrigin-RevId: 609284351
Change-Id: I066332784d8210de6fec5aa718e097c9ef67903c
2024-02-22 01:27:06 -08:00
Alessio Quaglino
042760eba8
Add compiler settings to mjmModel.
...
PiperOrigin-RevId: 608908314
Change-Id: Id3b0d8c62ca710b5b6d6e423abbbddcb7e7079a1
2024-02-21 01:58:22 -08:00
Alessio Quaglino
78dc5aee9f
Remove mjCPlugin from xml_native_reader.
...
PiperOrigin-RevId: 608546883
Change-Id: Ib529c2756102e4e2185d1d8e9585187c30049011
2024-02-20 03:46:42 -08:00
Alessio Quaglino
6f958bc404
Add mjmSkin to C API.
...
PiperOrigin-RevId: 607295996
Change-Id: I63bf7213d41acbfb98770c097979ce9b889f21ca
2024-02-15 05:09:10 -08:00
Alessio Quaglino
9ecd700923
Add mjmMesh to C API.
...
PiperOrigin-RevId: 606642150
Change-Id: Iae69ce8426729b1e2394d9da9f349a2f0f7ccf98
2024-02-13 09:09:59 -08:00
Alessio Quaglino
b224367a9b
Add mjmFlex to C API.
...
PiperOrigin-RevId: 606264589
Change-Id: Ifd94f5241a3eaaf23653b136cece81c054f43202
2024-02-12 08:48:11 -08:00
Alessio Quaglino
1fe258fb60
Add mjmGeom to C API.
...
PiperOrigin-RevId: 605302719
Change-Id: Ib4208e60cf4299473a96f62db2c9dc8c7a5b0b36
2024-02-08 06:53:01 -08:00
Alessio Quaglino
a3e49d582e
Add mjmBody and mjmPlugin and their compiler C APIs.
...
PiperOrigin-RevId: 604937231
Change-Id: Ib8a2105ce6c0500d6a610258b46f192d9e73169d
2024-02-07 04:17:30 -08:00
Alessio Quaglino
b3f93d436b
Convert mjmStruct to a C-struct.
...
PiperOrigin-RevId: 603357871
Change-Id: I27918b0030fc6a589c361cad965611adc3bf7247
2024-02-01 06:57:47 -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
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
Alessio Quaglino
acf698e2df
Store pointer to index in mjCBoundingVolume if possible.
...
PiperOrigin-RevId: 598592242
Change-Id: I8dc20a8d8a9a0e967688839fa22d75263c226958
2024-01-15 06:04:20 -08:00
Alessio Quaglino
cab1c6bb39
Preallocate mjCBoundingVolumeHierarchy and avoid copies during MakeBVH.
...
PiperOrigin-RevId: 598579741
Change-Id: Iac154affa6ee22994c571f2ec00ac602bfe7f4d6
2024-01-15 04:48:44 -08:00
Alessio Quaglino
623201ec76
Throw error if scale attribute is used with an SDF.
...
Fixes #1210 .
PiperOrigin-RevId: 589101807
Change-Id: I3f2796de3438fbcdaf9221bddc5c9bd82aedb7cb
2023-12-08 05:41:22 -08:00
Alessio Quaglino
50843cad30
Add defaults to SDF plugin attributes.
...
Expose diameter and number of teeth for the gear SDF.
PiperOrigin-RevId: 577779297
Change-Id: Iec5890ab7f39080b395cf06a76f9c2216f4f39ed
2023-10-30 03:09:25 -07:00
Nimrod Gileadi
f8c5ad2ba8
Check for errors when calling std::stod in XML loading.
...
PiperOrigin-RevId: 576608985
Change-Id: I148ca67d8960d73c281df2d6f2440d47940a6369
2023-10-25 12:26:43 -07:00
Alessio Quaglino
317d6d9ebe
Move edge creation after element reordering in mjCFlex.
...
PiperOrigin-RevId: 574193046
Change-Id: If2fb01b3494d637d4b220d03e7d7d84e4a9f7a2d
2023-10-17 10:28:43 -07:00
Alessio Quaglino
110ade1435
Update Solid and Shell plugins to use FlexComp.
...
PiperOrigin-RevId: 573755821
Change-Id: I3b8d7fb27f0e940038fa9fd2b26ecc746df4f7ac
2023-10-16 03:03:06 -07:00
Alessio Quaglino
5a70ad08ab
Add Flex component.
...
PiperOrigin-RevId: 572830650
Change-Id: I6908228087b7b9683be3506c8d9cdc725ed5dcd5
2023-10-12 10:49:35 +01:00
Chengrui Zhu
dff0bc2683
Copybara import of the project:
...
--
3add02bc2e20eb2895fdcaedfdf6be271decb448 by Chengrui Zhu <jewelry.zju@gmail.com >:
correct spelling "Bunding" to "Bounding"
COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/1068 from JewelryForge:main 3add02bc2e20eb2895fdcaedfdf6be271decb448
PiperOrigin-RevId: 568207690
Change-Id: I3262d459bfdbac6ebf097ddffc10c4d74b388946
2023-09-25 07:06:59 -07:00
Yuval Tassa
dfd48dd821
Replace mjMIN and mjMAX with mju_min and mju_max, where possible.
...
PiperOrigin-RevId: 566602924
Change-Id: I2d24183d0d9df3e647bb2d7d7544473582f38128
2023-09-19 05:40:41 -07:00
Alessio Quaglino
1afd98ec4b
Add [SdfLib]( https://github.com/UPC-ViRVIG/SdfLib ) plugin to first-party SDFs.
...
The following dependencies are disabled with a cmake patch file.
- Enoki
- OpenMP
- Assimp
- FCPW
PiperOrigin-RevId: 565352386
Change-Id: Icff9de68408e0afa2032bb83b24491fc4e41d181
2023-09-14 06:42:42 -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
Saran Tunyasuvunakool
a07e172770
Make MuJoCo work with -fsanitize=alignment.
...
PiperOrigin-RevId: 563702045
Change-Id: Ieca69595b7e2fc1e35ca69754d7cc7971825f48b
2023-09-08 03:29:34 -07:00
Saran Tunyasuvunakool
329ed193ac
Disallow variable-length arrays and turn on -Wpedantic in Clang and GCC.
...
PiperOrigin-RevId: 562832747
Change-Id: I0532624cee31e089a47426305d885687eb0fc5c5
2023-09-05 11:05:04 -07:00
Kyle Bayes
f86e8b449f
Refactor VFS logic out of ResourceProvider plugin code.
...
PiperOrigin-RevId: 561302536
Change-Id: I952f9e76e85a7e3a111e0338f307378a6ff58197
2023-08-30 04:47:24 -07:00
Alessio Quaglino
fdb041580c
Add Signed Distance Field to collision geometries.
...
PiperOrigin-RevId: 557507088
Change-Id: I358a642407aee1ba8dfc9d405eb9a4f609435fe9
2023-08-16 09:15:23 -07:00
Kyle Bayes
efca1a76aa
Encapsulate mjCMesh data, apply Google C++ naming convention to class members (See https://google.github.io/styleguide/cppguide.html#Variable_Names ), and fix a couple of typos.
...
PiperOrigin-RevId: 553129088
Change-Id: Ic515154220af472f4fc90ca9ade92d86b205cc94
2023-08-02 16:07:44 +01: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
Yuval Tassa
188b04fba5
Use std::stable_sort in model compiler.
...
PiperOrigin-RevId: 538791034
Change-Id: I6c8eceffeb765a8a9801fee996d6ebf2964d8453
2023-06-08 08:21:34 -07:00
Saran Tunyasuvunakool
f887c1e928
Add ASAN and MSAN instrumentation for arena and mjData stack.
...
PiperOrigin-RevId: 535635490
Change-Id: Ia1e58771bae25bf72c861f57452fb8faa2b918fb
2023-05-26 09:17:26 -07:00
Alessio Quaglino
9db444cd46
Fixed texture mapping bug. Before this fix, the first texture coordinate was not correctly processed.
...
Fixes #859 .
PiperOrigin-RevId: 532501028
Change-Id: I1fe9ca470f4d64af606479b91387e43bc56c23dc
2023-05-16 10:25:04 -07:00
Kevin Zakka
ca9c55d22b
Fix typo in user_mesh.cc.
...
PiperOrigin-RevId: 532158366
Change-Id: I58cc6d7ff5f0781ea2621768dbcd35442d1b2e9c
2023-05-15 10:43:12 -07:00
Alessio Quaglino
871a2a7c8e
Check that all face indices of a mesh exist in the vertex array.
...
PiperOrigin-RevId: 532049715
Change-Id: Ic42f6ef49f136aa89fb83527db0867afa8be7f08
2023-05-15 02:55:44 -07:00
Alessio Quaglino
09a8e59824
Create half-edge structure before converting from the C++ array userface to the C array face.
...
PiperOrigin-RevId: 531161474
Change-Id: I77d425f4b5e52b2e41c6c9a2ef187495fefda5b8
2023-05-11 04:15:59 -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
Alessio Quaglino
1aadef5927
Fix unused variable error from GCC.
...
PiperOrigin-RevId: 530591696
Change-Id: I0b1d647bb4dc343eca4966ba54a90a992ea9544f
2023-05-09 06:25:37 -07:00
Alessio Quaglino
4c487e07ed
Add mesh BVH.
...
PiperOrigin-RevId: 530559807
Change-Id: Ibdafae22c7c74d15d707f205be73e4a571a6ae10
2023-05-09 03:31:06 -07:00
Copybara-Service
26ff1fc4b5
Merge pull request #304 from traversaro:patch-5
...
PiperOrigin-RevId: 529843317
Change-Id: Iad4a3df7d8c61f536890f9760e441793d6d884dc
2023-05-05 16:38:02 -07:00
Kyle Bayes
67f0f5154f
Add various improvements for resource providers.
...
PiperOrigin-RevId: 529706437
Change-Id: I20385e031446674584349c301982dbe13b812477
2023-05-05 07:03:49 -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
Saran Tunyasuvunakool
66def34e0e
Fix broken OBJ and PNG loading when a VFS is provided to mj_loadXML.
...
At present, if a VFS is used but an OBJ or PNG asset doesn't exist in the VFS, the model compilation will fail without trying to first locate the asset on disk.
This breaks the Python bindings `MjModel.from_xml_string` almost entirely when OBJ assets are involved.
Also modify error messages to disambiguate between different modes of asset loading failures.
PiperOrigin-RevId: 526637686
Change-Id: Iba02cc94989083bc2835a3e67dfc78c0a21047e9
2023-04-24 07:37:33 -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
Kyle Bayes
fe3dccfd1d
Add a new plugin / extension mechanism called a resource provider along with retrofitting VFS on top of it.
...
A resource provider provides a mechanism for MuJoCo to read from filesystems other than the OS filesystem or the Virtual File System (VFS).
PiperOrigin-RevId: 525394983
Change-Id: I077ff5a7e2e76806b48b6defb531280aadc8b169
2023-04-19 03:02:22 -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
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