Ask Your Question
0

Get gmapping robot pose estimation

asked 2012-09-26 04:12:53 -0600

Antonio gravatar image

I'm using gmapping with laser and odometry to perform SLAM. How can I visualize in rviz the estimated robot path? And how can I get the x and y values for each pose?

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2012-09-26 22:19:26 -0600

Gmapping does not publish the pose of the robot as a pose per se (within a topic), but as a transform from 'map' to 'odom'.

In order to get the pose of the robot in the map that is built you have to get the current odometry of the robot (read your odometry topic) and then ask for the transform of that odometry (that is in 'odom' frame) to the 'map' frame. The result will be a pose in 'map' frame (the coordiantes of the robot in the map)

Then, in order to visualize the robot path through the map being built you have to create a node that asks periodically for that transform, store it in some place, and publish all the stored points as a path in a given topic (you decide the name).

Key point here is to understand the difference between 'tf transform' and 'topic'. Gmapping publishes a topic named '/map' which contains the current map, but it also publishes the tf transform 'map' (to 'odom').

edit flag offensive delete link more

Comments

shouldn't the actual pose of the robot be from map to base_link?

kaiyu gravatar imagekaiyu ( 2017-01-22 11:54:45 -0600 )edit

There is another potential problem. Getting the path in the way you described may suffer from loop closure or other adjustment of the map, which makes previously obtained poses invalid. Do you know a way to get the gmapping's current estimate of the trajectory?

kaiyu gravatar imagekaiyu ( 2017-01-26 15:15:37 -0600 )edit

Sorry but I do not understand so much, do you know how I can get a pose with covariance stamped from gmapping???

roberto3 gravatar imageroberto3 ( 2018-02-20 03:10:44 -0600 )edit
1

answered 2012-09-26 07:21:17 -0600

dejanpan gravatar image

Do you mean the robot pose? You can use the RobotModel display type and see where it is and for the other you could visualize the TF display type. base_link frame is where the base of your robot should be (with the map frame being the world frame).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2012-09-26 04:12:53 -0600

Seen: 2,395 times

Last updated: Sep 26 '12