Mobile robot SLAM method and device in dynamic scene and medium
By classifying objects in dynamic scenes and eliminating strongly dynamic objects in real time, combined with multi-sensor fusion technology and target detection algorithms, it solves the problem of reduced positioning and map construction accuracy of traditional SLAM algorithms in dynamic environments, and improves the accuracy of robot autonomous navigation. Accuracy and adaptability.
Patent Information
- Application Number
- CN202410990586.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-10-22
AI Technical Summary
In a dynamic environment, the traditional SLAM algorithm reduces the accuracy of positioning and map construction due to the interference of moving objects, affecting the accuracy of the robot's autonomous navigation.
Through the mobile robot SLAM method in dynamic scenes, multi-sensor fusion technology is used to divide indoor objects into strongly dynamic, weakly dynamic and static objects, eliminate strong dynamic objects in real time, and process weakly dynamic objects that have moved during offline updates, using Yolo- Fastest algorithm and KD-Tree algorithm are used for object detection and map optimization, and Brensham algorithm is used to construct a two-dimensional grid map.
It improves the adaptability and fault tolerance of robots in dynamic scenes, enhances environmental perception capabilities, and improves the accuracy of positioning and map construction.
Smart Images

Figure CN118823740A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot navigation, and in particular to a SLAM method, device and medium for a mobile robot in a dynamic scene. Background Art
[0002] With the development of robotics technology, SLAM methods have become a key technology for autonomous navigation of robots. Traditional SLAM algorithms perform well in static environments and have been widely used in logistics, handling and other fields. However, in dynamic environments with many pedestrians and high degree of scene changes, the positioning and map construction accuracy of SLAM algorithms decreases due to the interference of moving objects, thereby increasing the cumulative error in the process of autonomous navigation of robots. In the prior art, SLAM algorithms have a high degree of fault tolerance for low-dynamic scenes, such as using probabilistic models to remove a small number of pedestrian footprints. However, for traditional SLAM algorithms, stationary pedestrians are no different from obstacles, which directly affects the entire mapping and autonomous positioning and navigation functions. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a SLAM method, device and medium for mobile robots in dynamic scenes, which classify objects into strongly dynamic objects, weakly dynamic objects and static objects respectively, directly eliminate strongly dynamic objects when building a map, and eliminate weakly dynamic objects that have moved during offline updates, thereby improving the adaptability and fault tolerance of the robot working in dynamic scenes.
[0004] In order to solve the technical problem, the technical solution adopted by the present invention is: a mobile robot SLAM method in a dynamic scene, comprising the following steps: S01), indoor environment training set collection and target detection system training, according to the motion properties of the objects, the indoor objects are divided into strong dynamic objects, weak dynamic objects and static objects, the indoor scene training data is collected and the target detection system is trained, and the trained target detection system detects and segments strong dynamic objects, weak dynamic objects and static objects; S02), based on the pre-processing of the prior reference map of multi-sensor fusion, the robot is equipped with a single-line laser radar, a wheel odometer, a camera, and an IMU sensor for real-time perception of the surrounding environment information. The wheel odometer calculates the robot's linear velocity, angular velocity, and posture change according to the real-time feedback pulse, wheel radius, and wheelbase. The IMU sensor outputs the z-axis angular velocity, x-axis acceleration, and y-axis acceleration based on its own coordinate system. The single-line laser radar provides environmental section perception capabilities, and the camera outputs image or point cloud depth information; When performing the pre-processing of the prior reference map, the robot is first remotely controlled to stably pass through various indoor areas. During this process, the robot collects multiple frames of IMU instantaneous angular velocity, linear acceleration, multiple frames of wheel odometer wheel instantaneous linear velocity, one frame of depth camera RGB image and depth information, and one frame of lidar point cloud information in real time; after the RGB image information arrives, the strong dynamic object detection is completed immediately, and the detected strong dynamic object is converted into the depth image to complete the point cloud segmentation. At the same time, the depth image coordinate system is converted to the laser point cloud coordinate system, and the laser point cloud and the strong dynamic object depth point cloud are used as input using the KD-Tree algorithm. The point in the laser point cloud that is closest to the strong dynamic object depth point cloud is output and removed, and the laser point cloud and the original camera output after the strong dynamic object is removed are recorded for each key frame; S03), post-processing of the prior reference map, traversing the laser point cloud after the strong dynamic objects are eliminated after the image optimization recorded in step S02), the original camera output and the optimized posture, performing weak dynamic object detection on the original camera output, and converting the detected weak dynamic objects into the depth image to complete the point cloud segmentation, and at the same time converting the depth image coordinate system to the laser point cloud coordinate system, using the KD-Tree algorithm to take the laser point cloud and the weak dynamic object depth point cloud as input, output the point in the laser point cloud that is closest to the weak dynamic object depth point cloud and assign the weak dynamic object attribute, and finally complete the two-dimensional grid map construction to generate the prior reference map. At this time, the grid map has the occupancy and weak dynamic object attributes; S04), based on the secondary update of the prior reference map, when executing the task, the robot completes the scanning and matching positioning work according to the prior reference map output by step S03), and performs secondary update of the prior reference map after a certain period of time. One thread is used for positioning, and the other thread searches for whether the four grids around the grid with weak dynamic objects are hit when the positioning stability meets the requirements. If hit, no processing is performed. Otherwise, the number of pending updates set for the grid is increased by 1. When the robot is cyclically operating, if it is detected that the number of pending updates for a certain grid is greater than T, the occupation attributes of the grid and the four grids around it are updated to blank, and the attributes of the weak dynamic object are deleted.
[0005] Furthermore, when collecting indoor scene training data, indoor scenes with different scenes and different lighting times are selected, and an RGB-D camera is used to complete the image and depth information collection in the environment. Secondly, the collected images are manually annotated to mark the detection boxes and dynamic properties of the objects, and then the images are data enhanced and normalized.
[0006] Furthermore, the Yolo-Fastest algorithm is used as the target detection system.
[0007] Furthermore, in step S02), after outputting the point in the laser point cloud that is closest to the depth point cloud of the strong dynamic object and removing it, graph optimization is used to complete the back-end optimization, and then the laser point cloud, original camera output and optimized posture after removing the strong dynamic object are recorded for each key frame.
[0008] Furthermore, in step S02), strong dynamic object detection is completed in another thread immediately after the RGB image information arrives.
[0009] Furthermore, in step S03), the detection of weak dynamic objects is performed in an offline process.
[0010] Furthermore, in step S03), the two-dimensional grid map is constructed according to the Brensham algorithm.
[0011] Further, T=6.
[0012] The present invention also discloses a mobile robot SLAM device in a dynamic scene, comprising a processor and a memory storing program instructions, wherein the processor is configured to execute the mobile robot SLAM method in a dynamic scene as described above when running the program instructions.
[0013] The present invention also discloses a storage medium storing program instructions, which, when running, execute the mobile robot SLAM method in dynamic scenes as described above.
[0014] Beneficial effects of the invention: The invention provides a SLAM method for indoor mobile robots in dynamic scenes to solve the problems of the prior art. The method uses laser radar, depth camera, etc. to complete multi-sensor fusion, and the objects are respectively strong dynamic objects, weak dynamic objects and static objects. Strong dynamic objects are directly eliminated when building a map, and weak dynamic objects that have moved are eliminated when updating offline, which enhances the robot's ability to perceive and understand the environment, improves the processing ability of traditional SLAM algorithms for dynamic objects, and further optimizes the accuracy of robot positioning and map construction. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a flow chart of the method described in Example 1. DETAILED DESCRIPTION
[0016] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0017] Example 1 This embodiment discloses a mobile robot SLAM method in a dynamic scene, such as Figure 1 As shown, the following steps are included: S01), indoor environment training set collection and target detection system training In indoor scenes such as offices, residential apartments, and factories, some common objects are manually classified for dynamic attributes. For example, pedestrians, chairs, benches, sundries, and trash cans have extremely high motion attributes. Here we believe that they are the most threatening to the algorithm and are called strongly dynamic objects. Objects that do not change in a short period of time, such as tables, sofas, shelves, and running equipment, are called weakly dynamic objects. Objects that do not change, such as walls and cabinets, are called static objects. In order to complete the detection and segmentation of dynamic objects and static objects, it is necessary to complete the indoor scene training data collection and detection system training.
[0018] Firstly, the target detection system is trained by collecting training data in indoor environments. To ensure stable and reliable detection output, indoor scenes with different scenes and different lighting times (such as offices, living rooms, and equipment workshops) are selected, and RGB-D cameras are used to complete image and depth information collection in the environment. Secondly, in order to ensure the diversity and accuracy of the data, the collected images are manually annotated to mark the detection frames and dynamic attributes of objects such as benches, pedestrians, cabinets, tables, sundries, and trash cans. Next, the images are enhanced and normalized, and the diversity of the data is increased through operations such as rotation, scaling, cropping, and color transformation, and the images are adapted to the input requirements of the model. Finally, the lightweight Yolo-Fastest algorithm is used as the target detection model, and the learning rate and number of iterations are continuously adjusted to optimize the detection accuracy and stability of the model.
[0019] S02) Prior reference map pre-processing based on multi-sensor fusion The robot is equipped with sensors such as a single-line laser radar, a wheel odometer, and a camera for real-time perception of the surrounding environment. The wheel odometer can calculate the robot's linear velocity, angular velocity, and posture change based on real-time feedback pulses, wheel radius, and wheelbase. The IMU high-frequency output is based on the z-axis angular velocity, x-axis, and y-axis accelerations of its own coordinate system, and can calculate the robot's posture reference by integral superposition. The single-line laser radar can provide environmental cross-section perception capabilities for environmental map construction. The camera can also output image or point cloud depth information for target detection input in step 1.
[0020] The prior reference map is a high-confidence reference for the robot to perform navigation tasks. The remote-controlled robot passes through various areas stably. During the process, the robot collects IMU instantaneous angular velocity and linear acceleration in real time, multiple frames of wheel odometer instantaneous linear velocity on the wheel, one frame of depth camera RGB image and depth information, and one frame of lidar point cloud information. At this time, the traditional SLAM method calculates the robot's predicted posture based on the IMU and wheel odometer frame by frame; In order to improve the real-time performance of the overall task, this method completes the strong dynamic object detection in step 1 in another thread immediately after the RGB image information arrives, and the weak dynamic object is processed in step 3. The detected strong dynamic object is converted to the depth image to complete the point cloud segmentation, and the depth image coordinate system is converted to the laser point cloud coordinate system. The laser point cloud and the depth point cloud of the strong dynamic object are used as input using the KD-Tree algorithm, and the points in the laser point cloud closest to the strong depth point cloud are output and removed. In this method, the probability of weak dynamic objects changing in a short time is small, so only strong dynamic objects are removed to reduce the mismatch of scanning frame scanning matching; the back-end optimization part uses graph optimization to complete the calculation, and records the laser point cloud, original camera output, and optimized posture after the strong dynamic objects are removed in each key frame.
[0021] S03), prior reference map post-processing To ensure the real-time performance during the mapping process, the detection of weak dynamic objects is performed offline. After traversing the image recorded in step S02), the laser point cloud with strong dynamic physics is eliminated, the original camera output, and the optimized posture are optimized. The weak dynamic object detection in step S01) is performed on the original camera, and the detected weak dynamic object is converted into the depth image to complete the point cloud segmentation, and the depth image coordinate system is converted to the laser point cloud coordinate system. The KD-Tree algorithm is used to take the laser point cloud and the depth point cloud of the strong dynamic object as input, output the point in the laser point cloud that is closest to the strong depth point cloud, and assign the weak dynamic object attributes. Finally, the two-dimensional grid map is constructed according to the Brensham algorithm. At this time, the grid map has the attributes of occupation and weak dynamic objects.
[0022] S04) Secondary update based on prior reference map When executing the task, the robot completes the scanning and matching positioning work according to the prior reference map output in step S03). In the long-term working process, weak dynamic obstacles often change due to the use scenario. If the robot positioning relies more on scanning and matching at this time, it is easy to have a large positioning error. Therefore, this method will complete the secondary update of the prior reference map. This method uses one thread to complete the positioning calculation; the other thread detects whether the four grids around the grid with weak dynamic objects are hit under the premise of high positioning stability. If hit, no processing is performed. Otherwise, the number of updates set for the grid is increased by 1; when the robot is cyclically operating, if the above process detects that the number of updates for a certain grid is greater than 6, then the occupation attribute of the grid and the four grids around it is updated to blank, and the weak dynamic object attribute is deleted.
[0023] Example 2 This embodiment discloses a mobile robot SLAM device in a dynamic scene, including a processor and a memory storing program instructions, wherein the processor is configured to execute the mobile robot SLAM method in a dynamic scene as described in Example 1 when running the program instructions.
[0024] Example 3 This embodiment discloses a storage medium storing program instructions, which, when run, execute the mobile robot SLAM method in a dynamic scenario as described in Embodiment 1.
[0025] The above description is only the basic principle and preferred embodiments of the present invention. Improvements and substitutions made by those skilled in the art based on the present invention belong to the protection scope of the present invention.
Claims
1. Mobile robot SLAM method in dynamic scenes, Features: The following steps are involved: S01), indoor environment training set collection and target detection system training, according to the motion properties of the objects, the indoor objects are divided into strong dynamic objects, weak dynamic objects and static objects, the indoor scene training data is collected and the target detection system is trained, and the trained target detection system detects and segments strong dynamic objects, weak dynamic objects and static objects; S02), based on the pre-processing of the prior reference map of multi-sensor fusion, the robot is equipped with a single-line laser radar, a wheel odometer, a camera, and an IMU sensor for real-time perception of the surrounding environment information. The wheel odometer calculates the robot's linear velocity, angular velocity, and posture change according to the real-time feedback pulse, wheel radius, and wheelbase. The IMU sensor outputs the z-axis angular velocity, x-axis acceleration, and y-axis acceleration based on its own coordinate system. The single-line laser radar provides environmental section perception capabilities, and the camera outputs image or point cloud depth information; When performing the pre-processing of the prior reference map, the robot is first remotely controlled to stably pass through various indoor areas. During this process, the robot collects multiple frames of IMU instantaneous angular velocity, linear acceleration, multiple frames of wheel odometer wheel instantaneous linear velocity, one frame of depth camera RGB image and depth information, and one frame of lidar point cloud information in real time; after the RGB image information arrives, the strong dynamic object detection is completed immediately, and the detected strong dynamic object is converted into the depth image to complete the point cloud segmentation. At the same time, the depth image coordinate system is converted to the laser point cloud coordinate system, and the laser point cloud and the strong dynamic object depth point cloud are used as input using the KD-Tree algorithm. The point in the laser point cloud that is closest to the strong dynamic object depth point cloud is output and removed, and the laser point cloud and the original camera output after the strong dynamic object is removed are recorded for each key frame; S03), post-processing of the prior reference map, traversing the laser point cloud and original camera output after removing the strong dynamic objects recorded in step S02), performing weak dynamic object detection on the original camera output, and converting the detected weak dynamic objects into the depth image to complete point cloud segmentation, and at the same time converting the depth image coordinate system to the laser point cloud coordinate system, using the KD-Tree algorithm to take the laser point cloud and the weak dynamic object depth point cloud as input, output the point in the laser point cloud that is closest to the weak dynamic object depth point cloud and assign the weak dynamic object attribute, and finally complete the two-dimensional grid map construction to generate the prior reference map. At this time, the grid map has the occupancy and weak dynamic object attributes; S04), based on the secondary update of the prior reference map, when executing the task, the robot completes the scanning and matching positioning work according to the prior reference map output by step S03), and performs secondary update of the prior reference map after a certain period of time. One thread is used for positioning, and the other thread searches for whether the four grids around the grid with weak dynamic objects are hit when the positioning stability meets the requirements. If hit, no processing is performed. Otherwise, the number of pending updates set for the grid is increased by 1. When the robot is cyclically operating, if it is detected that the number of pending updates for a certain grid is greater than T, the occupation attributes of the grid and the four grids around it are updated to blank, and the attributes of the weak dynamic object are deleted.
2. The mobile robot SLAM method in dynamic scenes according to claim 1, Features: When collecting indoor scene training data, we select indoor scenes with different scenes and different lighting times, and use RGB-D cameras to complete the image and depth information collection in the environment. Secondly, we manually annotate the collected images, mark the detection frames and dynamic attributes of the objects, and then perform data enhancement and normalization on the images.
3. The mobile robot SLAM method in dynamic scenes according to claim 1, Features: The Yolo-Fastest algorithm is used as the target detection system.
4. The mobile robot SLAM method in dynamic scenes according to claim 1, Features: Step S02) Output the point in the laser point cloud that is closest to the depth point cloud of the strong dynamic object and remove it, and then use graph optimization to complete the back-end optimization, and then record the laser point cloud, original camera output and optimized posture after removing the strong dynamic object for each key frame.
5. The mobile robot SLAM method in dynamic scenes according to claim 1, Features: In step S02), after the RGB image information arrives, strong dynamic object detection is completed in another thread immediately.
6. The mobile robot SLAM method in dynamic scenes according to claim 1, Features: In step S03), the detection of weak dynamic objects is performed in an offline process.
7. The mobile robot SLAM method in dynamic scenes according to claim 1, Features: In step S03), the two-dimensional grid map is constructed according to the Brensham algorithm.
8. The mobile robot SLAM method in dynamic scenes according to claim 1, Features: T=6。 9. A mobile robot SLAM device in a dynamic scene, comprising a processor and a memory storing program instructions, It is characterized in that The processor is configured to execute the mobile robot SLAM method in a dynamic scene as described in any one of claims 1 to 8 when running the program instructions.
10. A storage medium storing program instructions, It is characterized in that When the program instructions are run, the mobile robot SLAM method in a dynamic scene as described in any one of claims 1 to 8 is executed.
