yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
EAI X3 Pro LiDAR📖
01.Linux basic course
  • 1.Introduction to Linux system
  • 2.Ubuntu file system
  • 3.Ubuntu common commands
  • 4.Ubuntu common editors
  • 5.Ubuntu software operation commands
  • 6.Virtual machine installation
  • 7.SSH remote control
  • 8.VNC remote control
  • 9.Transfer files remotely
  • 10.Driver library and communication
  • 11.Static IP and hotspot mode
  • 12.Bind device ID
  • 13.Capacity expansion and resource allocation
  • 14.Update system software sources
  • 15.Set root user password
  • 16.sudo free password
  • 17.Connect to WiFi network
  • 18.View system version
  • 19.Customized service management
  • 20.Back up system image
02.ROS1 basic course
  • 1.ROS introduction
  • 2.ROS installation
  • 3.ROS common command tools
  • 4.ROS workspace
  • 5.ROS function package
  • 6.ROS node
  • 7.ROS topic publisher
  • 8.ROS topic subscribers
  • 9.ROS service client
  • 10.ROS service server
  • 11.ROS action client
  • 12.ROS action server
  • 13.ROS custom message reception
  • 14.ROS-launch file
  • 15.ROS-TF transformation
  • 16.ROS parameter service
  • 17.ROS-rviz use
  • 18.ROS-rqt tool usage
  • 19.Topic message recording and playback
  • 20.urdf model introduction
  • 21.gazebo introduction
  • 22.ROS distributed communication
03.ROS1 lidar course
  • 0.Instructions before use
  • 1.Preparation
  • 2.Handheld lidar mapping
  • 3.Lidar avoiding
  • 4.Lidar guard
  • 5.Lidar follow
  • 6.Lidar mapping
  • 7.rrt_exploration mapping algorithm
  • 8.Navigation
  • 9.APP Mapping and Navigation
  • 10.RTAB 3D mapping and navigation
04.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
05.ROS2 lidar course
  • 0.ReadMe
  • 1.Preparation
  • 2.Handheld lidar mapping
  • 3.Lidar avoiding
  • 4.Lidar follow
  • 5.Lidar guard
  • 6.Lidar patrol
  • 7.gmapping mapping
  • 8.cartographer mapping
  • 9.Navigation and avoiding
  • 10.APP Mapping and Navigation
  • 11.RTAB 3D mapping and navigation
06.RPi 5 Docker course
  • 1.Overview and installation
  • 2.Common commands
  • 3.Understand and publish images
  • 4.Hardware interaction data processing
  • 5.Enter docker container
  • 6.Update docker images
  • 7.Docker container to install ROS using accessories
07.RDK course
  • 0.ReadMe before use
  • 1.Environment Construction
  • 2.Handheld Lidar Mapping
Download
  • ROS1-Code
  • ROS2-Code
  • ROS1-VMFile
  • ROS2-VMFile
  • PC Software
  • 3D_Model_File
  • RDK_Code
  • ROS2_Basic_VM
Download ZIP

Welcome to EAI X3 Pro LiDAR repository

7.rrt_exploration mapping algorithm

7. rrt_exploration mapping algorithm

The following workspace contains the function packages in the entire rplidar_ws. If you need to transplant it to your own development board, you need to copy all the function packages to the src of the workspace for compilation, and install the relevant environment.

Note: This course uses Rosmaster-X3Plus as an example. Users need to modify it according to their own motion model.

Different from the handheld lidar mapping content, this mapping adds odom data, so if you use your own motion model, you also need to have odom data.

Function package path: ~/ydlidar_ws/src/yahboomcar_nav

7.1 Start

Input following command:

x
roslaunch yahboomcar_nav laser_bringup.launch
roslaunch yahboomcar_nav rrt_exploration.launch use_rviz:=true

[use_rviz] parameter: whether to enable rviz visualization.

image-20221201152330947

Start Mapping

image-20221201152358686

Click [Publish Point] on the [rviz] interface, and then click on the map. Each time you click a point on the map, you must first select [Publish Point]. the clockwise or counterclockwise last point is near the car. After selecting five points as required, the robot begins to explore and build a map.

Save Map

After the mapping is completed, the map is automatically saved and returned to zero. The map is saved to the folder ~/ydlidar_ws/src/yahboomcar_nav/maps with the name rrt_map, which can be modified in the [simple.launch] file.

View nodes:

xxxxxxxxxx
rqt_graph

image-20221201152612288

View TF tree:

xxxxxxxxxx
rosrun rqt_tf_tree rqt_tf_tree

image-20221201152710990

7.2 Introduction

The framework of the Rapid Exploration Random Tree (RRT) algorithm is as follows:

  • Global RRT frontier point detector node.
  • Local RRT frontier point detector node.
  • OpenCV-based frontier detector node.
  • Filter node.
  • Assigner node.

image-20221201153141707

7.2.1 Global RRT frontier point detector node.

1)Introduction

The global_rrt_frontier_detector node takes an occupancy grid and finds frontier points(i.e. exploration targets) in it. It publishes detected points so that filter nodes can process them. In a multi-robot configuration, only one instance of the node is running. If desired, running additional instances of the global boundary detector can increase the speed of boundary point detection.

2)Topics and Services
Subscribe to topicstypedescribe
mapnav_msgs/OccupancyGridTopic names are defined by the ~map_Topic parameter. It is the name of the topic that the node receives.
clicked_pointgeometry_msgs/PointStampedThe area to be probed by the global_rrt_frontier_detector node. This topic is where the node receives the five points that define the area. The first four points are the four points that define the square area to be explored, and the last point is the starting point of the tree. After these five points are announced, the RRT will begin to probe the border points.
Post a topictypedescribe
detected_pointsgeometry_msgs/PointStampedPost the topic of detected boundary points.
shapesvisualization_msgs/MarkerPost RRT hypothetical linetypes to view with Rviz.

3) Configuration parameters

parametertypeDefaultsdescribe
~map_topicstring"/robot_1/map"This node receives the map topic map name
~ etafloat5.0This parameter controls the growth rate of the RRT used to detect boundary points, in meters. This parameter should be set according to the map size, a very large value will cause the tree to grow faster and thus detect border points faster, but a larger growth rate also means that the tree will lose small corner points in the map

7.2.2 Local RRT frontier point detector node

1. Introduction

This node is similar to global_rrt_frontier_detector. However, it works differently because here the tree keeps getting reset every time a boundary point is detected. This node will run along the Global Boundary Detector node, which is responsible for quickly detecting boundary points located near the robot.

In a multi-robot configuration, each robot runs a local probe instance. So for a team of 3 robots, there will be 4 nodes for detecting boundary points; 3 local detectors and 1 global detector. If needed, running additional instances of the local boundary detector can increase the speed of boundary point detection. All detectors will publish detected boundary points("/detected_points") on the same topic.

2. Topics and Services

Subscribe to topicstypedescribe
mapnav_msgs/OccupancyGridThe name of the map topic to which this node is subscribed.
clicked_pointgeometry_msgs/PointStampedSimilar to global_rrt_frontier_detector node
Post a topictypedescribe
detected_pointsgeometry_msgs/PointStampedPost the topic of detected boundary points.
shapesvisualization_msgs/MarkerPost RRT hypothetical linetypes to view with Rviz.

 

7.2.3 OpenCV-based frontier detector node.

1. Introduction

This node is another edge detector, but it is not based on RRT. This node uses OpenCV tools to detect boundary points. It is designed to run alone, in a multi-bot configuration, only one instance should be running(running other instances of this node will not make any difference).

Originally, this node was implemented for comparison with RRT-based boundary detectors. Running this node along the RRT detectors(local and global) can increase the speed of boundary point detection.

Note: You can run any type and number of detectors, all of which will be published on the same topic that the filter node(explained in the next section) subscribes to. The filter, on the other hand, passes the filtered boundary points to the assignor in order to command the robot to explore these points.

2. Topics and Services

Subscribe to topicstypedescribe
mapnav_msgs/OccupancyGridThe name of the map topic to which this node is subscribed.
Post a topictypedescribe
detected_pointsgeometry_msgs/PointStampedPost the topic of detected boundary points.
shapesvisualization_msgs/MarkerPost RRT hypothetical linetypes to view with Rviz.
   

3. Configuration parameters

parametertypeDefaultsdescribe
~map_topicstring"/robot_1/map"This node receives the map topic map name

7.2.4 Filter node

1. Introduction

This node is similar to global_rrt_frontier_detector. However, it works differently because here the tree keeps getting reset every time a boundary point is detected. This node will run along the Global Boundary Detector node, which is responsible for quickly detecting boundary points located near the robot.

In a multi-robot configuration, each robot runs a local probe instance. So for a team of 3 robots, there will be 4 nodes for detecting boundary points; 3 local detectors and 1 global detector. If needed, running additional instances of the local boundary detector can increase the speed of boundary point detection. All detectors will publish detected boundary points("/detected_points") on the same topic.

2. Topics and Services

Subscribe to topicstypedescribe
mapnav_msgs/OccupancyGridTopic names are defined by the ~map_Topic parameter. It is the name of the topic that the node receives.
robot_x/move_base_node /global_costmap/costmapnav_msgs/OccupancyGridx is the number of the robot. This node subscribes to the topic of all costmaps for all robots, so costmaps are required. Normally, costmaps should be published by navigation(there will be one costmap per robot when navigation is turned on on a robot). For example, if n_robots=2, the nodes will subscribe to: robot_1/move_base_node/global_costmap/costmap and robot_2/move_base_node/global_costmap/costmap. The costmap is used to remove invalid points. Note: The namespace of all nodes corresponding to robots should start with robot_x.
detected_pointsgeometry_msgs/PointStampedThe topic name defined by ~goals_topic. It is the topic on which the filter node receives boundary detection points.
Post a topictypedescribe
frontiersvisualization_msgs/MarkerThe filter node only publishes topics of filtered boundary points.
3. Configuration parameters
parametertypeDefaultsdescribe
~map_topicstring"/robot_1/map"This node receives the map topic map name
~costmap_clearing_thresholdfloat70.0Costmap cleanup threshold
~info_radiusfloat1.0The information radius used to calculate the information gain of the boundary point.
~goals_topicstring/detected_pointsDefines the topic the node receives to detect boundary points
~n_robotsfloat1.0Number of robots
~namespacestring Namespaces
~namespace_init_countfloat1.0index of namespace
~ratefloat100.0Node cycle rate(in Hz).

7.2.5 Assigner node.

1. Introduction

This node receives target detection targets, i.e. filtered boundary points issued by the filtering node, and commands the robot accordingly. The evaluator node commands the robot via move_base_node. That's why navigation is initiated on the robot.

2. Topics and Services

Subscribe to topicstypedescribe
mapnav_msgs/OccupancyGridTopic names are defined by the ~map_Topic parameter. It is the name of the topic that the node receives.
frontiers_topicnav_msgs/OccupancyGridThe topic name is defined by the ~frontiers_topic parameter
3. Configuration parameters
parametertypeDefaultsdescribe
~map_topicstring"/robot_1/map"This node receives the map topic map name
~info_radiusfloat1.0The information radius used to calculate the information gain of the boundary point.
~info_multiplierfloat3.0The unit is meters. This parameter is used to emphasize the importance of the information gain of the boundary point relative to the cost (expected travel distance to the boundary point).
~hysteresis_radiusfloat3.0The unit is meters. This parameter defines the lag radius.
~hysteresis_gainfloat2.0The unit is meters. This parameter defines the hysteresis gain.
~frontiers_topicstring/filtered_pointsThis node receives topics for boundary points.
~n_robotsfloat1.0Number of robots
~namespacestring Namespaces
~namespace_init_countfloat1.0Starting indexing of bot names.
~delay_after_assignementfloat0.5The unit is seconds. It defines the amount of delay after each robot assignment.
~global_framestring"/map"for the global coordinate system. In a single bot, it is the same as the "map_topic" parameter. In the case of multiple robots, the coordinate system name corresponds to the global coordinate system name.
Lidar mapping
Navigation

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/中文