Ask Your Question

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.stamp = ros::Time::now();
            line_list.action = visualization_msgs::Marker::ADD;
            line_list.pose.orientation.w = 1.0;
   = 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

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

gvdhoorn gravatar image = 0;

shouldn't you give each marker its own id?

edit flag offensive delete link more


Thanks! I update the ID and it is working.

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


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

Seen: 71 times

Last updated: Mar 07 '20