A method for covering operation of unmanned sweeper in indoor unknown environment

Through the combination of single-line lidar and gyroscope, using laser line-finding isometric control and PID angle control, the stable tracking and coverage operation of unmanned sweeping vehicles in unknown indoor environments is realized, which solves the problem of false detection and error in traditional methods. problem, improving the stability and reusability of autonomous driving.

CN118392191BActive Publication Date: 2024-08-23RUIYI TECH (SHANDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410850298.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-08-23
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

In an unknown indoor environment, it is difficult for unmanned sweepers to achieve global planning and coverage operations. There are false detections and errors in sensor data processing, resulting in unstable autonomous driving. High-precision maps need to be established to achieve wall tracking control.

Method used

Single-line lidar and gyroscope are used to realize wall tracking control through laser line-finding isometric control planning method. Single-line lidar is used to obtain wall data, and the vertical foot point and the number of reentry are calculated to select the appropriate line segment. Combined with PID angle control, the system The vehicle keeps running parallel to the wall and performs bow-shaped covering operations when obstacles exist.

Benefits of technology

It achieves stable autonomous driving of unmanned sweepers in unknown environments, avoids the need to build high-precision maps, improves reusability and simplifies deployment, and reduces the problem of inaccurate positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118392191B
    Figure CN118392191B
Patent Text Reader

Abstract

The present invention belongs to the field of automatic driving, and is specifically a method for covering operations of an unmanned sweeper in an unknown indoor environment, comprising the following steps: establishing a vehicle body coordinate system, reading point cloud data, and extracting line segment data; calculating the straight line equations corresponding to all line segments; calculating the coordinates of the perpendicular points from the origin of the vehicle body coordinate system to all line segments based on the straight line equations corresponding to the line segments; judging the line segments according to the perpendicular point coordinates and the number of vehicle turns N, calculating the length of the selected line segments, screening out the line segments that meet the requirements, calculating the distance from the origin of the vehicle body coordinate system to the perpendicular points of the line segments that meet the requirements, obtaining the line segments closest to the vehicle body for vehicle PID angle control, and obtaining the wall or obstacle in front of the vehicle through a laser radar for U-turn. The present invention obtains radar-to-wall data through a single-line laser radar, thereby eliminating the need to establish a corresponding high-precision map, and realizes wall tracking control through a laser line-finding equidistant control planning method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to the technical field related to autonomous driving, and specifically to a method for covering operations of an unmanned sweeper in an unknown indoor environment. Background Art

[0002] The coverage operation of unmanned sweepers in unknown indoor environments is a type of planning and control problem in unmanned vehicle systems. In indoor environments, there is no matching high-precision map or plane map, so it is impossible to determine the global position of the unmanned sweeper, nor to obtain the task trajectory of the global planning and coverage operation. The only way is to plan and control the current local environment to achieve the coverage of the overall environment and global scene. By receiving sensor data and selecting a strategy based on the wall conditions, the vehicle can be controlled to keep a certain distance from the wall, so that the vehicle and the wall can be tracked and covered.

[0003] Currently, in the wall tracking control of unmanned sweepers, the sensor devices used are method 1, a combination of laser radar and ultrasonic waves; method 2, a combination of multiple infrared sensors, etc.

[0004] The sensor is a combination of laser radar and ultrasonic wave: a single-line laser radar is used as the main sensor for target detection, and the distance recognized by the single-line laser radar is returned. The ultrasonic detection unit detects obstacles around the equipment, and sends an obstacle avoidance signal when the obstacle is too close to the equipment, and the equipment automatically stops the obstacle. (By obtaining the laser radar point cloud data, removing noise points and abnormal point data, and then performing straight-through filtering and curve smoothing. Then multiple differential calculations are performed, DBSCAN clustering is performed on the target set, and finally the current frame detection result is obtained, and a final distance value is output. Lateral control and longitudinal control are performed according to the detection result). This method can have strong adaptability to the environment and anti-interference ability, but there is a problem that ultrasonic detection will produce false detection, resulting in the problem of stopping automatic driving. At the same time, in this method, the laser radar is placed in front of the vehicle, which is greatly affected by the vehicle steering, is prone to false detection, and the detection range is limited to a certain extent. In addition, since the laser radar finally outputs the distance value between the vehicle body and the wall, this will cause lateral control when there is a lateral error, and the vehicle will swing back and forth.

[0005] The method of combining multiple infrared sensors: by setting a fuzzy controller, collecting data multiple times and then performing polynomial fitting, after obtaining the corresponding correction model, correction is performed to achieve a smooth motion trajectory and maintain a relatively stable distance from the wall. However, this method requires a large number of infrared sensor combinations, data collection to establish a correction model, and infrared sensors are easily affected by the material and color of obstacles.

[0006] Therefore, how to more reasonably configure corresponding sensors and path planning strategies is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0007] In order to solve the shortcomings of current technology, the present invention combines the existing technology and starts from practical application to provide a method for covering operation of unmanned sweeper in indoor unknown environment. The radar reaches the wall data through a single-line laser radar, so there is no need to establish a corresponding high-precision map. The wall tracking control is realized through the laser line-finding equidistant control planning method, and the vehicle position is obtained through a gyroscope data to perform covering operation.

[0008] The technical solution of the present invention is as follows:

[0009] A method for covering operation of an unmanned sweeper in an indoor unknown environment, wherein the unmanned sweeper adopts an Ackerman motion model, the vehicle steering angle takes a left turn as a positive value and a right turn as a negative value, and a single-line laser radar is installed on the top of the vehicle corresponding to the center of the rear wheel axle of the vehicle, comprising the following steps:

[0010] Step 1: Take the initial front-to-back direction of the vehicle as the x-axis, the left-to-right direction as the y-axis, the front as the positive value of the x-axis, the left as the positive value of the y-axis, and the intersection of the x-axis and y-axis as the origin to establish a vehicle coordinate system, read the point cloud data of the right wall scanned by the single-line laser radar, process the point cloud data, and extract the line segment data;

[0011] Step 2, calculate the straight line equations corresponding to all line segments;

[0012] Step 3: Calculate the coordinates of the foot points of the perpendicular points from the origin of the vehicle coordinate system to all the line segments based on the straight line equations corresponding to the line segments;

[0013] Step 4: determine the line segment based on the coordinates of the perpendicular point and the number of times the vehicle turns back N. When the number of turns back N is an odd number, select the line segment with the perpendicular point on the right side of the vehicle body; when the number of turns back N is an even number, select the line segment with the perpendicular point on the left side of the vehicle body;

[0014] Step 5, calculate the length of the line segment selected in step 4, filter out the line segment that meets the requirements, and then calculate the distance from the origin of the vehicle body coordinate system to the foot point of the line segment that meets the requirements for further screening, and finally calculate the line segment closest to the vehicle body;

[0015] Step 6: Based on the line segment closest to the vehicle body obtained in step 5, the real-time distance from the radar to the wall is calculated to perform vehicle PID angle control so that the vehicle and the wall are kept relatively parallel to each other;

[0016] Step 7: Use the laser radar to obtain the wall or obstacle in front of the vehicle to make a U-turn and achieve bow-shaped coverage operation.

[0017] Furthermore, in step 1, a filter is used to remove edge points from the point cloud data, determine which points belong to the line segment, and finally extract the line segment data.

[0018] Further, step 2 specifically includes:

[0019] Calculate the slope K value and constant b value of all the line segments read. The calculation is shown as follows:

[0020] ,

[0021] ,

[0022] Among them, p_start represents the starting point of the line segment, p_end represents the end point of the line segment, p_start.x and p_start.y represent the x-axis and y-axis coordinates of the starting point of the line segment, and p_end.x and p_end.y represent the x-axis and y-axis coordinates of the end point of the line segment.

[0023] Furthermore, in step 3, the formula for calculating the coordinates of the foot point of the line segment is as follows:

[0024] ,

[0025] ,

[0026] Among them, A=K, B= -1, C=b, p_foot.x is the x-axis coordinate of the perpendicular point, p_foot.y is the y-axis coordinate of the perpendicular point, X 0、 Y0 are the coordinates of the origin.

[0027] Furthermore, in step 4, the remainder is calculated for the number of return times N, and the formula is as follows:

[0028] N mod 2 = r,

[0029] In the above formula, r is the remainder. When r=1, N is an odd number, and when r=0, N is an even number.

[0030] When N is an odd or even number, the foot point selection satisfies the following formula:

[0031] (N is an odd number),

[0032] (N is an even number),

[0033] Among them, p_foot.y is the y-axis coordinate of the foot point.

[0034] Further, step 5 specifically includes the following steps:

[0035] Step 51, calculate the length d_line of the line segment selected in step 4, and select a line segment whose length is greater than n vehicle body lengths;

[0036] Step 52, calculate the distance d_foot from the origin of the vehicle body coordinate system to the foot point of the line segment that meets the requirements of step 51, and select the line segment whose d_foot is less than m meters;

[0037] Step 53, classifying the line segments selected in step 52 into optimally selected line segments and retained selected line segments, wherein the line segments above the y-axis or intersecting the y-axis are optimally selected line segments, and the rest are retained selected line segments. When an optimally selected line segment exists, the optimally selected line segment is selected, and when no optimally selected line segment exists, the retained selected line segment is selected;

[0038] Step 54: for the optimal selected line segment or the retained selected line segment selected in step 53, determine whether the foot points of all line segments are on the line segment. If the foot points are on the line segment, calculate the distance from the foot points to the origin of the vehicle coordinate system. If the foot points are not on the line segment, calculate the distances from the starting point and the end point of the line segment to the origin of the vehicle coordinate system. Compare the distances from the foot points, the starting point and the end point to the origin of the vehicle coordinate system, select the line segment corresponding to the minimum value as the line segment closest to the vehicle body, and use the line segment closest to the vehicle body as the final tracking line segment.

[0039] Further, in step 51, the length of the line segment satisfies the following formula:

[0040] ,

[0041] Among them, (d_car) is the length of the car body;

[0042] In step 52, the distance d_foot is calculated as follows:

[0043] ,

[0044] In step 53, the optimal selection line segment satisfies the following conditions:

[0045] ,

[0046] Keep selecting line segments that meet the following conditions:

[0047] ,

[0048] The conditions for determining whether the foot point is on a line segment are as follows:

[0049] ,

[0050] ,

[0051] The line segment closest to the vehicle body meets the following conditions:

[0052] ,

[0053] Further, step 6 specifically includes: calculating the real-time distance d_cw from the radar to the wall, setting the distance D_KCW between the vehicle and the wall, and generating a lateral error D_error through the two distances to perform PID angle angle control. The corresponding formula is as follows:

[0054] ,

[0055] ,

[0056] ,

[0057] Among them, d_front is the forward distance of the projected vehicle's current position, α is the vehicle's current heading angle obtained by the gyroscope, Kp is the P parameter of PID control, which needs to be adjusted according to actual conditions, Kd is the D parameter of PID control, which needs to be adjusted according to actual conditions, previous_error is the D_error calculated last time, and current_error is the current actual error D_error.

[0058] Furthermore, in step 7, when there is a wall on the side of the vehicle and a wall or an obstacle twice as long as the width of the vehicle appears 4 meters ahead, a U-turn is performed, and the number of turns N increases, and the distance to the wall also increases.

[0059] The conditions for determining the end of the environment in front of the vehicle are as follows:

[0060] ,

[0061] Calculate the length of the line segment d_end and the distance d_fcw between the vehicle body and the line segment using the following formula:

[0062] ,

[0063] ,

[0064] in,

[0065] ,

[0066] ,

[0067] ,

[0068] When the length of d_end is greater than 2 meters and the length of d_fcw is less than 4 meters, save the heading angle α1 before turning around. The formula is as follows:

[0069] ,

[0070] ,

[0071] The conditions for judging whether the U-turn is completed are:

[0072] ,

[0073] After the vehicle turns 180 degrees to make a U-turn, the following formula is satisfied:

[0074] ,

[0075] ,

[0076] In the above formula, p_start.x and p_start.y represent the x-axis and y-axis coordinates of the starting point of the line segment, p_end.x and p_end.y represent the x-axis and y-axis coordinates of the end point of the line segment, 0、 Y0 represents the origin coordinate, angle represents the control angle, r represents the remainder of the number of turns N, L represents the front and rear wheel wheelbase of the vehicle, R_min represents the minimum turning radius of the vehicle, α is the current heading angle of the vehicle obtained by the gyroscope, D_KCW is the distance set between the vehicle and the wall, and d_vw is the width of the vehicle.

[0077] Beneficial effects of the present invention:

[0078] The present invention uses a single-line laser radar and a gyroscope to enable an unmanned sweeper to perform coverage operations in an unknown indoor environment, eliminating the need to establish a related map.

[0079] Using a single-line laser radar and a gyroscope as sensors, it is possible to obtain the indoor environment conditions and vehicle position information in a stable and real-time manner; by screening the radar data, the wall segments suitable for the unmanned sweeper to track are obtained, enabling it to perform automatic driving relatively smoothly, and realizing the unmanned sweeper to cover unknown indoor environments, eliminating the need to establish relevant high-precision maps, and avoiding the problem of inaccurate positioning when using map positioning in a monotonous environment, thereby improving the reusability of the unmanned sweeper in this type of scenario and simplifying the deployment process of the unmanned sweeper in this type of scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 It is a flow chart of the present invention.

[0081] Figure 2Schematic diagram of the wall and coordinate system scanned by the laser radar of the present invention.

[0082] Figure 3 This is a schematic diagram of a vehicle tracking a wall.

[0083] Figure 4 Schematic diagram when selecting a line segment.

[0084] Figure 5 Schematic diagram of the line segment closest to the vehicle body.

[0085] Figure 6 This is a schematic diagram of vehicle angle control.

[0086] Figure 7 This is a schematic diagram of the vehicle after turning around. DETAILED DESCRIPTION

[0087] The present invention will be further described with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art may make various changes or modifications to the present invention, and these equivalent forms also fall within the scope limited by the application.

[0088] This embodiment provides a strategy method for an unmanned sweeper to cover an indoor unknown environment. In this embodiment, the unmanned sweeper adopts the Ackerman model with front-wheel steering and rear-wheel drive. The vehicle steering angle is positive for left turn and negative for right turn. The Ackerman model is a model commonly used to describe the kinematic characteristics of four-wheel vehicles, which can accurately control the vehicle.

[0089] In this embodiment, the unmanned sweeper includes a single-line laser radar and a gyroscope, wherein the single-line laser radar is installed on the top of the vehicle corresponding to the center of the rear wheel axle of the vehicle for wall recognition. The gyroscope is installed on the vehicle to feedback the posture information of the vehicle. Based on the data collected by the single-line laser radar and the data fed back by the gyroscope, the path planning algorithm provided in this embodiment can control the vehicle to perform full coverage operations in an unknown indoor environment.

[0090] In this embodiment, in the single-line wall-finding path planning method, the indoor environment should be rectangular to ensure that the vehicle can turn around normally. The main path planning process of this embodiment is as follows: Figure 1 As shown, the details are as follows.

[0091] First, you need to establish the coordinate system of the vehicle body. Figure 2 As shown, in this embodiment, in the initial state of the vehicle, the positive direction of the x-axis faces forward, the positive direction of the y-axis faces left, and the intersection of the two axes is the origin, so as to establish the coordinate system of the vehicle body, and the laser radar scanning area is the right area. Read the point cloud data of the wall scanned by the single-line laser radar.

[0092] The wall point cloud data scanned by the laser radar is not regular data, so it needs to be processed before the line segments can be extracted. For the point cloud data, the edge points are removed by using a filter to determine which points belong to the points on the straight line, and all the extracted line segments are published. Each line segment starts at point p_start and ends at point p_end. Figure 2 As shown, the wall and coordinate system scanned by the laser radar. In the figure, the dotted arrow is the laser scanning line, the dotted line is the wall scanned and released by the laser radar, and the black solid line is the wall. The line segments scanned by the laser radar will vary in length depending on the situation of the object.

[0093] Through the above steps, the laser radar scanned data is extracted into line segments. There are multiple line segments. The corresponding straight line equations are calculated for all the read line segments, that is, the slope K value and the constant b value of all the line segments are calculated. The calculation formula is as follows:

[0094] ,

[0095] ,

[0096] In the above calculation formula, p_start represents the starting point of the line segment, p_end represents the end point of the line segment, p_start.x and p_start.y represent the x-axis and y-axis coordinates of the starting point of the line segment, and p_end.x and p_end.y represent the x-axis and y-axis coordinates of the end point of the line segment.

[0097] After obtaining the straight line equation of the line segment, calculate the coordinates of the perpendicular points from the origin of the vehicle coordinate system to all line segments in all line segments. The corresponding calculation formula is as follows:

[0098] ,

[0099] ,

[0100] Among them, A=K, B= -1, C=b, p_foot.x is the x-axis coordinate of the perpendicular point, p_foot.y is the y-axis coordinate of the perpendicular point, X 0、 Y0 are the coordinates of the origin.

[0101] After that, the line segment is determined based on the foot point and the number of turns N. The number of turns N refers to the number of turns of the vehicle, and N=1 at the initial time. When the number of turns N is an odd number, the line segment with the foot point on the right side of the vehicle body is selected, and when the number of turns N is an even number, the line segment with the foot point on the left side of the vehicle body is selected.

[0102] like Figure 3As shown, the black solid line frame is the initial point of the vehicle, the driving direction is toward the X-axis, and the dotted line is the line segment that needs to be tracked. When the U-turn is completed, that is, the dotted line frame, the dotted line that needs to be tracked is on the left side of the vehicle, so as to determine the positional relationship between the tracking path and the vehicle.

[0103] As mentioned above, the line segment corresponding to the perpendicular foot point needs to be selected according to the number of vehicle turns N, and the conditions that need to be met are as follows:

[0104] For the number of return times N, the formula is as follows:

[0105] N mod 2 = r,

[0106] In the above formula, r is the remainder. When r=1, N is an odd number, and when r=0, N is an even number.

[0107] When N is an odd or even number, the foot point selection satisfies the following formula:

[0108] (N is an odd number),

[0109] (N is an even number),

[0110] Among them, p_foot.y is the y-axis coordinate of the foot point.

[0111] In the above steps, the positional relationship between the line segment to be tracked and the vehicle is obtained by calculating the number of turns and the foot point. However, not all line segments are the line segments to be tracked, so the line segments obtained above need to be screened. For the line segments obtained above, the length d_line of the line segment is calculated, and the line segment with a length greater than n vehicle bodies is selected. In this embodiment, it has been verified and analyzed that when the length d_line of the line segment satisfies the requirement of more than 4 vehicle body lengths, the vehicle tracks the line segment more accurately and the full coverage operation effect is better. Through this preliminary screening, the line segments with a length greater than 4 vehicle body lengths are selected, and the corresponding formula is as follows:

[0112] ,

[0113] After filtering the line segments through the above steps, calculate the perpendicular distance d_foot from the origin of the vehicle coordinate system to the filtered line segments, and select the line segments with d_foot less than 8 meters. The corresponding public display is as follows:

[0114] ,

[0115] Through the above screening, there are still many line segments that meet the conditions, so further screening is required to select the most suitable route for tracking. Through the above screening, all line segments corresponding to the straight lines intersecting the right semicircle with a radius of 8 meters at the origin of the coordinate system can be obtained. These line segments are classified, and the line segments above or intersecting the y-axis are the best choices (in front of the vehicle coordinate system or the line segment intersects with the y-axis of the vehicle coordinate system). When there is no optimal choice, the line segment below the y-axis is selected as the maintained selection (that is, there is no line segment above the y-axis of the coordinate system and the line segment intersecting with the y-axis, and there is a wall at a certain distance below the y-axis of the coordinate system. When the line segment is selected, keep walking for a distance). Among these line segments, by comparing the distances from the starting point, end point, and foot point of the line segment to the vehicle body, the line segment index closest to the vehicle body is obtained.

[0116] refer to Figure 4 As shown in the figure, the small black box is the car body, the dotted line on the right is the wall scanned by the radar, and the one that intersects with the Y axis and is above the Y axis is the optimal choice.

[0117] Through the above screening, the line segments that meet the optimal selection conditions are preferentially selected, the distances from the vehicle body to all the optimally selected line segments are calculated, and the line segment corresponding to the minimum distance is selected as the closest line segment to the vehicle body. The closest line segment to the vehicle body is used for subsequent vehicle control.

[0118] If there is no optimally selected line segment, then select the line segment to keep selected, calculate the distance from the vehicle body to all optimally selected line segments, and select the line segment corresponding to the minimum distance as the closest line segment to the vehicle body.

[0119] For the selected line segment, the most suitable line segment is selected by comparing the distances from the starting point, end point, and foot point of the line segment to the vehicle body. For the foot point of the perpendicular point, it is necessary to determine whether it is on the line segment. If it is on the line segment, it means that the vehicle body is perpendicular to the straight line to be tracked and the distance is the shortest. If the foot point is not on the line segment, it means that one of the starting point or end point of the line segment is closest to the vehicle body. Then, the line segment corresponding to the distance of the closest point is selected as the line segment closest to the vehicle body, which can be used as the final tracking line segment.

[0120] Among them, the optimal selection line segment meets the following conditions:

[0121] ,

[0122] Keep selecting line segments that meet the following conditions:

[0123] ,

[0124] The conditions for determining whether the foot point is on a line segment are as follows:

[0125] ,

[0126] ,

[0127] The line segment closest to the vehicle body meets the following conditions:

[0128] ,

[0129] refer to Figure 5 As shown in , based on the screening principle of this application, line segment L1 is above the y-axis, line segment L2 intersects the y-axis, and line segment L1 and line segment L2 are both optimally selected line segments. Of these two line segments, line segment L1, which does not intersect the y-axis, has its foot on the y-axis, and line segment L2, which intersects the y-axis, has its foot on the line segment.

[0130] Assume that the radar scan rotates clockwise, the upper ends of the two line segments are the starting point and the lower ends are the end points. The foot of the perpendicular line segment L1 is not on the line segment, and the distance from the origin to the starting point of the line segment and the distance from the origin to the end point of the line segment need to be calculated, and the two minimum distances L1_min are selected as the line segment L1 closest to the vehicle body. The foot of the perpendicular line segment L2 is on the line segment, and the distance from the origin to the foot of the perpendicular is calculated as the shortest distance L2 to the vehicle body L2_min, and then the size of L1_min and L2_min are compared. The smallest corresponding line segment is the final line segment closest to the vehicle, that is, if L1_min is greater than L2_min, then select line segment L2 as the line segment closest to the vehicle body, and line segment L2 is the line segment that needs to be tracked.

[0131] In the above steps, by screening the line segments multiple times and selecting the final tracking line segment, the relatively smooth and accurate automatic driving of the unmanned sweeper can be ensured.

[0132] According to the above selected line segment closest to the vehicle body, the corresponding straight line equation can be obtained, and the real-time distance d_cw from the radar to the wall can be obtained according to the corresponding straight line equation. At the same time, the distance D_KCW between the vehicle and the wall is set, and the lateral error D_error is generated by the two distances for PID angle control.

[0133] However, due to the forward motion of the car and the finite delay in the execution of the control and perception nodes, this distance cannot be used directly. Instead, it is necessary to project the vehicle forward by a certain distance d_front from its current position, such as Figure 6 At the same time, the current heading angle α of the vehicle is obtained from the gyroscope in real time, and the heading angle of the vehicle is adjusted according to the error so that the vehicle and the wall remain relatively parallel.

[0134] The real-time distance d_cw between the radar and the wall, the lateral error D_error between the two distances, and the corresponding formulas for angle adjustment are as follows:

[0135] ,

[0136] ,

[0137] .

[0138] Among them, Kp is the P parameter of PID control, which needs to be adjusted according to actual conditions. In a specific implementation manner provided in the present application, it is defined as Kp=0.7, Kd=D parameter of PID control, which needs to be adjusted according to actual conditions. In a specific implementation manner provided in the present application, it is defined as Kd=0.1, previous_error is the D_error calculated last time, and current_error is the current actual error D_error.

[0139] refer to Figure 6 As shown in the figure, the black solid line on the right is the wall, the small black rectangle is the car body, the small black dashed rectangle is the car body at the next moment, and the black arc is the current direction angle of the vehicle. The D double-headed arrow is d_cw, and the E double-headed arrow is .

[0140] Through the above steps, the unmanned sweeper can keep the vehicle and the wall relatively parallel to each other, but no conditions are given for the vehicle to turn around when it encounters an obstacle or reaches the end. Therefore, in this application, when there is a wall on the side of the vehicle and a wall or an obstacle twice the width of the vehicle appears 4 meters in front, a U-turn is performed. After the U-turn, the number of turns increases, and the distance maintained from the wall also increases accordingly.

[0141] The conditions for determining the end of the environment in front of the vehicle are as follows:

[0142] ,

[0143] The formula for calculating the length of the line segment d_end and the distance d_fcw between the vehicle body and the line segment is as follows:

[0144] ,

[0145] ,

[0146] ,

[0147] ,

[0148] ,

[0149] When the length of d_end is greater than 2 meters and the length of d_fcw is less than 4 meters, save the heading angle α1 before turning around:

[0150] ,

[0151] ,

[0152] (L is the front and rear wheelbase of the vehicle, R_min is the minimum turning radius of the vehicle),

[0153] The conditions for judging whether the U-turn is completed are:

[0154] ,

[0155] In the above formula, α1 is the heading angle before the U-turn, assuming it is 0.1, and α is the current heading angle, which is -3.04 after the U-turn. When the wall is on the right, r=1, then the above formula is |0.1|=|-3.04+3.14|.

[0156] When the vehicle turns 180 degrees to make a U-turn:

[0157] ,

[0158] .

[0159] refer to Figure 7 As shown, the small black box is the vehicle body, the black dotted line is the wall scanned by the radar, the solid double arrow is the distance from the vehicle body to the wall before the U-turn, and the dotted double arrow is the distance from the vehicle body to the wall after the U-turn.

[0160] In the present application, the line segments to be tracked are screened out through the point cloud data obtained by a single-line laser radar, and the vehicle posture information fed back by the gyroscope is used to control the vehicle to travel along the optimal tracking route. The vehicle can also turn around automatically when encountering an obstacle or a dead end, thereby performing bow-shaped coverage operations in unknown indoor environments, eliminating the need to establish relevant high-precision maps, and avoiding the problem of inaccurate positioning when using map positioning in a monotonous environment. This improves the reusability of the unmanned sweeper in this type of scenario and simplifies the deployment process of the unmanned sweeper in this type of scenario.

Claims

1. A method for unmanned sweeper covering operation in an indoor unknown environment, characterized in that: The unmanned sweeper adopts the Ackerman motion model, the vehicle steering angle is positive for left turn and negative for right turn, and a single-line laser radar is installed on the top of the vehicle corresponding to the center of the rear wheel axle of the vehicle, including the following steps: Step 1: Take the initial front-to-back direction of the vehicle as the x-axis, the left-to-right direction as the y-axis, the front as the positive value of the x-axis, the left as the positive value of the y-axis, and the intersection of the x-axis and y-axis as the origin to establish a vehicle coordinate system, read the point cloud data of the right wall scanned by the single-line laser radar, process the point cloud data, and extract the line segment data; Step 2, calculate the straight line equations corresponding to all line segments; Step 3: Calculate the coordinates of the foot points of the perpendicular points from the origin of the vehicle coordinate system to all the line segments based on the straight line equations corresponding to the line segments; Step 4: determine the line segment based on the coordinates of the perpendicular point and the number of times the vehicle turns back N. When the number of turns back N is an odd number, select the line segment with the perpendicular point on the right side of the vehicle body; when the number of turns back N is an even number, select the line segment with the perpendicular point on the left side of the vehicle body; Step 5, calculate the length of the line segment selected in step 4, filter out the line segment that meets the requirements, and then calculate the distance from the origin of the vehicle body coordinate system to the foot point of the line segment that meets the requirements for further screening, and finally calculate the line segment closest to the vehicle body; Step 6: Based on the line segment closest to the vehicle body obtained in step 5, the real-time distance from the radar to the wall is calculated to perform vehicle PID angle control so that the vehicle and the wall are kept relatively parallel to each other; Step 7: Use laser radar to obtain the wall or obstacle in front of the vehicle to make a U-turn and achieve bow-shaped coverage operation, which specifically includes: When there is a wall on the side of the vehicle and a wall or an obstacle twice as long as the width of the vehicle appears 4 meters ahead, the vehicle will make a U-turn. At the same time, the number of turns N increases and the distance to the wall also increases. The conditions for determining the end of the environment in front of the vehicle are as follows: ((p_start.y×p_end.y)<0)∧(p_start.x>0)∧(p_end.x>0) Calculate the length of the line segment d_end and the distance d_fcw between the vehicle body and the line segment using the following formula: in, A1=p_statrt.y-p_end.y B1=p_statrt.x-p_end.x C1=p_start.x×p_end.y-p_start.y×p_end.x When the length of d_end is greater than 2 meters and the length of d_fcw is less than 4 meters, save the heading angle α1 before turning around. The formula is as follows: (d_end>2)∧(d_fcw<4) The conditions for judging whether the U-turn is completed are: |α1|=|α+(-1) r-1 ×π| After the vehicle turns 180 degrees to make a U-turn, the following formula is satisfied: N=N+1 In the above formula, p_start.x and p_start.y represent the x-axis and y-axis coordinates of the starting point of the line segment, p_end.x and p_end.y represent the x-axis and y-axis coordinates of the end point of the line segment, X0 and Y0 represent the origin coordinates, angle represents the control angle, r represents the remainder of the number of turns N, L represents the front and rear wheelbase of the vehicle, R_min represents the minimum turning radius of the vehicle, α is the current heading angle of the vehicle obtained by the gyroscope, D_KCW is the distance set between the vehicle and the wall, and d_vw is the vehicle width.

2. The method for covering operation by an unmanned sweeper in an indoor unknown environment according to claim 1, characterized in that: In step 1, a filter is used to remove edge points from the point cloud data, determine which points belong to the line segment, and finally extract the line segment data.

3. The method for covering operation by an unmanned sweeper in an indoor unknown environment according to claim 1, characterized in that: Step 2 specifically includes: Calculate the slope K value and constant b value of all the line segments read. The calculation is shown as follows: b=p_start.yK×p_start.x Among them, p_start represents the starting point of the line segment, p_end represents the end point of the line segment, p_start.x and p_start.y represent the x-axis and y-axis coordinates of the starting point of the line segment, and p_end.x and p_end.y represent the x-axis and y-axis coordinates of the end point of the line segment.

4. The method for covering operation by an unmanned sweeper in an indoor unknown environment according to claim 3, characterized in that: In step 3, the formula for calculating the coordinates of the perpendicular point of the line segment is as follows: Among them, A=K, B=-1, C=b, p_foot.x is the x-axis coordinate of the perpendicular point, p_foot.y is the y-axis coordinate of the perpendicular point, and X0 and Y0 are the coordinates of the origin respectively.

5. The method for covering operation by an unmanned sweeper in an indoor unknown environment according to claim 4, characterized in that: In step 4, the remainder is calculated for the number of return times N, and the formula is as follows: N mod 2 = r In the above formula, r is the remainder. When r=1, N is an odd number, and when r=0, N is an even number. When N is an odd or even number, the foot point selection satisfies the following formula: When N is an odd number, p_foot.y<0 When N is an even number, p_foot.y>0 Among them, p_foot.y is the y-axis coordinate of the foot point.

6. The method for covering operation by an unmanned sweeper in an indoor unknown environment according to claim 4, characterized in that: Step 5 specifically includes the following steps: Step 51, calculate the length d_line of the line segment selected in step 4, and select a line segment whose length is greater than n vehicle body lengths; Step 52, calculate the distance d_foot from the origin of the vehicle body coordinate system to the foot point of the line segment that meets the requirements of step 51, and select the line segment whose d_foot is less than m meters; Step 53, classifying the line segments selected in step 52 into optimally selected line segments and retained selected line segments, wherein the line segments above the y-axis or intersecting the y-axis are optimally selected line segments, and the rest are retained selected line segments. When an optimally selected line segment exists, the optimally selected line segment is selected, and when no optimally selected line segment exists, the retained selected line segment is selected; Step 54: for the optimal selected line segment or the retained selected line segment selected in step 53, determine whether the foot points of all line segments are on the line segment. If the foot points are on the line segment, calculate the distance from the foot points to the origin of the vehicle coordinate system. If the foot points are not on the line segment, calculate the distances from the starting point and the end point of the line segment to the origin of the vehicle coordinate system. Compare the distances from the foot points, the starting point and the end point to the origin of the vehicle coordinate system, select the line segment corresponding to the minimum value as the line segment closest to the vehicle body, and use the line segment closest to the vehicle body as the final tracking line segment.

7. The method for covering operation by an unmanned sweeper in an indoor unknown environment according to claim 6, characterized in that: In step 51, the length of the line segment satisfies the following formula: Among them, d_car is the length of the car body; In step 52, the distance d_foot is calculated as follows: In step 53, the optimal selection line segment satisfies the following conditions: ((p_start.x)×(p_end.x)<0)∨((p_start.x≥0)∧(p_end.x≥0)) Keep selecting line segments that meet the following conditions: (p_start.x<0)∧(p_end.x<0) The conditions for determining whether the foot point is on a line segment are as follows: min(p_start.x,p_end.x)≤p_foot.x≤max(p_start.y,p_end.y) ∧min(p_start.y,p_end.y)≤p_foot.y≤max(p_start.y,p_end.y) The line segment closest to the vehicle body meets the following conditions:

8. The method for covering operation by an unmanned sweeper in an indoor unknown environment according to claim 3, characterized in that: Step 6 specifically includes: calculating the real-time distance d_cw from the radar to the wall, setting the distance D_KCW between the vehicle and the wall, and generating a lateral error D_error through the two distances to perform PID angle angle control. The corresponding formula is as follows: angle=K P ×D_error-K d ×(previous_error-current_error) Among them, d_front is the forward distance of the projected vehicle's current position, α is the vehicle's current heading angle obtained by the gyroscope, Kp is the P parameter of PID control, which needs to be adjusted according to actual conditions, Kd is the D parameter of PID control, which needs to be adjusted according to actual conditions, previous_error is the D_error calculated last time, and current_error is the current actual error D_error.