To install the necessary packages, run the following commands:
sudo apt-get install ros-kinetic-joy ros-kinetic-teleop-twist-joy \
ros-kinetic-teleop-twist-keyboard ros-kinetic-laser-proc \
ros-kinetic-rgbd-launch ros-kinetic-depthimage-to-laserscan \
ros-kinetic-rosserial-arduino ros-kinetic-rosserial-python \
ros-kinetic-rosserial-server ros-kinetic-rosserial-client \
ros-kinetic-rosserial-msgs ros-kinetic-amcl ros-kinetic-map-server \
ros-kinetic-move-base ros-kinetic-urdf ros-kinetic-xacro \
ros-kinetic-compressed-image-transport ros-kinetic-rqt* \
ros-kinetic-gmapping ros-kinetic-navigation ros-kinetic-interactive-markersAdditionally, install the following packages:
sudo apt-get install ros-kinetic-dynamixel-sdk
sudo apt-get install ros-kinetic-turtlebot3-msgs
sudo apt-get install ros-kinetic-turtlebot3Open a terminal and navigate to your Catkin workspace's src directory, then clone the required repositories:
cd ~/catkin_ws/src
git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3.git
git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations
cd .. && catkin_makeSet the TurtleBot model and launch the Gazebo simulation:
export TURTLEBOT3_MODEL=burger
roslaunch turtlebot3_gazebo turtlebot3_world.launchLaunch the SLAM algorithm using Gmapping:
roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmappingNow, move around to create a map and save it using the following command:
rosrun map_server map_saver -f ~/mapTo control the robot, run:
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launchTo start the navigation process and load the saved map, use:
roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:='/home/muh/map.yaml'After launching, select the 2D Pose button from the top bar to set the robot's location. You can then move the robot around using the 2D Nav Goal feature.
