yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
RDK X5 Robot📖
01. RDK-X5-Robot Introduction
  • 1.Introduction
  • 2.Common Problem Analysis
  • 3.Battery and charger usage precautions
  • 4.TF card expand capacity
02. Assembly Tutorial
  • Assembly Tutorial
  • Assembly Video-1
  • Assembly Video-2
  • Assembly Video-3
  • Assembly Video-4
03. Remote Control Course
  • 1.Mobile APP remote control
  • 2.USB Wireless Controller Remote Control
04. ROS Driver Board Course
  • 1. Introduction of extension board
  • 2. Set up STM32 development environment
  • 3. Key control buzzer sound
  • 4. FreeRTOS application
  • 5. Serial communication
  • 6. SBUS model remote control
  • 7. CAN bus communication
  • 8. RGB color light strip
  • 9. Timer interrupt control PWM servo
  • 10. Control serial steering gear
  • 11. Nine-axis attitude sensor to obtain data
  • 12. Control motor forward and reverse
  • 13. The timer captures encoder data
  • 14. Theory of robot kinematics analysis
  • 15. PID control robot motion
05. Basic Control Course
  • 1.Update expansion board firmware
  • 2.Install Python driver library
  • 3.Set the car type
  • 4.Open and close APP program control
  • 5.Turn hotspot mode on and off
  • 6.Buzzer sound
  • 7.Control the motor to rotate forward and reverse
  • 8.Controlling robot movement
  • 9.OLED display
  • 10.Control fans and lighting effects
06. Development Environment
  • 1. Virtual machine installation and use
  • 2. Linux Basics
  • 3. Remote connection
  • 4. Multi-machine communication configuration
  • 5. Bind device ID
  • 6. Image installation and backup
07. ROS2 Basic Course
  • 1. Introduction to ROS2
  • 2. ROS2 install Humble
  • 3. ROS2 development environment
  • 4. ROS2 workspace
  • 5. ROS2 function package
  • 6. ROS2 node
  • 7. ROS2 topic communication
  • 8. ROS2 service communication
  • 9. ROS2 action communication
  • 10. ROS2 custom interface message
  • 11. ROS2 parameter service case
  • 12. ROS2 meta-function package
  • 13. ROS2 distributed communication
  • 14. ROS2 DDS
  • 15. ROS2 time related API
  • 16. ROS2 common command tools
  • 17. ROS2 rviz2 use
  • 18. ROS2 rqt toolbox
  • 19. ROS2 Launch startup file configuration
  • 20. ROS2 recording and playback tool
  • 21. ROS2 URDF model
  • 22. ROS2 Gazebo simulation platform
  • 23. ROS2 TF2 coordinate transformation
08. Robot Chassis Control Course
  • 1. PID algorithm theory
  • 2. Robot information release
  • 3. Robot control
  • 4. Robot state estimation
  • 5. Robot calibration
  • 6. Robot trajectory tracking
  • 7. URDF Model
09. LiDAR Course
  • 1. Introduction and use of lidar
  • 2. Lidar obstacle avoidance
  • 3. Lidar tracking
  • 4. Lidar guard
  • 5. Lidar patrol
  • 6. gmapping mapping algorithm
  • 7. Cartographer mapping algorithm
  • 8. Navigation and obstacle avoidance
  • 9. App Mapping and Navigation
10. OpenCV Course
  • 1. Getting started with OpenCV
  • 2. OpenCV geometric transformation
  • 3. OpenCV Image Processing
  • 4. OpenCV image beautification
  • 5. QR code creation and recognition
11. Mipi Camera Course
  • 1. Camera driver
  • 2. Adjust the color HSV value
  • 3. Color recognition
  • 4. Color Tracking
  • 5. Color Follow
  • 6. QR code instructions
  • 7. Face Detection
  • 8. Object Detection
  • 9. Visual line patrol-OpenCV
  • 10. Visual line patrol-deep learning
  • 11. Human body tracking
  • 12. Gesture control
12. Depth Camera Course
  • 1. Use of Depth Camera
  • 2. Camera intrinsic calibration
  • 3. ROS+OpenCV Basics
  • 4. AR Vision
  • 5. Color Tracking
  • 6. Object Tracking
  • 7. RTAB-Map 3D Mapping Navigation
13. Multi-robot Synchronous Control
  • Multi-vehicle synchronous control
Remote login control
  • 1. VNC and SSH remote login
  • 2. Jupyter lab login and case code running
Download
  • System_File
  • Code
  • VM_File
  • Software_Tools
  • Hardware_Info
  • Firmware
  • Instruction_Manual
  • ROS2_Basic_VM
Download ZIP

Welcome to RDK X5 Robot repository

7. RTAB-Map 3D Mapping Navigation

RTAB-Map 3D Mapping Navigation

 

RTAB-Map 3D Mapping Navigation7.1. Introduction7.2, Map Building7.3, Navigation7.3.1, Start the camera [Execute on the car side]7.3.2, Start the chassis [Execute on the car side]7.3.3, Start rviz to display the map [Execute on the virtual machine side]7.3.4, Start the navigation node [virtual machine execution]7.3.5, Display rtabmap_viz [virtual machine execution]7.3.6, Navigation preparation7.3.7, Single-point navigation7.3.8, Multi-point navigation7.4. Node analysis7.4.1. Display calculation graph7.4.2. TF transformation

Official website of rtabmap: http://introlab.github.io/rtabmap/

rtabmap ros-humble: https://github.com/introlab/rtabmap/tree/humble-devel

7.1. Introduction

rtabmap is a SLAM method based on RGB-D images. It uses a global Bayesian loop closure detector based on bag of words and can build maps in real time in large-scale environments.

Features of rtabmap include:

  • It can use a handheld RGBD camera for 6-DOF RGB-D mapping, or a robot equipped with a lidar for 3-DOF (2D laser) or 6-DOF (3D laser) mapping.

  • It uses a memory management mechanism to divide the map into working memory (WM), short-term memory (STM) and long-term memory (LTM) to limit the number of positioning points used for loop closure detection and graph optimization to ensure real-time performance.

  • It uses a discrete Bayesian filter to estimate the probability of forming a loop closure and selects which positioning points to transfer or retrieve based on weight and time.

  • It uses an incremental dictionary creation method instead of a pre-trained dictionary, which can adapt to different environments.

  • It can run under ROS or as a standalone library and application.

7.2, Map Building

Note: When building a map, the slower the speed, the better the effect (note that the rotation speed should be slower), too fast, the effect will be very poor.

Execute the following launch files in the terminal:

  1. Start the Astra camera, this step is executed on the car side

xxxxxxxxxx
ros2 launch astra_camera astro_pro_plus.launch.xml
  1. Start the chassis, this step is executed on the car side

xxxxxxxxxx
ros2 launch yahboomcar_bringup rtabmap_bringup_launch.py
  1. Start the map, this step is executed in the virtual machine, and multi-machine communication needs to be configured in the virtual machine

xxxxxxxxxx
ros2 launch yahboomcar_nav rtabmap_sync_launch.py 
  1. Start rviz to display the map, this step is executed in the virtual machine, and multi-machine communication needs to be configured in the virtual machine

xxxxxxxxxx
ros2 launch yahboomcar_nav display_rtabmap_map_launch.py

Note: If the 3D map is not displayed for a long time, or an error is reported in rviz, the reason should be: due to the limited resources of RDK X5, rtabmap mapping has to be executed in the virtual machine. The camera's RGB and depth data need to be transmitted between the RDK X5 master and the virtual machine. Unstable data transmission may cause mapping failure. The solution at this time is to connect a network cable to the RDK X5 master to improve the stability of data transmission and improve the mapping effect.

image-20241115112204532

  1. Start the keyboard control node. This step is performed in the car end, or use the remote control [Slowly move the car] to start building the map until the complete map is built

xxxxxxxxxx
ros2 run yahboomcar_ctrl yahboom_keyboard

image-20241115112746564

  1. Save the map

When the map is built, just [ctrl+c] to exit the map building node, and the system will automatically save the map. The default map save path is [~/.ros/rtabmap.db]

7.3, Navigation

Execute in different terminals:

7.3.1, Start the camera [Execute on the car side]

xxxxxxxxxx
ros2 launch astra_camera astro_pro_plus.launch.xml

7.3.2, Start the chassis [Execute on the car side]

xxxxxxxxxx
ros2 launch yahboomcar_bringup rtabmap_bringup_launch.py

7.3.3, Start rviz to display the map [Execute on the virtual machine side]

This step is executed in the virtual machine, and multi-machine communication needs to be configured in the virtual machine.

xxxxxxxxxx
ros2 launch yahboomcar_nav display_rtabmap_nav_launch.py

image-20241115114907686

7.3.4, Start the navigation node [virtual machine execution]

xxxxxxxxxx
ros2 launch yahboomcar_nav navigation_rtabmap_launch.py

image-20241115114933321

7.3.5, Display rtabmap_viz [virtual machine execution]

rtabmap_viz is the visualization interface of RTAB-Map, which is RTAB-Map A wrapper for the GUI graphics library, similar to rviz but with options for RTAB-Map. It can subscribe to different topics, such as odom, rgb/image, depth/image, scan, etc., to display the SLAM process and results, and load the 3D map into rviz. This step is started in the virtual machine.

xxxxxxxxxx
ros2 launch yahboomcar_nav rtabmap_viz_launch.py

image-20241115115206858

7.3.6, Navigation preparation

Navigation can be divided into single-point navigation and multi-point navigation, which will be introduced below

  1. Click [2D Pose Estimate] on rviz, and then compare the position of the car to mark an initial position of the car on the map:

  2. Compare the overlap of the radar scanning point and the obstacle, and set the initial position of the car multiple times until the radar scanning point and the obstacle roughly overlap;

image-20241115113505845

7.3.7, Single-point navigation

After the initial pose is set, you can click [2D Goal Pose] to set a navigation target point, and the car will start single-point navigation;

image-20241115143618703

7.3.8, Multi-point navigation

  1. After the initial pose is set, you can click [Panels] in the upper left corner of rviz---Select [Navigation 2], and the [Navigation 2] panel will be displayed

image-20241115144127655

  1. Click [Waypoint / Nav Through Poses Mode] in the above picture, and then click [Nav2 Goal】, you can mark a target point on the map, click [Navigation2 Goal] again, you can mark the second target point on the map, and repeat the cycle to mark multiple target points at once;

image-20241115144617989

  1. After marking multiple target points, click [Start Nav Through Poses] to start multi-point navigation. After multi-point navigation is completed, the car will stay at the position of the last target point;

  2. rviz may exit during navigation, which may be caused by insufficient resources. You can turn off the display of rtabmap_viz on the virtual machine after the navigation node starts to fully display the 3D map

7.4. Node analysis

7.4.1. Display calculation graph

xxxxxxxxxx
rqt_graph

rosgraph

7.4.2. TF transformation

xxxxxxxxxx
ros2 run tf2_tools view_frames

image-20241115150250123

Object Tracking
Multi-vehicle synchronous control

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文