ashwath-karthikeyan / ros-slam-gazebo

Programming and control of Turtlebot3 waffle to perform SLAM in a prebuilt map in gazebo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Performing SLAM on Turtlebot3 in Gazebo

Initialize environment

First, go into the root directory and run catkin_make. This creates a catkin workspace to start working in.

To test if environment works, while in the same directory, run the following in the terminal

source devel/setup.bash
export TURTLEBOT3_MODEL=waffle
roslaunch turtlebot3_gazebo turtlebot3_house.launch

Find the map files

If the gazebo world is visible, the next step is to find the map files. In src/, find the global path of the file house.yaml. You will have to reference this path in the next step.

Open the navigation visualization

Now that the turtlebot3 gazebo environment is running, open a new terminal in the root directory and run the following lines of code.

source devel/setup.bash
export TURTLEBOT3_MODEL=waffle
roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=[Your Path Goes Here]

Run navigation code

Finally, we can run the navigation stack. Go to src/ and run python3 turtlebot3.py. You could also change the goal position in line 49 and 50 as you like (as long as it is within the range and is not coinciding with an obstacle).

About

Programming and control of Turtlebot3 waffle to perform SLAM in a prebuilt map in gazebo


Languages

Language:CMake 57.7%Language:Python 42.3%