Fix #1120 Visualization markers ignore color and show everything as white #1388
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.
Description
Fix #1120 Visualization markers ignore color and show everything as white using #752 as base patch
Checklist
Rendering issues:
Attached broken rendering image:![issue](https://user-images.githubusercontent.com/3864052/61529611-146fec00-aa22-11e9-97e7-cb102980d9cf.png)
Attached fixed rendering image:![mesh_marker_fixed](https://user-images.githubusercontent.com/3864052/61529616-189c0980-aa22-11e9-836c-044432cec9ec.png)
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;