This project demonstrates how to implement SLAM (Simultaneous Localization and Mapping) using the Gmapping algorithm on a two-wheel robot with two caster wheels.
This repository contains the necessary code and instructions to build and run a two-wheel robot equipped, and Sick 2D LiDAR with SLAM capabilities using the Gmapping algorithm. The robot uses two main wheels for movement and two caster wheels for balance.
- Implementation of SLAM using the Gmapping algorithm.
- mapping capabilities.
- Real-time visualization using RViz.
- ROS (Robot Operating System) Noetic
- Catkin workspace
- Ubuntu 20.04
mkdir -p catkin_ws/src
cd catkin_ws/src
git clone https://github.com/SAJIB3489/sick_robot.git
cd ~/catkin_ws
rosdep install --from-paths src --ignore-src -r -y
source /opt/ros/noetic/setup.bash
source ~/catkin_ws/devel/setup.bash
catkin_make
Launch gazebo simulation
roslaunch sick_robot_description gazebo.launch
Launch RViz Open a new Terminal.
roslaunch sick_robot_description display.launch
Start Gmapping Open a new Terminal.
roslaunch sick_robot_description mapping.launch
Drive the robot using keyboard Open a new Terminal.
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
If you do not have the package install it using sudo apt-get install ros-$ROS_DISTRO-teleop-twist-keyboard
To save the map
rosrun map_server map_saver -f robot_map
If you face any problem, feel free to create an issue or send an email to me. Thank you.