Ask Your Question
0

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

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

AG1617 gravatar image

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

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
1

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

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 http://wiki.ros.org/rviz/DisplayTypes... ).

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

Stats

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

Seen: 1,746 times

Last updated: Apr 08 '14