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

How to set the dimensions of the initial pose array

asked 2011-04-16 21:37:34 -0500

The initial pose array is really much bigger than it needs to be. How do I change it's initial dimensions?

edit retag flag offensive close merge delete


I'm not totally sure what array you're referring to. Are you talking about the PoseWithCovarianceStamped message that's sent to AMCL? The ParticleCloud message published by AMCL? Or something else entirely?
eitan gravatar image eitan  ( 2011-04-17 06:17:54 -0500 )edit
There is an array of poses published to /particlecloud, I think by amcl.
JediHamster gravatar image JediHamster  ( 2011-04-17 06:48:27 -0500 )edit
Do you mean the number of particles (elements in the array) or just the overall spread of those particles, say, when visualized in rviz?
Eric Perko gravatar image Eric Perko  ( 2011-04-18 06:33:27 -0500 )edit
That's a good point actually, I guess you can change the dimensions of that array by changing the number of particles AMCL uses.
eitan gravatar image eitan  ( 2011-04-18 06:34:19 -0500 )edit
No I don't mean the number of particles, I mean the dimensions over which the particles are initially distributed.
JediHamster gravatar image JediHamster  ( 2011-04-18 07:05:29 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2011-04-18 06:00:16 -0500

eitan gravatar image

From looking at the code, AMCL sizes the pose array in the "particlecloud" message to be the size of the number of guesses it currently has for the robot's pose. There's no way to change its initial dimensions. If you just want the current pose of the robot displayed in rviz, you can enable TF frames and look at the "base_link" frame relative to the "map" frame. The "particlecloud" message, provides a visualization that helps give insight into the particle filter AMCL uses internally.

edit flag offensive delete link more

answered 2011-04-18 08:38:26 -0500

Eric Perko gravatar image

The dimensions of the initial particle cloud should be dependent on the covariance of the initial pose estimate. Rviz won't let you change that value, but you should be able to publish it manually and try out different values for the covariance matrix until you get the initial spread you want. For example code of publishing the initial pose estimate programmatically, se .

edit flag offensive delete link more


How are the 3x3 acceleration covariance values derived ?
JediHamster gravatar image JediHamster  ( 2011-04-18 10:25:06 -0500 )edit
Acceleration? Being a pose estimate, it contains covariance for position and orientation, not velocity or acceleration.
Eric Perko gravatar image Eric Perko  ( 2011-04-18 10:59:12 -0500 )edit

Question Tools


Asked: 2011-04-16 21:37:34 -0500

Seen: 1,701 times

Last updated: Apr 18 '11