Commit Graph

73 Commits

Author SHA1 Message Date
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 57e6940f57 Prevent division by zero in testspeed. This can happen when parts of the pipeline are disabled.
PiperOrigin-RevId: 580208528
Change-Id: Ia5971ea9f15e0b19896392e86a65592357b2df61
2023-11-07 09:38:30 -08:00
Saran Tunyasuvunakool 269d88ad92 Bump dev version number to 3.0.1.
PiperOrigin-RevId: 574451745
Change-Id: Iedbbb3304b88876f31a6196d690a1f05c6428e2f
2023-10-18 15:01:21 +01:00
Erik Frey 8f9c690c85 Add MJX and bump version number to 3.0.0.
Co-authored-by: Baruch Tabanpour <btaba@google.com>
PiperOrigin-RevId: 574327508
Change-Id: Ia9b62fbc929c6869dfcec87636b2e10d405a1060
2023-10-18 10:33:29 +01:00
Yuval Tassa a1b6026b8c Delete derivative code sample.
PiperOrigin-RevId: 573477509
Change-Id: I0e619e36dd3fe677a27bbbdac87a15f04670cc13
2023-10-14 08:38:37 -07:00
Yuval Tassa c0357ef3d0 Improve documentation related to engine-internal threading.
PiperOrigin-RevId: 573346658
Change-Id: I112eba10b8f71b3a0aa27fa162a4a589be7ec3a7
2023-10-13 16:32:38 -07:00
Yuval Tassa fb4cf472ed Delete testxml code sample.
PiperOrigin-RevId: 573202693
Change-Id: Ic8d284293bd5c51693415d4186bb0b72a5416dca
2023-10-13 06:33:24 -07:00
Alessio Quaglino 5a70ad08ab Add Flex component.
PiperOrigin-RevId: 572830650
Change-Id: I6908228087b7b9683be3506c8d9cdc725ed5dcd5
2023-10-12 10:49:35 +01:00
Yuval Tassa bad6bee64f Improve component printout in testspeed
PiperOrigin-RevId: 572610538
Change-Id: I28745840e457ccef7276c3d37ecf3055d0f594da
2023-10-11 10:12:32 -07:00
Matthew Bennice 2842245ca9 Multithread parallelizable operations in mj_fwdPosition
PiperOrigin-RevId: 572576240
Change-Id: I70eb518385366a0027c5dad44ac15e3904d1b4a3
2023-10-11 08:01:53 -07:00
Yuval Tassa 18d9f1abb0 Improvements to timing.
- Fixed bug in timing of kinematics, was under-reported.
- Moved timing of inertia and collision into respective functions, in preparation for multi-threading.
- Detailed profiling in `testspeed` is always on, removed command-line flag.
- Improved `testspeed` self-documentation.

PiperOrigin-RevId: 571989548
Change-Id: If0e3cc17f6f3511b98fc36339f406a19968a9361
2023-10-09 11:14:44 -07:00
Matthew Bennice 071af3b015 Implement threading for island constraint solving.
Humanoids22 No threads:
 Benchmark Execution Time: 9.475905812s

Humanoids22 with 10 Threads:
 Benchmark Execution Time: 4.871352s

PiperOrigin-RevId: 571214307
Change-Id: I1f4f2c761b4ae6bc8fac1f28c6c695f6c499f339
2023-10-05 21:05:19 -07:00
Yuval Tassa 63fd23a934 Remove mjTIMER_ACCELERATION, add mjTIMER_ADVANCE.
- mjTIMER_ACCELERATION is not very useful, it's usually very tiny (0.5% for humanoid, 1% for 22humanoids). It basically times a single call to `mj_solveM`.

- Added `mjTIMER_ADVANCE` to time `mj_Euler` and `mj_implicit` (which can be significant).

- Moved `mj_transmission` to `mjTIMER_KINEMATICS` where it belongs (and used to be).

PiperOrigin-RevId: 565936880
Change-Id: I26b8a067133594e5500ca1c809beb3518b4a8d9c
2023-09-16 08:03:45 -07:00
Alessio Quaglino 492b6a72ec Prevent patches to be applied to an already patched dependency.
See https://gitlab.kitware.com/cmake/cmake/-/issues/21146

BEGIN_PUBLIC
Prevent patches to be applied to an already patched dependency.
END_PUBLIC

PiperOrigin-RevId: 565624168
Change-Id: I29b36d2cd02f58d5d9e84f9cae5e5bbf8be1b404
2023-09-15 02:58:54 -07:00
Saran Tunyasuvunakool 860f7b376a Fix GCC and MSVC build.
PiperOrigin-RevId: 564390190
Change-Id: Icba3eefb394b8d17798679dd9876f127fba5a599
2023-09-11 08:17:08 -07:00
Saran Tunyasuvunakool 78183e60e1 Refactor thread pool implementation.
- Make mjTask non-opaque and remove C++ Task class.
- Make C++ thread pool a subclass of a skeletal mjThreadPool C struct.
- Make the mjTask status enum more consistent with the rest of MuJoCo.
- Change mju_threadPoolEnqueue to take just the mjTask. Users must now prepare the mjTask by assigning the function pointer and argument into the struct.
- Rename files in thread/ to be more consistent with the rest of MuJoCo.
- Run threading tests in CMake.
- Allow use of C++20 designated initializers.

Otherwise the functionality remains identical.

PiperOrigin-RevId: 564374675
Change-Id: I37c9894566bc39faf217e5aa97a4e2713a70e467
2023-09-11 07:20:34 -07:00
Saran Tunyasuvunakool 7e5a7b76fc Change GitHub org name to google-deepmind.
PiperOrigin-RevId: 563512242
Change-Id: Ife98501e95bb3459d96c7c73e5fb53be5513dd4b
2023-09-07 12:34:20 -07:00
Saran Tunyasuvunakool 4929077211 Remove mjMARKSTACK and mjFREESTACK macros.
PiperOrigin-RevId: 562844184
Change-Id: Id2f57f5d132c47094dad75c6dab7297d7aa73458
2023-09-05 11:41:43 -07:00
Saran Tunyasuvunakool 329ed193ac Disallow variable-length arrays and turn on -Wpedantic in Clang and GCC.
PiperOrigin-RevId: 562832747
Change-Id: I0532624cee31e089a47426305d885687eb0fc5c5
2023-09-05 11:05:04 -07:00
Saran Tunyasuvunakool b979a26b10 Rename mj_stackAlloc to mj_stackAllocNum.
PiperOrigin-RevId: 561040193
Change-Id: I49ea21ffb5b596471d2aacefb1961c11c5c905d0
2023-08-29 08:43:03 -07:00
Saran Tunyasuvunakool eaf78b798b Bump dev version number to 2.3.8.
PiperOrigin-RevId: 549580971
Change-Id: If8be1910f0196754ce8abb8d91fe604e789ecec8
2023-07-20 03:27:50 -07:00
Saran Tunyasuvunakool c9246e1f50 Release version 2.3.7.
PiperOrigin-RevId: 549565890
Change-Id: I56db138998e43637bdde86de6490a567f0f255ec
2023-07-20 02:13:55 -07:00
Kyle Bayes 242aea93c6 Bump oldest supported MacOS to version 11.
PiperOrigin-RevId: 547479684
Change-Id: Idb6a432af0e7872ca087a0c571aafa72e9528818
2023-07-12 06:38:26 -07:00
Yuval Tassa 761649c3a3 Improvements to testspeed.cc:
- Turn on internal profiling by default, adding "other" category.
- Print step timing in microseconds.

PiperOrigin-RevId: 545493349
Change-Id: I0cd5fea1206b3f86f1c757130169975d6862733d
2023-07-04 12:53:59 -07:00
Saran Tunyasuvunakool 90e14ac8d0 Bump version number to 2.3.6.
Going forward, the version number at head will be kept one ahead of the latest released version. The rationale behind this change is so that it is clear that the source code at head is more recent.

PiperOrigin-RevId: 527687981
Change-Id: I7982ecd0b99ad70dccec6a8ffe86629754558bda
2023-04-27 14:40:32 -07:00
Saran Tunyasuvunakool db3b49b60f Bump version number to 2.3.5.
PiperOrigin-RevId: 526918869
Change-Id: I9f19600b0c1b855ef0834e5c026b204bf1dc06c4
2023-04-25 03:52:12 -07:00
Saran Tunyasuvunakool 0630b7543d Bump version number to 2.3.4.
PiperOrigin-RevId: 525745444
Change-Id: I8a9994b72a0a2ba3f371bee2c2bea947ad8f4fd1
2023-04-20 07:52:46 -07:00
Alessio Quaglino 5f132af625 Add midphase and broadphase statistics to mjData.
PiperOrigin-RevId: 521387641
Change-Id: Id50f2549d119e364216491a23b107e04d9ebb5b6
2023-04-03 00:59:59 -07:00
Nimrod Gileadi 33a2ce73d4 Update MuJoCo version to 2.3.3.
PiperOrigin-RevId: 517931617
Change-Id: I7c9960290f1b6e5d5f68a54df617a580f23c57e9
2023-03-20 04:36:09 -07:00
Nimrod Gileadi 08027b4e43 Only use -Wgnu-empty-initializer on Clang and not GCC.
Broken by ee566eb880.

PiperOrigin-RevId: 517390165
Change-Id: Ibd8ec46647873050899cffe435e3f5c293279aae
2023-03-17 05:35:16 -07:00
Alessio Quaglino ee566eb880 Remove empty initializers to ensure MSVC compatibility.
Add -Wgnu-empty-initializer to Clang builds to catch this issue in the future. Initialising arrays with empty braces is not part of the C standard and fails on MSVC. This commit should catch the issue earlier by detecting it in Clang.

PiperOrigin-RevId: 517373961
Change-Id: I518006e84151e8d5b45a7fe00ba7675dfb031ca0
2023-03-17 04:02:24 -07:00
Kyle Bayes d3d789cf7d Convert mju_error and mju_warning to variadic functions, supporting printf-like arguments. The functions mju_error_i, mju_error_s, mju_warning_i, and mju_warning_s are now deprecated.
PiperOrigin-RevId: 515431052
Change-Id: I440de0cb417ce216b6d636a5d86dc9ef6cc1fc06
2023-03-09 13:51:27 -08:00
Saran Tunyasuvunakool 5e989d18c3 Enable compiler errors for implicit switch case fallthroughs.
Also unify warning options across Clang and GCC and fix minor issues that was surfaced by this.

PiperOrigin-RevId: 508619655
Change-Id: I59b777bf2dfea4422485670e2427c7d3f5cf6405
2023-02-10 03:49:00 -08:00
Alessio Quaglino dd632b7ccc Bump MuJoCo version to 2.3.2.
PiperOrigin-RevId: 507720557
Change-Id: I7a5b577094ac1a7f468a84c484f62f61dc6b409f
2023-02-07 02:35:17 -08:00
Copybara-Service 36836d8e42 Merge pull request #636 from traversaro:fixextglfw
PiperOrigin-RevId: 507618773
Change-Id: I74362535e9840c97b7c4c3fbff29e06bcdcaf41a
2023-02-06 16:50:54 -08:00
Silvio Traversaro ca70d8bfaf Pass glfw3 as PACKAGE_NAME in glfw's findorfetch invocations 2022-12-07 19:25:18 +01:00
Kyle Bayes 73fb61e3e2 Bump version number to 2.3.1.
PiperOrigin-RevId: 493076656
Change-Id: I48c7a45b503c4a7363ea1455a4a3788262d007f7
2022-12-05 12:13:55 -08:00
Alessio Quaglino c17375fa32 Stop profiling mju_halton in testspeed and bechmarks.
PiperOrigin-RevId: 490239351
Change-Id: Id73c101672e5b974f16b6b4da3aae757a657de15
2022-11-22 07:41:02 -08:00
Nimrod Gileadi 0514010928 Disable deprecated-builtins warnings in clang.
Since upgrading to Clang 15, abseil fails to build, because of abseil/abseil-cpp#1201.

PiperOrigin-RevId: 486190797
Change-Id: Ibaa1c03b8d21ae4a83c3825c8d56363aa2f89505
2022-11-04 11:35:49 -07:00
Saran Tunyasuvunakool 57b0b36699 Bump version number to 2.3.0.
PiperOrigin-RevId: 481823754
Change-Id: Ie8c2c65b11178952355830ef019fe2efdf774189
2022-10-17 22:36:59 -07:00
Saran Tunyasuvunakool c2f1381f31 Update dependency versions.
PiperOrigin-RevId: 479839325
Change-Id: I44f51ed9fd756cf8c3397489f045492cca0bf54a
2022-10-08 16:55:29 -07:00
Nicholas Nadeau f637dd76d5 build(makefile): added proper .PHONY target 2022-09-26 10:49:08 -04:00
Nicholas Nadeau 0ca12b3171 build(makefile): added proper .PHONY target 2022-09-26 10:48:38 -04:00
Saran Tunyasuvunakool 94b6ae2b69 Bump version number to 2.2.2.
PiperOrigin-RevId: 472513958
Change-Id: I42f321c6681fdd42c5f80368f612534aa885af74
2022-09-06 11:32:55 -07:00
Kevin Zakka ee6fed1230 Add minor enhancements to compile binary.
* If output file exists, ask user whether to overwrite
* Fix erroneous check for whether XML file was successfully saved

PiperOrigin-RevId: 468743682
Change-Id: I06058c498328d333792e4b40d65c3a99ca1842e4
2022-08-19 11:15:19 -07:00
Yuval Tassa b966a37855 Add optional azimuth and elevation to initial free camera.
- Add `azimuth` and `elevation` to `visual.global`.
- Add `mjv_defaultFreeCamera`.
- Use `mjv_defaultFreeCamera` in `simulate`.

PiperOrigin-RevId: 465505244
Change-Id: I61e60f14a990d4e2d220958adb75c325001978ee
2022-08-05 01:04:02 -07:00
Saran Tunyasuvunakool e40b9da181 Merge pull request #201 from aftersomemath:refactor-simulate
PiperOrigin-RevId: 465044152
Change-Id: I54e65a30764a444dbd175260314d685fd7ffa6a1
2022-08-03 15:32:15 +01:00
Saran Tunyasuvunakool 373cc894a8 Bump version number to 2.2.1.
PiperOrigin-RevId: 461471944
Change-Id: Ia752d992fabdc57b822bc30b01030c19162917ac
2022-07-17 09:50:31 -07:00
Levi Burner 655eec1d63 Link GLFW as a shared library by default
Use one option name to control building GLFW as static/shared since it
is not straightforward to set it seperately for the samples and simulate
2022-07-08 16:04:12 -04:00
Levi Burner 1d4461fce6 Simulate: Use new cmake system fix build errors introduced with rebase 2022-07-08 16:04:12 -04:00