Commit Graph

176 Commits

Author SHA1 Message Date
Gabe Oppenheimer c90a63a926 Update the version number to 3.2.7 following the 3.2.6 release.
PiperOrigin-RevId: 702103729
Change-Id: Id5581cc823a17360e7bb98ac0aa4342020c1aefa
2024-12-02 15:30:52 -08:00
Kevin Sayed 276f5b04cd Bump MuJoCo version to 3.2.6.
PiperOrigin-RevId: 693472991
Change-Id: Ic202f52dd42c55c43ba05ca21b5cc6a4024b0c72
2024-11-05 14:13:08 -08:00
Google DeepMind ffdb800e45 Update the MuJoCo version for the 3.2.5 release following the 3.2.4 release.
PiperOrigin-RevId: 686641388
Change-Id: I68d5183c9d369b7617f692ab97c12c53f0d2504c
2024-10-16 14:24:06 -07:00
Gabe Oppenheimer c2024ef6d1 Update the MuJoCo version for the 3.2.4 release.
PiperOrigin-RevId: 686261295
Change-Id: Ib59e44a6829a79fd480f2822a68cb05f94c38732
2024-10-15 15:34:09 -07:00
Alessio Quaglino c5a677a9de Fix load error message. Fixes #2135
PiperOrigin-RevId: 685668168
Change-Id: Ieac7ccca5bee695cf55fc74bd33fadf77a025cb9
2024-10-14 05:10:58 -07: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 cf3e60f9a4 Fix load time reporting in simulate.
Before this change, a model which took more than 1/4 seconds to load caused the simulation to pause, which is a behavior that is only supposed to occur for models that loaded with a warning.

PiperOrigin-RevId: 665786861
Change-Id: Ie3a6c8d18a6abbb425a0bbcc5a8e55d5fd7a0c72
2024-08-21 02:54:10 -07:00
Taylor Howell 2c56946547 Increase mjVERSIONSTRING to 3.2.3 after release.
PiperOrigin-RevId: 660891033
Change-Id: I2bda69d11cab60a83b0c77bb53214240eacaea62
2024-08-08 10:31:57 -07:00
Gabe Oppenheimer ebc48d2783 Update the MuJoCo version to v3.2.2 following the 3.2.1 release.
PiperOrigin-RevId: 660036707
Change-Id: I7e649e5a0ce6db863bcb99dc4fc1aa851b3f5140
2024-08-06 11:39:30 -07:00
Gabe Oppenheimer d538bf994d Update version to 3.2.1 following the 3.2.0 release.
PiperOrigin-RevId: 658412236
Change-Id: I4bd6ccb5dee18059eb6fc0d187afe62598845793
2024-08-01 08:35:42 -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
Gabe Oppenheimer 22ce22ac8a Update the MuJoCo version number ahead of the 3.2.0 release.
PiperOrigin-RevId: 652578624
Change-Id: I8ed6f66ff1247ff7421e3ed0521cf15e1c0b6c79
2024-07-15 13:16:06 -07:00
Yuval Tassa 3d1d1d0718 Multithreaded mesh compilation.
PiperOrigin-RevId: 651358120
Change-Id: Id6272aac84ec6ac1b709d2f4a44b7593307bd158
2024-07-11 04:21:49 -07:00
Yuval Tassa 17f6b12930 Report model load time in simulate if it takes more than 0.5 seconds.
PiperOrigin-RevId: 650933302
Change-Id: Id33aa9935a6b4f493dfa9a913f8a424b3f387fa1
2024-07-10 02:56:47 -07:00
Yuval Tassa 1601ab6078 Remove Makefiles. Fixes #402
These are no longer needed, as the open-source build uses CMake.

PiperOrigin-RevId: 648340374
Change-Id: Ibc704ca3aaab1c48d245e24b071bed6cd846c110
2024-07-01 05:51:47 -07:00
Yuval Tassa 44be878e7e Enable inter-procedural optimization by default in cmake
PiperOrigin-RevId: 647336693
Change-Id: I44acf48ed9825dd3e71b06f2aca581cdb17dce34
2024-06-27 09:05:49 -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 f37f840880 Improvements to control noise in simulate:
- Use `ctrl` as filter state rather than external preallocated buffer.
- Scale and clip to control ranges.
- Exponential decay to the middle of the range.
- Scale is now [0 1] (scaled to range).
- Rate is now [0 20].

PiperOrigin-RevId: 642586333
Change-Id: Id45a0420736a6edcf09be1db53d9320e7df2c668
2024-06-12 05:35:41 -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
Meghha Dhoke 1bf90af0e0 Bumping mjVERSIONSTRING from 3.1.6 to next version 3.1.7
PiperOrigin-RevId: 639959152
Change-Id: I7b88bae6ea56b0173f00c6f0899ba4a156614f01
2024-06-04 15:27:47 +01:00
Meghha Dhoke 4eca3b048d Bumping mjVERSIONSTRING from 3.1.5 to version 3.1.6
PiperOrigin-RevId: 631544334
Change-Id: Iadf8fa25e30da5b00172c8212786b1f9edb22e1a
2024-05-07 14:11:38 -07:00
Gabe Oppenheimer 225619c964 Update MuJoCo internal version to be the external version +1
PiperOrigin-RevId: 623607403
Change-Id: Ia8f6516bb6b2fb6a3ecb8273b59e61667098f308
2024-04-10 14:32:54 -07:00
Silvio Traversaro d90d57609e Copybara import of the project:
--
4883e8aacd531d8dbc3551ba7cb4e3b4694dda1e by Silvio Traversaro <silvio@traversaro.it>:

Fix plugin related comment in simulate

The comment was outdated after https://github.com/google-deepmind/mujoco/commit/2ebc5f097b1a5fbbe276250ad1d13966510d1291 .

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/1499 from traversaro:patch-37 4883e8aacd531d8dbc3551ba7cb4e3b4694dda1e
PiperOrigin-RevId: 615005350
Change-Id: I93d746f996de25b871cc1bc5651308d44382feef
2024-03-12 05:33:33 -07:00
Meghha Dhoke 106453fa2b Updated version number to be (v3.1.4) ahead of current release (v3.1.3)
PiperOrigin-RevId: 613236845
Change-Id: I3ee759493f27cfa1e367c71e3e073b54738b73d4
2024-03-06 09:07:25 -08: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
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
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
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 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
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
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
Yuval Tassa 35f095d7c5 When paused in simulate, add index of history scrubber if not 0.
PiperOrigin-RevId: 590184966
Change-Id: Id0914c41a1339cf71ebdea02ec486c52c3d37179
2023-12-12 06:43:37 -08:00
Alessio Quaglino 8c7c39a211 Lock the sim mutex in PhysicsLoop and PhysicsThread.
This prevents an invalid memory access when the stack is used in engine_vis.

Fixes #1219.

PiperOrigin-RevId: 588017796
Change-Id: I1ee18c5aa5e96ccaeebb0a467cd384355882b80b
2023-12-05 03:56:52 -08:00
Alessio Quaglino 7cb84d45c1 Prevent integer overflow in history buffer for large models.
PiperOrigin-RevId: 585949038
Change-Id: Iabec5feedd1632b635583a608a5488b39e6bb9a2
2023-11-28 06:04:00 -08:00
Yuval Tassa 25ddb3e6e8 simulate: Add states to history when stepping with right arrow key.
PiperOrigin-RevId: 585613870
Change-Id: I7fb051946e8a91a900442e3d7048dfa8b8bd7c5c
2023-11-27 04:45:51 -08:00
Yuval Tassa 8693e0bba5 Stop actuator group disable from mistakenly binding to the number keys (should toggle geom groups, not actuators).
PiperOrigin-RevId: 583038620
Change-Id: Ibf339aed339b7ad862f61ac72298f43e717e3973
2023-11-16 07:34:58 -08:00
Baruch Tabanpour 1554048856 Bump dev version number to 3.0.2.
PiperOrigin-RevId: 582773849
Change-Id: I07a70911578fabb556eec1a4d8aa6fcb6557513f
2023-11-15 12:51:04 -08:00
Yuval Tassa 7051ab99e0 Enable keyframe loading and saving in passive viewer. Fixes #1175
PiperOrigin-RevId: 582332757
Change-Id: Iff23359e670906c0e88a2d34273c493bc8cbe2af
2023-11-14 08:38:04 -08:00