Ask Your Question
1

The size of particlecloud in PoseArray Message

asked 2014-09-27 14:22:47 -0500

Hi, I wrote a node that subscribes to amcl particlecloud. I would like to write a callback function that process all the Pose array elements. How can i get the size of the particlecloud or specifically the number of poses in the PoseArray Message?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-09-27 14:57:31 -0500

bvbdort gravatar image

geometry_msgs::PoseArray has pose vector type each element represent a particle in case of amcl particlecloud.

geometry_msgs::PoseArray poseArray;
int size = poseArray.pose.size();
edit flag offensive delete link more

Comments

Thanks it works for me like that: int size = poseArray.poses.size();

Anas Alhashimi gravatar imageAnas Alhashimi ( 2014-09-29 03:46:57 -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

Stats

Asked: 2014-09-27 14:22:47 -0500

Seen: 1,078 times

Last updated: Sep 27 '14