Commit Graph

270 Commits

Author SHA1 Message Date
Saran Tunyasuvunakool 00576a3bf9 Update icons to match the new banner and add Windows version info.
Also update the README banner so that the background grid lines scale more reliably to different screen PPI.

PiperOrigin-RevId: 473598837
Change-Id: I43434b35333714922128f8fd625aa6eb62521a7f
2022-09-11 11:04:36 -07:00
Copybara-Service 39e34404dc Merge pull request #476 from rohanpsingh:patch-1
PiperOrigin-RevId: 473219692
Change-Id: Ia9f5fe0e8faab38873f41ee8280ffecbc47d43a4
2022-09-09 04:46:10 -07:00
Rohan P. Singh 63f39d797e Update models.rst
Fix broken links
2022-09-09 17:07:28 +09:00
Yuval Tassa d04e37e724 Add Models page to docs.
PiperOrigin-RevId: 472730287
Change-Id: Ie1e5fe3bb30a5fffce8bf73b37300d8d10afd579
2022-09-07 08:25:41 -07:00
Saran Tunyasuvunakool f55a9fccea Add a MuJoCo banner to the README.
PiperOrigin-RevId: 472721942
Change-Id: Ida552f8ffe6ead102d138586c3e280a543c97511
2022-09-07 07:43:26 -07:00
Saran Tunyasuvunakool 9b694103e6 Update dependencies in CMake.
PiperOrigin-RevId: 472698116
Change-Id: I0afc29468555339e0a2cac27977bd68246e483f3
2022-09-07 05:17:54 -07: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
Alessio Quaglino 3647584caa Fixed typo ntexdata -> ntextdata.
PiperOrigin-RevId: 472461694
Change-Id: Ia97ffd6aeb1ae2df9ab5e11aabba6e361a98152b
2022-09-06 08:18:05 -07:00
Nimrod Gileadi a693a2d981 Don't infer limited attributes automatically by default.
This is an amendment to 4bfc2c0311.

Add an autolimits compiler option. When true, *limited will be inferred from the presence of the *range attributes.
When false, models where limited is not specified, and range is will fail to compile.

PiperOrigin-RevId: 472438650
Change-Id: I489098e879ee695030f44e0d8cd969787e75fb90
2022-09-06 06:11:53 -07:00
Yuval Tassa 0784a46f62 Add safety check to mjui_event.
PiperOrigin-RevId: 471809554
Change-Id: I563cac24781a9da6f7aa8313c9ea0b15c7b30903
2022-09-02 08:38:26 -07:00
Copybara-Service df51a1de59 Merge pull request #467 from aftersomemath:fix-python-setup
PiperOrigin-RevId: 471640674
Change-Id: I588230c597bc49e7a6b5aedb2bd2602f8b538d90
2022-09-01 14:58:40 -07:00
Saran Tunyasuvunakool 4210d31cf0 Restore MJAPI declaration for mjd_transitionFD.
Commit e3a82247c2 removed MJAPI in mujoco.h but not in engine_derivative.h, causing a linking error when building on Windows with MSVC.

PiperOrigin-RevId: 471639915
Change-Id: I6b965e23a19faee6f9f8f9c0168dc2774b19f310
2022-09-01 14:55:15 -07:00
Levi Burner e0f6441a27 swap out cp call with shutil.copyfile closes #462 2022-09-01 16:50:46 -04:00
Yuval Tassa e3a82247c2 Add sensor matrices to mjd_transitionFD.
- Also add missing `mj_jacSubtreeCom` to Python bindings.

PiperOrigin-RevId: 471610181
Change-Id: I31410d194527ce6a7bdbd01e176f3a41efa52d84
2022-09-01 13:00:36 -07:00
Yuval Tassa 46da1285af Cartesian end-effector control using site transmission.
- Added `refsite` attribute to actuators with `site` transmission.
- Such actuators now have a well defined length and can be used for e.g., Cartesian end-effector control.
- Added example models and documentation describing the new feature.

PiperOrigin-RevId: 471561218
Change-Id: I538f09af9600d5c53992c4a9fed325648aab4fa3
2022-09-01 10:06:52 -07:00
Yuval Tassa 834e8dd506 Improvements to time synchronisation in simulate.
- Improved time-sync logic readability in `PhysicsLoop`.
- Fixed unattainable condition for breaking from stepping loop if data was reset.
- Added measurement of actual real-time tracking.
- Moved slowdown overlay to top left.
- Report slowdown as % of real-time, rather than fraction.
- Report actual slowdown if different than requested (very small timestep, PhysicsLoop cannot keep up) by more than 10%.
- Replaced slowdown increments of 2 with decimal-rounded increments of 10^(1/10). This is a finer-grained scale (approximately 3x as fine) and well suited for decimal percentage representation.
- Maximum slowdown increased to 1000.
- Added `Simulate.refreshrate` with a default of 60Hz, in case videomode refreshrate is 0 (can occur e.g. when forwarding over X11).
- Remove realtime reporting from regular info overlay.
- Various cleanups.

PiperOrigin-RevId: 471547481
Change-Id: Idd2514a4defb1dc431617f3a515cc747c4fd8971
2022-09-01 09:09:48 -07:00
Yuval Tassa 7839c1c42a Annotate simulate/glfw_dispatch.cc
PiperOrigin-RevId: 471256296
Change-Id: I63594a478fc65bf27d8f04f6bb25352a719c5ccc
2022-08-31 07:59:23 -07:00
Yuval Tassa fdbbc8bbe0 Allow in-place computation for mju_mulQuat and mju_mulQuatAxis
PiperOrigin-RevId: 471222168
Change-Id: If43210636cf20000b343ad1efd02836465380ebe
2022-08-31 04:09:08 -07:00
DeepMind 366e1c53d4 Clarify docs on MJCF format comparison to inline CSS.
PiperOrigin-RevId: 471009039
Change-Id: I79704fd7939daef50918e5093b092f144436a47d
2022-08-30 09:11:01 -07:00
Yuval Tassa eb65273fa1 Add test for rotational Jacobian formula used in weld constraints
PiperOrigin-RevId: 470947389
Change-Id: I39b9495e3e6d6cf8994e603d6eb69e3e5322e734
2022-08-30 03:42:55 -07:00
Nimrod Gileadi 6b6fff69ba Make URDF parser stricter about required attributes.
Following the spec at http://wiki.ros.org/urdf/XML

PiperOrigin-RevId: 470192022
Change-Id: I4699b6f87fff5706b3ba5f33bb8242bb2ad33478
2022-08-26 02:08:39 -07:00
Saran Tunyasuvunakool 9d9493153c Fix GCC "declaration of ... changes meaning" errors.
PiperOrigin-RevId: 470175500
Change-Id: If13a81f308f803d3cc4731b3d4d0561cfe56d5c8
2022-08-26 00:13:57 -07:00
Saran Tunyasuvunakool 3240596c3a Call GLFW functions via a dynamic dispatch table.
This allows us to use GLFW without needing to introduce a link-time dependency on the library, which in turn enables us to get GLFW through Python.

PiperOrigin-RevId: 470100999
Change-Id: I27c84ad3310afdbebd582ab0033b6a963ba6307e
2022-08-25 15:41:53 -07:00
Alessio Quaglino d26501c0f3 Add two new attributes to weld constraints:
- `anchor` determines the point of wrench application, in the frame of body2.
- `tfratio` scales applied torques relative to applied forces.
- Add visualisation of both anchor points to both weld and connect constraints.
- Add a test model showing how the new weld parameters behave.

PiperOrigin-RevId: 470021901
Change-Id: I3faba0e5dcab2e29ee81096f5ff71ff66d99758c
2022-08-25 10:22:15 -07:00
Kevin Zakka e2c3f04097 Improve error message for invalid keyframe values.
PiperOrigin-RevId: 470007035
Change-Id: I482aea255954b0ec811b7400226419836d8449e3
2022-08-25 09:23:21 -07:00
Yuval Tassa c7e36e9350 Fix typo.
PiperOrigin-RevId: 469880250
Change-Id: I4d7d61ced696bb5dcbaafc9c49188d8a61a20ae5
2022-08-24 19:04:32 -07:00
Kevin Zakka a90803d643 "exactmeshinertia" is now only saved if its value is different than default.
PiperOrigin-RevId: 469848032
Change-Id: I9abdeccbf764f5e4267753c0e2bfdd42b3bec723
2022-08-24 16:08:55 -07:00
Yuval Tassa 62b185bd52 Fix indentation in the changelog.
PiperOrigin-RevId: 469825941
Change-Id: Ica8a9561a58c33816633266e51bc85ef1b827974
2022-08-24 14:35:19 -07:00
Nimrod Gileadi 00fcd10b20 Don't use user input as a format string in mjCError.
PiperOrigin-RevId: 469686222
Change-Id: Icb05df04f11387847aa8d66dcf1b63da9c470b9f
2022-08-24 03:54:34 -07:00
Yuval Tassa 090fe2db3f Add a disable flag for sensors.
PiperOrigin-RevId: 469473066
Change-Id: I296ed790c6261c4fb15b349540edcb77e53e0567
2022-08-23 09:02:56 -07:00
Alessio Quaglino 83ce236479 Process meshes for computing the correct scaling even when they have flipped faces.
PiperOrigin-RevId: 469414367
Change-Id: Ia5c75b4f2c9fd592c81a1ec659720f9820c0dfbb
2022-08-23 03:29:40 -07:00
Alessio Quaglino abc0a39b7a Add two new attributes to weld constraints:
- `anchor` determines the point of wrench application, in the frame of body2.
- `tfratio` scales applied torques relative to applied forces.
- Add visualisation of both anchor points to both weld and connect constraints.
- Add a test model showing how the new weld parameters behave.

PiperOrigin-RevId: 469228149
Change-Id: I836b0791f10fb624607a12ef3c687da991c21789
2022-08-22 10:46:46 -07:00
Yuval Tassa 558aaf2923 Tighter bound for triggering invalid condim in mj_collideGeoms.
PiperOrigin-RevId: 469210244
Change-Id: I349de59aac7ba1bc80df322f667fa9afc87d4b1f
2022-08-22 09:50:42 -07:00
Alessio Quaglino 8ca5887c20 Add two new attributes to weld constraints:
- `anchor` determines the point of wrench application, in the frame of body2.
- `tfratio` scales applied torques relative to applied forces.
- Add visualisation of both anchor points to both weld and connect constraints.
- Add a test model showing how the new weld parameters behave.

PiperOrigin-RevId: 469190483
Change-Id: I20f6da85b09cd2c4c0b5d29eb8003eabb524e55e
2022-08-22 08:19:22 -07:00
Yuval Tassa f16a6e513d Remove unused ranges in a test model.
PiperOrigin-RevId: 469168585
Change-Id: I50ac9af0e00743f538fe6d42b5c1ac292f4b6e37
2022-08-22 06:31:17 -07:00
Kevin Zakka 0b2f19bbe7 Fix "actrange" parsing for "intvelocity" actuators.
PiperOrigin-RevId: 468759706
Change-Id: I1d9eeb723d28cccb64a6112b103345fcf451700f
2022-08-19 12:22: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 7b7cf0c27a Add mjd_transitionFD to Python bindings.
PiperOrigin-RevId: 468731887
Change-Id: I2152e10bc0f50a6c6a6b6832b1e7ef7c413976f7
2022-08-19 10:27:40 -07:00
Yuval Tassa ae0ac86ec3 Add catenary visualisation to string-like tendons.
https://youtu.be/I2q7D0Vda-A

PiperOrigin-RevId: 468687422
Change-Id: I84f34e149cf098346a77a51f265113d8fa4f2525
2022-08-19 06:25:07 -07:00
Saran Tunyasuvunakool 7bd686cd87 Change signature of TryCompile so that *m isn't strewn across the function.
PiperOrigin-RevId: 468685571
Change-Id: I61e5b0cff29a0b1fc1a88bc088dc73f48b95c800
2022-08-19 06:12:07 -07:00
Kevin Zakka d466e390fc Add new simulate to CI.
PiperOrigin-RevId: 468670988
Change-Id: I2c6c7ac4763402f2a3e8df734746477e54a8ed8e
2022-08-19 04:17:10 -07:00
Yuval Tassa 833dc74074 Add support for excluded contacts in adhesion actuators.
- Update example model.
- Update video.

PiperOrigin-RevId: 468464196
Change-Id: I603c5a89c2d5a736de127440e6d542beffc12583
2022-08-18 08:28:11 -07:00
Kevin Zakka 4bfc2c0311 Automatically infer *limited field from *range field for joints, tendons and actuators.
PiperOrigin-RevId: 467980594
Change-Id: If635c55a90cf949796b99a41395a6c2c4f7ea094
2022-08-16 11:35:34 -07:00
Yuval Tassa 29535a8eca Fix typos.
PiperOrigin-RevId: 467656092
Change-Id: If908b58129c975a042c920ca2242f320876e4f54
2022-08-15 06:38:20 -07:00
Yuval Tassa 670b6136f9 Geoms of selected bodies respect transparency setting.
PiperOrigin-RevId: 467505247
Change-Id: I6864118e28d9c98aa1f8002583c2faeb011659ee
2022-08-14 04:34:38 -07:00
Yuval Tassa ed1ca199a7 Add weld constraint to test/testdata/model.xml
PiperOrigin-RevId: 467187914
Change-Id: I87c4788d069ad7a9fbbd1fe38276c38f56e974e0
2022-08-12 05:28:08 -07:00
Nimrod Gileadi 5dd7bf8613 Verify that body_parentid and similar properties always go up the kinematic chain.
PiperOrigin-RevId: 467063831
Change-Id: I591c6a6f78178e9c2196cc94d7e622eba93d8191
2022-08-11 15:27:10 -07:00
Yuval Tassa c8ff7b3d34 Remove distance constraints.
- `distance` constraints were not very useful and increased the contact buffer within the constraint solver, violating a core design principle. Therefore they have been removed.
- The enum value `mjEQ_DISTANCE` is retained, but errors will be thrown in the parser and engine if these constraints are selected.

PiperOrigin-RevId: 467050101
Change-Id: Ie72a07e4fe338eea5107004a9fc0f5e47eb0c3b7
2022-08-11 14:31:11 -07:00
Copybara-Service 396fdf00c3 Merge pull request #425 from aftersomemath:cull-face-flag
PiperOrigin-RevId: 466904386
Change-Id: Icd5515c2bbb8f8f3417501ea43c8e5ae22b32f91
2022-08-11 02:44:37 -07:00
Nimrod Gileadi 01c297cddd Validate that fields like mjModel.body_jntnum don't contain negative values.
PiperOrigin-RevId: 466733848
Change-Id: I0b1f41fa8841c678307f2185aac4c46a2fd40396
2022-08-10 10:57:36 -07:00