Pose optimization method and positioning method for indoor and outdoor multiple sensors and few parameters of robot

Through the pose optimization method of multiple sensors and few parameters, the ceres library is used for lidar point cloud data processing and IMU data fusion, which solves the problem of seamless positioning of robots between indoor and outdoor environments, and improves the real-time and performance of the positioning algorithm. Robust and adaptable to a variety of environmental conditions.

CN118776552AActive Publication Date: 2024-10-15HEFEI HAGONG TUNAN INTELLIGENT CONTROL ROBOT CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410794042.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-10-15
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

Existing technology is difficult to achieve seamless positioning and navigation of robots between indoor and outdoor environments. Traditional multi-sensor fusion algorithms are complex and have poor robustness, especially under poor lighting conditions, resulting in large errors, resulting in low system stability.

Method used

Using a multi-sensor and low-parameter pose optimization method, point cloud data is obtained through laser radar preprocessing, and the ceres library is used for nonlinear optimization. Combined with IMU and odometer data, a cost function is constructed to solve the robot pose and achieve real-time high-frequency positioning. , and use C++ and Eigen libraries in the ceres library for rotation group representation and plane fitting.

Benefits of technology

It improves the processing speed and robustness of the real-time positioning algorithm, adapts to day and night and rain and fog weather, reduces the amount of parameter maintenance, reduces system complexity, achieves 100Hz positioning data output, and supports real-time operation of embedded processors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118776552A_ABST
    Figure CN118776552A_ABST
Patent Text Reader

Abstract

The invention provides an indoor and outdoor multi-sensor and few-parameter pose optimization method and positioning method for a robot. The method comprises the following steps: eliminating surface point clouds of ground point clouds of point cloud data based on cerees optimization; fitting the current point and n neighbor points of the current point to form a plane; an abstract model of a positioning system is established, and a corresponding positioning result x0 is solved by calling a sol function in a cerees library. And repeating positioning calculation until convergence to a certain threshold value, and obtaining a transformation relation between Xrobot and Map, namely positioning data at the current moment. According to the iterative optimization method for removing the feature points of the ground point cloud based on cerees, the processing speed of a real-time positioning algorithm is obviously improved; the requirement on the computing power is low, the real-time performance is high, and the robustness is high; the device can be compatible with daytime, night and rainy and foggy weather with poor light.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of navigation technology, and in particular to a posture optimization method and a positioning method for robots with multiple sensors and few parameters indoors and outdoors. Background Art

[0002] With the development of robotics, autonomous mobile robots (AMRs) have emerged. AMRs are machines with see-think-act capabilities. They can perceive their environment and autonomously build a model of it, thereby obtaining information about their position within the environment and planning and controlling their movements.

[0003] Traditionally, the robot is first positioned to determine its current location; based on this location, the robot's direction of movement is determined. The robot's current location can be determined using GPS (Global Positioning System) on a world map, or by using LiDAR to scan point cloud data and match it with a point cloud map to determine the robot's position on the point cloud map.

[0004] In recent years, many companies have invested in mobile robotics research, making them a widespread part of people's daily lives. Examples include JD.com's unmanned outdoor delivery robots, Roborock's intelligent sweeping robots, and intelligent AGV forklifts deployed at major ports. However, these robots' environmental perception and navigation systems are limited to either indoor or outdoor environments, making it difficult to achieve seamless positioning and navigation between these environments.

[0005] Current solutions for indoor and outdoor positioning algorithms include using GPS to compensate for algorithmic deficiencies in outdoor positioning. However, GPS indoors is subject to significant interference, while LiDAR outdoor applications are affected by obstacles, making both approaches incompatible with both indoor and outdoor scenarios. GPS increases system hardware costs, and positioning based on GPS and LiDAR requires two separate positioning systems. GPS is typically used only to obtain a reference position at the initial point of identification, requiring fusion of the GPS position with the map coordinate system during map creation, increasing algorithmic complexity. Visual information is used to address indoor and outdoor positioning problems by addressing the lack of information available. However, visual information fusion introduces greater errors at night or in poor lighting conditions such as rain or fog, significantly impacting system robustness. Furthermore, traditional robot positioning algorithms based on loosely or tightly coupled multi-sensor fusion require designing the robot system and calibrating the position and posture relationships between the sensors. This requires significant effort and involves numerous fusion parameters. Improper parameter design or configuration can lead to system divergence, increasing system complexity and workload while reducing robustness. For example, traditional filtering-based data fusion requires dynamic maintenance and adjustment of the six dimensions (XYZRPY) of each sensor data in imu, odom, and laser_pose, which is a total of an 18*18-dimensional covariance matrix or information matrix. This parameter matrix needs to be continuously maintained, otherwise the sensor fusion process will have poor robustness and the data will easily diverge. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to solve the problem of seamless positioning optimization of robots indoors and outdoors based on a positioning algorithm that integrates multiple sensors and fewer parameters.

[0007] The present invention solves the above technical problems through the following technical means:

[0008] A multi-sensor, low-parameter pose optimization method for robots indoors and outdoors, comprising the following steps:

[0009] Step 1. Preprocess the measurement data acquired by the robot's laser radar to obtain point cloud data; and then use CERES to optimize and eliminate the surface point cloud of the ground point cloud of the point cloud data;

[0010] Step 2. Traverse the point cloud data after removing the ground point cloud and plane point cloud, process each point, use the initial positioning data given by the user or the last calculation result as input, and convert the lidar coordinate system to the map coordinate system;

[0011] Step 3. Use the kd-tree to find the nearest n neighboring points of the current point in the map. If the distance between the farthest neighbor point and the current point is less than the threshold m, continue processing; otherwise, skip the current point; fit a plane based on the n neighboring points;

[0012] Step 4. Calculate the distance dist from the current point to the plane, and calculate the projection point point_proj of the current point on the plane;

[0013] Step 5. Build the positioning model: Create a cost function. The cost function defines a structure called CostPlan. In the CostPlan structure, the operator() function is configured to receive two parameters:

[0014] const T*PRi: a pointer to a 6-dimensional vector representing the robot's position. The first three elements of the 6-dimensional vector are the position, and the last three elements are the logarithmic mapping of the rotation.

[0015] T*residual: a pointer to a 3D vector used to store the calculated residual;

[0016] operator() first converts the input current point and projection point into the template type T, then maps the input pose into a 6-dimensional vector, uses the Sophus library developed based on C++ and Eigen library, in which the SO(3) class used to represent the three-dimensional rotation group converts the logarithmic mapping of the rotation part into a quaternion, and then calculates the rotation and translation from the world coordinate system to the local coordinate system. Finally, the position of the current point on the map is calculated, and the distance from the current point to the projection point is calculated and saved in the residual;

[0017] Step 6. In order to minimize the sum of squares of the residuals, call the solve function in the ceres library to solve and obtain the corresponding positioning result x0.

[0018] Step 7. Output the obtained positioning result x0 as the input of step 2, repeat the above steps 2 to 7 until it converges to a certain threshold, and obtain the transformation relationship between the robot's position and posture and Map, that is, the positioning data at the current moment.

[0019] Furthermore, the preprocessing method for the measurement data obtained by the lidar is as follows:

[0020] First, convert the measurement data into PCL format. According to the obtained measurement data, that is, point cloud data, calculate the row number of each point cloud in the point cloud and reproject it.

[0021] Then, the ground points are calculated. All points below the horizontal angle are extracted. For the laser point in beam i, the corresponding point is found in beam i+1. The difference vector between the vectors formed by the line connecting these two points and the radar is calculated. If the angle formed by this difference vector and the horizontal plane is less than the set value, it is considered to be a ground point.

[0022] Cluster the remaining point clouds, record the clustered point clouds, thin the ground point clouds, and save the segmented point clouds;

[0023] IMU-based laser dedistortion, curvature calculation, smoothness calculation and removal of unreliable points;

[0024] Extract features from the current point cloud frame according to the line bundle, arrange the curvature of the point cloud in each part from small to large, extract line features, set all remaining points as surface points, then downsample to reduce the amount of calculation, and finally publish the point cloud.

[0025] Furthermore, the specific method of laser dedistortion is:

[0026] Subscribe to IMU sensor data in real time and save it in a queue, obtain the posture, handover, angular velocity, and angular acceleration of each frame of IMU sensor data, and record the IMU sensor timestamp of each frame; record the IMU sensor posture at the initial moment of the lidar; analyze each point data of the lidar to obtain the timestamp corresponding to each point in the point cloud; search for the previous and next IMU data in the IMU queue for the current timestamp; interpolate to the posture corresponding to the corresponding point through slerp; obtain the posture corresponding to each point cloud, and obtain the position of each point relative to the initial point cloud by inversely transforming the current point to the initial posture through the posture; after traversing all the point cloud data in one frame, obtain the position of the entire point cloud relative to the initial moment of the laser; assign the calculated new point cloud data to the position of the original stored point cloud as the dedistorted point cloud.

[0027] Furthermore, the method for fitting the plane in step 3 is:

[0028] For the n neighboring points found, calculate their mean and construct an nxm matrix matA0, where each row represents the coordinates of a neighboring point. Use column-pivoting QR decomposition to solve the linear system _matA0*_matX0=_matB0, where _matB0 is an nx1 matrix with all elements set to -1. The solution _matX0 is the plane's parameters. From the solution _matX0, obtain the plane's normal vector (pa, pb, pc) and the distance pd from the origin, and normalize them to ensure their length is 1, thus fitting a plane.

[0029] The present invention also provides a method for indoor and outdoor high-frequency real-time positioning of a mobile robot, comprising the following steps:

[0030] S01. Obtain the initial laser radar positioning data of the mobile robot and save it as the initial posture;

[0031] S02. Obtain key points within a certain range nearby based on the positioning data, and find point cloud map data corresponding to the corresponding corner points and surface points based on the key points;

[0032] S03, converting the point cloud map data into a Map coordinate system to obtain a converted point cloud map;

[0033] S04, performing ICP algorithm matching on the converted point cloud map and the Map. If the matching score is higher than the second threshold, executing step S01; otherwise, taking the obtained ICP algorithm initial pose as the initial value and proceeding to step S05;

[0034] S05. Based on the initial posture as an input to the real-time positioning algorithm, execute the method described in any one of claims 1 to 4; and finally calculate the real-time posture solution score;

[0035] S06. When the score is greater than the third threshold, the lidar data is fused with the IMU data and the odometer data. Otherwise, the result calculated by the lidar is used as the fused result. At this time, the IMU and odometer are not involved in the calculation. The fused data is transmitted to step S05 in real time and used as the prediction value for the next iterative calculation.

[0036] Furthermore, the fusion method in step S06 is:

[0037] IMU data processing: IMU data is used for integration calculation to obtain the displacement and rotation of the robot;

[0038] Odometer data processing: The odometer data is used for integration calculation to obtain the displacement of the robot;

[0039] LiDAR data processing: The data calculated by matching the LiDAR with the map data is assigned to a variable. The obtained data is the robot's position and posture.

[0040] Positioning data fusion: First, if the LiDAR pose is different from the previous pose and the real-time pose solution score is less than the third threshold, the LiDAR pose is considered accurate and directly used as the fused pose. Simultaneously, the IMU and odometry data are used to estimate the robot's pose between the previous LiDAR frame and the current frame. These poses are then Riemann integrated using the previous LiDAR pose as the starting point to obtain the fused pose.

[0041] Release data: The fused pose is published on the corresponding topic, and the final data frequency is not less than 100Hz.

[0042] The present invention also provides a mobile robot indoor and outdoor high-frequency real-time positioning system, comprising:

[0043] The initial pose acquisition module is used to obtain the initial lidar positioning data of the mobile robot and save it as the initial pose;

[0044] A point cloud map data acquisition module is used to obtain key points within a certain range nearby based on the positioning data, and find point cloud map data corresponding to the corresponding corner points and surface points based on the key points;

[0045] The map conversion module is used to convert the point cloud map data into the Map coordinate system to obtain the converted point cloud map;

[0046] The pose matching module is used to match the converted point cloud map with the Map using the ICP algorithm. If the matching score is higher than the second threshold, the initial pose acquisition module is executed. Otherwise, the initial pose obtained by the ICP algorithm is brought into the positioning calculation module as the initial value.

[0047] A positioning calculation module, configured to execute the method of any one of claims 1 to 4 based on the initial posture as an input to a real-time positioning algorithm; and finally calculate a real-time posture solution score;

[0048] The fusion calculation module is used to fuse the lidar data with the IMU data and the odometer data when the score is greater than the third threshold. Otherwise, the result calculated by the lidar is used as the fusion result. At this time, the IMU and odometer are not involved in the calculation; the fused data is transmitted to step S05 in real time and used as the prediction value for the next iterative calculation.

[0049] Furthermore, the fusion method in the fusion calculation module is:

[0050] IMU data processing: IMU data is used for integration calculation to obtain the displacement and rotation of the robot;

[0051] Odometer data processing: The odometer data is used for integration calculation to obtain the displacement of the robot;

[0052] LiDAR data processing: The data calculated by matching the LiDAR with the map data is assigned to a variable. The obtained data is the robot's position and posture.

[0053] Positioning data fusion: First, if the LiDAR pose is different from the previous pose and the real-time pose solution score is less than the third threshold, the LiDAR pose is considered accurate and directly used as the fused pose. Simultaneously, the IMU and odometry data are used to estimate the robot's pose between the previous LiDAR frame and the current frame. These poses are then Riemann integrated using the previous LiDAR pose as the starting point to obtain the fused pose.

[0054] Release data: The fused pose is published on the corresponding topic, and the final data frequency is not less than 100Hz.

[0055] The present invention also provides a processing device, which includes at least one processor and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute any one of the methods described in claims 1 to 6.

[0056] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method according to any one of claims 1 to 6.

[0057] The advantages of the present invention are:

[0058] The present invention is based on the CERES iterative optimization method for removing ground point cloud feature points, which significantly improves the processing speed of the real-time positioning algorithm; it requires little computing power, has high real-time performance and high robustness; and is compatible with daytime, nighttime, and rainy and foggy weather with poor lighting conditions;

[0059] The sensor fusion process is robust, avoiding post-fusion divergence, adjusting and maintaining a covariance matrix or information matrix with six dimensions for each variable in imu, odom, and laser_pose, totaling 18*18 dimensions. Direct positioning is performed on the 3D map without switching to a 2D map. Even in areas of the charging room where LiDAR positioning is poor, 100Hz fusion positioning results can still be output. This algorithm appropriately reduces data processing volume and optimizes processing logic, ultimately achieving a processing utilization rate of less than 50% on a single-core Intel CPU, supporting real-time operation on embedded processors.

[0060] The present invention adopts the fusion of IMU, odometer and lidar matching algorithm, without the need for traditional filtering algorithm, with few parameters, fast speed, high robustness, and real-time output of 100Hz positioning data. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 This is a logic block diagram of the laser radar data preprocessing in the first embodiment of the present invention;

[0062] Figure 2 This is a flowchart of laser radar dedistortion in Example 1 of the present invention;

[0063] Figure 3 This is a general workflow diagram of Example 2 of the present invention;

[0064] Figure 4 This is a flow chart of the IMU, odometer, and lidar data fusion in Example 2 of the present invention. DETAILED DESCRIPTION

[0065] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0066] Example 1

[0067] This embodiment describes a multi-sensor, low-parameter pose optimization method for robots indoors and outdoors, which has good adaptability to narrow or enclosed spaces. It includes the following steps:

[0068] Step 1: Data preprocessing, such as Figure 1 As shown:

[0069] 1) In the initial state, the LiDAR rotates one circle, collecting point cloud data. After receiving a frame of point cloud data, the point cloud is first converted into a more manageable PCL format. A single rotation of the LiDAR does not actually start at 0 degrees and end at 360 degrees in a fixed direction; rather, there is a certain deviation at the beginning. Therefore, the starting and ending angles of this frame of point cloud data must be determined. Based on the acquired point cloud data, the row number of each point in the point cloud is calculated and reprojected.

[0070] 2) Calculate ground points. Extract all points below the horizontal angle. For each laser point in beam i, find the corresponding point in beam i+1. Calculate the difference between the vectors formed by the line connecting these two points and the radar. If the angle between this difference and the horizontal plane is less than 10 degrees, it is considered a ground point.

[0071] 3) Cluster the remaining point clouds, record the clustered point clouds, thin the ground point clouds, and save the segmented point clouds.

[0072] 4) IMU-based laser dedistortion, curvature calculation, smoothness calculation and removal of unreliable points.

[0073] 5) To prevent feature extraction from being too dense, the current point cloud frame is divided into six parts according to the line bundle to extract features. The curvature of the point cloud in each part is arranged from small to large, and line features are extracted. All remaining points are set as surface points, and then downsampling is performed to reduce the amount of calculation. Finally, the point cloud is published.

[0074] Among them, the laser dedistortion process based on IMU in the previous step is as follows: Figure 2 As shown:

[0075] This example only uses slerp interpolation and an inverse transformation algorithm to resolve laser point cloud distortion during rotation. Considering that the amount of computation required for the robot to rotate increases significantly, and two consecutive laser frames are significantly distorted during the robot's rotation, this example performs laser de-distortion processing for the rotation process. The algorithm has good convergence and low computational complexity for the translation process, so de-distortion processing is not considered. The implementation method is to subscribe to IMU data in real time and save it in a queue. The IMU data includes attitude angle, angular velocity, and angular acceleration. There is a certain amount of drift in the angle. The angular velocity and angular acceleration can be used to integrate the corresponding angle and displacement within a certain period of time (the default laser radar is converted to the IMU coordinate system through the external parameters between the IMU and the radar). Considering the high frequency of IMU data (>200Hz), in order to reduce the complexity of the algorithm, this example only processes the attitude angle of the IMU. In order to solve the problem of its angle drift, the relative angle value over a period of time is obtained for calculation. Get the Euler angles of each frame of IMU data, record the IMU timestamp of each frame, and record the IMU posture of the initial point of the lidar (taking into account the time alignment problem, the initial point is interpolated to the posture corresponding to the initial timestamp of the lidar using the slerp interpolation algorithm). The lidar outputs data at 10Hz, and the default rate of each frame of lidar data is 100ms. Within 100ms, the lidar collects data at a constant speed. Analyze each point data of the lidar to obtain the timestamp corresponding to each point in the point cloud. For the current timestamp, find the previous and next IMU data in the IMU queue and interpolate to the posture corresponding to the corresponding point through slerp. The interpolation coefficient is the ratio of the timestamp of the point in the current point cloud to the timestamps in the previous and next IMU data. Finally, the posture corresponding to each point cloud can be obtained. By inversely transforming the current point to the initial posture through the posture, the position of each point relative to the initial point cloud can be obtained. After traversing all the point cloud data in one frame, the position of the entire point cloud relative to the initial moment of the laser is obtained, that is, the point cloud is dedistorted in its rotational state, and the calculated new point cloud data is assigned to the position of the original stored point cloud as the dedistorted point cloud.

[0076] Step 2: Scene degradation processing method

[0077] Based on CERES optimization, surface points are eliminated for matching and positioning, distance constraints from points to surfaces are established, and nonlinear optimization library acceleration technology is used to reduce complexity and improve processing efficiency.

[0078] The previous method can obtain point clouds with different features, including surface point clouds, ground point clouds, and corner point clouds. Among them, there are also surface point cloud maps, corner point cloud maps, and overall point cloud maps in the map. Due to the large amount of global point cloud data, the data feature information represented by the corner point cloud is not complete, and the overall data volume of the surface point cloud is also large. Among them, the ground point cloud can be used as a constraint to prevent drift in the Z direction during the mapping process, but in the positioning algorithm, there is no drift in the Z direction, so the surface point cloud matching can be performed by removing the ground point cloud, which greatly reduces the amount of data, improves computational efficiency, and increases robustness. In this example, the surface point cloud information of the ground point cloud is removed and matched with the surface point cloud map for matching and positioning. The nonlinear optimization algorithm based on the Ceres library is used. The specific algorithm steps are as follows:

[0079] 1. Traverse the input plane point cloud data after removing the ground point cloud (if the point cloud data is too small, less than 200, the processing flow will be exited without processing), process each point, and use the current point as input based on the initial positioning data given by the user or the last calculated result (if this is the first time the algorithm is executed, the data is the initial positioning value given by the user, otherwise it is the positioning result calculated last time) to convert the radar coordinate system to the global map coordinate system.

[0080] 2. Use the kd-tree to find the 5 nearest neighbors of the current point in the global map. If the distance between the farthest neighbor point and the current point is less than the threshold of 3 meters, continue processing, otherwise skip the current point.

[0081] 3. For the five neighboring points found, calculate their mean and construct a 5x3 matrix matA0, where each row contains the coordinates of a neighboring point. This matrix can be considered the coefficient matrix of a linear system. _matB0 is a 5x1 matrix with all elements set to -1. This matrix can be considered the constant term of the linear system. Use column pivoting QR decomposition to solve the linear system of equations: _matA0*_matX0=_matB0, where _matB0 is a 5x1 matrix with all elements set to -1. The solution to this system, _matX0, is the parameters of the plane. From the solution, _matX0, obtain the plane's normal vector (pa, pb, pc) and the distance pd from the origin and normalize them. Column pivoting QR decomposition is a method for solving linear systems of equations that can handle rectangular coefficient matrices (i.e., the number of equations and unknowns is unequal). In this problem, we have five equations (the five neighboring points) and three unknowns (the parameters of the plane). From solution_matX0, obtain the plane's normal vector (pa, pb, pc) and its distance from the origin, pd. Here, pa, pb, and pc are a, b, and c in the plane equation ax+by+cz+d=0, and pd is d. Then normalize the normal vector to ensure its length is 1.

[0082] In summary, a plane is fitted by the least squares method, which can conform to the distribution of neighbor points.

[0083] 4. Check whether all neighbor points are on the calculated plane (that is, the distance from the plane is less than 0.2). If so, it is considered that a valid plane feature has been found.

[0084] 5. If a valid plane feature is found, calculate the distance dist from the current point to the plane and calculate the projection point point_proj of the current point on the plane.

[0085] 6. Create a cost function e, which represents the distance from the current point to the plane. The cost function creation process is as follows:

[0086] The cost function defines a structure called CostPlan, which is used to calculate the Ceres cost function between the point cloud planar features and the map cloud. Ceres is a library for solving nonlinear least squares problems.

[0087] The Create static function accepts the current point, the projected point, and the transformation matrix as parameters, creates a new CostPlan object, and wraps it with the Ceres cost function. This function returns a pointer to ceres::CostFunction, which can be directly used in Ceres optimization problems.

[0088] In the CostPlan structure, the operator() function is a template function that accepts two parameters:

[0089] -const T*PRi: This is a pointer to a 6-dimensional vector representing the robot's position and rotation. The first three elements of this vector are the position, and the last three elements are the logarithmic mapping of the rotation.

[0090] -T*residual: This is a pointer to a 3D vector used to store the calculated residual.

[0091] First, the input current point and projection point are converted to the template type T, and then the input pose is mapped to a 6-dimensional vector. The Sophus library developed based on C++ and Eigen library is used, in which the SO(3) class used to represent the three-dimensional rotation group is used to convert the logarithmic mapping of the rotation part into a quaternion. Then, the rotation and translation from the world coordinate system to the local coordinate system are calculated. Finally, the position of the point on the map is calculated, and the distance from the point to the projection point is calculated and saved in the residual.

[0092] 7. The above process establishes an abstract model of the positioning system, sets the number of processing threads used to 4-6, and the number of iterations to 5. In order to minimize the sum of squares of the residuals (i.e., the difference between the observed data and the model prediction), the solve function in the ceres library is called to solve and obtain the corresponding positioning result x0.

[0093] 8. Output the positioning result x0 obtained in step 7, repeat step 1, and repeat the above steps until it converges to a certain threshold (the rotation threshold is 0.5 degrees, the translation threshold is 0.05m, and the iteration threshold is 5 times), and obtain the transformation relationship between Xrobot and Map, that is, the positioning data at the current moment.

[0094] In summary, this process primarily extracts planar features from the input point cloud and calculates the distance from each point to the corresponding plane. These distances are then used to calculate the Ceres cost function between the point cloud planar features and the map cloud. This cost function can be used to optimize the robot's position by minimizing the cost function. The Ceres-based iterative optimization method for removing ground point cloud feature points significantly improves the processing speed of the real-time localization algorithm.

[0095] Example 2

[0096] Based on the solution of the scene degradation problem in the first embodiment, this embodiment provides a method for rapid positioning of a robot, such as Figure 3 As shown, the specific steps include:

[0097] Step 1: Create a 3D map based on LOAM or Lego-LOAM, Lio-SAM related algorithms, and save the data as map data, corner point map, surface point map, and point cloud data corresponding to key points;

[0098] Step 2: When positioning, first give an initial positioning data or read a real-time saved data as the initial pose;

[0099] Step 3: Based on this initial pose, obtain the key points 3 meters around the key points and find the map point cloud corresponding to the corresponding corner points and surface points;

[0100] Step 4: Convert the point cloud map to the Map coordinate system through this key point to obtain the converted point cloud map;

[0101] Step 5: Perform ICP matching on the converted point cloud map and Map. If the matching score is higher than the second threshold, go to step 2 (at this time, manual intervention can be used to re-initialize the value). If the matching score is lower than the second threshold, the initial pose of the ICP algorithm is used as the initial value and is brought into step 6.

[0102] Step 6: Pass the precise initial pose to the real-time positioning algorithm;

[0103] Step 7: The real-time positioning algorithm is iteratively solved for the real-time pose, that is, the method of Example 1, and the real-time pose solution score is calculated;

[0104] Step 8: If the score is greater than the third threshold, the lidar data is fused with the IMU data and the odometer data; otherwise, the result calculated by the lidar is used as the fused result (the IMU and odometer are not involved in the calculation at this time);

[0105] Step 9: Fuse the IMU attitude and odometer data to output real-time position data at a rate of no less than 100 Hz.

[0106] Step 10: The fused data is transmitted to step 6 in real time and used as the prediction value for the next iterative calculation.

[0107] Among them, the IMU, odometer, and lidar data fusion process is as follows: Figure 4 As shown:

[0108] 1. IMU Data Processing: IMU data is used to estimate the robot's posture and velocity. This data is stored in a locked double-ended queue and can be retrieved through specific functions. The acquired IMU data is used in integral calculations to determine the robot's displacement and rotation.

[0109] 2. Odometry Data Processing: Odometry data provides the robot's linear and angular velocity. This data is stored in a locked double-ended queue and can be retrieved through functions. The retrieved odometry data is used in integral calculations to determine the robot's displacement.

[0110] 3. LiDAR data processing: Assign the data calculated by matching the LiDAR with the map data to a variable. The data obtained is the robot's position and posture.

[0111] 4. Positioning Data Fusion: First, if the LiDAR pose is different from the previous pose and the map matching cost is less than a threshold, the LiDAR pose is considered accurate and directly used as the fused pose. The IMU and odometry data are used together to estimate the robot's pose between the previous LiDAR frame and the current frame. These poses are then Riemann integrated using the previous LiDAR pose as the starting point to obtain the fused pose.

[0112] 5. Data publishing: The fused pose is published on the corresponding topic, and the final data frequency is not less than 100Hz.

[0113] This embodiment first uses LOAM or Lego-LOAM, Lio-SAM and other related algorithms to create a 3D map using LiDAR data. This map data includes map data, corner point maps, surface point maps, and point cloud data corresponding to key points, providing detailed map information for subsequent positioning.

[0114] At the beginning of positioning, the system obtains initial positioning data or reads real-time saved data as the initial pose. Then, the system extracts key points within 3 meters of the key points and finds the corresponding map point cloud of corner points and surface points.

[0115] By converting the point cloud map to the map coordinate system using the initial pose, the system achieves the conversion from the sensor coordinate system to the global coordinate system. Next, the system performs ICP matching. If the matching score is above the second threshold, the initial pose is updated and re-localization is performed; if it is below the threshold, the initial pose of the ICP algorithm is used as the initial value.

[0116] The precise initial pose is passed to the real-time positioning algorithm, and the system begins iteratively solving the real-time pose, using the Ceres optimization algorithm to calculate the real-time pose solution score. If the score exceeds a threshold, the system fuses the IMU pose and odometer pose data to improve the accuracy of the pose estimation.

[0117] Ultimately, the system outputs real-time position data at a rate of no less than 100Hz, and transmits this fused data in real time to the next round of iterative calculations as the predicted value. This enables efficient and accurate real-time positioning, and by fusing multi-sensor information, it improves the system's robustness and stability.

[0118] Throughout the entire process, key steps such as point cloud processing, keypoint extraction, pose estimation, pose optimization, data fusion, and real-time updating and publishing work together to ensure the system's reliable operation in complex environments. This comprehensive system, based on advanced algorithms, provides an efficient, real-time solution for mobile robots' navigation and positioning in unknown environments.

[0119] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A multi-sensor and low-parameter posture optimization method for robots indoors and outdoors, characterized in that: The following steps are involved: Step 1. Preprocess the measurement data obtained by the laser radar carried by the robot to obtain point cloud data; and optimize and eliminate the surface point cloud of the ground point cloud of the point cloud data based on CERES; Step 2. Traverse the point cloud data after removing the ground point cloud and plane point cloud, process each point, take the current point as input according to the initial positioning data given by the user or the last calculation result, and convert the laser radar coordinate system to the map coordinate system; Step 3. Use the kd tree to find the nearest n neighbor points of the current point in the Map; if the distance between the farthest neighbor point and the current point is less than the threshold m, continue processing, otherwise skip the current point; fit a plane based on the n neighbor points; Step 4. Calculate the distance dist from the current point to the plane, and calculate the projection point point_proj of the current point on the plane; Step 5. Build the positioning model: Create a cost function. The cost function defines a structure called CostPlan. In the CostPlan structure, the operator() function is configured to receive two parameters: const T*PRi: a pointer to a 6-dimensional vector, which represents the position of the robot. The first three elements of the 6-dimensional vector are the position, and the last three elements are the logarithmic mapping of the rotation. T*residual: a pointer to a 3D vector used to store the calculated residual; operator() first converts the input current point and projection point into the template type T, and then maps the input pose into a 6-dimensional vector. It uses the Sophus library developed based on C++ and Eigen library, in which the SO(3) class used to represent the three-dimensional rotation group converts the logarithmic mapping of the rotation part into a quaternion, and then calculates the rotation and translation from the world coordinate system to the local coordinate system. Finally, it calculates the position of the current point on the map and the distance from the current point to the projection point, and saves it in the residual. Step 6. In order to minimize the sum of squares of the residuals, call the solve function in the ceres library to solve and obtain the corresponding positioning result x0; Step 7. Output the obtained positioning result x0 as the input of step 2, repeat the above steps 2 to 7 until it converges to a certain threshold, and obtain the transformation relationship between the robot's position and posture and Map, that is, the positioning data at the current moment.

2. A multi-sensor and low-parameter posture optimization method for robots indoors and outdoors according to claim 1, characterized in that: The specific preprocessing method for the measurement data obtained by the lidar is as follows: First, convert the measured data into PCL format, calculate the row number of each point cloud in the point cloud according to the acquired measured data, that is, point cloud data, and perform reprojection; Then calculate the ground points, extract all points below the horizontal angle, find the corresponding point in the i+1 beam for the laser point in the i beam, calculate the difference vector of the vectors formed by the line connecting these two points and the radar, and if the angle formed by the difference vector and the horizontal plane is less than the set value, it is considered to be a ground point; Cluster the remaining point clouds, record the clustered point clouds, thin the ground point clouds, and save the segmented point clouds; IMU-based laser dedistortion, calculation of curvature, calculation of smoothness and removal of unreliable points; Extract features of the current point cloud frame according to the line bundle, arrange the curvature of the point cloud in each part from small to large, extract line features, set all remaining points as surface points, then downsample to reduce the amount of calculation, and finally publish the point cloud.

3. A multi-sensor and low-parameter posture optimization method for robots indoors and outdoors according to claim 2, characterized in that: The specific method of laser de-distortion is: Subscribe to IMU sensor data in real time and save it in a queue, obtain the attitude, handover, angular velocity, and angular acceleration of each frame of IMU sensor data, and record the IMU sensor timestamp of each frame; record the IMU sensor attitude at the initial point of the lidar; Analyze each point data of the laser radar to obtain the timestamp corresponding to each point in the point cloud; search for the previous and next IMU data in the IMU queue for the current timestamp; interpolate to the posture corresponding to the corresponding point through slerp; Get the posture corresponding to each point cloud, and get the position of each point relative to the initial point cloud by inversely transforming the current point to the initial posture through the posture; after traversing all the point cloud data in one frame, get the position of the entire point cloud relative to the initial moment of the laser; assign the calculated new point cloud data to the position of the original stored point cloud as the dedistorted point cloud.

4. A multi-sensor and low-parameter posture optimization method for robots indoors and outdoors according to any one of claims 1 to 3, characterized in that: The method for fitting the plane in step 3 is: For the n neighbor points found, calculate their means and construct an nxm matrix matA0, where each row is the coordinate of a neighbor point; use column pivot QR decomposition to solve the linear equation system _matA0*_matX0=_matB0, where _matB0 is an nx1 matrix with all elements being -1, and the solution of the equation system _matX0 is the parameter of the plane; obtain the plane's normal vector (pa, pb, pc) and the distance pd from the origin from the solution _matX0 and normalize them; ensure that its length is 1 and fit a plane.

5. A high-frequency real-time positioning method for a mobile robot indoors and outdoors, characterized in that: The following steps are involved: S01, obtain the initial laser radar positioning data of the mobile robot and save it as the initial posture; S02, based on the positioning data, obtaining key points within a certain range nearby, and finding point cloud map data corresponding to the corner points and surface points based on the key points; S03, converting the point cloud map data into a Map coordinate system to obtain a converted point cloud map; S04, matching the converted point cloud map with the Map using the ICP algorithm, if the matching score is higher than the second threshold, executing step S01, otherwise the obtained initial pose of the ICP algorithm is taken as the initial value and brought into step S05; S05, based on the initial posture as the real-time positioning algorithm input, executing any method described in claims 1 to 4; and finally calculating the real-time posture solution score; S06. When the score is greater than the third threshold, the lidar data is fused with the IMU data and the odometer data. Otherwise, the result calculated by the lidar is used as the fused result. At this time, the IMU and the odometer do not participate in the calculation. The fused data is transmitted to step S05 in real time and used as the prediction value for the next iterative calculation.

6. A mobile robot indoor and outdoor high-frequency real-time positioning method according to claim 5, characterized in that: The fusion method in step S06 is: IMU data processing: IMU data is used for integration calculation to obtain the displacement and rotation of the robot; Odometer data processing: The odometer data is used for integral calculation to obtain the displacement of the robot; LiDAR data processing: assign the data calculated by matching the LiDAR with the map data to a variable. The data obtained is the robot's position and posture. Positioning data fusion: First, if the LiDAR pose is different from the previous pose, and the real-time pose solution score is less than the third threshold, the LiDAR pose is considered accurate and is directly used as the fused pose. At the same time, the IMU and odometer data are used to estimate the robot's pose between the previous LiDAR frame and the current frame. These poses are Riemann integrated with the LiDAR pose of the previous frame as the starting point to obtain the fused pose. Published data: The fused pose is published on the corresponding topic, and the final data frequency is not less than 100Hz.

7. A mobile robot indoor and outdoor high-frequency real-time positioning system, characterized in that: include: The initial posture acquisition module is used to obtain the initial laser radar positioning data of the mobile robot and save it as the initial posture; A point cloud map data acquisition module is used to acquire key points within a certain range nearby based on the positioning data, and find point cloud map data corresponding to the corner points and surface points based on the key points; The map conversion module is used to convert the point cloud map data into the Map coordinate system to obtain a converted point cloud map; The pose matching module is used to match the converted point cloud map with the Map by the ICP algorithm. If the matching score is higher than the second threshold, the initial pose acquisition module is executed. Otherwise, the initial pose of the ICP algorithm is taken as the initial value and brought into the positioning calculation module. A positioning calculation module, used to execute any one of the methods of claims 1 to 4 based on the initial posture as an input to the real-time positioning algorithm; and finally calculate the real-time posture solution score; The fusion calculation module is used to fuse the lidar data with the IMU data and the odometer data when the score is greater than the third threshold value, otherwise the result calculated by the lidar is used as the fused result, and the IMU and odometer are not involved in the calculation at this time; the fused data is transmitted to step S05 in real time as a prediction value for the next iterative calculation.

8. A mobile robot indoor and outdoor high-frequency real-time positioning system according to claim 7, characterized in that: The fusion method in the fusion calculation module is: IMU data processing: IMU data is used for integration calculation to obtain the displacement and rotation of the robot; Odometer data processing: The odometer data is used for integral calculation to obtain the displacement of the robot; LiDAR data processing: assign the data calculated by matching the LiDAR with the map data to a variable. The data obtained is the robot's position and posture. Positioning data fusion: First, if the LiDAR pose is different from the previous pose, and the real-time pose solution score is less than the third threshold, the LiDAR pose is considered accurate and is directly used as the fused pose. At the same time, the IMU and odometer data are used to estimate the robot's pose between the previous LiDAR frame and the current frame. These poses are Riemann integrated with the LiDAR pose of the previous frame as the starting point to obtain the fused pose. Published data: The fused pose is published on the corresponding topic, and the final data frequency is not less than 100Hz.

9. A processing device, characterized in that: It comprises at least one processor and at least one memory in communication with the processor, wherein the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute any method according to claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Map construction method and device

    CN113819914A

  • Positioning method based on 3D point cloud registration

    CN114004869A

  • Laser SLAM implementation method and system based on vertical optimization

    CN117269977A

  • Positioning mapping method for effectively combining environment plane information

    CN117470218A

  • Mobile robot positioning method based on multi-sensor fusion

    CN117629212A