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

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

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



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

Anas Alhashimi gravatar image Anas Alhashimi  ( 2014-09-29 03:46:57 -0500 )edit

Hi @bvbdort do you know how to increase the size and spread of amcl particles, I am not being able to trigger the plan module for my Ackermann truck and I believe it is due the fact of particles size. I have already changed the parameters but the size seems to keep the same: AMCL Small particles don't allow Planning

Vini71 gravatar image Vini71  ( 2023-05-19 21:49:15 -0500 )edit

Question Tools

1 follower


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

Seen: 2,044 times

Last updated: Sep 27 '14