Skip to content

Creating a 2D occupancy grid and 3D octomap from a simulated environment using a robot with the RTAB-Map package

License

Notifications You must be signed in to change notification settings

aaryapatel007/slam_rtab_ros

Repository files navigation

slam_rtab_ros

Overview

In this project I created a 2D occupancy grid and 3D octomap from a simulated environment using my own robot with the RTAB-Map package.
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.
For this project I will be using the rtabmap_ros package, which is a ROS wrapper (API) for interacting with RTAB-Map.

pic pic pic pic pic

Prerequisites/Dependencies

  • Gazebo >= 7.0
  • ROS Kinetic
  • ROS navigation package
sudo apt-get install ros-kinetic-navigation
  • ROS map_server package
sudo apt-get install ros-kinetic-map-server
  • ROS move_base package
sudo apt-get install ros-kinetic-move-base
  • ROS amcl package
sudo apt-get install ros-kinetic-amcl
  • ROS rtabmap-ros package
sudo apt-get install ros-kinetic-rtabmap-ros

Setup Instructions (abbreviated)

  1. Meet the Prerequisites/Dependencies
  2. Open Ubuntu Bash and clone the project repository
  3. On the command line execute
sudo apt-get update && sudo apt-get upgrade -y
  1. Build and run your code.

Run the project

  • Clone this repository under the catkin_ws/src folder
git clone https://github.com/aaryapatel007/slam_rtab_ros.git

  • Open the repository and make
cd /home/workspace/catkin_ws/
catkin_make
  • Launch my_robot in Gazebo to load both the world and plugins
roslaunch my_robot world.launch
  • Launch teleop_twist_keyboard node, open a new terminal, enter
cd /home/workspace/catkin_ws/
source devel/setup.bash
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
  • Launch mapping node, open a new terminal, enter
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 rtabmapviz.
    rtabmap-databaseViewer ~/.ros/rtabmap.db

  • View database Once you statisfied with your move, press Ctrl + c to exit then view your database 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

License

This repository is licensed under the terms of the MIT license.

About

Creating a 2D occupancy grid and 3D octomap from a simulated environment using a robot with the RTAB-Map package

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages