A mobile robot automatic recharging method based on straight line feature detection
The mobile robot recharging method uses laser radar and least squares analysis to detect straight lines for accurate and efficient navigation to the charging pile, addressing inefficiencies and misjudgment in existing technologies.
Patent Information
- Application Number
- CN202210788028.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-06
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2042-07-06
AI Technical Summary
Existing automatic recharging methods for mobile robots, such as those using infrared guidance and LiDAR positioning, incur additional hardware and software costs, are inefficient, and prone to misjudgment, making them unsuitable for large mobile robots.
A mobile robot recharging method based on straight line feature detection using laser radar to collect point cloud data, filter and segment the data, and apply the least squares method to calculate straight line analytical expressions, enabling accurate positioning and real-time navigation to the charging pile.
The method achieves simple calculation, accurate positioning, and high execution efficiency, allowing the robot to return to the charging pile effectively, suitable for commercial applications.
Smart Images

Figure CN115047886B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of robot control, and in particular relates to an automatic recharging method for a mobile robot based on straight line feature detection. Background Art
[0002] Automatic recharging refers to the process in which a mobile robot stops working and automatically returns to the charging station to recharge after consuming a certain amount of power during operation. At present, the automatic recharging methods for indoor mobile robots can be divided into two categories according to the different devices used: automatic recharging methods based on infrared guidance and automatic recharging methods based on lidar positioning.
[0003] The automatic recharging method based on infrared guidance installs a signal transmitter and a signal receiver on the charging pile and the robot respectively. After a certain amount of power is consumed, the signal transmitter and the receiver are turned on, and the robot gradually returns to the charging pile and charges by receiving infrared signals. Currently, most of the automatic recharging of sweeping robots on the market use this method. However, the use of this method will increase additional hardware and software costs, and is not conducive to the use of large mobile robots.
[0004] The automatic recharging method based on LiDAR positioning mainly uses LiDAR to collect environmental information and convert it into point cloud data. The robot processes the point cloud data and combines various sensors such as gyroscopes, inertial navigation measurement units, and encoders to navigate and locate in the robot's working environment, gradually find the charging pile, and return to the charging pile. This method has a large amount of calculation and requires the collaboration of various sensors. It is not efficient and is prone to misjudgment. When the robot is about to run out of power, it may not be able to return to the charging pile, which is not conducive to commercial use. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and to provide a mobile robot automatic recharging method based on straight line feature detection which has simple calculation, accurate positioning, high execution efficiency and can be calculated in real time.
[0006] The object of the present invention is achieved through the following technical solution: A mobile robot automatic recharging method based on straight line feature detection comprises the following steps:
[0007] S1. Use laser radar to collect point cloud information of the charging pile and its surrounding environment. The data format is polar coordinates. Use the laser radar as the origin and the front as the x-axis to establish a left-hand rectangular coordinate system. Then use the polar coordinates of the point cloud to derive the two-dimensional rectangular coordinates of the point cloud.
[0008] S2. Filter the point cloud generated by random errors using the polar coordinate information of the point cloud, and then perform point cloud data segmentation. Each group of point cloud data is a straight line. Analyze the two-dimensional rectangular coordinates of the point cloud of each straight line using the least squares method, calculate the analytical formula of each straight line in the rectangular coordinate system, and calculate the distance from each straight line to the origin and the deflection angle.
[0009] S3. Group the straight lines according to the distance from each straight line to the origin and the deflection angle, select the group with the largest number of straight lines, find the midpoint coordinates of the charging pile in combination with the appearance characteristics of the charging pile, and record the distance from the current straight line group to the origin and the deflection angle.
[0010] S4. Based on the processing results of steps S3 and S4 and the saved midpoint coordinates and straight line information of the charging pile, control the robot to move and continuously update the straight line information and the midpoint coordinates of the charging pile until the robot returns to the charging pile for charging.
[0011] Further, step S2 specifically includes the following steps:
[0012] S21. Point cloud data filtering: Traverse all the collected point cloud data. First, filter out the data points outside [MinRange, MaxRange]. Then traverse the remaining point cloud data. If ranges[i] – ranges[i - 1] is greater than OutlineDist and ranges[i] – ranges[i + 1] is greater than OutlineDist, connect i - 1 and i + 1, denoted as the straight line Line, calculate the distance from point i to Line. When the distance from point i to the straight line Line is greater than MinSplitDist, filter point i. MinRange, MaxRange, OutlineDist, and MinSplitDist are all preset thresholds.
[0013] S22. Point cloud data segmentation: If the number of point clouds in the input point cloud array is less than or equal to 1, directly end this step and execute S23. If the number of point clouds is greater than 1, connect the starting point and the ending point in the point cloud data array and consider it as a straight line. Traverse all the points in the array to find the point i that is farthest from the straight line, and record its distance as Distmax, and the points j and k with the largest interval between adjacent two points, and record its maximum interval as GapMax. When DistMax < MinSplitDist and GapMax < MaxLineGap, consider this straight line valid and store this straight line in the straight line structure array line[]. Each straight line structure contains each coordinate in the point cloud array. Otherwise, when DistMax > GapMax, use i as the demarcation point, and vice versa use j as the demarcation point, divide the point cloud array into two segments as the input. Repeat step S22. MinSplitDist and MaxLineGap are both preset thresholds.
[0014] S23, line filtering: the point cloud array processed by S22 is divided into several groups of point cloud coordinate sets, which are stored in the line structure array line[]. Line[] is traversed, and for each line in it, the line data whose length is greater than or equal to MinLineLength and whose point cloud data volume is greater than or equal to MinLinePoints is retained, and the remaining data is filtered. Then the length of each line is calculated. MinLineLength and MinLinePointsw are both preset thresholds.
[0015] S24. Use the least square method to process each straight line to obtain the analytical expression of each straight line, and then calculate the distance radius and the deflection angle angle from the origin to each straight line according to the slope k and intercept b of each straight line in the analytical expression. The calculation formula is:
[0016]
[0017]
[0018] Furthermore, the step S3 specifically comprises the following steps:
[0019] S31, straight line grouping: for the straight lines detected by S2, straight lines with the same radius and angle are grouped together, and each straight line group is considered to be straight lines with the same analytical expression but different starting and ending points;
[0020] S32, finding the straight lines of the walls on both sides of the charging pile, specifically: for the grouped straight line groups, select the straight line group with the largest number of straight lines, combine the straight lines in the straight line group in pairs, calculate the Euclidean distance between the starting point of one straight line and the end point of another straight line in the combination, and use the two straight lines whose Euclidean distance is closest to the length of the charging pile as the walls on both sides of the charging pile;
[0021] S33, saving the angle and radius of the two straight lines found in S32, and calculating the midpoint coordinates P (xp, yp) of the charging pile on the wall according to the starting point coordinates and the end point coordinates of the two straight lines.
[0022] Furthermore, the step S4 specifically comprises the following steps:
[0023] S41, controlling the robot to rotate according to angle, so that the robot rotates at an angle of angle;
[0024] S42, repeating steps S2 and S3 multiple times, controlling the robot to move according to the detection straight line information and the coordinates of the midpoint of the charging pile, until the robot faces the charging pile;
[0025] S43. Repeat steps S2 and S3 to obtain the midpoint coordinates P (xp, yp) of the charging pile on the wall, record xp, rotate the robot so that the robot charging port faces the charging pile, and according to the direction of the robot charging port and the width D of the charging pile, control the robot to move a distance x′=xp-D toward the robot charging port to complete charging.
[0026] The beneficial effects of the present invention are as follows: the present invention processes the point cloud information of the laser radar, searches for straight line features in the environment, uses the least squares method to calculate the straight line analytical expression, and further combines the shape of the charging pile to find the coordinates of the midpoint of the charging pile relative to the robot, and finally controls the robot to return to the charging pile for charging; it has the advantages of simple calculation, accurate positioning, high execution efficiency, and real-time calculation, and can be fully used in commercial applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A simulation environment provided for an embodiment of the present invention;
[0028] Figure 2 is a flow chart of the method of the present invention;
[0029] Figure 3 A schematic diagram of a coordinate system of a laser radar used in an embodiment of the present invention;
[0030] Figure 4 A schematic diagram of data and environmental information collected by a laser radar provided in an embodiment of the present invention;
[0031] Figure 5 A flow chart of a straight line detection method provided by an embodiment of the present invention;
[0032] Figure 6 A schematic diagram of a straight line detection result provided by an embodiment of the present invention;
[0033] Figure 7 A schematic diagram of preliminary posture adjustment of a robot provided in an embodiment of the present invention;
[0034] Figure 8 A schematic diagram of a robot facing a charging pile provided by an embodiment of the present invention;
[0035] Fig. 9 This is a schematic diagram of the final robot returning to the charging pile for charging provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The present invention proposes an automatic recharging method for a mobile robot based on straight line feature detection, which uses a laser radar to collect environmental information and convert it into point cloud data. After filtering and segmenting the point cloud data, a set of points on the straight line of the current environment is obtained, and each set of points is analyzed by the least squares method to obtain the analytical expression of the straight line. Then, the shape information of the charging pile is collected to find the coordinates of the midpoint of the charging pile relative to the robot. The coordinates are combined with the analytical expression of the straight line to issue a control command to the control robot, and the straight line information and the charging pile coordinates are updated after each movement. The control robot movement and data update are repeated until the robot returns to the charging pile for charging. The technical solution of the present invention is further explained below in conjunction with the accompanying drawings and specific embodiments.
[0037] This embodiment is simulated in the gazebo simulation environment. Figure 1 As shown in the figure. The charging pile used in the simulation is in the shape of a cuboid, with a length L of 0.25m, a width D of 0.2m, and a height H of 0.13m. One end of the charging pile is close to the wall. The charging port of the charging pile is at the same height as the robot and is located in the middle of the charging pile. The process of the robot returning to the charging pile is to find the two-dimensional coordinates of the midpoint of the charging pile on the plane of the charging port and move to that position.
[0038] like Figure 2 As shown, the automatic recharging method of a mobile robot based on straight line feature detection of the present invention comprises the following steps:
[0039] S1. Use laser radar to collect point cloud information of the charging pile and its surrounding environment. The data format is polar coordinates. In order to facilitate the calculation of relevant information after straight line detection, a left-hand rectangular coordinate system is established with the laser radar as the origin and the front as the x-axis, such as Figure 3 As shown; then the two-dimensional rectangular coordinates of the point cloud are derived using the polar coordinates of the point cloud;
[0040] The specific implementation method of step S1 is as follows: the laser radar is mounted on the robot, and the robot is controlled to move to the vicinity of the charging pile. The laser radar scans its installation plane to collect environmental information about the charging pile and its surroundings; the content of each frame of point cloud data collected by the laser radar is that the scanning start angle is AngleMin, the scanning end angle is AngleMax, the angle increase between each point cloud data is AngleIncrement, and the distance from the radar to the scanned object is d, where d is put into the array ranges[]. The size of the ranges[] array is called the laser radar measurement step MeasurementSteps; the laser radar uses a polar coordinate system to save data, the origin of the coordinate system is the center of the laser radar, the angle between the line between the obstacle and the origin and the front of the laser radar is the rotation angle θ, which increases with clockwise rotation and has a value range of [-π,π]; Figure 4Schematic diagram of the point cloud data information collected by the lidar and the robot's working environment.
[0041] AngleMin, AngleMax, and AngleIncrement are affected by the shape of the robot and the performance parameters of the radar. In this embodiment, the laser radar only collects data in front of the robot and does not consider the data behind the robot, so the value of AngleMin is -1.7444rad, the value of AngMax is 1.7444rad, and the value of AngleIncrement is 0.0087rad. It can be calculated that the laser radar measurement step length is:
[0042]
[0043] The specific method of converting the polar coordinates of point cloud data into two-dimensional rectangular coordinates is as follows: for each point cloud data i, its rotation angle is placed in the θ[] array, the horizontal coordinate of the two-dimensional rectangular coordinate system is placed in the x[] array, and the vertical coordinate of the two-dimensional rectangular coordinate system is placed in the y[] array; then the two-dimensional rectangular coordinate calculation formula of the i-th point cloud is as follows:
[0044] θ[i]=AngleMin+i*AngleIncrememt
[0045] x[i]=ranges[i]*cos(θ[i])
[0046] y[i]=ranges[i]*sin(θ[i]).
[0047] S2. Line detection using point cloud data: Use the polar coordinate information of the point cloud to filter the point cloud generated by random errors, and then segment the point cloud data. Each group of point cloud data is a straight line. Use the least squares method to analyze the two-dimensional rectangular coordinates of the point cloud of each straight line, calculate the analytical expression of each straight line in the rectangular coordinate system, and calculate the distance and deflection angle of each straight line to the origin. Figure 5 As shown, the specific steps include:
[0048] S21. Point cloud data filtering, filtering out the values with large errors in each frame of lidar point cloud data. Specifically: traverse all the collected point cloud data, first filter out the data points outside [MinRange, MaxRange]; then traverse the remaining point cloud data. If ranges[i] – ranges[i-1] is greater than OutlineDist and ranges[i] – ranges[i+1] is greater than OutlineDist, connect i-1 and i+1, denoted as the straight line Line, calculate the distance from point i to Line. When the distance from point i to the straight line Line is greater than MinSplitDist, filter point i; after processing, the point cloud array has filtered out the point clouds beyond the control range and the point clouds with large random errors. MinRange, MaxRange, OutlineDist, and MinSplitDist are all preset thresholds; in this embodiment, MinRange is set to 0.1m, MaxRange is set to 10m, OutlineDist is set to 0.06m, and MinSplitDist is set to 0.03m.
[0049] S22. Point cloud data segmentation: If the number of point clouds in the input point cloud array is less than or equal to 1, directly end this step and execute S23; if the number of point clouds is greater than 1, connect the starting point and the ending point in the point cloud data array and consider it as a straight line. Traverse all the points in the array to find the point i with the farthest distance from the straight line, and record its distance as Distmax, as well as the points j and k with the largest interval between two adjacent points, and record the maximum interval as GapMax; when DistMax < MinSplitDist and GapMax < MaxLineGap, consider this straight line valid and store this straight line into the straight line structure array line[], where each straight line structure contains each coordinate in the point cloud array; otherwise, when DistMax > GapMax, use i as the demarcation point, and vice versa use j as the demarcation point, divide the point cloud array into two segments as the input; repeat step S22; after being processed by step S22, the point cloud data has been divided into several point cloud data sets, and all the point clouds in each set can be regarded as all the points on a straight line.
[0050] Both MinSplitDist and MaxLineGap are preset thresholds. In this example, the value of MinSplitDist is the same as that in 2.1, which is 0.03m, and the value of MaxLineGap is 0.6m.
[0051] S23, line filtering: The point cloud array processed by S22 is divided into several groups of point cloud coordinate sets and stored in the line structure array line[]. Line[] is traversed, and for each line in it, the line data whose length is greater than or equal to MinLineLength and the amount of point cloud data in the line is greater than or equal to MinLinePoints are retained, and the remaining data are filtered. Then the length of each line is calculated. MinLineLength and MinLinePointsw are both preset thresholds. In this example, MinLineLength is 0.4m and MinLinePointsw is 10.
[0052] The starting point and end point coordinates of each straight line are the starting point coordinates (start.x, start.y) and the end point coordinates (end.x, end.y) of the point cloud data set saved by it, and the calculation formula for the length l of each straight line is:
[0053]
[0054] S24, use the least squares method to process each line; the specific implementation method is: after the point cloud data is processed by S21~S23, the line structure array line[] stores all the two-dimensional point cloud coordinates that meet the preset line requirements, and each line is analyzed by the least squares method, and the slope k and intercept b of each line are calculated; for each line, assuming that there are n points in it, according to the coordinates of each point in the two-dimensional rectangular coordinate system calculated in step S1, list the matrix equation:
[0055]
[0056] Will Denoted as matrix X, Denoted as matrix Y, according to the least squares method, k and b are calculated as follows:
[0057]
[0058] Further calculate the distance radius from the origin to each straight line and the deflection angle angle, the calculation formula is:
[0059]
[0060]
[0061] Finally, the distance radius from the origin to each straight line, the deflection angle angle, the straight line starting point coordinates (start.x, start.y) and the end point coordinates (end.x, end.y) are saved in the current straight line structure. Figure 6This is the schematic diagram of the final straight line detection result.
[0062] S3, grouping the straight lines according to the distance and deflection angle from each straight line to the origin, selecting the group with the largest number of straight lines, finding the coordinates of the midpoint of the charging pile in combination with the appearance features of the charging pile, and recording the distance and deflection angle from the current straight line group to the origin; specifically comprising the following steps:
[0063] S31, straight line grouping: for the straight lines detected by S2, straight lines with the same radius and angle are grouped together, and each straight line group is considered to be straight lines with the same analytical expression but different starting and ending points;
[0064] S32, find the straight lines on the walls on both sides of the charging pile, specifically: for the grouped straight line groups, select the straight line group with the largest number of straight lines, combine the straight lines in the straight line group in pairs, and calculate the Euclidean distance d between the starting point of one straight line and the end point of another straight line in the combination ij , the Euclidean distance d ij The two straight lines closest to the length of the charging pile are used as the walls on both sides of the charging pile; d ij The calculation formula is:
[0065]
[0066] S33, save the angle and radius of the two straight lines found in S32, and calculate the midpoint coordinates P (xp, yp) of the charging pile on the wall according to the starting point coordinates and the end point coordinates of the two straight lines:
[0067]
[0068]
[0069] S4, based on the processing results of step S3 and step S4 and the saved charging pile midpoint coordinates and straight line information, control the robot to move and continuously update the straight line information and the charging pile midpoint coordinates until the robot returns to the charging pile for charging; specifically includes the following steps:
[0070] S41. To reduce the error, repeat steps S2 and S3, obtain the angle saved in S3, and control the robot to rotate according to the angle, so that the robot rotates to an angle of angle until the robot faces the wall. In actual application, the repeatedly obtained angle is smaller than AngleTolerance. In this example, AngleTolerance is 0.02rad.
[0071] S42, repeat steps S2 and S3 for many times, control the robot to move according to the detected straight line information and the midpoint coordinates of the charging pile, until the robot is facing the charging pile; in order to reduce the error, repeat steps S2 and S3 to obtain the midpoint coordinates P (xp, yp), control the robot to move on the x-axis, and make the distance between the robot and the wall dw, then the moving distance is x = xp – dw. In this example, dw = 0.5m. At this time, the robot has completed the initial adjustment, and the schematic diagram of the robot and the environment is as follows Figure 7 As shown in the figure. Since part of the wall is blocked by the charging pile when the robot collects the LiDAR point cloud data after the initial adjustment, it is necessary to repeat steps S2 and S3 to obtain the midpoint coordinates P (xp, yp) when adjusting the y-axis. At this time, the robot is controlled to move a distance yp on the y-axis until the robot faces the charging pile. In actual application, the yp obtained repeatedly is less than YTolerance. The result diagram is shown in the figure. Figure 8 In this example, YTolerance is 0.03m.
[0072] S43, repeat steps S2 and S3 again to obtain the midpoint coordinates P (xp, yp) of the charging pile on the wall, record xp, rotate the robot so that the robot charging port faces the charging pile, and according to the direction of the robot charging port and the width D of the charging pile, control the robot to move a distance x′=xp-D toward the robot charging port, so that the robot completes charging. The final result is as follows Fig. 9 shown.
[0073] In the simulation environment, the present invention uses the point cloud data obtained by the laser radar, performs least squares regression analysis through the converted point cloud coordinates, obtains the straight line information around the robot, then finds the charging pile by analyzing the finally obtained straight line information and the structural information of the charging pile, and finally controls the robot to return to the charging pile. In the simulation test, the robot's initial position parameters were adjusted many times, including the distance between the robot and the wall and the charging pile, the robot's deflection angle relative to the wall, etc., and the robot was able to successfully return to the charging pile for charging, proving that the method is effective.
[0074] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A mobile robot automatic recharging method based on straight line feature detection, characterized in that: The following steps are involved: S1. Use laser radar to collect point cloud information of the charging pile and its surrounding environment. The data format is polar coordinates. A left-hand rectangular coordinate system is established with the laser radar as the origin and the front as the x-axis. Then, the polar coordinates of the point cloud are used to derive the two-dimensional rectangular coordinates of the point cloud. The specific implementation method is as follows: the laser radar is mounted on the robot, and the robot is controlled to move near the charging pile. The laser radar scans its installation plane to collect environmental information about the charging pile and its surroundings. The content of each frame of point cloud data collected by the laser radar is that the scanning start angle is AngleMin, the scanning end angle is AngleMax, the angle increase between each point cloud data is AngleIncrement, and the distance d from the radar to the scanned object is d, where d is put into the array ranges[]. The size of the ranges[] array is called the laser radar measurement step MeasurementSteps. The laser radar uses a polar coordinate system to save data. The origin of the coordinate system is the center of the laser radar. The angle between the line between the obstacle and the origin and the front of the laser radar is the rotation angle θ, which increases with clockwise rotation and has a value range of [-π,π]. S2. Use the polar coordinate information of the point cloud to filter the point cloud generated by random errors, and then segment the point cloud data. Each group of point cloud data is a straight line. Use the least squares method to analyze the two-dimensional rectangular coordinates of the point cloud of each straight line, calculate the analytical expression of each straight line in the rectangular coordinate system, and calculate the distance and deflection angle of each straight line to the origin. Specifically, the following steps are included: S21, point cloud data filtering: traverse all the collected point cloud data, first filter out the data points outside [MinRange, MaxRange]; then traverse the remaining point cloud data, if ranges[i]-ranges[i-1] is greater than OutlineDist and ranges[i]-ranges[i+1] is greater than OutlineDist, connect i-1 and i+1, record them as a straight line Line, calculate the distance from point i to Line, and when the distance from point i to the straight line Line is greater than MinSplitDist, filter point i; MinRange, MaxRange, OutlineDist, and MinSplitDist are all preset thresholds; S22. Point cloud data segmentation: If the number of point clouds in the input point cloud array is less than or equal to 1, this step is directly ended and S23 is executed; if the number of point clouds is greater than 1, the connection between the starting point and the ending point in the point cloud data array is considered as a straight line. Traverse all the points in the array to find the point i that is farthest from the straight line, and its distance is denoted as Distmax, and the points j and k with the largest interval between two adjacent points, and its maximum interval is denoted as GapMax; when DistMax < MinSplitDist and GapMax < MaxLineGap, this straight line is considered valid, and store this straight line into the straight line structure array line[], where each straight line structure contains each coordinate in the point cloud array; otherwise, when DistMax > GapMax, use i as the demarcation point, and vice versa use j as the demarcation point, divide the point cloud array into two segments as the input; repeat step S22; both MinSplitDist and MaxLineGap are preset thresholds; S23. Straight line filtering: The point cloud array processed by S22 is segmented into several groups of point cloud coordinate sets and stored in the straight line structure array line[]; traverse line[], for each straight line in it, retain the straight line data with a straight line length greater than or equal to MinLineLength and the amount of point cloud data in the midpoint of the straight line greater than or equal to MinLinePoints, and filter the remaining data; then calculate the length of each straight line; Both MinLineLength and MinLinePointsw are preset thresholds; S24. Use the least squares method to process each straight line to obtain the analytical formula of each straight line, and then calculate the distance radius and deflection angle angle from the origin to each straight line according to the slope k and intercept b of each straight line in the analytical formula. The calculation formula is: S3. Group the straight lines according to the distance from each straight line to the origin and the deflection angle, select the group with the largest number of straight lines, combine the appearance characteristics of the charging pile to find the midpoint coordinates of the charging pile in the wall, and record the distance and deflection angle from the current straight line group to the origin; specifically include the following steps: S31. Straight line grouping: For the straight lines detected in S2, group the straight lines with the same radius and angle together, then each straight line group is considered as a straight line with the same analytical formula but different starting and ending points; S32. Find the straight lines on both sides of the charging pile wall, specifically: for the grouped straight line groups, select the straight line group with the largest number of straight lines, combine the straight lines in the straight line group in pairs, calculate the Euclidean distance between the starting point of one straight line and the ending point of another straight line in the combination, and use the two straight lines with the Euclidean distance closest to the length of the charging pile as the walls on both sides of the charging pile; S33. Save the angle and radius of the two straight lines found in S32, and calculate the midpoint coordinates P(xp, yp) of the charging pile on the wall according to the starting point coordinates and ending point coordinates of the two straight lines; S4. Based on the processing results of step S3 and step S4 and the saved charging pile midpoint coordinates and straight line information, control the robot to move and continuously update the straight line information and the charging pile midpoint coordinates until the robot returns to the charging pile for charging.
2. The method for automatic recharging of a mobile robot based on straight line feature detection according to claim 1, characterized in that: The step S4 specifically comprises the following steps: S41, controlling the robot to rotate according to angle, so that the robot rotates at an angle of angle; S42, repeating steps S2 and S3 multiple times, controlling the robot to move according to the detection straight line information and the coordinates of the midpoint of the charging pile, until the robot faces the charging pile; S43. Repeat steps S2 and S3 to obtain the midpoint coordinates P (xp, yp) of the charging pile on the wall, record xp, rotate the robot so that the robot charging port faces the charging pile, and according to the direction of the robot charging port and the width D of the charging pile, control the robot to move a distance x′=xp-D toward the robot charging port to complete charging.
Citation Information
Patent Citations
Laser radar based accurate robot posture correction method and device
CN111060131A
Mobile robot automatic charging method based on laser radar
CN111324121A
