Matthew Bennice
e4fada1963
Correct use of uninitialized value and clean up FullInertia function
...
PiperOrigin-RevId: 605049375
Change-Id: I7ffb6bd56b08111036e8490bf767fb9393499f13
2024-02-07 11:38:02 -08:00
Alessio Quaglino
8b17d260a3
Add user_init for setting default parameters.
...
PiperOrigin-RevId: 604942840
Change-Id: I746ac7bb28f508b606bc0b8544136f523ce50d4c
2024-02-07 04:42:41 -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
Matthew Bennice
b9c50ad79c
Move fullinertia from mjCAlternative to mjCBody with correction to handle URDF with 0 inertias.
...
PiperOrigin-RevId: 604812870
Change-Id: I018254d1362a654a4f99bf5e621d5abc7129a0c6
2024-02-06 17:21:31 -08:00
Matthew Bennice
84f20ffb66
Automated g4 rollback of changelist 604607692.
...
*** Reason for rollback ***
breakage resulting in "inertia must have positive eigenvalues" when parsing URDF's
*** Original change description ***
Move fullinertia from mjCAlternative to mjCBody.
***
PiperOrigin-RevId: 604677400
Change-Id: Iab8263b5b0aee310bd75404e314f3b707ce3300e
2024-02-06 09:47:04 -08:00
Alessio Quaglino
737342bdfe
Move fullinertia from mjCAlternative to mjCBody.
...
PiperOrigin-RevId: 604607692
Change-Id: Ic2fcc08b9073d01ab190e7acacc3d827dbdfbca4
2024-02-06 04:43:12 -08:00
Alessio Quaglino
01439f28b3
Add AddFreeJoint and remove isfree from AddJoint.
...
PiperOrigin-RevId: 604597442
Change-Id: I2fe03cf0f9a59b425080cc5cc12b236fea9c020d
2024-02-06 03:49:49 -08:00
Alessio Quaglino
3b2dd06c54
Add compiler C API for mjmSite.
...
PiperOrigin-RevId: 604573450
Change-Id: I6ba7fcece0942ddc0d109413ba5684b2df3fab96
2024-02-06 01:50:47 -08:00
Meghha Dhoke
f763254a00
Updating Mujoco Release version number to v3.1.3
...
PiperOrigin-RevId: 604459311
Change-Id: I766f704c28740cf751cb935bb48fb6954fccf024
2024-02-05 15:59:20 -08:00
Nimrod Gileadi
e3dc54f609
Emit only one warning about ARB_depth_buffer_float or ARB_clip_control.
...
This code was warning on every frame, which was unhelpful.
PiperOrigin-RevId: 604267726
Change-Id: Ied1d46e3d84d58f3b21201e3752e3c2d43ea3ba9
2024-02-05 03:36:23 -08:00
Alessio Quaglino
1ed8694dbe
Replace xmlpos with info string for mjCError.
...
PiperOrigin-RevId: 603759456
Change-Id: I0d86d8e61e31a70da77169107268728d6c052778
2024-02-02 12:34:52 -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
7a98038e88
Move mjCSite attributes to mjmSite struct.
...
PiperOrigin-RevId: 603051589
Change-Id: I31eeeccffa15b96e7393b8e64f6be8c964fc5948
2024-01-31 08:07:48 -08:00
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
Kyle Bayes
3b0a680fa7
Refactor GlobalModel class in the XML API.
...
PiperOrigin-RevId: 601761425
Change-Id: I9c24f670c1e9766867ec75aab56cec1c0b4f5703
2024-01-26 07:33: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
Kyle Bayes
4f53d9a0d7
Add AddVector and GetVector to user cache.
...
PiperOrigin-RevId: 601485067
Change-Id: I1a31f15c2495de4f057316022dcddf4df39afd64
2024-01-25 10:13:13 -08:00
Alessio Quaglino
c8e839a666
Do not create contact if there are no DOFs.
...
PiperOrigin-RevId: 601146599
Change-Id: I68b1975a3217b266bbbfb0a15c85a65cfa46facb
2024-01-24 09:37:40 -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
Yuval Tassa
fea7c10b95
Add bvhactive flag to visual/global. Fixes #1279 .
...
PiperOrigin-RevId: 599778272
Change-Id: If5530629035cc68b198447503388f59a04041b13
2024-01-19 02:59:56 -08:00
Yuval Tassa
2feefbc5d2
Remove fine-grained timing from narrow-phase collision functions, delete mjTIMER_COL_MID.
...
PiperOrigin-RevId: 599225419
Change-Id: Ieca166753c20a0abf660e2821b2844dda8758951
2024-01-17 10:54:23 -08:00
Yuval Tassa
a14a584f1d
Fix bug in muscle length-gain curve. Fixes #1342
...
PiperOrigin-RevId: 599165049
Change-Id: Ic5ef77b4349a8a9c343eacfd781195bfebea9aca
2024-01-17 07:20:01 -08:00
Yuval Tassa
67a00a3a51
Rename mjMAXTHREADS -> mjMAXTHREAD (consistency).
...
PiperOrigin-RevId: 599130235
Change-Id: Ia80379b8ae0574a7cd8fbc668657f806e90d6c5c
2024-01-17 04:33:44 -08:00
Kyle Bayes
71b0561758
Clean up formatting issues in user_objects.h
...
PiperOrigin-RevId: 599127766
Change-Id: If752c00038818fb21476eb98be891ead467aad56
2024-01-17 04:21:10 -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
Yuval Tassa
79bcfecba4
Tidy up mj_kinematics implementation.
...
PiperOrigin-RevId: 597556619
Change-Id: Iaf108a6582e8135c7169dad07ed0654bdea8ee71
2024-01-11 08:00:06 -08:00
Yuval Tassa
60cd7248c2
Add zero vector shortcut to mju_rotVecQuat.
...
PiperOrigin-RevId: 597504456
Change-Id: I23580fc08571db97e984a87cba3f4d14e67d6b3a
2024-01-11 03:19:30 -08:00
Alessio Quaglino
8a9b041388
Replace objid with obj pointers.
...
This in preparation of adding functions to remove/add elements after compilation.
PiperOrigin-RevId: 597286844
Change-Id: I940103ade986c8d057db8cc1e9a98c073ddfab98
2024-01-10 10:20:47 -08:00
Alessio Quaglino
889353dfa8
Replace meshid and hfieldid with mjCMesh and mjCHField pointers in mjCGeom.
...
PiperOrigin-RevId: 597279837
Change-Id: I45ca00c70c13cd5bddb3385a0c60388fb166527c
2024-01-10 09:56:54 -08:00
Nimrod Gileadi
371da98d97
Avoid dynamically generated strings from being used as format strings in mjCError and mjXError.
...
PiperOrigin-RevId: 597198372
Change-Id: I2f159436091c03c7454545877cd5f7e2383cd7c8
2024-01-10 03:20:48 -08:00
Alessio Quaglino
63ec34f9f8
Add plugins to flex parent body if there are pinned vertices.
...
Fixes #1270 .
PiperOrigin-RevId: 595429578
Change-Id: Ifc61d4bde4dd3c6b4d4a09106152de1d24e71ef0
2024-01-03 09:53:22 -08:00
Yuval Tassa
4c066a26b5
Change mjVISSTRING of connect and weld equality constraints from "Constraint" to "Equality". This is more consistent with the 'E' shortcut key and with mjDISABLESTRING ("constraint" means all constraints, "equality" means bilateral constraints).
...
Also remove unused ampersands from `mjVISSTRING` names, these are a remnant from a very old version of the UI framework.
PiperOrigin-RevId: 593469811
Change-Id: I0f6f73c9f5d2c61b2280f395f76434b0710ce4f3
2023-12-24 12:06:59 -08:00
Google DeepMind
7fb448613f
Post release version update: Update to V3.1.2
...
PiperOrigin-RevId: 592019826
Change-Id: I64fd7da628bf3312ede4970b9b10ef5d0cc75b45
2023-12-18 15:03:37 -08:00
Nimrod Gileadi
7cb7c87f70
Fix a few issues with the passive viewer.
...
1. Create an arena for the mjData instance used by the passive viewer visualization.
When using the passive viewer, stuff gets copied from the real mjData into a minimal struct.
That struct didn't have a stack, and now visualization for Flex does stack allocs.
2. Add missing a missing field in scene state for flex visualization.
3. Fix a memory leak where mjvScene wasn't released on exit in the passive viewer.
4. Add some locks in places where the render thread and Simulate::Sync collide.
This fixes #1280 .
PiperOrigin-RevId: 591891676
Change-Id: I592f286cab9719c8d9af84e42f9756ea1f9f1971
2023-12-18 07:33:19 -08:00
Yuval Tassa
38fa756a20
Add mjGEOM_LINEBOX, used in visualization of collision trees.
...
PiperOrigin-RevId: 591224734
Change-Id: I09ad8c4b711021ff4dd5548ba5381d25d5a3d7f8
2023-12-15 05:36:35 -08:00
Yuval Tassa
f2a967348c
Fix bug introduced in 7942fe957e
...
That change removed some spurious contacts returned by mjc_BoxBox, but also removed some desirable contacts that occur during very deep penetration of two boxes (when one box is completely inside another box). This is now fixed.
PiperOrigin-RevId: 591036252
Change-Id: I84b51f2179fd6fe29618a4e908e86934c6fc6941
2023-12-14 13:30:38 -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
Google DeepMind
c2c76195dd
Updating Mujoco Release version number to v3.1.1
...
PiperOrigin-RevId: 590712172
Change-Id: Ibf32322222212c1bf098e75bbb2e145344c57b93
2023-12-13 14:26:08 -08:00
Yuval Tassa
1c34553631
Add shortcuts for power function in impedance computation.
...
PiperOrigin-RevId: 590692245
Change-Id: I1a49475c9a8299f4845e4ec33c9a7ce21a9c5d2b
2023-12-13 13:14:27 -08:00
Yuval Tassa
5b2c98f8f1
When saving XMLs, don't round floats that are bigger than INT_MAX. Fixes #1278
...
PiperOrigin-RevId: 590692020
Change-Id: Icd11d20f47bc4163eb4378f4cb031b8fd9d13612
2023-12-13 13:13:15 -08:00
Google DeepMind
fcebdf4d09
Update MuJoCo to v3.1.0 for release.
...
PiperOrigin-RevId: 590256664
Change-Id: I42ad788d609dde0ff00b13a2e456b2a8d3d9e952
2023-12-12 10:37:47 -08:00
Nimrod Gileadi
e3df84ec3f
Include the size limit in error message from mjr_addAux.
...
This is to help debug #1274 .
PiperOrigin-RevId: 590215990
Change-Id: I356675be84f9cb2892d31d4dc7639adf49fe4a0f
2023-12-12 08:41:10 -08:00
Yuval Tassa
28a9e6d9a2
Add mjNOBJECT value to mjtObj enum.
...
PiperOrigin-RevId: 590164716
Change-Id: I500741aa4fb97fe2c4f5d2086188bb2c9fdfd1a0
2023-12-12 05:15:00 -08:00
Copybara-Service
5c8f22609a
Merge pull request #1263 from limymy:main
...
PiperOrigin-RevId: 589857317
Change-Id: I5f241f5c798811b0d082ba4bed9ca8c8233e4052
2023-12-11 09:59:59 -08:00
Yuval Tassa
b22919543d
Fix bugs related to saving of <statistics> values.
...
Before this change:
- User-modified values of `mjModel.stat.{meanmass, meaninertia}` would not be saved to XML.
- Non-user-modified values of `mjModel.stat.{meansize, extent, center}` would always get saved to XML.
After this change values are saved to XML only if provided by the user, either in the XML or by changing values in `mjModel` before saving.
PiperOrigin-RevId: 589473351
Change-Id: I4dcf4892ef61c35edf424226e731232d861bad8d
2023-12-09 16:06:39 -08:00
Yuval Tassa
7942fe957e
Circumvent bug in mjc_BoxBox.
...
The box-box collider sometimes outputs bad contact points which are far outside one of the two boxes. This happens at configurations which are very rare numerically, but rare configurations (e.g. perfect box alignment) are often induced by the designer and the physics, making them actually not-so-rare.
Since the box collision functions are very difficult to understand, we circumvent the issue by extending the post processing code to detect and remove such contacts.
PiperOrigin-RevId: 589178197
Change-Id: I82b8a888ef04f9196111c960757e3314d0ab6d8e
2023-12-08 10:39:27 -08:00