ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Judging from your earlier question, you are using a visualization_msgs::Marker message with the type POINTS, looking at the message definition, you can see that there is two ways of specifying the color, which are: Marker.color and Marker.colors. The latter is a vector that has to be of the same length as the number of points. Putting the colors into that vector will allow you to set different colors for different points. If you use Marker.color (like you seem to do in the code you posted before), you will indeed also change the color of the previous points.