I ran rtabmap_ros with ROS Noetic on ubuntu20.04LTS, so I made a note of how to do it.
We have confirmed the operation in the following environment.
item | value |
---|---|
CPU | Ryzen5 |
OS | Ubuntu20.04LTS |
ROS | Noetic Ninjemys |
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
Install with the following command.
sudo apt install ros-noetic-rtabmap-ros ros-noetic-rtabmap
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
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.
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
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.
Next time, I will use RealSense L515 to SLAM the environment. If you installed rtabmap_ros from apt and the demo worked, please comment.
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