SLAM using gmapping with TurtleBot robot and Gazbo

In this tutorial, we do some SLAM with TurtleBot robot.

1.Before anything, you have to install all packages for gazebo and gmapping and TurtleBot:

2.Launch gazebo and TurtleBot

3. Call the gmapper to read laser scan and build the map:

Only for indigo:

if you got and error, you need to do some hacky stuff and following changes some

comment this line:

and add the following line:

so at the end, your file should look like this:

4.Call the rviz so you can see the map:

5.Move your robot via keyboard or joystick controller:

 

or

or

To make your joystick controller works, you have to hold the “axis_deadman” button. This has been specified in the corresponding launch file. For instance for xbox360 controller edit

you can see, in this file, it has been assigned to 4

 

To see which button on your controller has been assigned to “axis_deadman”, run

and press all buttons one by one until you see which button is 4″

now you have to keep pressing that button for sending a command from your controller. You can watch the state of each button by listening to the /joy topic:

Now start adding objects into gazebo scene and start exploring the environment, you should see the map:

 

0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
trackback

[…] to learn how to move the robot with your joystick controller please follow my other tutorial on that here […]

1
0
Would love your thoughts, please comment.x
()
x