ubuntu20.04 ・ Run RTAB-MAP with ROS Noetic (1)

Introduction

I ran rtabmap_ros with ROS Noetic on ubuntu20.04LTS, so I made a note of how to do it.

Operating environment

We have confirmed the operation in the following environment.

item value
CPU Ryzen5
OS Ubuntu20.04LTS
ROS Noetic Ninjemys

Install ROS Noetic

If you already have ROS, please skip it.

http://wiki.ros.org/noetic/Installation/Ubuntu

Registration of ROS download destination to apt

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

Obtaining public key

$ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

Installation

$ sudo apt update
$ sudo apt install ros-noetic-desktop-full

Setting environment variables

$ echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
$ source ~/.bashrc

Install the ROS package installer

$ sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential

Initialization of rosdep

$ sudo rosdep init
$ rosdep update

Creating a workspace

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/
$ catkin_make

Installation of RTAB-MAP (from apt)

Install with the following command.

sudo apt install ros-noetic-rtabmap-ros ros-noetic-rtabmap

Installation of RTAB-MAP (build from source)

For some reason, when I installed it from apt in my environment, the demo described later did not work, so I built it from source.

See Build from source below https://github.com/introlab/rtabmap_ros

Install and build RTAB-MAP itself below

$ cd ~
$ git clone https://github.com/introlab/rtabmap.git rtabmap
$ cd rtabmap/build
$ cmake .. 
$ make
$ sudo make install

Install and build rtabmap_ros

$ cd ~/catkin_ws
$ git clone https://github.com/introlab/rtabmap_ros.git src/rtabmap_ros
$ catkin_make -j1

Run demo

First, download rosbag from the following. demo_mapping.bag

Open a terminal and do the following

roslaunch rtabmap_ros demo_robot_mapping.launch 

In another terminal run the following in the directory where you downloaded rosbag

rosbag play --clock demo_mapping.bag

A GUI screen like this is displayed. Screenshot from 2021-01-14 23-41-00.png

Please refer to the following article for how to read the GUI screen. How to use RTABMAP

Next, let's take a look at rqt_graph when the demo is executed.

rqt_graph

rosgraph.png

rtabmap

The topic has been entered. / rtabmap/rtabmapviz is a node on the GUI screen.

/ data_throttled_image/compressed is an RGB image,/data_throttled_image_depth/compressedDepth is a Depth image, and/data_throttled_camera_info is a camera parameter. The/jn0/base_scan topic seems to be a LaserScan type and is inputting a 2DLiDAR scan.

Finally

Next time, I will use RealSense L515 to SLAM the environment. If you installed rtabmap_ros from apt and the demo worked, please comment.

reference

rtabmap_ros - ROS Wiki http://wiki.ros.org/rtabmap_ros

How to use RTABMAP https://qiita.com/k65c1/items/7a4df58b50a587fad3e2

Do SLAM with Realsense. https://qiita.com/k65c1/items/0d9039c021ecbb26b04e

Read RTABMAP Part 1 https://qiita.com/ohtt/items/b3c00a62757244a6e16c

Run the RTAB-Map demo https://veloart-intelligence.com/blog/run-rtab-map-demo/

Recommended Posts

ubuntu20.04 ・ Run RTAB-MAP with ROS Noetic (1)
Run Ubuntu + ROS with Docker on Mac
Install ROS Noetic ubuntu20.04
How to use RealSense with ubuntu 20.04 and ROS Noetic
Run Pico with docker
Install Gradle with ubuntu16.04
Run Payara with Docker
Run tiscamera on Ubuntu 18.04
Run batch with docker-compose with Java batch
Run TAO Core with Docker
Run Tensorflow with THETA V
Run LIFF with Spring Boot
Update gitlab-runner with Ubuntu automatic update
Develop Arduino with vscode @Ubuntu
Run chromium-mir-kiosk on Ubuntu Core
Run Rails whenever with docker
Run java applet on ubuntu
Build Ubuntu 18.04.5 with dual boot
Run Eclipse CDT on Ubuntu
ROS installation Ubuntu compatible version
Run Java VM with WebAssembly