Commit Graph

46 Commits

Author SHA1 Message Date
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
Levi Burner 65d5ade426 Refactor simulate to split UI from application
Fix name of glew library

Move simulate to new directory and refactor to use C++ conventions

Wrap simulate in mujoco namespace

fix namespaces, convert struct to class, use std::lock_guard

use GetMutex to better handle destruction ordering

rename mjSimulate to Simulate

nit: space before public and typo

move startup print

use nullptr instead of NULL

use GetInstance() to get simulate object

convert init to default constructor
2022-07-08 16:04:07 -04:00
Yuval Tassa 09a5efc09e Add control values to keyframes.
- Add basic test for keyframes.
- Add missing documentation for keyframe mocap positions and quaternions.

PiperOrigin-RevId: 459021649
Change-Id: I91cf7ecbddc6262e8c72a868eeb82d627f389fb3
2022-07-05 01:07:37 -07:00
Alessio Quaglino 2d0995b47c Add visualisation groups to skins.
PiperOrigin-RevId: 458441645
Change-Id: I14324e8efda5142b2718a5cc9215228c7556dbf7
2022-07-01 04:57:34 -07:00
Saran Tunyasuvunakool 37fe45d41e Change macOS bundle structure.
This allows us to sign and notarize the bundle with mujoco.tbd in place, which is required for AppleClang to be able to build against the embedded framework.

PiperOrigin-RevId: 455952502
Change-Id: I366f1c17e7a6c06d956467ced6f16f3c37aebf6a
2022-06-19 14:13:23 -07:00
Levi Burner b9534c4e76 Lower cmake version to 3.16 to support Ubuntu 20.04 2022-05-24 00:23:02 -04:00
Saran Tunyasuvunakool 7eb4ab3a8f Fix documentation typos and CMake framework setup for macOS.
The previous commit missed out some recent changes in the internal repo. This commit brings the public GitHub repo in sync.

PiperOrigin-RevId: 450377010
Change-Id: I59a68ae4a39c5cd5ed5f7df77ba870273243d623
2022-05-23 14:06:12 +01:00
DeepMind 64bc6d27b2 Add implicit integrator.
Added analytic derivatives of smooth (unconstrained) dynamics forces, with respect to velocities:
  - Centripetal and Coriolis forces computed by the Recursive Newton-Euler algorithm.
  - Damping and fluid-drag passive forces.
  - Actuation forces.

A new implicit-in-velocity integrator is implemented using the analytic derivatives. This integrator lies between the Euler and Runge Kutta integrators in terms of both stability and computational cost.

PiperOrigin-RevId: 450377010
Change-Id: Ie192b441876c22e732fb749333926f296e0a09cc
2022-05-23 01:22:15 -07:00
Saran Tunyasuvunakool 1913a02b40 Initial open sourcing of MuJoCo.
PiperOrigin-RevId: 450374687
Change-Id: Ie3225a46ce095fc28ae8e63c326a640261f562bb
2022-05-23 01:08:49 -07:00
Saran Tunyasuvunakool 87539dbd24 Version 2.1.5: Fix GLAD loading on Linux, experimental multi-CCD.
PiperOrigin-RevId: 441482552
Change-Id: I16b7ba81cd81ca2293a9a12bfa08a40ab24c70bb
2022-04-13 16:22:26 +01:00
Saran Tunyasuvunakool 0d5d1f5ff2 Add -Wl,-no-as-needed to Linux Makefile.
GCC's linker drops dependency on libGL because neither MuJoCo, GLFW, nor the sample applications themselves explicitly depend on OpenGL symbols.

PiperOrigin-RevId: 439372170
Change-Id: I122d1d9658484e901f422d35395ad5929c7a9021
2022-04-04 19:43:58 +01:00
Saran Tunyasuvunakool 90dea1bdfb Version 2.1.4: Switch to GLAD, minor improvements to simulate.
PiperOrigin-RevId: 439277749
Change-Id: I741d1c499ae88753338fcc6d141a65e92e13023e
2022-04-04 13:53:21 +01:00
Saran Tunyasuvunakool 3c71720d83 Revert commit d627374545.
This commit requires a new binary build, and therefore breaks compatibility with version 2.1.3.

Fixes #217.

Change-Id: I1e08b6fd2c468e3845e2166a1e4cc9d265de64de
2022-03-31 11:54:51 +01:00
Yuval Tassa e3e98ac2c6 Minor changes to simulate:
- Rename "set key", "reset to key" to "save key" and "load key", respectively.
- Change bindings of F6 and F7 from the not very useful "vertical sync" and "busy wait" to the more useful cycling of frames and labels (as in Domain Explorer).

PiperOrigin-RevId: 438017260
Change-Id: I6d67e99f785f2777e131c591188f554722af7f49
2022-03-29 16:18:19 +01:00
Yuval Tassa d627374545 Add contact frame visualisation.
This is useful when writing or modifying collision functions, when the actual direction of the x and y axes of a contact can be important.

PiperOrigin-RevId: 437256700
Change-Id: I5eab737fc98018399e151552778c6109088bf614
2022-03-29 13:08:05 +01:00
Yuval Tassa 21338e6178 Fix bug in simulate where pressing '[' or ']' when a model is not loaded will causes a crash.
PiperOrigin-RevId: 436791755
Change-Id: I0bfec45eecef4bbb8db8f47f0d1e8a0276399b8f
2022-03-23 22:42:07 +00:00
Nimrod Gileadi df048e54c0 Update MuJoCo to version 2.1.3.
PiperOrigin-RevId: 436727767
Change-Id: I9b1b0084021e83f790efa46eab9a980cbde4953f
2022-03-23 16:57:26 +00:00
Yuval Tassa ed775c8f04 Improvements to simulate:
- Add '[' and ']' to cycle through fixed cameras.
- Remove options to step backwards or step 100 steps forwards or back.
- Add missing elements from built-in help.
- Reorder help strings.

PiperOrigin-RevId: 436497103
Change-Id: I9f910ea328c859239b46c9d7a47e4ee16a43f1ad
2022-03-23 16:57:26 +00:00
Saran Tunyasuvunakool 3577e2cf8b Version 2.1.2: Python bindings, OBJ assets support, bugfixes.
PiperOrigin-RevId: 434731612
Change-Id: I0cfda3e7a3d1c72036764986efc252ffa1b8c6b0
2022-03-15 14:04:44 +00:00
Yuval Tassa 1ef7ec6dde Documentation improvements for 2.1.1.
- Fix typos and broken links.
- Add documentation for functions introduced in 2.1.1.
- Add copyright header to `FLV.m` and remove `hello.c`.
- Update documentation for `mj_ray` and `mj_contactForce`.
- Delete out-of-date comments in `XMLreference.rst`.
- Add geom:size table to `XMLreference.rst`.

PiperOrigin-RevId: 425318966
2022-01-31 19:19:19 +00:00
Saran Tunyasuvunakool ee39340ae7 Remove inappropriate executable bits and minor reformat of code and changelog.
PiperOrigin-RevId: 416854656
Change-Id: I554d2c5667282567a129d79d91d8f2e97146d6f5
2021-12-16 20:58:26 +00:00
Saran Tunyasuvunakool a499b38120 Version 2.1.1: Binaries for ARM64, proper macOS bundles, minor bugfixes.
Closes #2
Closes #42
Closes #59

PiperOrigin-RevId: 416794598
Change-Id: I1306df1127d6acecf2323873c0da0910f35d31a0
2021-12-16 14:40:33 +00:00
Saran Tunyasuvunakool 4bf5630558 Move a number of files ahead of 2.1.1 launch.
This commit explicitly moves files around without modifying any content
so that Git can track them correctly.

Change-Id: I087d6d61d4e2d82ce06ad9ac0adf7327db94dd9c
2021-12-16 14:35:55 +00:00
Saran Tunyasuvunakool 1f7eaae62e Version 2.1: documentation, public API headers, and sample programs.
PiperOrigin-RevId: 403900419
2021-10-18 12:35:33 +01:00