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

Visualization marker line_list replaces by new line_list

asked 2020-03-07 18:50:52 -0500

ytosclee gravatar image

updated 2020-03-07 18:51:19 -0500

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);
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-03-08 06:30:39 -0500

gvdhoorn gravatar image
line_list.id = 0;

shouldn't you give each marker its own id?

edit flag offensive delete link more

Comments

Thanks! I update the ID and it is working.

ytosclee gravatar image ytosclee  ( 2020-03-08 09:42:50 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-03-07 18:50:52 -0500

Seen: 166 times

Last updated: Mar 07 '20