Ask Your Question
2

How to use GMapping

asked 2013-06-18 15:54:45 -0500

Robocop87 gravatar image

updated 2016-10-24 09:03:32 -0500

ngrennan gravatar image

Hey everyone,

I'm honestly surprised I have not been able to find a similar question anywhere. I am just getting started with ROS and I would like to start using gmapping for SLAM.

The robot I am using has a kinect and publishes odometry data through a topic called /Odometry. I used depthimage_to_laserscan to convert the kinects native output to the laser scan that gmapping wants. I confirmed that this works using rviz.

My problem comes when it is time to use gmapping. I don't really know what I need to do or provide to make gmapping work. From reading the documentation (And I can't say I understand too much of it) it seems like this is all I need to do:

rosrun gmapping slam_gmapping scan:=scan

However when I run this nothing happens. And I can't say I would expect otherwise, because I have not told gmapping where it can find my odometry. The documentation also mentioned something about required transforms, but I don't have any, know how to make any, or how to provide them when I have them.

What I need, and I'm sure other people need as well, is some kind of beginners guide to using gmapping. If any of you guys can help me with my specific problem, that would be great, or if you could direct me to a tutorial I overlooked (not the logged data one) that would be even better.

More on my actual problem: When I run gmapping using the command I wrote above, rviz complains that there is no transform that links my laser scanner to the map and the terminal window where I ran gmapping just replays the message "Dropped 100% of messages so far"

Thanks in advance for your help!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2013-06-18 16:19:36 -0500

weiin gravatar image

To really understand how to use ROS for higher level functions, it is best to go through ALL the links in http://www.ros.org/wiki/ROS/Tutorials

I believe you have understood what gmapping requires correctly. What you are missing now is the tf, so the logical next step is to look into the tf tutorials (which is under "Tutorials for other libraries" in the main tutorials page). After that, you might want to further understand how to use the navigation stack.

A "shortcut" for learning how to use ROS for robots is to look for robots with good documentation, like turtlebot. Then go into the launch files to see how things are done.

edit flag offensive delete link more

Comments

Thanks for your answer weiin! I agree I need to read up on my transforms, which I am currently doing. I will also dig through the turtlebot code to see how they went about doing it, but I am still worried about the odometry data. I didn't see any way to pass that data...cheers to exploring!

Robocop87 gravatar image Robocop87  ( 2013-06-18 16:37:10 -0500 )edit
1

Odometry data is passed through the transform odom->base_link. That means only the pose information is passed. See also http://ros.org/reps/rep-0105.html

weiin gravatar image weiin  ( 2013-06-18 19:57:06 -0500 )edit
-1

answered 2019-02-13 08:48:02 -0500

Mohamed gravatar image

Hi,

Here is a complete tutorial on using the ros navigation stack. It has a tutorial one gmapping.

https://www.youtube.com/playlist?list...

I thought of sharing it here as it might be useful.

edit flag offensive delete link more

Comments

This is not an answer, but rather a comment as it does not provide an answer but is only a link. And, honestly, it comes of rather spammy because it's a link to your YouTube channel and you did the same thing to two other questions at the same time (#q296575 & #q274332).

jayess gravatar image jayess  ( 2019-02-13 18:08:17 -0500 )edit

The tutorials are not shared randomly (spammy) as you mentioned. They are shared where they are only relevant. Spammy means that they were shared randomly everywhere which is not the case. And there is nothing wrong with sharing the relevant answer which happens to be a tutorial on my channel.

Mohamed gravatar image Mohamed  ( 2019-02-13 20:54:43 -0500 )edit

Sorry, if this came off as harsh or insulting to you because it wasn't meant to be. What I meant was that it's more of an advertisement to your YouTube channel than an answer. Link-only answers are always discouraged.

spammy != random
jayess gravatar image jayess  ( 2019-02-13 21:02:23 -0500 )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

Stats

Asked: 2013-06-18 15:54:45 -0500

Seen: 4,059 times

Last updated: Feb 13 '19