Yuval Tassa
769f37b653
Implement sleeping in engine
...
PiperOrigin-RevId: 829361787
Change-Id: I6f64d8e25c4248cf32c18cd94d37ff5def78946e
2025-11-07 03:33:07 -08:00
Alessio Quaglino
3a7aa84e53
Add quadratic stiffness to flex.
...
PiperOrigin-RevId: 827409919
Change-Id: I3dff8ea49fb1726fec4acf5b91138d6d52c4bfba
2025-11-03 03:01:38 -08:00
Haroon Qureshi
66a1c22cae
Label all bodies, not just selected bodies, when mjLABEL_BODY is set.
...
An earlier refactor incorrectly assumed that only selected bodies needed
labels.
PiperOrigin-RevId: 818568645
Change-Id: I7aea07c5342673dd589e1891d0db1f2b0c489fe4
2025-10-13 02:54:34 -07:00
Haroon Qureshi
abe88202d0
Remove redundant flags argument.
...
PiperOrigin-RevId: 817115667
Change-Id: I4e5096206d7c24f5861e1bb9e8049149803dceeb
2025-10-09 04:07:43 -07:00
Haroon Qureshi
8e4932170a
Remove unused params.
...
PiperOrigin-RevId: 816654011
Change-Id: Ib26bc90dcda167e8acf1feaa3b015acb5aa7aceb
2025-10-08 05:05:59 -07:00
Haroon Qureshi
e7e331b11e
Update sensor decor elements to be of type mjOBJ_SENSOR.
...
PiperOrigin-RevId: 816640568
Change-Id: I838608c0482ec1ee499fe9598ddb33aa6c5331e9
2025-10-08 04:17:40 -07:00
Haroon Qureshi
7b9f6a5cc1
Invert early-out checks to reduce nesting.
...
PiperOrigin-RevId: 816606107
Change-Id: I325d3f4695cdeb189694088d8a81b198d65f96ea
2025-10-08 02:21:14 -07:00
Haroon Qureshi
a849fedcd2
Separate mjv_addGeoms into separate functions for each category.
...
PiperOrigin-RevId: 815607891
Change-Id: I16b29061c7e2229146bd0e0152721bca40fa4fd1
2025-10-06 01:30:26 -07:00
Haroon Qureshi
24679b47e4
Separate out site and geom frame construction.
...
PiperOrigin-RevId: 814677737
Change-Id: I623f9d1e23ac6b3076a577e97911f7ec73492f52
2025-10-03 06:56:53 -07:00
Haroon Qureshi
493d73062c
Misc cleanup to addFrameGeoms.
...
PiperOrigin-RevId: 814582959
Change-Id: I2546bf1c13334628d379ad24737de095085e1b1f
2025-10-03 01:14:32 -07:00
Haroon Qureshi
6ed2ceaa83
Add non-decorative elements before decorative elements.
...
PiperOrigin-RevId: 814165875
Change-Id: Iab09e2fe1fa129b0c19760c969b5639e690a95d9
2025-10-02 03:59:06 -07:00
Yuval Tassa
edbdb5195c
Change MuJoCo engine source code function-spacing convention from 3 blank lines to 2
...
PiperOrigin-RevId: 813754244
Change-Id: I6836e41c3b021cb727e922c25c60f629b9814c93
2025-10-01 07:58:17 -07:00
Haroon Qureshi
b1ae44d10f
Refactor duplicated frame drawing logic into a utility function.
...
PiperOrigin-RevId: 813675737
Change-Id: I7f9094852f26b2ddc08534bf87cf2f71476d99ec
2025-10-01 03:36:14 -07:00
Haroon Qureshi
f9d0bedb44
Minor cleanup: Move geom-related functions together.
...
PiperOrigin-RevId: 813661319
Change-Id: I6cdf74ff57f39f932ddd39268f15f1128ddf1df4
2025-10-01 02:46:45 -07:00
Haroon Qureshi
328a4ab293
Merge geomsExhausted into acquireGeom.
...
PiperOrigin-RevId: 813347956
Change-Id: I07bd566388383cc5c49e675f5b85fffb379ef6d1
2025-09-30 11:19:53 -07:00
Haroon Qureshi
59d0676dcc
Remove redundant checks for exhausted geoms.
...
PiperOrigin-RevId: 813284297
Change-Id: I565c517bef782ba07ff323e206b75f6f905e5809
2025-09-30 08:44:17 -07:00
Haroon Qureshi
70d03adc71
Store the status of the scene in the scene itself.
...
PiperOrigin-RevId: 813119377
Change-Id: Iebff9e7796ca9809ea22902522982bfd96eeba06
2025-09-30 00:06:00 -07:00
Yuval Tassa
fe8384b6c5
Visualize joint and tendon limits by re-coloring.
...
PiperOrigin-RevId: 811590674
Change-Id: I5b65f2294a4bcda3c321fb51ebf29501bd0d416d
2025-09-25 19:02:26 -07:00
Haroon Qureshi
0baac58999
Remove redundant ngeoms check.
...
PiperOrigin-RevId: 810787607
Change-Id: I5d04b1d7f5f8ad758960a46ff08cc47d2887e851
2025-09-24 02:21:35 -07:00
Yuval Tassa
33b09e0822
Stop using stack allocation for catenary drawing
...
PiperOrigin-RevId: 810434095
Change-Id: Iee8c01ff721c2af216c5725fc9eaf6267b2e5284
2025-09-23 07:37:34 -07:00
Haroon Qureshi
09e6723dab
Remove unnecessary stack mark/free in engine_vis_visualize.c
...
PiperOrigin-RevId: 810391913
Change-Id: Id02f4dadba7ef08f60bb7726470082f45c5761c5
2025-09-23 04:53:50 -07:00
Haroon Qureshi
7fc6b29afd
Replace PREPARE_NEXT_GEOM and FINISH_GEOM macros with functions.
...
PiperOrigin-RevId: 809940866
Change-Id: I1d45eede9ddf8606e7fd2a8caa2ed0224b0e24a7
2025-09-22 03:21:13 -07:00
Haroon Qureshi
d9da8e2570
Replace RETURN_IF_GEOMS_EXHAUSTED macro with inlined code.
...
PiperOrigin-RevId: 809919921
Change-Id: Icf2afbd4168ebb18577b5915afa9d457001259d6
2025-09-22 02:03:19 -07:00
Haroon Qureshi
d7500e0dec
Split START macro into two parts: one for control flow and one for assignment.
...
PiperOrigin-RevId: 808497167
Change-Id: I4d78426af69d98f57600cb7fd76edaf5b20b0039
2025-09-18 03:23:12 -07:00
Yuval Tassa
7eab0117f7
Don't smooth tracking camera motion
...
PiperOrigin-RevId: 808110613
Change-Id: Ib8631e5ace6db7c7bb780f26b79a72e26e72f451
2025-09-17 05:25:17 -07:00
Yuval Tassa
52da7586dc
Clean up includes in src/engine
...
PiperOrigin-RevId: 807726978
Change-Id: I02800deb79bfb3c328d941861ded9d817e8f6e32
2025-09-16 09:36:44 -07:00
Haroon Qureshi
ad5f07e060
Extract functions from mjv_updateCamera for calculating frames and frustums.
...
PiperOrigin-RevId: 805770746
Change-Id: Id2a6022a2ee2e8b1a783debf54b470a9df81051a
2025-09-11 04:10:59 -07:00
Haroon Qureshi
017e7d5a73
Add light ids.
...
PiperOrigin-RevId: 805755907
Change-Id: I92a1b1ea4ce1495c2746fd518f33ab2d1ad81399
2025-09-11 03:20:44 -07:00
Yuval Tassa
b9900db00e
Extract memory allocation functions and core utilities
...
PiperOrigin-RevId: 801745499
Change-Id: Iaf05c3430769d3115743d8ab020d13148cb2eb59
2025-09-01 03:38:25 -07:00
Yuval Tassa
7c10a62f21
Improve island visualization colors and logic.
...
- Make island visualization off by default
- Give it the keyboard shortcut 'N'
- Use HSV island coloring
PiperOrigin-RevId: 796375514
Change-Id: I3cc8d6f8142412c771b2b8e57e82e70000727770
2025-08-18 05:03:41 -07:00
Alessio Quaglino
7baaa39846
Add SDF geom to test/testdata/model.xml.
...
Also, when a mesh has both an octree and a bvh, render only the octree.
PiperOrigin-RevId: 790680831
Change-Id: Iaf3896933f6728af4db1eaa83ff5b06558ab0d19
2025-08-04 03:53:51 -07:00
Alessio Quaglino
100b1a06fd
Decrease opacity of taxels with zero value.
...
This prevents the taxels from being occluded by the convex hull for meshes that do not provide face connectivity.
PiperOrigin-RevId: 790420616
Change-Id: I543fd7b52e4625d921b6b5b5b77b4720020df42a
2025-08-03 08:36:39 -07:00
Alessio Quaglino
80befd64ae
Do not cull mjGEOM_TRIANGLE.
...
PiperOrigin-RevId: 789723631
Change-Id: I8a5aaa78a9fe63458c07b823c7550846c14413b1
2025-08-01 05:28:30 -07:00
Alessio Quaglino
51babec9c5
Move tactile sensor to the engine.
...
PiperOrigin-RevId: 788863133
Change-Id: I3172ebb7641fa8146469da25cba7db794760e7b1
2025-07-30 05:27:44 -07:00
Copybara-Service
6416e548aa
Merge pull request #2348 from jjyyxx:patch-3
...
PiperOrigin-RevId: 785518837
Change-Id: I2bbdcb6aea0ff3edfa354389ef758c2d34b93f68
2025-07-21 11:49:39 -07:00
Yuval Tassa
5e666635f6
Remove mjtVisFlag.mjVIS_FLEXBVH and mjvOption.oct_depth
...
PiperOrigin-RevId: 783355711
Change-Id: I1e11999d5c533925f1d07266aeca95598a5691ba
2025-07-15 09:08:22 -07:00
Alessio Quaglino
4ea778f2d3
Add octree support to MJX API.
...
Also, enable the touch sensor to use the octree SDF.
PiperOrigin-RevId: 783313462
Change-Id: I0032c2a7164f4770aa10a3612db3fd70bea954db
2025-07-15 06:44:43 -07:00
Alessio Quaglino
5c1f1f9dba
Add octree to meshes of SDF geoms.
...
PiperOrigin-RevId: 777634862
Change-Id: I3210c2f8d73fd30ceecb0a11abd1d82e086b3d5d
2025-06-30 10:50:15 -07:00
Google DeepMind
9b2b7cf92a
Set light intensity to 0 by default (not 1000).
...
PiperOrigin-RevId: 764257692
Change-Id: If656095e3f8d4b4d9c97fa67bdad508a49095eb3
2025-05-28 07:47:28 -07:00
Google DeepMind
568620dd2f
Add texture attribute to lights.
...
PiperOrigin-RevId: 763739805
Change-Id: I333ed2ac68f30f79f688ca01d7b5fd6bf2d836c9
2025-05-27 05:04:01 -07:00
Google DeepMind
74cc904edc
Convert light directional boolean into a type enum.
...
PiperOrigin-RevId: 761983728
Change-Id: Id5bf93c103e5358d9c5cd9f1176532a978e0b3a8
2025-05-22 08:51:18 -07:00
Google DeepMind
fa95fe0c59
Add intensity and range parameters to lights.
...
PiperOrigin-RevId: 758603199
Change-Id: I74e88bdfeedd9224e84d953f237d68eca79e6cb7
2025-05-14 03:28:03 -07:00
Yuval Tassa
ecb769fc3a
Refactor islands to be memory contiguous.
...
PiperOrigin-RevId: 755803476
Change-Id: I41972b07e0d5ef5d0117c94f565b93367b87458b
2025-05-07 05:06:27 -07:00
Alessio Quaglino
7651cb1b33
Copy texture coordinates from OBJ into flex. Fixes #2464 .
...
PiperOrigin-RevId: 732109960
Change-Id: I506b3540ab5d489ce8f10d0c473919611ccb654a
2025-02-28 06:04:19 -08:00
Alessio Quaglino
7cdf180641
Introduce trilinear flex parametrization.
...
These flexes use only 24 DOFs (3 per vertex of the bounding box), while colliding with the full high resolution mesh.
On an 8x8x8 cube, the performance using DOFs at all vertices is
```
Simulation time : 18.74 s
Steps per second : 533
Realtime factor : 0.53 x
Time per step : 1874.4 µs
Contacts per step : 114.88
Constraints per step : 3322.51
Degrees of freedom : 1536
```
With the new implementation, it is the following:
```
Simulation time : 1.82 s
Steps per second : 5507
Realtime factor : 5.51 x
Time per step : 181.6 µs
Contacts per step : 38.84
Constraints per step : 155.36
Degrees of freedom : 24
```
PiperOrigin-RevId: 721008829
Change-Id: I833df027527db578d86667cc4b24295bcf6f7d22
2025-01-29 09:38:22 -08:00
Yuxuan Jiang
5fa6b43539
Fix contact frame inconsistency in visualization with mjContact.frame
2025-01-10 20:45:46 +08:00
Saran Tunyasuvunakool
357ea024c0
Remove unconditional mj_markStack in mjv_addGeoms.
...
Prior to commit 3f855f32d9 , calling `mjv_updateScene` and `mjv_updateSceneFromState` on an "empty" `mjData` (one without a buffer but where all sizes are also zero) was a valid operation. The `mj_markStack` call requires free stack space, so a call to `mjv_addGeoms` on an empty `mjData` results in a stack overflow whenever `mjVIS_TENDON` is enabled.
Fixes #2305 .
PiperOrigin-RevId: 713418586
Change-Id: I99b5de23fe94ba9aa86eeef0700c891976c9aecc
2025-01-08 14:32:44 -08:00
Yuval Tassa
94230a8bee
Fix bad indent.
...
PiperOrigin-RevId: 712267512
Change-Id: I3463b0f53b808b726ff0fe5ea46ec8d30164eac4
2025-01-05 09:12:50 -08:00
Yuval Tassa
3f855f32d9
Fix stack allocation leak in mjv_addGeoms()
...
PiperOrigin-RevId: 708356387
Change-Id: If3d227028ea8f809390911b578878d985d9d7b1a
2024-12-20 10:11:18 -08:00
Yuval Tassa
b26d6f0466
Disable tendon catenary visualization when tendon is actuated. Add note about catenary visualization.
...
PiperOrigin-RevId: 706161179
Change-Id: Ifaf571e039306309869078d1a0bcf9a69f1fe9de
2024-12-14 01:54:40 -08:00