Move the collision geoms to geom group 3 - #22
Merged
Merged
Conversation
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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X43rjzmEQRBQHqbFhzEfXC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The URDF import leaves every collision geom in geom group 0. Group 0 is also the group of the scene's floor. A ray cast that looks for the terrain in group 0 therefore hits the robot too.
lite-motion-tracking's velocity task has such a ray cast. Its foot height scan casts 6 rays down from each sole and keeps the smallest height. When the swing foot passes the stance foot, a ray lands on the stance foot, and the scan reads the gap to its top face instead of the gap to the ground. The
foot_clearancereward and the critic'sfoot_heightobservation use this reading.urdf_to_mjcfnow moves every collision geom to group 3 (COLLISION_GROUP), as MuJoCo Menagerie and mjlab's G1 do. The geoms keep colliding. Viewers and mjlab's ray sensors see groups 0 to 2 by default, so they no longer see the collision geoms. The visual meshes stay in group 1.litelite_prolite_dummylite_bimanuallite_bipedlite_biped_debugImpact
uv lock --upgrade-package lite-description) to pick this up.Test plan
groupattribute of the 89 collision geoms is the only change. Every other element and attribute is identical.test_set_collision_group_moves_collision_geoms_onlycovers the post-process step.test_committed_mjcf_keeps_group_0_for_the_sceneloads every committed MJCF and requires each robot collision geom in group 3, and the floor of a*_scene.xmlin group 0. It failed on all 8 MJCFs before the regeneration.pytest: 1599 passed, 36 skipped.PYTHONPATH: all 26 tasks build, and the foot height scan reads 0.0% wrong.🤖 Generated with Claude Code
https://claude.ai/code/session_01X43rjzmEQRBQHqbFhzEfXC