ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to find the number of Markers in a Marker Array?

asked 2013-07-23 06:37:44 -0600

AG1617 gravatar image

updated 2014-04-20 14:09:30 -0600

ngrennan gravatar image

Hi Everyone,

I'm trying to write a simple program that extracts the heights from all the markers in a MarkerArray message. However, I am having a lot of trouble doing this.

This is how I get the cartesian information: msg->markers[i].pose.position.z

I read somewhere that this might work, but so far no luck: msg->markers.size()

Any ideas?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-04-08 15:44:56 -0600

atp gravatar image

msg->markers.size() gives you the number of markers contained in the message.

To find or set the height, have a look at the scale fields of the marker message (see also ).

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2013-07-23 06:37:44 -0600

Seen: 2,737 times

Last updated: Apr 08 '14