a std_msgs/ColorRGBA message
hello everyone
i am just a beginner with ROS system. i am trying to writing a publisher node, which send a colorRGBA message to the subscriber about the topic "visualization_kit".
but it's unable to display the color,here are my codes
int main(int argc, char **argv)
{
ros::init(argc, argv, "talker");
ros::NodeHandle n;
ros::Publisher chatter_pub = n.advertise<std_msgs::ColorRGBA>("chatter", 1000);
while(ros::ok())
{
std_msgs::ColorRGBA color;
color.r = 255;
color.g = 0;
color.b = 0;
color.a = 1;
//draw.colors.push_back(color)
ROS_INFO("%s","visualisation_kit");
chatter_pub.publish(color);
ros::spinOnce();
}
return 0;
}
thanks for your help.