Repository navigation
Conversation
…w everything as white Re-integrate patch from ros-visualization#752 Color tinting for mesh markers Signed-off-by: Xavier BROQUERE <[email protected]>
Signed-off-by: Xavier BROQUERE <[email protected]>
|
Hi Robert, Thanks for pointing me #893. Seems that this issue has a long story :) With rviz melodic release, only external image textures (like PR2 base) are displayed. When materials are fully defined inside collada file, the mesh is white. I also used garaemon/rviz_collada_marker for my tests and added moonwalk marker (that is not using external image files for materials). https://github.com/xbroquer/rviz_collada_marker The result of rviz melodic release (arrow and moonwalk are white): When mesh_use_embedded_materials=True, color is not dynamically updated Here is the result with my latest commit: Here the 2 videos that shows the dynamic color update: However, as you can see, the usage of passes changes the behavior when mesh_use_embedded_materials=True and a color is set. Do you think this behavior change is acceptable ? If not, I pushed another solution that does not use passes: |
Signed-off-by: Xavier BROQUERE <[email protected]>
|
Closing in favor of #1424. @xbroquer, could you please review the new PR? |






Description
Fix #1120 Visualization markers ignore color and show everything as white using #752 as base patch
Checklist
Rendering issues:
Attached broken rendering image:
Attached fixed rendering image:
Source code snippet for three cases:
// display marker not using mesh material in transparent blue
marker.color.r = 0;
marker.color.g = 0;
marker.color.b = 1;
marker.color.a = 0.3;
marker.scale.x = 1;
marker.scale.y = 1;
marker.scale.z = 1;
marker.type = visualization_msgs::Marker::MESH_RESOURCE;
marker.mesh_resource = "package://my_pkg/moonwalk.dae";
marker.mesh_use_embedded_materials=false;
// display marker using mesh material and tinted with transparent green
marker.scale.x = 1;
marker.scale.y = 1;
marker.scale.z = 1;
marker.color.r = 0;
marker.color.g = 1;
marker.color.b = 0;
marker.color.a = 0.5f;
marker.type = visualization_msgs::Marker::MESH_RESOURCE;
marker.mesh_resource = "package://my_pkg/moonwalk.dae";
marker.mesh_use_embedded_materials=true;
// display marker using mesh material and not tinted
marker.scale.x = 1;
marker.scale.y = 1;
marker.scale.z = 1;
marker.color.r = 0;
marker.color.g = 0;
marker.color.b = 0;
marker.color.a = 0;
marker.type = visualization_msgs::Marker::MESH_RESOURCE;
marker.mesh_resource = "package://my_pkg/moonwalk.dae";
marker.mesh_use_embedded_materials=true;