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

Add markers to markerarray in c++

asked 2012-05-30 00:14:02 -0600

Fredje gravatar image

Hi all, I am trying to add markers to a markerarray but i am unable to find the line of code that has to be used for this. Ot is probably pretty simple but I am inexperienced with c++ and ros.

Thank you in advance

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-05-30 01:18:09 -0600

dornhege gravatar image

MarkerArray ma; ma.markers.push_back(mark)

edit flag offensive delete link more



what is the difference in insert and push_back

MarkerArray ma;

MarkerArray mark;

ma.markers.insert(ma.makers.end(), mark.makers.begin(), mark.markers.end());


ma.markers.push_back(mark); gravatar image  ( 2020-04-22 02:12:05 -0600 )edit

I usually work in python, but it might be that push_back can be in loop easier than your insert line, or that push_back is faster. Could also be neither

Hazel-rah gravatar image Hazel-rah  ( 2023-06-08 15:08:18 -0600 )edit

answered 2012-05-30 21:30:49 -0600

Fredje gravatar image

Thank you very much, that works.

edit flag offensive delete link more


This is not where you comment actually.

kk2105 gravatar image kk2105  ( 2020-09-06 05:55:32 -0600 )edit

Question Tools


Asked: 2012-05-30 00:14:02 -0600

Seen: 6,997 times

Last updated: May 30 '12