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

Self Localisation?

asked 2017-03-16 02:53:43 -0500

MarkyMark2012 gravatar image

Hi,

I have AMCL working well - but setting the initial pose is annoying - is there a package that will set the likely pose of the robot based on is current samples of data relative to the map?

Thanks

Mark

edit retag flag offensive close merge delete

Comments

If I remember correctly, you can ask for a global localization using a service call, but I don't know if this is exactly what you want

Augusto Luis Ballardini gravatar image Augusto Luis Ballardini  ( 2017-03-16 16:29:58 -0500 )edit

What I want it to be able to fire the system up and for the robot to be able to place itself within the map with out my using riviz to set the "Initial Pose"

MarkyMark2012 gravatar image MarkyMark2012  ( 2017-03-17 02:33:17 -0500 )edit

ok, what about putting inside your launch file a publisher for the global localization service? look here http://answers.ros.org/question/11271...

Augusto Luis Ballardini gravatar image Augusto Luis Ballardini  ( 2017-03-17 05:49:11 -0500 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2017-03-22 05:17:57 -0500

Procópio gravatar image

updated 2017-03-24 11:24:20 -0500

you can pass the initial position as arguments when launching your node, as initial_pose_x and initial_pose_y.

EDIT: if you want AMCL to "guess" on its own the initial position, you can set the parameters update_min_d and update_min_a to negative values. By doing so, the filter will update at the frequency of your /scan topic, without the need to move. (bear in mind that this will greatly increase your cpu usage).

However, there is no guarantee the filter will converge to the correct solution instead of converging to a local minima. Taking you comment about the 4 rooms, if they all look very alike, there is no way AMCL can know in which one you are.

EDIT2: it is wise to also use the /global_localization service, as told by @augusto-luis-ballardini , as it will spread your filter particles throughout the map, instead of concentrating them in the initial position loaded by AMCL.

edit flag offensive delete link more

Comments

Hi,

Thanks for the reply - yep I know you can pass the parameters though. My requirement is - assume you have 4 rooms in a map. The robot needs to be able to start up without being told work out room it's in and navigate from there.

MarkyMark2012 gravatar image MarkyMark2012  ( 2017-03-22 05:38:47 -0500 )edit

ok, I will edit the answer with more details.

Procópio gravatar image Procópio  ( 2017-03-24 11:15:49 -0500 )edit

Is there any way to calculate the localisation score? I tried it with the size of /particlecloud topic which spreads the pose array, but this method doesn't work with all cases. Say even when the initial pose is given wrong or if the robot finds its own position and that is not correct.

Regardless of any of these, the pose array size decreases when it gets moved using a joystick. So what are the ways in which you qualify the self localisation done is right or wrong.

Goki gravatar image Goki  ( 2020-04-01 06:16:03 -0500 )edit

@Goki there is no way of doing this from inside AMCL. You need an external reference to assess your localization

Procópio gravatar image Procópio  ( 2020-04-06 05:01:28 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-03-16 02:53:43 -0500

Seen: 1,208 times

Last updated: Apr 01 '20