Giter Club home page Giter Club logo

map-my-world's Introduction



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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.