Skip to content

Deploy RTAB-Map on a simulated mobile robot to create 2D and 3D maps of the environment in which it is operating.

License

Notifications You must be signed in to change notification settings

Vamshi2198/Map-My-World

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation



Deploy RTAB-Map on ROSbot to create 2D and 3D maps of aws simulated small house world!

OverviewPrerequisitesDirectory StructureHow To LaunchTesting

Overview

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.

Prerequisites

  • Gazebo >= 7.0
  • ROS >= Kinetic
  • ROS rtabmap-ros package
sudo apt-get install ros-${ROS_DISTRO}-rtabmap-ros

Directory Structure

.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

How To Launch

Clone the project in catkin_ws/src/ and source the environment

$ 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

Build the Map-My-World project

$ cd /home/workspace/catkin_ws/ 
$ catkin_make

After building the package, source your workspace

$ cd /home/workspace/catkin_ws/
$ source devel/setup.bash

Launch my_robot in Gazebo

$ roslaunch my_robot world.launch

Launch teleop node in new terminal

$ cd /home/workspace/catkin_ws/
$ source devel/setup.bash
$ rosrun teleop_twist_keyboard teleop_twist_keyboard.py

Launch rtabmap node in new terminal

$ cd /home/workspace/catkin_ws/
$ source devel/setup.bash
$ roslaunch my_robot mapping.launch

Testing

  • 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

About

Deploy RTAB-Map on a simulated mobile robot to create 2D and 3D maps of the environment in which it is operating.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published