Commit Graph

15 Commits

Author SHA1 Message Date
Alessio Quaglino 84ad22a590 Add mj_copyBack for copying real-valued arrays from mjModel back to mjSpec.
Also add `SaveAndReadXML` function to test fixture using `mjSpec` as input.

PiperOrigin-RevId: 765393821
Change-Id: Ic257addd2fc89678fc11b226c168c077626cc51e
2025-05-30 17:17:14 -07:00
Alessio Quaglino dcf2816543 Remove copy_back from Python bindings and mj_copyBack from the C API.
PiperOrigin-RevId: 687377331
Change-Id: I355493d92857418b08b5aa90ea38cebe5c475314
2024-10-18 11:55:04 -07:00
Yuval Tassa e76f3ce1e3 Rename model to spec in xml_native_reader.cc.
PiperOrigin-RevId: 651780148
Change-Id: I476c79af4b47bf763f1f3cb166d3f0897554a207
2024-07-12 08:22:54 -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
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
Yuval Tassa cf433a4ad9 Use enum instead of NaNs for alternative orientation specification.
PiperOrigin-RevId: 627413508
Change-Id: I9f1a682a1533e1a3fa3cac0a462f28ce9b0fa192
2024-04-23 09:32:51 -07:00
Yuval Tassa 4660a297d1 rename mjspec api structs and functions mjm -> mjs
PiperOrigin-RevId: 618017976
Change-Id: I5f790167e5ca670f8d5f92e8e1c920db8d236144
2024-03-21 18:04:50 -07:00
Alessio Quaglino ef3cb7ec2e Renamed mjmModel to mjSpec.
PiperOrigin-RevId: 613516063
Change-Id: I09e360d3eba2accba2e260ec4754b0879b12892f
2024-03-07 02:48:32 -08:00
Alessio Quaglino 1bd44e73bb Replace mjCModel with mjmModel in mjXBase.
PiperOrigin-RevId: 611762880
Change-Id: I22254689b6cbf10fe7b61f9742b6ffd6c2074477
2024-03-01 03:38:28 -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 3b2dd06c54 Add compiler C API for mjmSite.
PiperOrigin-RevId: 604573450
Change-Id: I6ba7fcece0942ddc0d109413ba5684b2df3fab96
2024-02-06 01:50:47 -08:00
Alessio Quaglino 16baac9353 Throw an error if multiple orientation specifiers are used in the same element.
- Applies to [orientation specifiers](https://mujoco.readthedocs.io/en/latest/modeling.html#frame-orientations) in `body`, `inertial`, `geom`, `site`, `camera`.
- Before this change the check was done only for multiple *alternative* specifiers, but not for `quat` and an alternative specifier.
- Moved the check from the compiler to the parser.
- Added tests.

PiperOrigin-RevId: 453201981
Change-Id: I20907361f211dae904e734cd083e9df0efe4f654
2022-06-06 08:13:06 -07:00
Saran Tunyasuvunakool 1913a02b40 Initial open sourcing of MuJoCo.
PiperOrigin-RevId: 450374687
Change-Id: Ie3225a46ce095fc28ae8e63c326a640261f562bb
2022-05-23 01:08:49 -07:00