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

amcl basic localization

asked 2013-06-26 05:42:28 -0600

acp gravatar image

Dear all.

I am having problems to localize the robot using the topics from amcl

amcl_pose (geometry_msgs/PoseWithCovarianceStamped)

tf (tf/tfMessage)

Can anyone advise me how to do it.

In advance thank you

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
3

answered 2013-06-27 01:15:13 -0600

ZdenekM gravatar image

You don't need to deal directly with TF topic... Just define point (geometry_msgs/PoseStamped, with x/y/z equal to zero) in robot coordinate system (frame_id="/base_link") and transform it to map coordinate system ("/map"). Then you will get robot position/orientation in map. If you don't know how to transform point, please read some TF tutorials.

edit flag offensive delete link more

Comments

Hi, thank you for your answer :) it looks good :), Actually I got the position from amcl_pose topic but I will try the way you suggest. Cheers

acp gravatar image acp  ( 2013-06-27 02:08:17 -0600 )edit

Yeah, it's much better to use described TF-based method because it doesn't depend on some specific topic. It will work also with different localization code which provides transformation between map and robot (like gmapping etc).

ZdenekM gravatar image ZdenekM  ( 2013-06-27 02:12:16 -0600 )edit

Yea, thats right, I have implemented as you suggested :) thanx :)

acp gravatar image acp  ( 2013-06-27 02:34:26 -0600 )edit

Ok... Please mark my answer as correct. Thanks.

ZdenekM gravatar image ZdenekM  ( 2013-06-27 02:35:33 -0600 )edit

I believe this is the correct answer.

Gazer gravatar image Gazer  ( 2013-06-28 12:03:35 -0600 )edit
0

answered 2013-12-16 14:25:10 -0600

FuerteNewbie gravatar image

Do you mind to share how do you do by using tf to get the amcl_pose?

edit flag offensive delete link more

Comments

Did you check TF tutorials? What is not clear?

ZdenekM gravatar image ZdenekM  ( 2013-12-16 19:18:39 -0600 )edit

Btw, next time please post a new question as a new question and not as an answer :) Thanks!

ZdenekM gravatar image ZdenekM  ( 2013-12-16 19:19:25 -0600 )edit
0

answered 2013-06-26 13:27:15 -0600

Gav gravatar image

The wiki page for AMCL gives a good start: http://www.ros.org/wiki/amcl

You'll need to provide: - 'scan', your laser scan - 'tf' - transform topic which amongst other things should show the relationship between the robot base and laser. And also the robot odometry. - 'map' - the topic to query to get the map. Use the map server to load a map you've saved already.

If those topics are in place, you should be able to get started by just typing: rosrun amcl amcl in a console.

edit flag offensive delete link more

Comments

Hi, thank you for your answer, I am running already amcl with the navigation stack, I need to use either amcl_pose or tf topics to get the actual position of the robot in my code.

acp gravatar image acp  ( 2013-06-26 20:56:37 -0600 )edit

Question Tools

Stats

Asked: 2013-06-26 05:42:28 -0600

Seen: 1,853 times

Last updated: Dec 16 '13