Skip to content

visual-only mesh fallback + visual/collision group split, refactors make_mjcf_from_robot_description.py to reuse the new logic - #265

Open
saikishor wants to merge 4 commits into
use/collision_tags/select_collision_meshesfrom
use/collision_tags/visual_only_groups
Open

visual-only mesh fallback + visual/collision group split, refactors make_mjcf_from_robot_description.py to reuse the new logic#265
saikishor wants to merge 4 commits into
use/collision_tags/select_collision_meshesfrom
use/collision_tags/visual_only_groups

Conversation

@saikishor

Copy link
Copy Markdown
Member

Description

Second in the series splitting up #209 (see that PR for full context).

Builds on top of #264 by giving visual and collision geoms their own distinct roles instead of sharing one code path:

  • Visual geometry is now purely for rendering (visual class). Visual meshes are kept as plain references — .stl/.obj untouched, only .dae converted (MuJoCo can't load DAE) — and are placed
    under assets/visual/. They are never decomposed, and the URDF material colour is carried over as the geom's rgba.
  • Collision geometry drives physics (collision class). Collision primitives (box/sphere/cylinder/capsule) are used as-is; collision meshes are used as a single whole-mesh collision unless the link
    is explicitly listed in a decompose_mesh input, in which case they're convex-decomposed with obj2mjcf under assets/decomposed/. Decomposition is therefore opt-in per link rather than automatic.
  • A mesh shared by a visual and a collision tag is converted once and reused for both.
  • make_mjcf_from_robot_description.py was refactored to reuse this shared logic instead of duplicating it.

@saikishor
saikishor requested a review from ndunkelb-nasa August 6, 2026 12:50
@saikishor saikishor changed the title Use/collision tags/visual only groups visual-only mesh fallback + visual/collision group split, refactors make_mjcf_from_robot_description.py to reuse the new logic Aug 6, 2026
@codecov-commenter

codecov-commenter commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.62%. Comparing base (5e8920c) to head (113151f).

Additional details and impacted files
@@                              Coverage Diff                               @@
##           use/collision_tags/select_collision_meshes     #265      +/-   ##
==============================================================================
+ Coverage                                       81.39%   81.62%   +0.22%     
==============================================================================
  Files                                              30       30              
  Lines                                            5203     5267      +64     
  Branches                                          559      558       -1     
==============================================================================
+ Hits                                             4235     4299      +64     
  Misses                                            674      674              
  Partials                                          294      294              
Flag Coverage Δ
unittests 81.62% <100.00%> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...co_ros2_control/tests/test_urdf_to_mujoco_utils.py 99.83% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scastro-nasa
scastro-nasa force-pushed the use/collision_tags/visual_only_groups branch from 27d7947 to 113151f Compare August 31, 2026 13:15

@scastro-nasa scastro-nasa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok it is this branch that then causes some of our visual meshes to disappear... digging into it now.

EDIT: Also, the decomposed meshes do not show up at all in this branch?

Image

@scastro-nasa

Copy link
Copy Markdown
Collaborator

@saikishor I put my changes up in #298

Just to check though, you do have upstack changes that prevent the visual and collision meshes from both being processed redundantly, right? That's #268 ?

@saikishor

Copy link
Copy Markdown
Member Author

@saikishor I put my changes up in #298

Just to check though, you do have upstack changes that prevent the visual and collision meshes from both being processed redundantly, right? That's #268 ?

Yess exactly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants