Skip to content

Add a way to replace collision meshes upon MJCF conversion - #310

Open
saikishor wants to merge 7 commits into
ros-controls:mainfrom
pal-robotics-forks:add/collision_replacement
Open

saikishor wants to merge 7 commits into
ros-controls:mainfrom
pal-robotics-forks:add/collision_replacement

Conversation

@saikishor

Copy link
Copy Markdown
Member

Description

This add a way to replace the collision defined for a link with a custom informaiton. For instance, remove meshes or primitive shapes and add capsules on mujoco end.

Adds a new replace_collision processed_inputs tag to the URDF→MJCF conversion tool, letting users fully replace a link's collision geometry with one or more user-authored MJCF primitives (capsules, boxes, etc.), including nested sub-bodies useful for swapping an expensive collision mesh

  <replace_collision link="forearm">                                                                                                                                                    
    <geom type="capsule" fromto="0 0 0 0 0 0.3" size="0.04"/>                                                                                                                           
    <geom type="capsule" fromto="0 0 0.3 0.1 0 0.3" size="0.03"/>                                                                                                                       
  </replace_collision> 

Is this user-facing behavior change?

NO

Did you use Generative AI?

Claude Sonnet/opus

@saikishor saikishor changed the title Add/collision replacement Add a way to replace collision meshes upon MJCF conversion Sep 16, 2026
@codecov-commenter

codecov-commenter commented Sep 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.08%. Comparing base (49a4155) to head (6006134).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #310      +/-   ##
==========================================
+ Coverage   82.68%   83.08%   +0.40%     
==========================================
  Files          35       35              
  Lines        5907     6047     +140     
  Branches      602      603       +1     
==========================================
+ Hits         4884     5024     +140     
  Misses        703      703              
  Partials      320      320              
Flag Coverage Δ
unittests 83.08% <100.00%> (+0.40%) ⬆️

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.87% <100.00%> (+0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants