Overview • Prerequisites • Directory Structure • How To Launch • Testing
This project is a part of Udacity's Robotics Software Engineer Nanodegree Program. In this project, I used ROSbot as a mobile robot and aws-robomaker-small-house-world as a gazebo world to replicate realistic simulation. RTAB-Map (Real-Time Appearance-Based Mapping) is a popular solution for SLAM to develop robots that can map environments in 3D. RTAB-Map has good speed and memory management, and it provides custom developed tools for information analysis. Most importantly, the quality of the documentation on ROS Wiki (http://wiki.ros.org/rtabmap_ros) is very high. This project uses the rtabmap_ros package, which is a ROS wrapper (API) for interacting with RTAB-Map.
In this project:
- ROSbot is used to interface with rtabmap_ros package because it consits of all the essential sensors namely RGB-D camera and 2D laser scanner.
- using teleop node, ROSbot is moved around the room to generate a proper map of the environment.
- Gazebo >= 7.0
- ROS >= Kinetic
- ROS rtabmap-ros package
sudo apt-get install ros-${ROS_DISTRO}-rtabmap-ros
- make >= 4.1(mac, linux), 3.81(Windows)
- Linux: make is installed by default on most Linux distros
- Mac: install Xcode command line tools to get make
- Windows: Click here for installation instructions
- gcc/g++ >= 5.4
- Linux: gcc / g++ is installed by default on most Linux distros
- Mac: same deal as make - install Xcode command line tools
- Windows: recommend using MinGW
.Map-My-World # Map-My-World Project
├── catkin_ws # Catkin workspace
│ ├── src
│ │ ├── aws-robomaker-small-house-world # folder that contains small-house world
│ │ ├── images
│ │ ├── my_robot # my_robot package
│ │ │ ├── launch # launch folder for launch files
│ │ │ │ ├── mapping.launch
│ │ │ │ ├── robot_description.launch│ │ │ │ ├── world.launch # Launches bookstore world
│ │ │ │ ├── teleop.launch # To drive the rosbot
│ │ │ ├── meshes # meshes folder for sensors
│ │ │ │ ├── astra.stl
│ │ │ │ ├── box.stl
│ │ │ │ ├── rplidar.stl
│ │ │ │ ├── upper.stl
│ │ │ │ ├── wheel.stl
│ │ │ ├── realsense2_camera # folder that contains launch files for realsense camera
│ │ │ ├── realsense2_description # folder that contains description files for realsense camera
│ │ │ ├── urdf # urdf folder for xarco files
│ │ │ │ ├── materials.xacro #contains material properties used in rosbot
│ │ │ │ ├── my_robot.xacro
│ │ │ │ ├── rosbot.gazebo #contains plugins to interact with rosbot
│ │ │ ├── worlds # world folder for world files
│ │ │ │ ├── empty.world
│ │ │ ├── CMakeLists.txt # compiler instructions
│ │ │ ├── package.xml # package info
$ cd /home/workspace/catkin_ws/src/
$ git clone https://github.com/Vamshi2198/Map-My-World
$ source /opt/ros/${ROS_DISTRO}/setup.bash
Note : The world file proivided is empy because it only contains the url of remote repository, for this purpose you need to clone the aws-bookstore-world and place it inside your src folder. Also, delete the folder named aws-robomaker-bookstore-world manually before cloning.
$ cd /home/workspace/catkin_ws/src/Map-My-World/src/
$ git clone https://github.com/aws-robotics/aws-robomaker-small-house-world
Also, repeat the same with teleop_twist_keyboard packages. i.e, remove the empty file folder and clone the packages
$ cd /home/workspace/catkin_ws/src/Map-My-World/src/
$ git clone https://github.com/ros-teleop/teleop_twist_keyboard
$ cd /home/workspace/catkin_ws/
$ catkin_make
$ cd /home/workspace/catkin_ws/
$ source devel/setup.bash
$ roslaunch my_robot world.launch
$ cd /home/workspace/catkin_ws/
$ source devel/setup.bash
$ rosrun teleop_twist_keyboard teleop_twist_keyboard.py
$ cd /home/workspace/catkin_ws/
$ source devel/setup.bash
$ roslaunch my_robot mapping.launch
- Send move command via teleop package to control your robot and observe real-time visualization in the environment with
rtabmapviz
. - Once you satisfied, view rtabmap-databaseViewer with:
$ rtabmap-databaseViewer ~/.ros/rtabmap.db
- Remember to rename your ~/.ros/rtabmap.db before your next attempt since it will be deleted due to the launch file setting in mapping.launch. You can download my database here.
The code was tested on the following specifications:
- Processor:
Intel Core i7-10875H
- Graphics:
Nvidia GeForce GTX 1650 Ti 4GB GDDR6
- OS:
Ubuntu 20.04.3 LTS
- Kernal:
5.10.60.1-microsoft-standard-WSL2
- ROS:
noetic