- Add RGBA color editing for visualization
- Make some separator sections closed by default
PiperOrigin-RevId: 646502122
Change-Id: Id863d983b7fb53e6bbe86a92833876e40b74a5d8
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
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
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
Fixes#1719.
Also improve documentation of `mju_sigmoid`, was previously only documented in changelog.
PiperOrigin-RevId: 642637458
Change-Id: I811a0bf8f881c8b76c9a62d2faec8fdec4e7585b
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
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
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
Added `option-actuatorgroupdisable` attribute and associated `mjOption.disableactuator` integer bitfield, used to disable sets of actuators at runtime according to their group.
- The first 6 actuator groups are toggleable in the `simulate` viewer.
- Minor refactor and cleanup of actuator documentation.
https://youtu.be/H9qG9Zf2W44Fixes#1092.
PiperOrigin-RevId: 578335600
Change-Id: I4cf663b90ea768e4380acfa2fe3b8c15c7cbb568
- Improved Help overlay text, mention shortcuts for UI toggle.
- Removed buttons for UI toggle.
- Moved Spacing / Color / Font to the end of the Option section.
PiperOrigin-RevId: 576480554
Change-Id: Ie1427b97cb784421490c276a8544d570a6042188
Fixes#1110.
The code was using outdated indices since 48eb75ae92. It now uses the more stable pdata pointer.
PiperOrigin-RevId: 574805349
Change-Id: If6112fb2af7d60f17b35599233b24f33b6a8cac6
The segfault is caused by a call to mjui_update outside of the macOS main thread, introduced in 3e12f0d50c.
PiperOrigin-RevId: 572531447
Change-Id: Ib8424c746d18a776c0b91087d9501aa8ee463026
- See public description below.
- Stopped incrementing the iteration count in saveStats().
- `sizeof(mjSolverStat) == 40`, so this ends up costing 160KB, up from 40KB.
BEGIN_PUBLIC
Changed the size of `mjData.solver`, the structure used to collect solver diagnostic information. The array is now of length `mjNISLAND * mjNSOLVER`, where each row of length `mjNSOLVER` contains separate solver statistics for each constraint island. Until solver islanding is implemented, only row 0 is used.
- The new constant `mjNISLAND` is set to 20.
- `mjNSOLVER` is reduced from 1000 to 200.
- Added `mjData.solver_nisland`, the number of islands for which the solver ran.
- `mjData.solver_niter` (renamed from mjData.solver_iter) and `mjData.solver_nnz` are now integer vectors of length `mjNISLAND`.
END_PUBLIC
PiperOrigin-RevId: 565030093
Change-Id: I773e918805c6ced79f0dab5f19ea23956760c8c5
Before this change timing plots would report zeros if the render thread was faster than the physics thread, making them unreadable when slowdown was used.
PiperOrigin-RevId: 557432042
Change-Id: Ie9a18fb84cab788d11dfbede4e3052f24441b4c4