Robot positioning scene degradation processing method, rapid positioning method and system
Through the Gauss-Newton method of eigenvalue decomposition and the fusion of IMU and odometer data, the problem of robot switching between indoor and outdoor environments and low positioning accuracy in small spaces is solved, an efficient and stable positioning algorithm is realized, and the robustness and stability of the system are improved. real-time.
Patent Information
- Application Number
- CN202410794040.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-19
Smart Images

Figure CN118363008B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of navigation technology, and in particular to a positioning scene degradation processing method, a rapid positioning method and a system for a robot. Background Art
[0002] With the development of robotics technology, autonomous mobile robots (AMRs) have emerged. AMRs are machines with see-think-act capabilities that can sense the environment and autonomously build environmental models to obtain their own position information in the environment, plan and control the movement of the robot.
[0003] In traditional technology, the robot is first positioned to determine its current position, and then the direction of movement is determined based on the current position of the robot. The current position of the robot can be determined by using GPS (Global Positioning System) to determine the position of the robot on the world map, or by using laser radar to scan point cloud data, and then matching the point cloud data with the point cloud map to obtain the position of the robot on the point cloud map.
[0004] In recent years, many companies have invested in the research of mobile robots, which have also made mobile robots widely used in people's production and life, such as the outdoor unmanned delivery robot developed by JD.com, the intelligent sweeping robot of Roborock Technology, and the intelligent AGV forklifts of major ports. However, the environmental perception and navigation design of these robots can only be applied to a single environment, either indoors or outdoors, and it is difficult to achieve seamless positioning and navigation when the robot switches between indoor and outdoor environments.
[0005] There are some solutions for the current indoor and outdoor positioning algorithms, such as using GPS to make up for the defects of outdoor positioning algorithms. However, the application of GPS indoors will be greatly disturbed, and the application of LiDAR outdoors will be affected by obstacles. They cannot be applied to both indoor and outdoor scenarios. Among them, GPS increases the hardware cost of the system. In addition, there are two positioning systems based on GPS and LiDAR. Generally, GPS is only used to obtain the reference position at the initial recognition point. The GPS position and the map coordinate system need to be fused when the map is established, which increases the complexity of the algorithm. Visual information is used to make up for the richness of information acquisition to solve indoor and outdoor positioning problems. Among them, the introduction of visual information fusion at night or in rainy and foggy weather with poor light is equivalent to introducing greater errors, which seriously affects the robustness of the system.
[0006] However, when the robot is in a small space such as a closed charging room or a narrow corridor, there is a situation where the lidar data information is insufficient and it cannot be positioned. This can be achieved through the fusion of IMU and odometer data. However, the traditional filtering-based data fusion requires dynamic maintenance and adjustment of the 6-dimensional (XYZRPY) of each sensor data in imu, odom, and laser_pose, which is a total of 18*18 dimensional covariance matrix or information matrix. The maintenance of this matrix is complex, with many parameters, poor robustness of the sensor fusion process, and easy data divergence. Summary of the invention
[0007] The technical problem to be solved by the present invention is how to improve the positioning accuracy of the robot in a small range or a narrow and long space.
[0008] The present invention solves the above technical problems through the following technical means:
[0009] The method for processing the degradation of the robot positioning scene includes the following steps:
[0010] Pre-process the measurement data acquired by the laser radar carried by the robot to obtain point cloud data;
[0011] Based on the point cloud data and global map information, a lidar measurement model is established:
[0012] Zlidar = h(Xrobot, Map) + ε
[0013] In the formula, Zlidar represents the laser radar measurement value, Xrobot represents the robot position and posture, Map represents the global map information, h represents the corresponding nonlinear mapping relationship, that is, the mapping from the robot posture to the map, and ε represents the existing error; by continuously iterating the laser radar measurement model, the minimized error ε is the corresponding robot position;
[0014] The method to minimize the error ε is to define an error function E, which represents the difference between the lidar measurement and the nonlinear mapping between the robot's current position and the map:
[0015]
[0016] Where E(Xrobot, Map) represents the error vector; the least squares minE of the constructed error is as follows:
[0017] minE = E(Xrobot, Map) T E(Xrobot,Map)
[0018] Where, E(Xrobot, Map)T Transpose E(Xrobot, Map) and use the Gauss-Newton method to iterate the above equation. In each iteration, update the parameter dx to reduce the objective function. The final simplified formula of the Gauss-Newton method is as follows:
[0019] (J T J)dx = -J T e
[0020] Where dx is the unknown variable to be solved, J is the Jacobian matrix, and J T is the transpose of the Jacobian matrix, e is the error of the current measurement, and the formula can be further simplified into the following form:
[0021] Hdx = b
[0022] Where H is J T J, multiplying the Jacobian matrix by the transpose of the Jacobian matrix, can be used to approximate the Hessian matrix, which is a semi-positive symmetric square matrix. b is a constant. The matrix eigenvalue decomposition method in the Eigen library can be used to solve dx, which is the corresponding iterative change.
[0023] Decompose the Hessian matrix H to obtain the eigenvalue array V and eigenvector, and obtain the ratio of the maximum and minimum eigenvalues:
[0024] d = fabs(max(V) / min(V))
[0025] Wherein, V is the eigenvalue array, max(V) represents the maximum value in the array, min(V) represents the minimum value in the array, fabs() is the absolute value function, d represents the absolute value of the corresponding ratio, if d is less than the set first threshold, the IMU sensor and odometer are used to assist the laser radar positioning, if d is greater than the set first threshold, the laser radar data is used for positioning.
[0026] Furthermore, the iterative update rule of the laser radar measurement model is:
[0027]
[0028] Where Xrobot represents the actual posture of the robot, Map represents the global map information, J is the Jacobian matrix of the error function with respect to the posture, and J T is its transpose, e is the error vector of the current measurement; repeat the above steps until it converges to a certain threshold, and obtain the transformation relationship between Xrobot and Map, that is, the positioning result data of the robot at the current moment.
[0029] Furthermore, the preprocessing method for the measurement data obtained by the laser radar is specifically as follows:
[0030] 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;
[0031] Then calculate the ground points, extract all points below the horizontal angle, find the corresponding point in the i-beam laser point in the i + 1 beam, and calculate the difference vector of the vectors formed by the line connecting these two points and the radar. 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 cloud.
[0032] Cluster the remaining point clouds, record the clustered point clouds, thin the ground point clouds, and save the segmented point clouds;
[0033] IMU-based laser dedistortion, calculation of curvature, calculation of smoothness and removal of unreliable points;
[0034] 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.
[0035] Furthermore, the specific method of laser de-distortion is:
[0036] Subscribe to IMU sensor data in real time and save it in a queue, obtain the posture, angle, 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 frames of point cloud data, 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 de-distorted point cloud.
[0037] The present invention also provides a method for rapid positioning of a robot in a positioning scene degradation, comprising the following steps:
[0038] S01, obtain the initial laser radar positioning data of the mobile robot and save it as the initial posture;
[0039] 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;
[0040] S03, converting the point cloud map data into a Map coordinate system to obtain a converted point cloud map;
[0041] 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;
[0042] S05, based on the initial posture as the real-time positioning algorithm input, executing the above robot positioning scene degradation processing method; finally calculating the real-time posture solution score;
[0043] 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 lidar data does not participate in the fusion accumulation operation. The fused data is transmitted to step S05 in real time and used as the prediction value for the next iterative calculation.
[0044] Furthermore, the fusion method in step S06 is:
[0045] IMU data processing: Use IMU data for integral calculation to obtain the displacement and rotation of the robot;
[0046] Odometer data processing: Use odometer data for integral calculation to obtain the displacement of the robot;
[0047] 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.
[0048] 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.
[0049] Published data: The fused pose is published on the corresponding topic, and the final data frequency is not less than 100Hz.
[0050] The present invention also provides a robot positioning scene degradation rapid positioning system, comprising:
[0051] 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;
[0052] 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;
[0053] 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;
[0054] 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.
[0055] A positioning calculation module is used to execute the above-mentioned robot positioning scene degradation processing method based on the initial posture as the input of the real-time positioning algorithm; and finally calculate the real-time posture solution score;
[0056] The fusion calculation module uses the lidar data to fuse 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 (the IMU and odometer are not involved in the calculation at this time); the fused data is transmitted to the positioning calculation module in real time and used as the prediction value for the next iterative calculation.
[0057] Furthermore, the fusion method in the fusion calculation module is:
[0058] IMU data processing: Use IMU data for integral calculation to obtain the displacement and rotation of the robot;
[0059] Odometer data processing: Use odometer data for integral calculation to obtain the displacement of the robot;
[0060] 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.
[0061] 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.
[0062] Published data: The fused pose is published on the corresponding topic, and the final data frequency is not less than 100Hz.
[0063] The present invention also provides a processing device, comprising at least one processor and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor can execute the above-mentioned method by calling the program instructions.
[0064] The present invention also 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 above method.
[0065] The advantages of the present invention are:
[0066] The present invention uses the Gauss-Newton method based on eigenvalue decomposition to perform algorithm iteration matching, reduce algorithm complexity, and improve real-time performance; the method can handle the problem of positioning algorithm degradation in the environment, and for the limitation of scene degradation, the ratio between the maximum eigenvalue and the minimum eigenvalue is used for judgment; the eigenvalue is highly sensitive to the external environment, and the robot may encounter different degradation scenes during movement. The eigenvalue data corresponding to different scenes have relatively obvious differences. The ratio of the maximum and minimum eigenvalues belongs to a relative quantity rather than an absolute quantity, which can effectively improve the stability of the system. If the ratio is too large, it means that the feature contrast is obvious, otherwise it is not obvious. Using a suitable threshold can adapt to the algorithm degradation problem in different scenes. If the absolute value is used for judgment, since it is necessary to set the threshold for judgment according to different scenes, the complexity of the system is increased and the stability is reduced.
[0067] The present invention adopts the fusion of IMU, odometer and lidar matching algorithm, does not need to adopt the traditional filtering algorithm, has few parameters, fast speed, high robustness, and outputs 100Hz positioning data in real time. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 This is a logic block diagram of laser radar data preprocessing in Embodiment 1 of the present invention;
[0069] Figure 2 This is a flow chart of laser radar dedistortion in Embodiment 1 of the present invention;
[0070] Figure 3 This is a general workflow diagram of Embodiment 2 of the present invention;
[0071] Figure 4 This is a flow chart of the IMU, odometer, and lidar data fusion in the second embodiment of the present invention. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0073] Embodiment 1
[0074] This embodiment describes a method for processing robot positioning scene degradation, which has good adaptability to narrow and long spaces or closed spaces. It includes the following steps:
[0075] Step 1: Data preprocessing, such as Figure 1 As shown:
[0076] 1) In the initial state, the laser radar rotates one circle and collects point cloud data. After receiving a frame of point cloud, first convert the point cloud into an easy-to-process PCL format. The radar rotates one circle, which is not actually from 0 degrees to 360 degrees in a certain direction, but there is a certain deviation at the beginning, so the starting angle and ending angle of this frame of point cloud must be found. According to the acquired point cloud data, calculate the row number of each point cloud in the point cloud and reproject it.
[0077] 2) Calculate the ground points and extract the points below the horizontal angle from all the points. For the laser point in beam i, find the corresponding point in beam i + 1 and calculate the difference vector between the vectors formed by the line connecting these two points and the radar. If the angle between the difference vector and the horizontal plane is less than 10 degrees, it is considered to be a ground point cloud.
[0078] 3) Cluster the remaining point clouds, record the clustered point clouds, thin the ground point clouds, and save the segmented point clouds.
[0079] 4) IMU-based laser dedistortion, calculation of curvature, calculation of smoothness and removal of unreliable points.
[0080] 5) In order to prevent the feature extraction from being too dense, the current point cloud frame is divided into 6 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 the line features are extracted. All the remaining points are set as surface points, and then down-sampling is performed to reduce the amount of calculation, and finally the point cloud is published.
[0081] Among them, the laser dedistortion process based on IMU in the previous step is as follows: Figure 2 As shown:
[0082] In this example, slerp interpolation and inverse transformation algorithms are used only to solve the laser point cloud distortion during the rotation process. Considering that the amount of calculation of the robot increases significantly when it rotates, the distortion of two consecutive frames of laser is obvious during the robot's rotation process. In this example, laser de-distortion processing is performed for the rotation process. The algorithm has good convergence and low calculation amount 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 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, only the attitude angle of the IMU is processed in this example. In order to solve the problem of its angle drift, the relative value of the angle within a period of time is used for calculation. Get the Euler angle of each frame of IMU data, record the IMU timestamp of each frame, and record the IMU posture of the initial point of the laser radar (considering the time alignment problem, the initial point is interpolated to the posture corresponding to the initial timestamp of the laser radar using the slerp interpolation algorithm). The laser radar outputs data at 10Hz, and the default laser radar data frame is 100ms. The radar collects data at a constant speed within 100ms. Analyze each point data of the laser radar to obtain the timestamp corresponding to each point in the point cloud. Find the previous and next IMU data in the IMU queue for the current timestamp, and interpolate to the posture corresponding to the corresponding point through slerp. The interpolation coefficient is the ratio of the point timestamp in the current point cloud to the timestamp 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 frame point cloud data, 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 the rotation state, and the calculated new point cloud data is assigned to the position of the original stored point cloud as the dedistorted point cloud.
[0083] Step 2: Scene degradation processing method
[0084] The Gaussian iteration method based on eigenvalue decomposition can handle the problem of positioning scene degradation. This embodiment establishes a laser radar measurement model based on the laser radar measurement data obtained in the previous step and the map (here is the point cloud global map) data, which can be expressed as:
[0085] Zlidar = h(Xrobot, Map) + ε
[0086] Among them, Zlidar represents the radar measurement value, Xrobot represents the robot position and posture, Map represents the global map information, h represents the corresponding nonlinear mapping relationship, that is, the mapping from the robot posture to the map, and ε represents the existing error. This formula represents the actual position of the robot and the map data. Through nonlinear mapping, the current observation data of the lidar (including the ε error) can be obtained. Through continuous iteration, the corresponding error is minimized to obtain the corresponding robot position.
[0087] According to the above process, the error function E is defined to represent the difference between the lidar measurement value and the nonlinear mapping between the robot's current position and the map:
[0088]
[0089] Among them, E(Xrobot, Map) represents the error vector. The process of solving this equation uses the minimization error function E, that is, minimizing the difference in the nonlinear mapping between the laser measurement value and the map value. That is, the smaller the error, the more accurate the relationship between the observed position and the corresponding position on the robot map, that is, the more accurate the positioning. The least squares minE of the error is constructed as follows:
[0090] minE = E(Xrobot, Map) T E(Xrobot,Map)
[0091] Where E(Xrobot, Map) represents the error vector, E(Xrobot, Map) T Transpose it, establish the equation, and solve the least squares equation. The solution process uses the Gauss-Newton method for iterative processing. The Gauss-Newton method is an iterative nonlinear optimization algorithm with fast iteration speed and small calculation amount. In each iteration, the parameter dx is updated to reduce the objective function. The final simplified formula of the Gauss-Newton method is as follows:
[0092] (J T J)dx = -J T e
[0093] Where dx is the unknown variable to be solved, J is the Jacobian matrix, that is, the partial derivative matrix of the equation for the unknown quantity, and J T is the transpose of the Jacobian matrix, e is the error of the current measurement, and the formula can be further simplified into the following form:
[0094] Hdx = b
[0095] Where H is J TJ, multiplying the Jacobian matrix by the transpose of the Jacobian matrix, can be used to approximate the Hessian matrix (i.e., the quadratic partial derivative matrix), which is a semi-positive symmetric square matrix. b is a constant. The matrix eigenvalue decomposition method in the Eigen library can be used to solve dx, which is the corresponding iterative change.
[0096] Among them, due to the instability of the positioning algorithm in a small range or a narrow corridor, mathematically expressed as the current feature is not obvious enough, for the constructed equation, it is necessary to perform certain constraints on the Hessian matrix H to solve the problem of positioning divergence within a certain range, especially the degenerate problem of positioning. By decomposing the Hessian matrix, the eigenvalue array V and eigenvector are obtained. This method obtains the ratio of the maximum and minimum eigenvalues:
[0097] d = fabs(max(V) / min(V))
[0098] Among them, V is the eigenvalue array, max(V) represents the maximum value in the array, min(V) represents the minimum value in the array, fabs() is the absolute value function, and d represents the absolute value of the corresponding ratio. Since the threshold uses a relative quantity, there is no need to set and adjust the eigenvalue threshold for different scenes, and it can adapt to a wider range of scenes. The maximum and minimum eigenvalue ratios in a small and narrow space are small, indicating feature degradation. It is found that if this ratio d is less than the first threshold, other sensors such as IMU and odometer are used to assist in positioning, and laser radar data is not used for positioning, thereby solving the problem of positioning degradation caused by unclear features in the scene.
[0099] The iterative update rule is:
[0100]
[0101] Among them, Xrobot represents the actual posture of the robot, Map represents the global map information, J is the Jacobian matrix of the error function with respect to the posture, and J T is its transpose, and e is the error vector. Repeat the above steps until convergence to a certain threshold (in this embodiment, the rotation threshold is 0.5 degrees, the translation threshold is 0.05m, and the iteration threshold is 10 times), and obtain the transformation relationship between Xrobot and Map, that is, the positioning result data at the current moment.
[0102] This embodiment performs algorithm iterative matching based on the Gauss-Newton method of eigenvalue decomposition, reduces algorithm complexity and improves real-time performance; this method can handle the problem of positioning algorithm degradation in the environment and the limitation of scene degradation. Currently, the eigenvalue threshold method has been used to judge the scene and algorithm degradation problems. In this example, the ratio between the maximum eigenvalue and the minimum eigenvalue is used for judgment; the algorithm is simple.
[0103] Embodiment 2
[0104] Based on the solution of the scene degradation problem in the first embodiment, this embodiment provides a method for fast positioning of a robot in a scene degradation situation, such as Figure 3 As shown, the specific steps include:
[0105] Step 1: Create a 3D map based on LOAM or Lego-LOAM, Lio-SAM related algorithms, and save the data as global map data, corner point map, surface point map, and point cloud data corresponding to key points;
[0106] Step 2: When positioning, first give an initial positioning data or read a real-time saved data as the initial posture;
[0107] Step 3: Based on this initial pose, obtain the key points 3 meters away from the key points, and find the map point clouds corresponding to the corner points and surface points;
[0108] Step 4: Convert the point cloud map to the Map coordinate system through this key point to obtain the converted point cloud map;
[0109] 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, human intervention can be used to give a new initial value). If it is lower than the second threshold, the initial pose of the ICP algorithm is taken as the initial value and brought into step 6.
[0110] Step 6: Pass the precise initial pose to the real-time positioning algorithm;
[0111] Step 7: The real-time positioning algorithm is iteratively used to solve the real-time posture, that is, the method of Example 1, and the real-time posture solution score is calculated;
[0112] 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 radar pose does not participate in the fusion accumulation operation;
[0113] Step 9: Fuse the IMU attitude and odometer data to output real-time position data at a rate of no less than 100 Hz.
[0114] Step 10: The fused data is transmitted to step 6 in real time and used as the prediction value for the next iterative calculation.
[0115] Among them, the IMU, odometer, and lidar data fusion process is as follows Figure 4 As shown, the specific process is as follows:
[0116] IMU data processing: IMU data is used to estimate the robot's posture and speed. These data are stored in a locked double-ended queue and can be obtained through specific functions. The obtained IMU data is used for integral calculation to obtain the robot's displacement and rotation. Odometer data processing: Odometer data provides the robot's linear velocity and angular velocity. These data are stored in another locked double-ended queue and can be obtained through functions. The obtained odometer data is used for integral calculation to obtain the robot's displacement. Lidar data processing: The data calculated by matching the lidar with the map data is assigned to a variable, and the obtained data is the robot's posture;. Positioning data fusion: First, if the lidar's posture is different from the previous posture, and the cost of map matching is less than the threshold, then the lidar's posture is considered to be accurate and is directly used as the fused posture. Use the data of IMU and odometer at the same time to estimate the robot's posture between the previous frame of lidar and the current frame. These postures use Riemann integrals starting from the lidar posture of the previous frame to obtain the fused posture. Published data: The fused pose is published on the corresponding topic, and the frequency of the final acquired data is not less than 100Hz. This embodiment first uses LOAM or Lego-LOAM, Lio-SAM related algorithms to use lidar data to build a 3D map. These map data include global map data, corner point maps, surface point maps, and point cloud data corresponding to key points, providing detailed map information for subsequent positioning.
[0117] At the beginning of positioning, the system obtains the initial positioning data or reads the real-time saved data as the initial pose. Then, the system extracts the key points within 3 meters of the key points and finds the map point cloud of the corresponding corner points and surface points.
[0118] By converting the point cloud map to the Map coordinate system through the initial pose, the system realizes the conversion from the sensor coordinate system to the global coordinate system. Next, the system performs ICP matching. If the matching score is higher than the second threshold, the initial pose is updated and re-positioned; if it is lower than the threshold, the initial pose of the ICP algorithm is obtained as the initial value.
[0119] The precise initial pose is passed to the real-time positioning algorithm, and the system begins to iteratively solve the real-time pose, using the eigenvalue decomposition algorithm to calculate the real-time pose solution score. If the score is greater than the threshold, the system fuses the IMU pose and odometer pose data to improve the accuracy of pose estimation.
[0120] Finally, the system outputs real-time position data of no less than 100 Hz, and transmits the fused data to the next round of iterative calculation in real time as the prediction value. In this way, the system achieves efficient and accurate real-time positioning, and improves the robustness and stability of the system by fusing multi-sensor information.
[0121] Throughout the process, key steps such as point cloud processing, key point extraction, pose estimation, pose optimization, data fusion, and real-time update and release work together to ensure the reliable operation of the system in complex environments. This comprehensive system based on advanced algorithms provides an efficient and real-time solution for the navigation and positioning of mobile robots in unknown environments.
[0122] Embodiment 3
[0123] Based on the robot positioning scene degradation fast positioning method of the second embodiment, this embodiment provides a robot positioning scene degradation fast positioning system, including:
[0124] 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;
[0125] 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;
[0126] 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;
[0127] 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.
[0128] A positioning calculation module, used to execute the method of embodiment 1 based on the initial posture as the input of the real-time positioning algorithm; and finally calculate the real-time posture solution score;
[0129] The fusion calculation module uses the lidar data to fuse 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 (the IMU and odometer are not involved in the calculation at this time); the fused data is transmitted to the positioning calculation module in real time and used as the prediction value for the next iterative calculation.
[0130] Among them, the fusion method in the fusion calculation module is:
[0131] IMU data processing: Use IMU data for integral calculation to obtain the displacement and rotation of the robot;
[0132] Odometer data processing: Use odometer data for integral calculation to obtain the displacement of the robot;
[0133] 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.
[0134] 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.
[0135] Published data: The fused pose is published on the corresponding topic, and the final data frequency is not less than 100Hz.
[0136] Embodiment 4
[0137] This embodiment provides a processing device, including at least one processor and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method described in embodiment one or embodiment two.
[0138] Embodiment 5
[0139] The embodiment 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 described in the first embodiment or the second embodiment.
[0140] 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 the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. 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 embodiments of the present invention.
Claims
1. A method for processing robot positioning scene degradation, characterized in that: The following steps are involved: Pre-process the measurement data acquired by the laser radar carried by the robot to obtain point cloud data; Based on the point cloud data and global map information, a lidar measurement model is established: Zlidar = h(Xrobot, Map) + ε In the formula, Zlidar represents the laser radar measurement value, Xrobot represents the robot position and posture, Map represents the global map information, h represents the corresponding nonlinear mapping relationship, that is, the mapping from the robot posture to the map, and ε represents the existing error; by continuously iterating the laser radar measurement model, the minimized error ε is the corresponding robot position; The method to minimize the error ε is to define an error function E, which represents the difference between the lidar measurement and the nonlinear mapping between the robot's current position and the map: Where E(Xrobot, Map) represents the error vector; the least squares minE of the constructed error is as follows: minE = E(Xrobot, Map) T E(Xrobot,Map) Where, E(Xrobot, Map) T Transpose E(Xrobot, Map) and use the Gauss-Newton method to iterate the above equation. In each iteration, update the parameter dx to reduce the objective function. The final simplified formula of the Gauss-Newton method is as follows: (J T J)dx = -J T e Where dx is the unknown variable to be solved, J is the Jacobian matrix, and J T is the transpose of the Jacobian matrix, e is the error of the current measurement, and the formula can be further simplified into the following form: Hdx = b Where H is J T J, multiplying the Jacobian matrix by the transpose of the Jacobian matrix, can be used to approximate the Hessian matrix, which is a semi-positive symmetric square matrix. b is a constant. The matrix eigenvalue decomposition method in the Eigen library can be used to solve dx, which is the corresponding iterative change. Decompose the Hessian matrix H to obtain the eigenvalue array V and eigenvector, and obtain the ratio of the maximum and minimum eigenvalues: d = fabs(max(V) / min(V)) Wherein, V is the eigenvalue array, max(V) represents the maximum value in the array, min(V) represents the minimum value in the array, fabs() is the absolute value function, d represents the absolute value of the corresponding ratio, if d is less than the set first threshold, the IMU sensor and odometer are used to assist the laser radar positioning, if d is greater than the set first threshold, the laser radar data is used for positioning.
2. The method for processing robot positioning scene degradation according to claim 1, characterized in that: The iterative update rule of the lidar measurement model is: Where Xrobot represents the actual posture of the robot, Map represents the global map information, J is the Jacobian matrix of the error function with respect to the posture, and J T is its transpose, e is the error vector of the current measurement; repeat the above steps until it converges to a certain threshold, and obtain the transformation relationship between Xrobot and Map, that is, the positioning result data of the robot at the current moment.
3. The method for processing robot positioning scene degradation 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 between the vectors formed by the line connecting these two points and the radar, and if the angle between the difference vector and the horizontal plane is less than the set value, it is considered to be a ground point cloud; 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.
4. The method for processing robot positioning scene degradation according to claim 3, 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, angle, 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 laser radar; 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 attitude 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 frame point cloud data, 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.
5. A robot positioning scene degradation fast positioning method, 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 lidar data does not participate in the fusion accumulation operation. The fused data is transmitted to step S05 in real time and used as the prediction value for the next iterative calculation.
6. The method for rapid positioning of a robot in a positioning scene degradation according to claim 5, characterized in that: The fusion method in step S06 is: IMU data processing: Use IMU data for integral calculation to obtain the displacement and rotation of the robot; Odometer data processing: Use odometer data 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. The robot's positioning scene degradation rapid positioning system is characterized by: 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 uses the lidar data to fuse 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 do not participate in the calculation. The fused data is transmitted to the positioning calculation module in real time and used as the prediction value for the next iterative calculation.
8. The robot positioning scene degradation rapid positioning system according to claim 7, characterized in that: The fusion method in the fusion calculation module is: IMU data processing: Use IMU data for integral calculation to obtain the displacement and rotation of the robot; Odometer data processing: Use odometer data 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.
