Mobile robot autonomous recharging method based on two-dimensional point cloud

Through the autonomous recharge method based on two-dimensional point cloud, using two-dimensional lidar and machine learning technology, the problems of low recognition accuracy and large error in autonomous recharge of mobile robots are solved, and efficient and low-cost charging pile recognition and Smooth docking.

CN119024838APending Publication Date: 2024-11-26HOHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411117414.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The existing mobile robot autonomous recharge technology has problems such as low recognition accuracy, large error, high cost and dependence on light conditions. Especially when two-dimensional lidar long-distance measurement, the error from point cloud to origin increases, resulting in linear feature detection accuracy. decline.

Method used

Adopting the autonomous recharge method based on two-dimensional point clouds, the length characteristics of the charging pile are constructed by establishing kinematic models, collecting point cloud information in real time, clustering, filtering and machine learning classification, and designing the inversion control rate in combination with the Liyapunov function , realize accurate posture adjustment and smooth docking.

Benefits of technology

The recognition accuracy of charging piles is improved, the cost is reduced, and the smooth and fast docking is achieved, motion oscillation is avoided, and the recognition efficiency and accuracy are significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119024838A_ABST
    Figure CN119024838A_ABST
Patent Text Reader

Abstract

The invention discloses a mobile robot autonomous recharging method based on a two-dimensional point cloud, and aims to achieve the purpose that a mobile robot autonomously identifies a charging pile through a two-dimensional radar and moves to a charging position for charging The method comprises the following steps: firstly, establishing a kinematics equation of a differential wheel mobile robot under a map coordinate system; then European clustering and filtering are carried out on two-dimensional point cloud data collected in real time, classification is carried out by using an SVM algorithm with the distance from a point cluster center to a coordinate origin and a least square fitting straight line residual error square sum mean value as features, a straight line point cluster is obtained, and a target charging pile point cluster is identified according to the length feature of a charging pile; and finally, designing a Lyapunov function according to the error model so as to provide an inversion stabilization control rate, and calculating the speed and the angular speed, so that the mobile robot continuously moves to complete the butt joint with the charging pile. According to the invention, the accuracy and stability of identification and movement control of the charging pile during automatic charging of the mobile robot can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of mobile robot identification and control, and in particular relates to an autonomous recharging method for a mobile robot based on two-dimensional point cloud. Background Art

[0002] As mobile robots are used more and more frequently in various application scenarios, the issue of autonomous charging of mobile robots for battery life has received more attention. More and more robots are equipped with automatic recharging functions, that is, when the robot's battery is about to run out, it automatically finds a charging station and docks to charge.

[0003] Currently commonly used autonomous recharging methods include long-distance infrared light guidance solutions and visual tracking guidance solutions, but there are problems: 1. It is necessary to install additional infrared light transmitters and other devices at the charging pile, and the robot needs to add additional sensors in addition to the lidar; 2. The infrared signal transmission distance is short, the recognition efficiency is low, and the cost is high; 3. Visual tracking services require a lot of computing resources and are greatly affected by light conditions.

[0004] In addition, the current method of automatic recharging of mobile robots using two-dimensional laser radar for straight line feature detection, such as existing document 1: Chinese patent application number 202210788028.0, performs point cloud data filtering, point cloud data segmentation, and straight line filtering through preset thresholds to obtain straight line data in the point cloud data. Since the point cloud obtained by the laser radar has a problem that the measurement error of the distance from the point cloud to the origin will increase with the increase of the detection distance, the method of filtering out non-straight line points by presetting a unique threshold in this method will increase the error when filtering point clouds with a long distance, etc., resulting in a decrease in recognition accuracy.

[0005] In addition, the recognition and docking accuracy and stability between the mobile robot and the charging pile are also particularly important. Summary of the invention

[0006] In order to solve the problems of large errors and low recognition accuracy in the prior art, the present invention proposes a mobile robot autonomous recharging method based on two-dimensional point cloud, which can achieve effective and accurate recognition of charging piles and perform smooth and fluent mobile docking.

[0007] To achieve the above purpose, the technical solution adopted by the present invention is:

[0008] A mobile robot autonomous recharging method based on two-dimensional point cloud, comprising the following steps:

[0009] S1: Establish the kinematic model equation of the mobile robot in the map coordinate system;

[0010] S2: Collect point cloud information of the robot's surrounding environment in real time through a two-dimensional laser radar, and convert it from the radar coordinate system to the map coordinate system through coordinate transformation;

[0011] S3: Clustering and filtering the two-dimensional point cloud, and classifying it using machine learning methods to obtain straight line point clusters and non-straight line point clusters;

[0012] S4: For the classified straight line point clusters, according to the length characteristics of the charging piles, select the corresponding straight line point clusters as target charging piles;

[0013] S5: Based on the two-dimensional point cloud data of the target charging pile, construct a mathematical relationship between the error between the ideal charging posture of the robot and the current posture in the map coordinate system;

[0014] S6: Convert the pose error in the map coordinate system to the pose error in the robot coordinate system. When the pose error is less than a certain threshold, it is considered that the mobile robot has moved to the ideal charging pose and the process ends; otherwise, go to S7;

[0015] S7: Construct a Lyapunov function based on the posture error to design the inversion stabilization control rate of the mobile robot, control the speed and angular velocity of the mobile robot to adjust its posture in real time, and return to S2.

[0016] Furthermore, the step S3 specifically includes:

[0017] Step S3.1) clustering the two-dimensional point cloud into several point clusters using the Euclidean clustering method, and considering point clusters with too few points as noise points or thin columns, etc., and removing them;

[0018] Step S3.2) All point clusters are fitted into straight lines by the least squares method, and the distance from the center point of each point cluster to the origin is calculated. Together with the mean of the residual square sum, it is used as a feature. The Gaussian kernel function is introduced and trained using the SVM algorithm to classify straight line point clusters and non-straight line point clusters.

[0019] Further, step S3.2) specifically includes:

[0020] All point clusters are fitted into a straight line by the least squares method, and the resulting straight line is:

[0021]

[0022] Where:

[0023]

[0024] x ij is the horizontal coordinate of the jth point in the i-th point cluster, y ij is the ordinate of the jth point in the ith point cluster, and n is the number of points in the ith point cluster.

[0025] Mean of the residual sum of squares The calculation formula is:

[0026]

[0027] Because the two-dimensional laser radar has the characteristic that the point cloud measurement distance error increases as the point cloud distance increases, the least squares straight line fitting residual sum of squares mean is selected The distance d from the fitting line to the origin is used as a feature to train and learn the classification using the SVM algorithm. The average values ​​of the horizontal and vertical coordinates of each point in the cluster are selected as the horizontal and vertical coordinates of the center point of the cluster, and its distance from the origin of the radar coordinate system is calculated as d.

[0028] In the SVM algorithm used in this method, the Gaussian kernel function is introduced to map the data in the two-dimensional feature space of the point cloud to the three-dimensional space for classification and recognition:

[0029] Finding the optimal hyperplane That is, solve the maximum geometric interval of training samples:

[0030]

[0031] In the formula, w represents the weight, b represents the bias, and y i is the category of the i-th point cluster (1 for a straight line point cluster, -1 for a non-straight line point cluster), x i is its feature vector, and n is the total number of point clusters for training.

[0032] Introducing the slack variable ξ i , which allows a certain degree of violation:

[0033]

[0034] Where C is the penalty factor, ξ i is the penalty factor.

[0035] Integrate the constraints into the optimization objective function to construct the Lagrangian formula:

[0036]

[0037] In the formula, α i ,μ i is the Lagrange multiplier;

[0038] The Lagrangian function is converted into a dual problem for solution, and the Gaussian kernel function κ(x i ,x j ) replaces the inner product x i · j , map the samples to high-dimensional space for classification and recognition:

[0039]

[0040] In the formula, x i ,xj are the eigenvectors of two ρ is the bandwidth.

[0041] Solving the Lagrangian function, we can obtain the optimal segmentation hyperplane between the linear point cluster and the non-linear point cluster, that is, the decision function is:

[0042]

[0043] Where x is the input sample feature vector, z i are the support vectors.

[0044] Furthermore, the error mathematical relationship constructed in step S5 is:

[0045]

[0046] In the formula, the rotation matrix R1 is [x r ,y r ,θ r ],[x,y,θ] are the robot's coordinates in the map coordinate system X w O w Y w The ideal charging posture and current posture, θ2, θ1 are the horizontal axis X of the robot's ideal charging posture coordinate system r and the horizontal axis X and X of the current pose coordinate system w The angle between the center of the robot and the front charging port is L, d h is the vertical distance from the charging pile to the center of the robot, which is obtained by calculating the distance from the fitting straight line of the point cluster in S4 to the origin of the robot coordinate system, θ h It is the perpendicular line from the charging pile to the center of the robot and the X w The angle between the fitting line and the horizontal axis of the robot coordinate system is obtained by calculating the sum of the X angle between the fitting line and the horizontal axis of the robot coordinate system and θ1, d m is the distance from the midpoint of the charging pile to the center of the robot. The coordinate mean of 6 points at the beginning and end of the cluster is taken as the center of the cluster, and the distance from the origin of the robot coordinate system is calculated. m It is the angle between the line from the center of the charging pile to the center of the robot and X, which is obtained by calculating the angle between the line from the center of the cluster to the center of the robot and X.

[0047] Furthermore, in step S6, the pose error in the map coordinate system is converted to the robot coordinate system XOY, and the robot pose error p is defined as Δ :

[0048]

[0049] In the formula, the rotation matrix R2 is [x e ,ye ,θ e ] is the position error of the robot in the robot coordinate system XOY.

[0050] Furthermore, step S7 specifically includes:

[0051] The pose error p Δ The differential of is:

[0052]

[0053] Where v and ω are the linear velocity and angular velocity of the robot in the robot coordinate system.

[0054] Based on the pose error p Δ Construct the Lyapunov function V:

[0055]

[0056] In formula (11), k1, k2, k3 are control coefficients and are all greater than zero.

[0057] The differential of the function V is:

[0058]

[0059] According to formula (13), the control rate can be designed as:

[0060]

[0061] In the formula, k4 is also the control coefficient and is greater than 0.

[0062] Substituting the control rate into the V function differential, we can get:

[0063]

[0064] From the expression of function V and the differential of function V, it can be seen that the selected V function meets the stability criterion of Lyapunov method, and the proposed stabilization control rate is stable.

[0065] Compared with the existing literature 1, the main differences of this method in extracting two-dimensional point cloud data to obtain straight line point cluster data are:

[0066] 1) In the existing literature 1, method S2 uses the preset OutlineDist and MinSplitDist thresholds to filter out the values ​​with large errors in the point cloud data, and uses the preset MinSplitDist and MaxLineGap to segment the point cloud data to obtain a straight line structure array, and then uses the preset MinLineLength to filter out the straight line data with too few points. Finally, each straight line is processed by the least squares method to obtain the distance radius and the deflection angle angle; this method S3 clusters the two-dimensional point cloud into several types of point clusters through Euclidean clustering, selects the distance from the center point of the point cluster to the origin and the mean of the residual sum of squares of the least squares straight line fitting as features, and uses the SVM algorithm for learning and classification to classify straight line point clusters and non-straight line point clusters.

[0067] 2) In the existing literature 1, method S3 groups the lines with the same radius and angle into a group and finds the Euclidean distance d between the starting point of a line and the end point of another line in each group. i,j The two straight lines closest to the length of the charging pile are used as the walls on both sides of the charging pile, and the coordinates of the midpoint of the charging pile [x p ,y p ]; This method S4 selects the target charging pile point cluster from each straight line point cluster through straight line features.

[0068] 3) In method S4 of existing document 1, based on the processing results of step S3 and step S4 and the saved coordinates of the midpoint of the charging pile and the straight line information, S2 and S3 are repeated to control the robot to rotate the angle angle first and face the wall, and then S2 and S3 are repeated to control the robot to move a distance x=xp-dw along the x-axis, and S2 and S3 are repeated to move a distance yp along the y-axis until yp is less than the threshold YTolerance, and S2 and S3 are repeated to rotate the robot so that the charging port of the robot faces the charging pile and moves x′=xp-D in the direction of the charging port, and finally completes the docking and charging; this method constructs a current posture and an ideal posture error model according to the point cloud information characteristics of the target charging pile point cluster, and designs a stabilization control rate according to Lyapunov's second method to control the linear velocity and angular velocity of the mobile robot to achieve closed-loop control docking.

[0069] The beneficial effects of the present invention are:

[0070] 1) The present invention uses a two-dimensional laser radar to collect point clouds to identify charging piles. Compared with infrared light guidance and visual tracking guidance, no additional sensors are required, and the method is simple, reliable and low-cost;

[0071] 2) The present invention uses a machine learning method to achieve distance adaptive classification of straight line point clusters, and the accuracy of extracting straight line data is higher and the effect is better.

[0072] 3) The present invention proposes a stabilization control rate, which enables the robot to dock with the charging pile steadily and quickly in a smooth path, with high docking accuracy, short time consumption, and avoidance of motion oscillation. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0074] Figure 1 A flowchart of the method of the embodiment of the present application;

[0075] Figure 2 This is the kinematic model of the two-wheel differential mobile robot in the embodiment of the present application;

[0076] Figure 3 A schematic diagram of SVM classification using a Gaussian kernel function is shown in the embodiment of the present application;

[0077] Figure 4 A two-dimensional point cloud information map collected by the laser radar in the embodiment of the present application;

[0078] Figure 5 A straight line point cluster diagram obtained by extracting two-dimensional point cloud information collected by the laser radar in the embodiment of the present application;

[0079] Figure 6 This is a mathematical model diagram of the ideal charging posture and current posture of the mobile robot in an embodiment of the present application. DETAILED DESCRIPTION

[0080] The present invention is described more clearly below in conjunction with the accompanying drawings. The following examples are only used to more clearly illustrate the technical solution of the present invention, and therefore should also be regarded as the protection scope of the present invention.

[0081] It should be noted that the following description is intended to further illustrate the present invention. Unless otherwise specified, all terms used herein have the same meanings as those generally understood by those skilled in the art to which the present invention belongs.

[0082] Example 1

[0083] A mobile robot autonomous charging method based on two-dimensional point cloud. The specific principle of the method is: when the power of the mobile robot is lower than a certain threshold or receives a charging command issued by a human, the mobile robot automatically navigates to the vicinity of the charging pile. Through this method, a two-dimensional laser radar is used to recognize the scene to identify the charging pile and the robot movement is controlled by the control rate to achieve docking with the charging pile.

[0084] The mobile robots in some examples of this application include an embedded processor, a two-dimensional laser radar, a two-wheel differential mobile chassis, a battery, a charging port, etc., among which the laser radar can adopt the JIHUA WR-S3. A charging pile at the same height as the charging port of the car needs to be installed in the scene.

[0085] The premise of the embodiment of the method of the present invention is: a grid map of the robot's working area is established in advance using a laser radar, and the approximate location of the charging pile is marked on the map. When the battery level of the mobile robot is lower than a certain threshold or a charging instruction is received manually, the mobile robot will automatically navigate to the vicinity of the charging pile, and use a mobile robot autonomous recharging method based on two-dimensional point cloud proposed by the present invention to identify the charging pile and move to dock with the charging pile.

[0086] After preparing the mobile robot and environment scenario in the example and completing the prerequisite work for the implementation example, Figure 1 As shown, a mobile robot autonomous recharging method based on two-dimensional point cloud includes the following steps:

[0087] S1: Establish the kinematic model of the mobile robot in the map coordinate system.

[0088] The two-wheel differential mobile robot used in this embodiment sets its starting position in the map coordinate system and establishes its kinematic equation, such as Figure 2 As shown, specifically:

[0089] The kinematic equation of the two-wheel differential mobile robot is:

[0090]

[0091] Where [x, y, θ] is the pose vector of the robot in the robot coordinate system, v and ω are the linear velocity and angular velocity of the mobile robot in the robot coordinate system, and θ is the X-axis of the robot coordinate system relative to the horizontal coordinate X of the map coordinate system. w The deviation angle (counterclockwise is the positive direction).

[0092] S2: The two-dimensional point cloud information of the robot's surrounding environment is collected in real time through the lidar, and converted from the radar coordinate system to the map coordinate system through TF coordinate transformation;

[0093] S3: Cluster the collected two-dimensional point cloud, filter out point clusters with too few points, and use the SVM algorithm to classify them into straight line point clusters and non-straight line point clusters.

[0094] 3.1) The Euclidean clustering method is used to cluster the two-dimensional point cloud into several types of point clusters, and the point clusters with too few points are considered to be noise points or thin columns, etc., and are removed.

[0095] The Euclidean clustering method belongs to the existing algorithm. In this embodiment, a point a is randomly selected from the two-dimensional point cloud data, and a KD-Tree is established to find its K neighboring points. It is determined whether the Euclidean distance of these K neighboring points to point a is less than the set threshold r. If so, it is added to the clustering set Q. Repeat the above steps for the remaining points in Q in turn. When there are no new points added to Q, determine whether the points in Q are less than or equal to the threshold m. If so, directly clear Q; if greater, put Q into the clustering list C, and clear Q. Reselect the points that have not been clustered and repeat the above steps. When all points in the original point cloud data have been processed as above, it ends. In this embodiment, r=20mm and m=12 are set.

[0096] 3.2) All point clusters are fitted into straight lines by the least squares method, and the distance from the center point of each point cluster to the origin is calculated. Together with the mean of the residual square sum, it is used as a feature. The Gaussian kernel function is introduced and trained using the SVM algorithm to classify straight line point clusters and non-straight line point clusters.

[0097] All point clusters are fitted into a straight line by the least squares method, and the resulting straight line is:

[0098]

[0099] In the formula,

[0100]

[0101] x ij ,y ij is the horizontal and vertical coordinates of the jth point in the ith point cluster, and n is the number of points in the ith point cluster.

[0102] Mean of the residual sum of squares The calculation formula is:

[0103]

[0104] Take the average value of the horizontal and vertical coordinates of each point in the cluster as the horizontal and vertical coordinates of the center point of the cluster, and calculate its distance from the origin of the radar coordinate system as d. The distance d from the fitting line to the origin is used as the feature, and the SVM algorithm is used to introduce the Gaussian kernel function to map the data in the two-dimensional feature space of the point cloud to the three-dimensional space for classification and recognition, and to find the optimal hyperplane That is, solve the maximum geometric interval of training samples:

[0105]

[0106] In the formula, w represents the weight, b represents the bias, and y i is the category of the i-th point cluster (1 for a straight line point cluster, -1 for a non-straight line point cluster), x iis its feature vector, and n is the total number of point clusters for training.

[0107] Introducing the slack variable ξ i , which allows a certain degree of violation:

[0108]

[0109] Where C is the penalty factor and ξ is the slack variable.

[0110] Integrate the constraints into the optimization objective function to construct the Lagrangian formula:

[0111]

[0112] In the formula, α i ,μ i is the Lagrange multiplier.

[0113] The Lagrangian function is converted into a dual problem for solution, and the Gaussian kernel function κ(x i ,x j ) replaces the inner product x i ·x j , map the samples to high-dimensional space for classification and recognition, such as Figure 3 As shown:

[0114]

[0115] In the formula, x i ,x j is the feature vector of the two samples ρ is the bandwidth, which is selected based on actual conditions.

[0116] In this embodiment, 150 linear point clusters and 350 non-linear point clusters that were previously collected, clustered, and feature calculated were selected as training sets for training. The Lagrangian function was solved by the SMO method to obtain the optimal segmentation hyperplane for linear point clusters and non-linear point clusters, that is, the decision function:

[0117]

[0118] Where x is the input sample feature vector, z i are the support vectors.

[0119] The feature vector of the point cluster to be detected is brought into the optimal segmentation hyperplane, and the calculation result is 1 for a straight line point cluster and -1 for a non-straight line point cluster. The two-dimensional point cloud collected by the laser radar is Figure 4 As shown, the straight line point clusters are classified, such as Figure 5 shown.

[0120] S4: For all the classified straight line point clusters, calculate the distance between the first point and the last point in the sequence as its length L i , judge L i Is it equal to the length characteristic L of the charging pile? goal (within a certain error range), if it is equal, it is considered to be the target charging pile point cluster. In this example, the length feature of the charging pile is 558mm, and an error range of ±5mm is allowed.

[0121] The point cloud information of the straight charging pile is identified from the point cloud information collected by the laser radar. In this embodiment, the identification update frequency can reach 50Hz, with high real-time performance.

[0122] S5: Based on the two-dimensional point cloud data of the target charging pile, construct the mathematical formula for the error between the ideal charging posture of the robot and the current posture in the map coordinate system:

[0123]

[0124] In formula (7), the rotation matrix R1 is [x t ,y r ,θ r ],[x,y,θ] are the robot's coordinates in the map coordinate system X w O w Y w The ideal charging posture and current posture, θ2, θ1 are the horizontal axis X of the robot's ideal charging posture coordinate system r and the horizontal axis X and X of the current pose coordinate system w The angle between the center of the robot and the front charging port is L, d h is the vertical distance from the charging pile to the center of the robot, which is obtained by calculating the distance from the fitting straight line of the point cluster in S3 to the origin of the robot coordinate system, θ h It is the perpendicular line from the charging pile to the center of the robot and the X w The angle between the fitting line and the horizontal axis of the robot coordinate system is obtained by calculating the sum of the X angle between the fitting line and the horizontal axis of the robot coordinate system and θ1, d m is the distance from the midpoint of the charging pile to the center of the robot. The coordinate mean of 6 points at the beginning and end of the cluster is taken as the center of the cluster, and the distance from the origin of the robot coordinate system is calculated. m It is the angle between the line from the center of the charging pile to the center of the robot and X, which is obtained by calculating the angle between the line from the center of the point cluster to the center of the robot and X. In this example, L is 320 mm.

[0125] S6: Convert the pose error from the map coordinate system to the robot coordinate system and define the robot position error p Δ :

[0126]

[0127] In the formula, the rotation matrix R2 is [x e ,y e ,θ e ] is the position error of the robot in the robot coordinate system XOY.

[0128] When the posture error is less than a certain threshold, it is considered that the mobile robot has moved to the ideal charging posture, and the process ends and charging begins; otherwise, it continues.

[0129] In this embodiment, when the error p Δ When it is within the threshold [±5mm, ±5mm, ±0.035], the robot is considered to have reached the ideal charging posture, the mobile control ends, and charging begins.

[0130] S7: Based on the posture error, a Lyapunov function is constructed to design the inversion stabilization control rate of the mobile robot to control its speed and angular velocity to adjust its posture in real time, and return to S2, specifically:

[0131] Pose error p Δ The differential of is:

[0132]

[0133] Where v, ω are the linear velocity and angular velocity of the mobile robot in the robot coordinate system, i.e., the controller output.

[0134] Based on the pose error p Δ Design the Lyapunov function V:

[0135]

[0136] Differentiating the function V, we get:

[0137]

[0138] Wherein, k1, k2, k3 are control coefficients and are all greater than 0. In this embodiment, they are [0.1, 0.3, 2].

[0139] According to formula (13), the inversion control rate can be designed as:

[0140]

[0141] In the formula, k4 is also a control coefficient and is greater than 0, and is set to 2 in this embodiment.

[0142] In order to prove the stability of the proposed control rate, the control rate is substituted into the differential of the V function, and we can get:

[0143]

[0144] From equations (12) and (15), it can be seen that the designed function V satisfies the Lyapunov stability condition, and the proposed control rate is asymptotically stable. The control rate is calculated in the host computer embedded development board and sent to the slave computer through the topic at a frequency of 50Hz to achieve high-frequency and smooth mobile control. The success rate of the mobile robot identifying the target charging pile and docking with this method reaches more than 99%.

Claims

1. A mobile robot autonomous recharging method based on two-dimensional point cloud, characterized in that: The following steps are involved: S1: Establish the kinematic model equation of the mobile robot in the map coordinate system; S2: Collect point cloud information of the robot's surrounding environment in real time through a two-dimensional laser radar, and convert it from the radar coordinate system to the map coordinate system through coordinate transformation; S3: Clustering and filtering the two-dimensional point cloud, and classifying it using machine learning methods to obtain straight line point clusters and non-straight line point clusters; S4: For the classified straight line point clusters, according to the length characteristics of the charging piles, select the corresponding straight line point clusters as target charging piles; S5: Based on the two-dimensional point cloud data of the target charging pile, construct a mathematical relationship between the error between the ideal charging posture of the robot and the current posture in the map coordinate system; S6: Convert the pose error in the map coordinate system to the pose error in the robot coordinate system. When the pose error is less than a certain threshold, it is considered that the mobile robot has moved to the ideal charging pose, and the process ends. Otherwise go to S7; S7: Construct a Lyapunov function based on the posture error to design the inversion stabilization control rate of the mobile robot, control the speed and angular velocity of the mobile robot to adjust its posture in real time, and return to S2.

2. The autonomous recharging method for a mobile robot based on two-dimensional point cloud according to claim 1, characterized in that: The step S3 specifically includes: Step S3.1) clustering the two-dimensional point cloud into several point clusters using the Euclidean clustering method, and removing point clusters with too few points; Step S3.2) All point clusters are fitted into straight lines by the least squares method, and the distance from the center point of each point cluster to the origin is calculated. Together with the mean of the residual square sum, it is used as a feature. The Gaussian kernel function is introduced and trained using the SVM algorithm to classify straight line point clusters and non-straight line point clusters.

3. The autonomous recharging method for a mobile robot based on two-dimensional point cloud according to claim 2, characterized in that: Step S3.2) specifically includes: All point clusters are fitted into a straight line by the least squares method, and the resulting straight line is: In formula (1): x ij is the horizontal coordinate of the jth point in the i-th point cluster, y ij is the ordinate of the jth point in the i-th point cluster, and n is the number of points in the i-th point cluster; Mean of the residual sum of squares The calculation formula is: Mean of the residual sum of squares The distance d from the fitting line to the origin is used as a feature, and the SVM algorithm is used for training and learning classification. The Gaussian kernel function is introduced to map the data in the two-dimensional feature space of the point cloud to the three-dimensional space for classification and recognition: Finding the optimal hyperplane That is, solve the maximum geometric interval of training samples: In formula (3), w represents weight, b represents bias, and y i is the category of the i-th point cluster, which is 1 if it is a straight line point cluster and -1 if it is not; x i is the eigenvector n is the total number of point clusters for training; Introducing the slack variable ξ i , which allows a certain degree of violation: In formula (4), C is the penalty factor, ξ i is the penalty factor; Integrate the constraints into the optimization objective function to construct the Lagrangian formula: In formula (5), α i ,μ i is the Lagrange multiplier; The Lagrangian function is converted into a dual problem for solution, and the Gaussian kernel function κ(x i ,x j ) replaces the inner product x i ·x j , map the samples to high-dimensional space for classification and recognition: In the formula, x i ,x j is the feature vector of the two samples ρ is the bandwidth; Solve to obtain the optimal segmentation hyperplane between straight line point clusters and non-straight line point clusters, that is, the decision function: Where x is the input sample feature vector, z i is the support vector, y i is the category of the i-th point cluster, which is 1 if it is a straight line point cluster and -1 if it is not.

4. The autonomous recharging method for a mobile robot based on two-dimensional point cloud according to claim 1, characterized in that: The error mathematical relationship constructed in step S5 is: In formula (8), the rotation matrix R1 is [x r ,y r ,θ r ] is the robot's coordinate system X in the map w O w Y w The ideal charging posture, [x, y, θ] is the posture of the robot in the robot coordinate system, θ2 is the horizontal axis X of the robot's ideal charging posture coordinate system r and the horizontal axis X of the map coordinate system w θ1 is the angle between the horizontal axis X of the robot's current posture coordinate system and the horizontal axis X of the map coordinate system. w The angle between the center of the robot and the front charging port is L, d h is the vertical distance from the charging pile to the center of the robot, which is obtained by calculating the distance between the fitting straight line of the point cluster in S3 and the origin of the robot coordinate system. h It is the perpendicular line from the charging pile to the center of the robot and the X w The angle between the fitting line and the horizontal axis X of the robot's current posture coordinate system is calculated by adding the angle between the fitting line and the horizontal axis X of the robot's current posture coordinate system and θ1. m is the distance from the midpoint of the charging pile to the center of the robot. The coordinate mean of 6 points at the beginning and end of the cluster is taken as the center of the cluster, and the distance between the center point and the origin of the robot coordinate system is calculated. m It is the angle between the line from the center of the charging pile to the center of the robot and X, which is obtained by calculating the angle between the line from the center of the cluster to the center of the robot and X.

5. The autonomous recharging method for a mobile robot based on two-dimensional point cloud according to claim 1, characterized in that: The step S6 specifically includes: Convert the pose error in the map coordinate system to the robot coordinate system XOY and define the robot pose error p Δ : In formula (9), the rotation matrix R2 is [x e ,y e ,θ e ] is the position error of the robot in the robot coordinate system XOY.

6. The autonomous recharging method for a mobile robot based on two-dimensional point cloud according to claim 5, characterized in that: Step S7 is specifically as follows: The pose error p Δ Perform differentiation: In formula (10), v, ω are the linear velocity and angular velocity of the robot in the robot coordinate system; Based on the pose error p Δ Construct the Lyapunov function V: In formula (11), k1, k2, k3 are control coefficients and are all greater than zero; The differential of the function V is: According to formula (12), the control rate can be designed as: In formula (13), k4 is the control coefficient and is greater than 0; Substituting the control rate into the V function differential, we can get: It can be seen from equations (11) and (14) that the selected V function satisfies the stability criterion of the Lyapunov method, and the proposed stabilization control rate is stable.