Ask Your Question
0

amcl laser localization

asked 2013-04-12 02:42:07 -0600

acp gravatar image

Hi

I have a question.

I have created a map using slam_gmapping package, then I save that map as map.yaml using rosrun map_server map_saver -f map.

Is it possible to use a laser and the map I have created with amcl for localization?

I appreciate your answer :)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-04-12 03:04:02 -0600

Ben_S gravatar image

Short answer: yes.

Longer answer: Yes, it is possible. Use the map_server to publish your saved map, start amcl and use rviz to estimate the inital pose. Then move your robot around and see, if the localization is working. :)

edit flag offensive delete link more

Comments

well, I do the following: I use rosrun map_server map_server map.yaml then in another console I use rosrun amcl amcl scan. Then the only topic I see in rviz under Pose is /move_base_simple/goal. I supposed to see amcl_pose topic under Pose, right?

acp gravatar imageacp ( 2013-04-12 03:15:24 -0600 )edit
1

According to the docs, amcl publishes the pose as geometry_msgs/PoseWithCovarianceStamped. But you can also add displays for the particlecloud (geometry_msgs/PoseArray) and tf. Through tf, amcl should publish the most likely transform between your map and odom.

Ben_S gravatar imageBen_S ( 2013-04-12 03:40:33 -0600 )edit

well, i have 2 issues, 1.-how i can set the initial pose 2--why my map gets rotated after I have published it and visualized in rviz?

acp gravatar imageacp ( 2013-04-12 04:07:39 -0600 )edit

1) In rviz you should have a "2d pose estimate" button. 2) Depending on your fixed frame, the visualized map can rotate if the best guess by amcl changes. Try setting the fixed frame to /map in rviz.

Ben_S gravatar imageBen_S ( 2013-04-12 04:14:16 -0600 )edit

Well, it seems to be as it everything is working, the only issue now is how to see the estimated poses produced by amcl in rviz? in other words, how can I see that amcl is working?

acp gravatar imageacp ( 2013-04-14 22:30:06 -0600 )edit

Add a display of type PoseArray to rviz, set the topic to /particlecloud and then drive around a little bit. You then should see all the pose-guesses of amcl as small arrows in rviz.

Ben_S gravatar imageBen_S ( 2013-04-14 23:25:20 -0600 )edit

Well, it seems to be as PoseAarray is working under rviz, however, from the beginning the amcl algorithm spreads particles even outside the map. Is that normal? or is there a way to fix it?

acp gravatar imageacp ( 2013-04-15 22:11:46 -0600 )edit

Since amcl publishes the pose as geometry_msgs/PoseWithCovarianceStamped, how can I see the poses with covariance under rviz?

acp gravatar imageacp ( 2013-04-15 22:12:49 -0600 )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: 2013-04-12 02:42:07 -0600

Seen: 1,334 times

Last updated: Apr 12 '13