Simulation of a differential drive robot which can perform autonomous navigation.
- Clone this repository.
- Run
catkin_make
. - Run
source slam_ws/devel/setup.bash
.
- Run
roslaunch slamBot_gazebo slamBot_test_world.launch
to launch the world in gazebo - In a separate terminal run
roslaunch slamBot_navigation slamBot_slam.launch slam_methods:=gmapping
to start building the map. This also launches rviz. - In a separate terminal run
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
to start the teleoperation of the robot - Move the robot around steadly to generate a map.
- In a separate terminal run
rosrun map_server map_saver -f /tmp/test_map
to save the map in a yaml file.
- Launch the gazebo world by running
roslaunch slamBot_gazebo slamBot_test_world.launch
- In a separate terminal run
roslaunch slamBot_navigation slamBot_navigation.launch map_file:=/tmp/test_map.yaml
, to start navigation in the map - In rviz, estimate initial pose by
2D Pose Estimate
- In a separate terminal run
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
to start the teleoperation of the robot. You'll see that the estimate of robot's pose will coverge pretty quickly.
This work was done taking reference from here