Commit Graph

125 Commits

Author SHA1 Message Date
Yuval Tassa 58f6d52491 Introduce new logging API, fixes #858
PiperOrigin-RevId: 930744288
Change-Id: I6ec1203b55c031390f3eef23192e2337508ce886
2026-06-11 14:36:57 -07:00
Kyle Bayes b935d4153c Add new mju_threadpool API function, and delete old threading API.
PiperOrigin-RevId: 922838541
Change-Id: Id9f7e0fb298ffde61fcc49a802dc78971858ce51
2026-05-28 10:11:44 -07:00
Yuval Tassa f712eed4ce Allow flex sleeping
PiperOrigin-RevId: 917817500
Change-Id: Ia3bd5e52e7c2eaa3f70c81352d82c130b1d357f6
2026-05-19 07:15:27 -07:00
Yuval Tassa 647af382c1 Add per-island PGS solver dispatch.
Total testspeed runtime for `2humanoids100.xml` reduced by 27.6% (63.4 -> 49.5s) due to early termination on small islands

PiperOrigin-RevId: 906910915
Change-Id: If55ad468c3680ef44eda7000455a77f8003b3122
2026-04-28 05:13:54 -07:00
Yuval Tassa b2281883dd Improve slider precision and range clamping, fixes #3206
Add clamping to slider values in both ImGui widgets and mjUI to ensure they remain within the defined min/max ranges, preventing potential floating point inaccuracies from causing values to slightly exceed the bounds.

PiperOrigin-RevId: 902660458
Change-Id: Ia153ae7907f07b890f2b5ac2e3a4be93ecae7bd3
2026-04-20 08:54:11 -07:00
Yuval Tassa 0e04436d51 Remove `mjWARN_VGEOMFULL, handle visual geom buffer full warnings in mjvScene`.
PiperOrigin-RevId: 896483023
Change-Id: I6dde2c20d8e8e229cf95e1f002dd10525d3376e6
2026-04-08 07:17:53 -07:00
Alessio Quaglino 15d8fc13b9 Add user sensor visualization in simulate. This is triggered when the product of sensor_intprm[0] and sensor_intprm[1] is equal to the sensor data dimension divided by 3 (the RGB channels).
PiperOrigin-RevId: 878473154
Change-Id: Icb3d7e9b766c49e3a9abe3f8bceea57e18e43328
2026-03-04 07:09:01 -08:00
Matija Kecman 8f56d5eefa Minor style fixes
PiperOrigin-RevId: 872669434
Change-Id: I794173b9fad3a286cbf57d246b2f8672412a0e20
2026-02-19 19:16:31 -08:00
Kevin Zakka fa43e2c03b Fix tracking camera detaching when toggling visualization flags, fixes #3108
Toggling visualization flags via keyboard shortcuts (e.g., C for contact points, F for contact forces) causes the SECT_RENDERING event handler to unconditionally re-evaluate the camera selection, which can reset a tracking camera to free mode. This particularly affects users of mujoco.viewer who set tracking cameras programmatically.

Guard the camera update logic so it only runs when the camera selector itself is changed, not when other items in the rendering section are modified.

PiperOrigin-RevId: 871600340
Change-Id: Ia6ef2a1617c6cdc18c7d10b4b099a8f2c620a824
2026-02-17 18:59:33 -08:00
Taylor Howell 5903d4826f Sparse ten_J and ten_J_colind
PiperOrigin-RevId: 869712136
Change-Id: Id2979684aa0c39552cb8453852483cbac55f0ea3
2026-02-13 06:57:22 -08:00
Google DeepMind 336e1026a4 Sparse ten_J and ten_J_colind memory
PiperOrigin-RevId: 868834376
Change-Id: Iec92d9e09e3134666895e54a78cb02439d74a4de
2026-02-11 14:05:43 -08:00
Taylor Howell d011285380 Sparse ten_J and ten_J_colind memory
PiperOrigin-RevId: 868800229
Change-Id: Id83f9fd40dd9bece06fd99753e4202eea17ca884
2026-02-11 12:45:50 -08:00
Yuval Tassa 769f37b653 Implement sleeping in engine
PiperOrigin-RevId: 829361787
Change-Id: I6f64d8e25c4248cf32c18cd94d37ff5def78946e
2025-11-07 03:33:07 -08:00
Yuval Tassa abc02b736e Minor fixes to viewer diagnostics
- When `mjData.nefc` was 0 (solver not run at all), we were plotting the stale diagnostics from the last run; now fixed.
- In the case where islands were used, the semantic of the plotted diagnostic `sqrt_nnz` (square root of Hessian nonzeros) is changed. It used to be the sum of square roots of solver nonzeros per island, it is now the square root of the sum of all nonzeros in all islands. The semantic `sqrt(sum(nnz_i))` was found to be more consistent than `sum(sqrt(nnz_i))`, in the sense that switching islanding on/off leads to smaller changes and is more in line with the interpretation of islanding as [block-diagonalization](https://mujoco.readthedocs.io/en/3.3.7/computation/#constraint-islands).

PiperOrigin-RevId: 827624908
Change-Id: I5fc86364ead585a4752a6d44823fb75cf6c7c318
2025-11-03 13:23:05 -08:00
Yuval Tassa 431f96572e Remove unused mjOption.apirate.
PiperOrigin-RevId: 815633571
Change-Id: Ib98f3eb2df47f96fa1fe6e987a3a0cd23a9479f6
2025-10-06 02:51:17 -07:00
Taylor Howell 401bf431b8 Modify Simulate::InjectNoise to set target of exponential decay to value from key_ctrl if a valid key is provided as input.
PiperOrigin-RevId: 813819040
Change-Id: I79508039b17fb3484b71ae0d19614c32adacfa10
2025-10-01 10:46:29 -07:00
Yuval Tassa ec94bb49aa Make constraint island discovery on by default.
Also fix latent bug in mjData serialization.

PiperOrigin-RevId: 799505349
Change-Id: I299e7cc8133fa2ec0b339a7ff3d02543e06778b1
2025-08-26 04:27:24 -07:00
Yuval Tassa c7a82c32dc Do not update qacc_warmstart at the end of the solver call; instead, update it at the same time as all other state variables. This change makes mj_forward idempotent.
See changelog herein for motivation and discussion.

PiperOrigin-RevId: 797392841
Change-Id: If50e9f09e1d07e8363169d3589c32097aeca2432
2025-08-20 11:30:13 -07:00
Matija Kecman 09f7154e57 Add option to only sync the state to improve sync performance in passive mode.
By default this option is off, which preserves the current behavior of syncing all of `mjModel` and `mjData`.

PiperOrigin-RevId: 776498017
Change-Id: I02127c9397efbabebb89b0e0d139b00b6e665d35
2025-06-27 02:49:58 -07:00
Yuval Tassa 14dc7c2a60 Add "cameraid" attribute to visual/global specifying the default camera to use at model load.
PiperOrigin-RevId: 773783069
Change-Id: I2fff2abdceedc982d89cee8d14b95abceea1c113
2025-06-20 11:41:27 -07:00
Google DeepMind 6b309b5251 Display equality constraints in the simulate UI.
Add section for toggling constraint activity to the UI, similar to actuators or joint controls.

PiperOrigin-RevId: 772866923
Change-Id: I017b9195fcf67b5865e9d44d6c8aded64c8bc46d
2025-06-18 04:42:34 -07:00
Levi Burner 3eb31f56cd Copybara import of the project:
--
c9acc0a6f677951db34f2b607bd60fc18a43f72b by Levi Burner <leviburner@gmail.com>:

Fix race condition in Python viewers set_X methods

--
b89ab8f7a0f628ee7a02ebfbac2a97f113112076 by Levi Burner <leviburner@gmail.com>:

use std::swap to replace some copying

--
02625bed0cffbfc9ea4537f74689f0bbcb8bf44c by Levi Burner <leviburner@gmail.com>:

fix whitespace

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/2613 from aftersomemath:simulate-set-race 02625bed0cffbfc9ea4537f74689f0bbcb8bf44c
PiperOrigin-RevId: 766646168
Change-Id: I1e1dc16afbfb1e69fb958d54bd1075cc9aed3569
2025-06-03 07:01:31 -07:00
Yuval Tassa bf1f8081c1 Enable Visualization pane in Passive Viewer. Fixes #2158
PiperOrigin-RevId: 761522429
Change-Id: Ice4322ce413891893c89856e55f60a4f26010cf2
2025-05-21 07:52:55 -07:00
Yuval Tassa ced630181d Replace mjv_sceneState and related code with mjv_copy{Model,Data}
PiperOrigin-RevId: 760662776
Change-Id: I512bda9187fbc19ade6924b91d5cb2275078de42
2025-05-19 09:51:58 -07:00
Yuval Tassa ecb769fc3a Refactor islands to be memory contiguous.
PiperOrigin-RevId: 755803476
Change-Id: I41972b07e0d5ef5d0117c94f565b93367b87458b
2025-05-07 05:06:27 -07:00
Yuval Tassa 8f768be2da Remove solver_nisland field from mjData.
PiperOrigin-RevId: 750527660
Change-Id: I6b34944c92483ea2abc774df75efd868255a2bac
2025-04-23 03:27:41 -07:00
Copybara-Service 699ad13a72 Merge pull request #2503 from Andrew-Luo1:rscope
PiperOrigin-RevId: 745266549
Change-Id: I15d2eb992aae643ac096650693cc0750421f14c6
2025-04-08 13:21:47 -07:00
andrew 65500cfbdc improve variable and function names 2025-03-30 22:19:55 -04:00
Kevin Zakka e272e46770 Rename simulate "copy pose" button to "copy state", also save "qvel', ctrl, mpos and mquat if present. SHIFT-click will save values at full precision.
Example formatting:

```
# default precision
<key
  time="2.99"
  qpos="9.4287e-07 3.02972e-07 1.19963 0.999999 -9.3978e-06 0.00102591 8.06948e-06 -0.000337469 -0.000182994 -0.00282448 -0.000358084 -0.00370829 0.0631084 0.0996347 -0.00161963 0.0260658 -2.09992 -0.00459387 0.0474729 -0.0171906 0.0018216 0.72549 0.00133026 0.724951 0.000816735 0.724389 0.000454671 0.724 -0.00146646 -1.12233e-05 -0.0995942 0.00159877 0.0261695 -2.09993 0.00458912 0.0473279 0.0171317 0.00177837 0.725447 0.00131597 0.724941 0.00081406 0.724393 0.000465918 0.72402 -0.00140271 -1.42355e-05 0.0949171 0.0790632 -0.461397 1.02664 -9.42133e-05 -0.55539 -0.0952333 -0.0790705 -0.460978 1.02899 8.38339e-05 -0.671707 0.401772 0.197427 1.00101 0.999979 0.00125793 -0.00100982 -0.00631542"
  qvel="0.000132784 3.49155e-05 0.000536692 -0.000560519 -0.0242142 0.00693928 0.00119816 -0.000234844 0.00350923 -0.00036047 0.00137217 0.026605 0.000647559 -0.000813737 0.00151335 0.00158296 -0.000628786 0.0184574 -0.000751955 8.75972e-05 0.00017462 9.47749e-05 0.00018949 7.40435e-05 0.000170318 -2.65743e-05 5.67808e-05 0.000256585 -8.77605e-05 -0.00070146 5.90881e-05 0.00186213 0.00150788 0.000645196 0.0183261 -0.00189709 0.000234144 0.000180699 0.00020344 0.000161977 0.000154203 0.000127231 2.28526e-05 -2.85628e-06 0.000232213 2.32483e-05 -0.000415728 0.000285987 0.00873081 0.00361353 5.70155e-05 0.000316513 -0.00778618 0.00404914 -0.0239508 -0.0375704 -0.000528571 4.92965 3.51479e-15 -4.54231e-16 -9.39907e-15 -7.5733e-14 -1.54433e-14 8.71183e-14"
  ctrl="0 0 0 0 0 0 0.106158 0 0 -2.1308 0 0 0 0 0 0 0 0 0 -0.106158 0 0 -2.1308 0 0 0 0 0 0 0 0 0 0.1 0.08 -0.477 1.033 0 -0.556 -0.1 -0.08 -0.477 1.033 0 -0.556"
  mpos="0.5 0 0.5 0.5 0 0.5 0.5 0 0.5"
  mquat="1 0 0 0 1 0 0 0 1 0 0 0"
/>

# full precision
<key
  time="19.78000000000035     "
  qpos="-5.456931939182209e-13 4.210058291674657e-14  1.199596868198444      0.9999997705632744     -1.123107929038176e-05 -0.000677308838908712  -4.574736052563342e-13 4.81467762006399e-06   -0.0001470530836508491 -0.01285126600561344   -0.0003314670141921113 -0.003753266058087929  0.06165064101255623    0.01573179146576803    -3.013291189105153e-05 0.00898818165332332    -0.0005543865919957537 0.001960768693378906   0.003171337599202657   0.05998529721754536    -0.006869809693640725  0.7108455550986151     -2.768022862919269e-05 0.7234287700347743     -2.65358465809282e-05  0.7234305602907817     -2.427451970418236e-05 0.7234340023869628     0.0001444026830625057  0.004779116304496144   -0.01556918200171751   2.367030531882565e-05  0.00887857821391661    -0.0005393749458389281 -0.002002170464405725  0.004065365245773832   -0.059404381452836     -0.006700853036263364  0.7112073591870905     -2.793780628594305e-05 0.7234283783336887     -2.67570932686378e-05  0.7234302250735107     -2.446320244250625e-05 0.7234337167312712     0.0001441442525519209  0.004776981844081063   0.001964241516442131   -0.001279289930183057  0.0009901921906584617  0.005102724602622095   -0.0001969944416873799 0.0006055390861509305  -0.001981889349334628  0.001289775046291938   0.0009924227912350586  0.005084179458414934   0.0001970337430004949  0.0006055492125132441  0.4000059982468001     0.2000006330421453     1.001005166968155      0.9999986986616857     0.001264259603338192   -0.00100188514175821   -2.342548568520312e-05"
  qvel="8.028421913635349e-14  -7.933623204015651e-15 -1.766955416585763e-09 -1.242788325114248e-10 1.380680257623891e-08  4.072776622758517e-13  -2.152263214542579e-08 -3.878177040643757e-09 -7.698904695669224e-07 1.032750347898222e-09  -1.203279562630678e-09 -7.551458300921444e-08 2.469496246057255e-06  8.917880101195273e-08  -6.756803792056489e-06 -2.872076666906819e-06 1.785650772865195e-06  -5.01959632083366e-06  -5.599940213931672e-06 8.890181416091634e-07  1.64456042549838e-06   -1.371426840474208e-09 -2.120678515220117e-09 -2.024654983099582e-09 -3.146661587304676e-09 -2.584650818327909e-09 -4.007447393764789e-09 3.46515937628953e-09   1.271775029987075e-08  -2.488928508740539e-06 -8.746797042033161e-08 -6.8499144406484e-06   -2.901446048768352e-06 -1.790798673741401e-06 -5.013863339758384e-06 5.931327072492727e-06  9.379458926032098e-07  1.728266244061688e-06  -1.546731198107214e-09 -2.391411625987869e-09 -2.205072839286403e-09 -3.425520861505272e-09 -2.768770278332858e-09 -4.29204657928239e-09  3.77970711367913e-09   1.210836106515995e-08  2.48779855243758e-07   1.794262457563144e-08  2.425338558609319e-07  -4.490996387632652e-09 1.5470867213074e-10    -1.056275279772894e-10 -2.528203830071622e-07 -1.984360361016969e-08 2.432485190492325e-07  -4.490126811319184e-09 -1.553085076375719e-10 -1.050844929338509e-10 -5.03087850573677e-15  -3.069973955284326e-15 1.263049899085103e-14  -2.132657422360499e-13 1.240631051776082e-14  7.346260313161907e-14 "
  ctrl="0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                      0                     "
  mpos="0.5                    0                      0.5                    0.5                    0                      0.5                    0.5                    0                      0.5                   "
  mquat="1                      0                      0                      0                      1                      0                      0                      0                      1                      0                      0                      0                     "
/>
```

PiperOrigin-RevId: 741427042
Change-Id: Ib33f3e6215b7933d9267fc4c222d7a0abc75dbb4
2025-03-28 00:38:19 -07:00
andrew f02fdfe2d1 add handles for text and image overlays 2025-03-14 21:41:28 -04:00
Google DeepMind 37d7591ce0 Add support for user-defined figures in the MuJoCo viewer.
PiperOrigin-RevId: 726983516
Change-Id: Ifb821f3cafb163d4f3077d76b0668037b4bc5a9c
2025-02-14 10:45:47 -08:00
Yuval Tassa 395129bbd3 Improvements to lighting and replication logic in humanoid.xml and 22_humanoids.xml.
Minor fix to memory usage printing in simulate.

PiperOrigin-RevId: 683787943
Change-Id: I0a42dacc8af0e659c3817df57bceb76d9e4d5ae3
2024-10-08 15:36:22 -07:00
Yuval Tassa d3a1ca72d8 Report memory usage in simulate using percentage rather than decimal fraction.
PiperOrigin-RevId: 683098469
Change-Id: I7310848fb87e040996fcfc24991d45bf55872993
2024-10-07 02:37:58 -07:00
Yuval Tassa 088079eff0 Rename mpr_tolerance and mpr_iterations to ccd_tolerance and ccd_iterations.
PiperOrigin-RevId: 666438658
Change-Id: I23dbdf939b9ab581f0fca4445f95c5bb36f6b463
2024-08-22 12:01:54 -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
Saran Tunyasuvunakool f62792594f Add a new disable flag mjDSBL_AUTORESETNAN.
PiperOrigin-RevId: 654677473
Change-Id: Id92383fe413729bf6697353aa6e0bc8a946ec7e8
2024-07-22 03:22:41 -07:00
Yuval Tassa 5a513a0afb simulate improvements
- Add RGBA color editing for visualization
- Make some separator sections closed by default

PiperOrigin-RevId: 646502122
Change-Id: Id863d983b7fb53e6bbe86a92833876e40b74a5d8
2024-06-25 09:16:25 -07:00
Emo Todorov ee6a1dba28 UI improvements. Fixes #1274.
Copybara import of the project:

--
a1297d997d0b3cc624bbd1e704ffb7fbb2c5db9d by Emo Todorov <etodorov@gmail.com>:

UI imrovements

When OpenGL buffer size is too small to hold entire UI with all sections open, older sections (as determined by latest mouse click) are automatically closed as needed.

To test this new functionality, uncomment the test near the top of mjui_resize().

UI items now have userid, which can be used for event handling.  It is set through the (new) last field of mjuiDef, called otherint.

Sections titles can now have a checkmark - in which case they are rendered differently. Set via mjuiDef.otherint: 0- none (as before), 1- rendering changed but box not shown, 2- box shown.  This can be used to label sections of special interest to the application.

--
b0405bfb3005586ef1d2656ea9cc43c608225927 by Emo Todorov <etodorov@gmail.com>:

more ui improvements

Implemented mjPRESERVE state for adding sections and separators, so you don't have to keep track of old states.

simulate.cc is now modified to use this new functionality.  I also made the separators in the Physics section collapsible. If you don't like it, change them back to state 1.

Also added functionality for handling section checkboxes.

--
10f4c49be62a6605a38b7c0c7bfae1629024ba31 by Emo Todorov <etodorov@gmail.com>:

even more ui improvements

Selection boxes that extend below the current UI height are finally rendered in full.

Sections and collapsible separators now have rounded corners. The radius can be controlled from theme spacing.

More theme color settings were added. In particular, color gradients can now be disabled (the two end colors are set independently).

--
96c2dc601a25d31c93b21f8e089d349e729e829e by Emo Todorov <etodorov@gmail.com>:

final ui improvements

Cleaned up the code a bit.

Added more control for color gradients.

--
c9eddb679f36df3f0745d37e3fa90c4e66ee6b98 by Emo Todorov <etodorov@gmail.com>:

bug fix

Fixed some rendering bugs in the new functionality.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/1749 from emotodorov:ui_improve ddfc21dbcf0482b8f0d5eacab21847c302f71440
PiperOrigin-RevId: 646060325
Change-Id: Idb27aae7cd0311d00f26387bcadf5891175e867d
2024-06-24 05:33:51 -07:00
Yuval Tassa 3f3b39bbb1 Fix type-related issues in dependent code. Remove hardcoded mjUSEDOUBLE. Add mjUSESINGLE compiler flag.
This CL does not change the default build behavior of MuJoCo. To use single-precision floating-point, build MuJoCo with `-DmjUSESINGLE`.

PiperOrigin-RevId: 644782648
Change-Id: Ie815df9916798ca8054306437b39a33f84ce9e08
2024-06-19 10:52:18 -07:00
Yuval Tassa 6a532fc53e Fix bug in simulate noise injection logic.
Noise injection was occurring at every iteration of the physics thread, rather than before every call to `mj_step`, leading to time-step-dependent noise rate.

- Moved the logic from main.cc to a `Simulate::` method, called before `mj_step`.
- Reduced the maximum time-scale slider value back to 4 seconds (recent increase was due to this bug).

PiperOrigin-RevId: 643350296
Change-Id: I96832905e6614f92ac725298b16fcabe64ea1df1
2024-06-14 08:13:24 -07:00
Yuval Tassa c9bcf8371e Add mj_setKeyframe function to save current state in k-th model keyframe.
Fixes #1719.

Also improve documentation of `mju_sigmoid`, was previously only documented in changelog.

PiperOrigin-RevId: 642637458
Change-Id: I811a0bf8f881c8b76c9a62d2faec8fdec4e7585b
2024-06-12 09:22:52 -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
Yuval Tassa 55e2c76c01 Use mj_resetDataKeyframe when loading key frames in simulate.
PiperOrigin-RevId: 608209431
Change-Id: I1ee78c837cbc098144143b90e8c0b4618568c9cf
2024-02-18 20:49:09 -08:00
Yuval Tassa eb844a4b77 When computing suitable initial font scale for a display, let 250% be the maximum size. Workaround for #1274.
PiperOrigin-RevId: 603791510
Change-Id: I37aa3431dcaf42dae8daa77ed87e108ca4d78ea0
2024-02-02 14:41:12 -08:00
Saran Tunyasuvunakool 914a001753 Update UI when rendering flags are changed via user_scn.
PiperOrigin-RevId: 603679619
Change-Id: If094836f97c8086a7f70bd235b8c8cc8ab69c639
2024-02-02 07:16:37 -08:00
Saran Tunyasuvunakool 7bb0ce4211 [Python Viewer] Allow users to override rendering flags via user_scn.
Fixes #1190

PiperOrigin-RevId: 603672602
Change-Id: I3ff1bb0dca7e913b36f1b241aaea8b8bb95cadff
2024-02-02 06:39:08 -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 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
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 dc0d0c59d4 Fix bug in simulate where the "LOADING..." label was not properly showing.
PiperOrigin-RevId: 591257979
Change-Id: Id09754b1e5a87decfb68b9fe305388aa8f0f5ed3
2023-12-15 08:12:28 -08:00