0
$\begingroup$

Rosanswers logo

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?


Originally posted by AG1617 on ROS Answers with karma: 1 on 2013-07-23

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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/Marker#Message_Parameters).


Originally posted by atp with karma: 529 on 2014-04-08

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.