From a9940044b930e778ea7da315fee18dae7453471f Mon Sep 17 00:00:00 2001 From: "-T.K.-" Date: Thu, 1 Oct 2026 22:55:24 -0700 Subject: [PATCH] Move the collision geoms to geom group 3 The URDF import leaves every collision geom in group 0, the group of the scene's floor. A ray cast that looks for the terrain in group 0, such as the foot height scan of lite-motion-tracking's velocity task, therefore hits the robot too: the rays under the swing foot land on the other foot. urdf_to_mjcf now moves every collision geom to group 3, as MuJoCo Menagerie and mjlab's G1 do. The geoms keep colliding, but viewers and mjlab's ray sensors, which see groups 0 to 2 by default, no longer see them. The visual meshes stay in group 1. All six MJCFs are regenerated. The group attribute of the 89 collision geoms is the only change. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01X43rjzmEQRBQHqbFhzEfXC --- lite_description/robots/lite/mjcf/lite.xml | 34 ++++++------ .../lite_bimanual/mjcf/lite_bimanual.xml | 22 ++++---- .../robots/lite_biped/mjcf/lite_biped.xml | 52 +++++++++---------- .../mjcf/lite_biped_debug.xml | 12 ++--- .../robots/lite_dummy/mjcf/lite_dummy.xml | 24 ++++----- .../robots/lite_pro/mjcf/lite_pro.xml | 34 ++++++------ lite_description/workflow/urdf_to_mjcf.py | 30 +++++++++-- tests/test_urdf_to_mjcf.py | 47 ++++++++++++++++- 8 files changed, 162 insertions(+), 93 deletions(-) diff --git a/lite_description/robots/lite/mjcf/lite.xml b/lite_description/robots/lite/mjcf/lite.xml index ea7ce56..2bb07cb 100644 --- a/lite_description/robots/lite/mjcf/lite.xml +++ b/lite_description/robots/lite/mjcf/lite.xml @@ -80,7 +80,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -98,7 +98,7 @@ - + @@ -111,8 +111,8 @@ - - + + @@ -128,7 +128,7 @@ - + @@ -137,7 +137,7 @@ - + @@ -150,8 +150,8 @@ - - + + @@ -163,7 +163,7 @@ - + @@ -176,7 +176,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -194,7 +194,7 @@ - + @@ -314,7 +314,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -332,7 +332,7 @@ - + @@ -452,7 +452,7 @@ - + diff --git a/lite_description/robots/lite_bimanual/mjcf/lite_bimanual.xml b/lite_description/robots/lite_bimanual/mjcf/lite_bimanual.xml index a72e9dc..35de2f1 100644 --- a/lite_description/robots/lite_bimanual/mjcf/lite_bimanual.xml +++ b/lite_description/robots/lite_bimanual/mjcf/lite_bimanual.xml @@ -23,9 +23,9 @@ - - - + + + @@ -38,7 +38,7 @@ - + @@ -47,7 +47,7 @@ - + @@ -56,8 +56,8 @@ - - + + @@ -80,7 +80,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -98,8 +98,8 @@ - - + + diff --git a/lite_description/robots/lite_biped/mjcf/lite_biped.xml b/lite_description/robots/lite_biped/mjcf/lite_biped.xml index 79b6a5e..f013653 100644 --- a/lite_description/robots/lite_biped/mjcf/lite_biped.xml +++ b/lite_description/robots/lite_biped/mjcf/lite_biped.xml @@ -34,7 +34,7 @@ - + @@ -43,7 +43,7 @@ - + @@ -56,17 +56,17 @@ - - - - - - - - - - - + + + + + + + + + + + @@ -82,7 +82,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -104,17 +104,17 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/lite_description/robots/lite_biped_debug/mjcf/lite_biped_debug.xml b/lite_description/robots/lite_biped_debug/mjcf/lite_biped_debug.xml index 2d027f8..b36dfd6 100644 --- a/lite_description/robots/lite_biped_debug/mjcf/lite_biped_debug.xml +++ b/lite_description/robots/lite_biped_debug/mjcf/lite_biped_debug.xml @@ -34,7 +34,7 @@ - + @@ -43,7 +43,7 @@ - + @@ -56,7 +56,7 @@ - + @@ -72,7 +72,7 @@ - + @@ -81,7 +81,7 @@ - + @@ -94,7 +94,7 @@ - + diff --git a/lite_description/robots/lite_dummy/mjcf/lite_dummy.xml b/lite_description/robots/lite_dummy/mjcf/lite_dummy.xml index a1b2b3d..5315cc9 100644 --- a/lite_description/robots/lite_dummy/mjcf/lite_dummy.xml +++ b/lite_description/robots/lite_dummy/mjcf/lite_dummy.xml @@ -26,9 +26,9 @@ - - - + + + @@ -41,7 +41,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -59,8 +59,8 @@ - - + + @@ -83,7 +83,7 @@ - + @@ -92,7 +92,7 @@ - + @@ -101,8 +101,8 @@ - - + + @@ -125,7 +125,7 @@ - + diff --git a/lite_description/robots/lite_pro/mjcf/lite_pro.xml b/lite_description/robots/lite_pro/mjcf/lite_pro.xml index a7ba5d7..d83da67 100644 --- a/lite_description/robots/lite_pro/mjcf/lite_pro.xml +++ b/lite_description/robots/lite_pro/mjcf/lite_pro.xml @@ -82,7 +82,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -100,7 +100,7 @@ - + @@ -113,8 +113,8 @@ - - + + @@ -130,7 +130,7 @@ - + @@ -139,7 +139,7 @@ - + @@ -152,8 +152,8 @@ - - + + @@ -173,7 +173,7 @@ - + @@ -186,7 +186,7 @@ - + @@ -195,7 +195,7 @@ - + @@ -204,7 +204,7 @@ - + @@ -324,7 +324,7 @@ - + @@ -333,7 +333,7 @@ - + @@ -342,7 +342,7 @@ - + @@ -462,7 +462,7 @@ - + diff --git a/lite_description/workflow/urdf_to_mjcf.py b/lite_description/workflow/urdf_to_mjcf.py index 2292c94..2c0b9fa 100644 --- a/lite_description/workflow/urdf_to_mjcf.py +++ b/lite_description/workflow/urdf_to_mjcf.py @@ -4,9 +4,10 @@ URDF + meshes -> MuJoCo compile -> post-process -> mjcf/.xml -Post-processing replaces cylinder geoms with capsules, injects the ``