Skip to content

A package for spawning a skid-steer drive robot in a Gazebo environment and performing SLAM using rtabmap.

License

Notifications You must be signed in to change notification settings

gsotirchos/mapping-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mapping-bot

Overview

This repository contains the following package:

  • mapping_bot: A 4-wheeled skid-steer drive robot equipped with a RGBD camera and a Hokuyo lidar in a Gazebo environment. The generated graph is stored inside the databases directory and can be used afterwards for localization. rtabmapviz is used for visualization during SLAM, while rviz is used during localization. The robot is controlled with the teleop_twist_keyboard package.

License

The source code is released under an MIT license.

Author/Maintainer: George Sotirchos

The mapping-bot package has been tested under ROS Kinetic in a docker container on Ubuntu 20.04 (see Running in Docker section). This is experimental, personal project code, and possibly subject to frequent changes with any need for explanation disclaimed.

Example image

The generated database file (~500MB) containing the above graph can be downloaded from the following link:
https://drive.google.com/file/d/1b5pvZWY5gWn9cGNwS4kvx6GS7iLyPiKr/view?usp=sharing

Note: the numbered white cubes are not detected by the laser scan because their models contained no <collision> elements.

Installation

Building from Source

Dependencies

Building

To build from source, with ROS Kinetic on Ubuntu 16.04, clone the latest version from this repository into your catkin workspace and compile the package with the following commands:

mkdir -p /catkin_ws/src
cd catkin_ws/src
git clone https://github.com/gsotirchos/mapping-bot
cd ../
rosdep install --from-paths . --ignore-src
catkin_make
# place the downloaded database file at ./src/mapping-bot/mapping_bot/databases/rtabmap.db

Running in Docker

Install Docker.

Spin up a container with GUI forwarding for X11 applications:

docker run \
    -ti \
    --rm \
    --network=host \
    --env="DISPLAY" \
    --env QT_X11_NO_MITSHM=1 \
    --device=/dev/dri:/dev/dri \
    --volume="$HOME/.Xauthority:/root/.Xauthority:rw" \
    --name ros-container \
    mjenz/ros-kinetic-desktop-full \
    bash

This downloads the mjenz/ros-kinetic-desktop-full image from mjenz's Docker repository, indicates that it requires an interactive terminal (-t, -i), gives it a name (--name), removes it after you exit the container (--rm), sets the required environment variables (--env) and access to local resources (--device, --volume) to be able to launch graphical applications (Gazebo, RViz, rqt_graph, etc.), and runs a command (bash).

Now, continue with the instructions from the Building section.

Usage

  1. Start the Gazebo environment containing the robot:

    roslaunch mapping_bot world.launch
  2. Start the teleop_twist_keyboard node:

    roslaunch mapping_bot teleop.launch
  3. Start the rtabmap and rtabmapviz nodes in SLAM mode:

    roslaunch mapping_bot mapping.launch

    Alternatively, start the rtabmap and rtabmapviz nodes in localization mode:

    roslaunch mapping_bot localization.launch

Launch files

  • mapping_bot/launch/world.launch: A Gazebo simulation is opened and a 4-wheeled skid-steer drive robot equipped with an RGBD camera and a Hokuyo lidar is spawned in an office environment.

  • mapping_bot/launch/mapping.launch: Starts the rtabmap node for SLAM, and the rtabmapviz node for visualization.

  • mapping_bot/launch/localization.launch: Starts the rtabmap node for localization, and the rviz node for visualization.

    Arguments:

    • rviz: Whether to launch an RViz window.
      Default: true

    • move_base: Whether to start a move_base node.
      Default: false

Nodes

rtabmap

Following are the rtabmap's published and subscribed topics of main interest for the current application.

Published Topics

Subscribed Topics

Bugs & Feature Requests

Please report bugs and request features using the Issue Tracker.

ROS: http:https://www.ros.org
RTAB-Map's ROS package: https://github.com/introlab/rtabmap_ros
move_base ROS package (ROS Navigation stack): https://github.com/ros-planning/navigation
teleop_twist_keyboard ROS package: https://github.com/ros-teleop/teleop_twist_keyboard

About

A package for spawning a skid-steer drive robot in a Gazebo environment and performing SLAM using rtabmap.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages