Yuval Tassa
f864108c23
using for std::{string, string_view}, where helpful for readibility.
...
PiperOrigin-RevId: 663707900
Change-Id: Icbea374d5f99c7d267140d83f541f0ee872de8c1
2024-08-16 06:14:54 -07:00
Yuval Tassa
e0e08aa597
Rename xml_native_writer variables to be consistent with xml_native_reader.
...
PiperOrigin-RevId: 663699130
Change-Id: If11ed48d3b30d3c6d09ca77e3d8048c2a3d9f054
2024-08-16 05:34:30 -07:00
Yuval Tassa
1f5f9a8a67
Improve variable naming in xml_native_reader.cc
...
PiperOrigin-RevId: 663236609
Change-Id: I0a3af8432054172a3fe687867706eeef14a2529d
2024-08-15 02:42:30 -07:00
Alessio Quaglino
da15aa6a0e
Improve error message for fullinertia and orientation specifiers.
...
Fixes #1888 .
PiperOrigin-RevId: 661359190
Change-Id: Ibe38e88024b4a43922352b42347abf1026f168a2
2024-08-09 12:20:27 -07:00
Yuval Tassa
24a555062d
Rename mjDSBL_AUTORESETNAN to mjDSBL_AUTORESET.
...
- Expose in MJCF.
- Add documentation.
- Improve handling in simulate.
PiperOrigin-RevId: 657606140
Change-Id: I6a27c2f4842d7d4ae32642f2a6255e5f8f1f605a
2024-07-30 08:41:59 -07:00
Alessio Quaglino
6928e09f36
Small performance improvement: Parse body once during replicate.
...
PiperOrigin-RevId: 657227162
Change-Id: I5b60c25ab4634a44ed0474fdbf22e676bcb8f6d7
2024-07-29 09:32:40 -07:00
Kyle Bayes
5ac5cfb618
Support directories in VFS via mj_addBufferVFS.
...
PiperOrigin-RevId: 655286683
Change-Id: I846376a0571d8df28d979beb5981a0cbccd7a04f
2024-07-23 13:39:18 -07:00
Kyle Bayes
2746cb8559
Support FilePaths instead of raw strings in XML code.
...
PiperOrigin-RevId: 655177026
Change-Id: I55b055551384b01ba7a4baa5d75fbe3329b7d25d
2024-07-23 08:36:53 -07:00
Tom Erez
33e5960653
Allow multiple textures per material in MJCF.
...
PiperOrigin-RevId: 654795013
Change-Id: I418b72533484d00accaf801a342aa183e602a2d0
2024-07-22 09:57:51 -07:00
Kyle Bayes
8a8a44a4db
Refactor numerical parsing in XML.
...
PiperOrigin-RevId: 653979240
Change-Id: I4d39f4041b88396193eb35f0cc393141d64f6fc0
2024-07-19 05:42:02 -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
27b9ddda5b
Add attach tag to MJCF.
...
PiperOrigin-RevId: 651117953
Change-Id: I57b0e53ed44607d479b3785d908e0837c0804cf3
2024-07-10 12:41:43 -07:00
Alessio Quaglino
7f9f8b5429
Catch errors in attach during replicate.
...
PiperOrigin-RevId: 651041336
Change-Id: I59986e157b4e22c74f8b8493899cdd4a3d5df839
2024-07-10 09:04:37 -07:00
Nimrod Gileadi
393895bb29
Explicitly specify actdim on PID plugin actuators, to allow them to be used with keyframes.
...
Support actdim attribute on plugin actuators.
Remove the actuator_actdim callback. This callback leads to crashes when loading keyframes for models that have a stateful plugin.
PiperOrigin-RevId: 650649505
Change-Id: I40d1994d02ae4e20ce631b2702a984766cf2628e
2024-07-09 09:08:48 -07:00
Kyle Bayes
2a4410e4e5
Fix bug with absolute meshdirs in included XML files. Fixes #1772 .
...
PiperOrigin-RevId: 649150979
Change-Id: I5df08c689afc4f5bc625e989a8c0b9733fcfa3c2
2024-07-03 11:49:17 -07:00
Yuval Tassa
8f16b72f44
Rename mjSpec.euler to eulerseq to match MJCF.
...
PiperOrigin-RevId: 649007737
Change-Id: Iedb53c1d8a6e6a082a6ba30a1fb2bb4516839fa1
2024-07-03 03:10:02 -07:00
Alessio Quaglino
f6cc3f4091
Remove classname from mjs* structs.
...
PiperOrigin-RevId: 647277317
Change-Id: Ic3cb0d3bf890d6be2712c0538e21910a8f12ab44
2024-06-27 05:13:02 -07:00
Alessio Quaglino
6be4e0697e
Simplify mjs_addDefault.
...
PiperOrigin-RevId: 646534046
Change-Id: I658224e4800849231e68ed02d8fad07b8d796231
2024-06-25 10:51:57 -07:00
Yuval Tassa
d8b85245a7
Informative error if mis-naming the top-level default class.
...
Also:
- Move the the top-level default class name into the mjCModel constructor.
- Fix bug in default class propagation in frame elements.
PiperOrigin-RevId: 646384669
Change-Id: Icc6154124361a234b84a07e2b5ecaa7c8b18ebf7
2024-06-25 01:46:18 -07:00
Yuval Tassa
8e2f830fd2
Fix type errors in compiler and tests.
...
In preparation for a float32 build of MuJoCo.
PiperOrigin-RevId: 644407674
Change-Id: I60069f0f865ef89fbf613f5a2ca0c336cc63461e
2024-06-18 09:12:44 -07:00
Yuval Tassa
07fc95ca9a
Add orthographic cameras.
...
Orthographic cameras are specified by setting the `orthographic` attribute of the `<camera>` element. The `fovy` attribute is still used to specify the field-of-view, but its semantic is different for orthographic cameras. For orthographic cameras, the field-of-view is expressed in units of length, rather than degrees.
Other related changes:
* Fix bug in the ordering of `cam_xxx` elements in `mjModel`.
* Make camera visualization translucent only when the frustum is visualized.
* Added a button to `simulate` to toggle between perspective and orthographic free cameras.
https://youtu.be/ZXBTEIDWHhs
PiperOrigin-RevId: 642293435
Change-Id: Id090a421ad88ab404b5b27ddbbd6bfc81ad49bc5
2024-06-11 09:23:18 -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
Baruch Tabanpour
ace0c8f0a3
Add maxhullvert.
...
PiperOrigin-RevId: 641092710
Change-Id: Ib4fa828a9c82531614f0a67de9990340dbb25406
2024-06-06 19:05:16 -07:00
Yuval Tassa
2830a4071f
Add dampratio attribute to position and intvelocity actuators.
...
PiperOrigin-RevId: 639745135
Change-Id: I94ba4c346d2750c6c454a60a568f2e6f6bce19d4
2024-06-03 05:28:35 -07:00
Yuval Tassa
8fa0fea02d
Allow partial specification of polycoef attribute of equality constraints.
...
- Usually the user only wants to tweak `polycoef[1]`, after this change `"0 2"` is equivalent to `"0 2 0 0 0"`.
- Also improve documentation of this attribute.
- Tighten margins of documentation display equations.
PiperOrigin-RevId: 639720742
Change-Id: Ibafa0e093cebe1c1c75bf2e47ff3bd2ad7619414
2024-06-03 03:43:13 -07:00
Tom Erez
727893f0f2
Add timeconst attribute to position actuator.
...
PiperOrigin-RevId: 635018979
Change-Id: I919573f4241ecb4a4c61c3b8b6641b31aa79eca4
2024-05-18 03:38:20 -07:00
Yuval Tassa
02d015458c
Add mj_geomDistance API function and sensors for geometric distance, normal direction and segment between between two geoms. Fixes #51
...
PiperOrigin-RevId: 632458301
Change-Id: I65b7e5bb0df59008028114cf4a07e0d6365ff3d3
2024-05-10 04:52:43 -07:00
Yuval Tassa
62bc837b4c
Rename remaining model to spec in xml/
...
PiperOrigin-RevId: 630855094
Change-Id: Ib921fe43b9b5a5a64867ef4c8c1cca217c27a5aa
2024-05-05 12:03:49 -07:00
Yuval Tassa
1b70907060
Convert user_api header and user_init source files to valid C code.
...
PiperOrigin-RevId: 629691192
Change-Id: I9be78aca27ae584fff0b733e9015b2bb3b927ca4
2024-05-01 04:53:01 -07:00
Alessio Quaglino
26f23066d1
Add replicate element to MJCF. Fixes #553
...
PiperOrigin-RevId: 629393578
Change-Id: Ia1db1b9e47eba8868117b0f7b85edcd0cc1b6d79
2024-04-30 06:29:18 -07:00
Yuval Tassa
027c26a153
Improve error reporting of sensorized objects.
...
Also remove duplication of element name and id from most error messages.
PiperOrigin-RevId: 628065116
Change-Id: Idd962fbab7aeba09e3a70c6c9d044b23db94cf23
2024-04-25 07:13:54 -07:00
Yuval Tassa
546a27ca72
Fix memory allocation error when memory size is larger than 2G. Fixes #1606
...
PiperOrigin-RevId: 627058355
Change-Id: Iebef647a0107d1f112a876d705f5b3ea888b4a41
2024-04-22 09:15:46 -07:00
Yuval Tassa
caf215e342
Add metallic and roughness scalar attributes to materials.
...
Rename `light_radius` -> `light_bulbradius`, make the default value 0.02.
PiperOrigin-RevId: 627032170
Change-Id: I1e01e2eca028c0aefc2e7dc384e8b34abac184aa
2024-04-22 07:39:06 -07:00
Yuval Tassa
0cd28d2423
Add light radius attribute.
...
Also fix bug: light defaults were not being saved.
PiperOrigin-RevId: 625142278
Change-Id: I8ec3a5a06e9f314e98b7c34346db3c24b34d7e0b
2024-04-15 17:55:15 -07:00
Yuval Tassa
5d26b50fce
Remove native sensor noise sampling.
...
PiperOrigin-RevId: 620075316
Change-Id: I6a0a1d63834e7c8bfd290f89d86fea791d794739
2024-03-28 15:33:03 -07:00
Yuval Tassa
47ba72ea59
Add actuatorgravcomp joint attribute, to treat gravity compensation forces as applied by actuators, rather than passive buoyancy.
...
PiperOrigin-RevId: 620049593
Change-Id: I2c8a9dc152c087b408e4f904838034271a7dd910
2024-03-28 14:01:52 -07:00
Yuval Tassa
4d2aa46e56
Rename mjmDefault -> mjsDefault
...
PiperOrigin-RevId: 619180662
Change-Id: Id7cedf82fbb022f08accc7c9a547495ed8eecba0
2024-03-26 07:20:03 -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
bda03af49a
Add childclass support to frames.
...
PiperOrigin-RevId: 615487831
Change-Id: I0e4d2efd52211701b4286a0b0de84424470a3a47
2024-03-13 11:31:22 -07:00
Alessio Quaglino
655e3d0914
Renamed Model to Spec in C API function names.
...
PiperOrigin-RevId: 613922860
Change-Id: Ic47a83aa33b57ef96bd742088442e6237282ee92
2024-03-08 07:05:44 -08:00
Alessio Quaglino
ef3cb7ec2e
Renamed mjmModel to mjSpec.
...
PiperOrigin-RevId: 613516063
Change-Id: I09e360d3eba2accba2e260ec4754b0879b12892f
2024-03-07 02:48:32 -08:00
Kyle Bayes
31384bdfeb
Speed up String2Vector.
...
PiperOrigin-RevId: 612767185
Change-Id: I4a4de5e03bbd6653be7ccb3e730ad64a335e17b0
2024-03-05 02:50:26 -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
Alessio Quaglino
8f1ea05bef
Add disc mesh generation to user_flexcomp.
...
PiperOrigin-RevId: 611462985
Change-Id: I0fc195d8733172f5f4347b04b5de0edfdd12613d
2024-02-29 07:24:47 -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
Yuval Tassa
8679c9fc59
Fix null pointer deref for unknown class names.
...
PiperOrigin-RevId: 610391077
Change-Id: I5abd62ff46e31e788f06fe111adb3c25287d4fdc
2024-02-26 06:38:52 -08:00
Alessio Quaglino
ce52047c6f
Remove column = -1 from error messages.
...
PiperOrigin-RevId: 609664538
Change-Id: I1cf27cbd0812d1d88d53724ae416a0b618140acc
2024-02-23 02:40:23 -08:00
Alessio Quaglino
cf7bd77cd3
Fix refpos typo in xml_native_reader.
...
PiperOrigin-RevId: 609376004
Change-Id: I2c722b03aaee63c4dcd8ac34f3e7c834bf15052d
2024-02-22 08:09:57 -08:00
Alessio Quaglino
5fe3e169ab
Remove mjm_finalize.
...
PiperOrigin-RevId: 609284351
Change-Id: I066332784d8210de6fec5aa718e097c9ef67903c
2024-02-22 01:27:06 -08:00
Alessio Quaglino
7edacd39cd
Add engine settings to mjmModel.
...
PiperOrigin-RevId: 608915453
Change-Id: Ic58566d7a9cdb57e25954caec69f595c8c9ee88a
2024-02-21 02:26:57 -08:00