Visualization marker line_list replaces by new line_list
Hi, I setup visualalization marker line list to displace calculated trajectories. The problem is that the new line list will replace the existing one. I would like to show both the old and new trajectories at the same time and have the old one to disappear in 3 seconds. I can do it with sphere. But when I come to the line_list, I cannot. Would you please help? Thanks!
// setup the visualization marker
visualization_msgs::Marker line_list;
line_list.header.frame_id="/camera_link";
line_list.header.stamp = ros::Time::now();
line_list.ns="lines";
line_list.action = visualization_msgs::Marker::ADD;
line_list.pose.orientation.w = 1.0;
line_list.id = 0;
line_list.type= visualization_msgs::Marker::LINE_LIST;
line_list.scale.x = 0.01;
line_list.color.g = 1.0f;
line_list.color.a = 1.0f;
line_list.lifetime = ros::Duration(3);