std_msgs/ColorRGBA[].displaying different color for each point
Hello sir,
I am trying to display different color for each point. I am able to display points with single color using:
draw.color.b = 1.0;
draw.color.a = 1.0;
but in am unable to display points with different colors. my lines of code is:
for(int i =0;i<=5;i++)
{
geometry_msgs::Point p;
std_msgs::ColorRGBA c;
p.x =i;
p.y = 1;
p.z = 1;
c.r = 1;
c.g = 1;
c.b=1;
draw.points.push_back(p);
draw.colors.push_back(c);
}
marker_pub.publish(draw);
thanks for the help.