Skip to content

feat: add RViz multi-material compatibility tool - #93

Open
Yang-Ci wants to merge 1 commit into
Seeed-Projects:mainfrom
Yang-Ci:add-rviz-compat-tool
Open

Yang-Ci wants to merge 1 commit into
Seeed-Projects:mainfrom
Yang-Ci:add-rviz-compat-tool

Conversation

@Yang-Ci

@Yang-Ci Yang-Ci commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Rebot_Arm_description/tools/rviz_urdf_compat.py for ROS 2 Jazzy RViz multi-material rendering compatibility
  • Update both English and Chinese READMEs with tool usage instructions

Problem

ROS 2 Jazzy's RViz renderer can assign a link's first material to all visuals within that link. Links with multiple differently-colored meshes therefore lose their per-part colors when loaded directly.

Solution

The compatibility script:

  • Moves extra visuals into zero-offset fixed child links so each mesh keeps its own material
  • Preserves original mesh poses, materials, and collision definitions
  • Lightens RS black materials for RViz/Ogre display without altering the source URDF or Web/MuJoCo colors
  • Writes converted output to stdout; never modifies the source URDF

Documentation

Both READMEs now cover:

  • Command-line preview usage
  • Python ROS 2 launch integration with Command and ParameterValue
  • MoveIt integration via SourceFileLoader
  • Installation guidance for ROS packages

Testing

  • Verified the script runs successfully on both RS/urdf/ReBot_Arm_RS.urdf and DM/urdf/ReBot_Arm_DM.urdf
  • Confirmed RS black material color overrides are applied
  • Confirmed DM URDF parses and only receives the multi-visual split

ROS 2 Jazzy's RViz renderer can assign one link's first material to all
visuals in that link. Add tools/rviz_urdf_compat.py to move additional
visuals into zero-offset fixed child links so each mesh keeps its own
material. The script also lightens RS black materials for RViz display
and writes the converted URDF to stdout without modifying the source.

Document CLI, ROS 2 launch, and MoveIt usage in both READMEs.
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.

1 participant