A method for detecting path points of a spray robot during ceiling spraying operation

By dividing the floor plan of the indoor ceiling into small rectangular working surfaces and testing its effectiveness, the problem of the spraying robot's path point being too close to the indoor and wall is solved, and the accuracy and efficiency of the spraying operation are improved.

CN116494262BActive Publication Date: 2024-08-30ANHUI TONGPAITE ROBOT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310501431.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-06
Publication Date
2024-08-30
Estimated Expiration
2043-05-06

AI Technical Summary

Technical Problem

During the ceiling spraying operation of the spraying robot, the path points are prone to passing through the wall or being too close to the wall, resulting in the inability to accurately travel to the designated location, and there is a lack of detection mechanism to ensure the accuracy of the path points.

Method used

By obtaining the floor plan of the indoor ceiling and dividing it into small rectangular working surfaces of the same size, the effectiveness of each small rectangular working surface is determined, and its corresponding travel path point is calculated to determine whether the path point is indoors and whether it has passed away from the wall. Recently, if the conditions are not met, it will be recalculated.

Benefits of technology

It improves the quality and efficiency of the spraying robot's spraying operation on the indoor ceiling, ensures the accuracy of the traveling path points, and avoids the problem of being unable to travel or being too close to the wall.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116494262B
    Figure CN116494262B
Patent Text Reader

Abstract

The present invention relates to the technical field of spraying robots, and solves the technical problem that the prior art cannot detect whether a travel path point is indoors or too close to a wall, and in particular relates to a method for detecting travel path points of a spraying robot for ceiling spraying operations, comprising the following steps: S1, obtaining a floor plan of an indoor ceiling to be sprayed; S2, dividing the floor plan into a plurality of small rectangular working surfaces of equal size; S3, judging the effectiveness of the plurality of small rectangular working surfaces to obtain an effective working surface. The present invention can detect the accuracy of the travel path points generated by the spraying robot for indoor ceiling spraying operations, and avoid the phenomenon that the spraying robot cannot travel to a designated position and is too close to a wall, thereby improving the quality and efficiency of the spraying robot in performing spraying operations on indoor ceilings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of spraying robots, and in particular to a method for detecting travel path points of a spraying robot during a ceiling spraying operation. Background Art

[0002] In the application of spraying robots, the operation path planning of the spraying robot determines whether the spraying operation can be carried out with intelligent automatic control. Due to the complex indoor environment of buildings, when spraying the corners of the ceiling, the following two situations are likely to occur for the travel path points corresponding to the area:

[0003] First, the travel path points generated by the spraying robot according to the house plan are prone to pass through the wall, that is, the calculated travel path points are located outdoors, which makes it impossible for the spraying robot to travel to the designated location for operation;

[0004] Secondly, the generated travel path points are likely to be too close to the wall, causing the spray robot's robotic arm to be unable to extend.

[0005] Both of these phenomena will lead to errors in the generated travel path points, resulting in the spray robot being unable to move to the specified position or being too close to the wall when it moves to the operation path point. However, there is currently a lack of corresponding detection mechanism for the planning of the spray robot's travel path points, and the accuracy of the generated travel path points cannot be detected, which causes the spray robot to make mistakes when performing the spraying operation and is unable to spray the indoor ceiling continuously. Summary of the invention

[0006] In view of the shortcomings of the prior art, the present invention provides a method for detecting the travel path points of a spray robot during ceiling spraying operations, which solves the technical problem that the prior art cannot detect whether the travel path points are indoors or too close to the wall.

[0007] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for detecting the path points of a spray robot during ceiling spraying operation, comprising the following steps:

[0008] S1. Obtaining a floor plan of the indoor ceiling to be sprayed;

[0009] S2, dividing the floor plan into a number of small rectangular work surfaces of equal size;

[0010] S3, judging the effectiveness of several small rectangular working surfaces to obtain effective working surfaces;

[0011] S4, calculating the coordinates of the travel path points corresponding to the effective working surface;

[0012] S5, determining whether the travel path point is indoors;

[0013] If yes, proceed to step S6;

[0014] If not, then recalculate the new travel path point corresponding to the effective working surface, and then return to step S5;

[0015] S6, determining whether the path point is too close to the wall;

[0016] If yes, then recalculate the new travel path point corresponding to the effective working surface, and then return to step S5;

[0017] If not, then end.

[0018] Furthermore, in step S2, the floor plan is divided into a plurality of small rectangular work surfaces of equal size. The specific process includes the following steps:

[0019] S21. Select a rectangle A w B w C w D w Cover the entire floor plan, let A w The coordinates of the point are (x min ,y min ), B w The coordinates of the point are (x max ,y min ), C w The coordinates of the point are (x max ,y max ), D w The coordinates of the point are (x min ,y max ), with length as l s , width is w s Rectangle A w B w C w D 分 Cut into several small rectangular working surfaces;

[0020] S22, determining whether each small rectangular working surface is a complete working surface;

[0021] If so, then end;

[0022] If not, proceed to step S23;

[0023] S23, completing the incomplete working surface into a complete working surface.

[0024] Further, in step S22, it is determined whether each small rectangular working surface is a complete working surface. The specific process includes the following steps:

[0025] S221, obtaining the categories of the inflection points formed by the small rectangular working surface P and the wall, which are divided into positive corner inflection points and negative corner inflection points;

[0026] S222, let the minimum horizontal coordinate of the vertex of the small rectangular working surface P be x s min , the maximum horizontal coordinate is x s max , the minimum ordinate is y s min , the maximum ordinate is y s max ;

[0027] S223, determining whether the small rectangular working surface P is not complete;

[0028] If there is an inflection point G(x g ,y g ), so that x s min <x g <x s max And y s min <y g <y s max , then the small rectangular working surface P does not have integrity;

[0029] S224. Determine whether the small rectangular working surface P is an incomplete and regular working surface or an incomplete and irregular working surface.

[0030] Further, in step S224, the small rectangular working surface P is judged to be an incomplete and regular working surface or an incomplete and irregular working surface. The specific process includes the following steps:

[0031] S2241, let the coordinates of the next inflection point of inflection point G be G1(x g1 ,y g1 ), the coordinates of the previous inflection point of inflection point G are G0(x g0 ,y g0 );

[0032] S2242, respectively calculate the vectors between the inflection points G0 and G and the vector between G and G1

[0033] S2243, according to vector And vector Determine whether the small rectangular working surface P is an incomplete and regular working surface;

[0034] If the inflection point G is the inflection point of the inner angle, and the small rectangular working surface P only contains the inflection point G, then the small rectangular working surface P is an incomplete and regular working surface;

[0035] If the inflection point G is the inflection point of the positive angle, no matter whether the next inflection point of the inflection point G is within the small rectangular working surface P, the small rectangular working surface P is an incomplete and irregular working surface that needs to be segmented;

[0036] If there are two adjacent inflection points G'(x g’ ,y g’ ) and G”(x g” ,y g” ), so that the line segment G'G" has two intersection points with the edge of the small rectangular working surface P, that is, when y s min <y g’ <y s max And y s min <y g” <y s max When x g’ ≤x s min or x g’ ≥x s max And x g” ≥x s max or x g” ≤x s max ;

[0037] Or when x s min <x g’ <x s max And x s min <x g” <x s max When g’ ≤y s min or g’ ≥y s max And y g” ≥y s max or g” ≤y s max , then, the small rectangular working surface P does not have integrity and is an incomplete and regular working surface.

[0038] Furthermore, in step S3, the validity of a plurality of small rectangular working surfaces is judged to obtain a valid working surface, and the specific process includes the following steps:

[0039] S31, let the starting point of the boundary line segment l in the floor plan be l st (x st ,y st , the end point is l ed (x ed ,y ed ), the coordinates of the vertex A1 at the lower left corner of the small rectangular working surface are (x A1 ,y A1 ), the coordinates of the lower right vertex B1 are (x B1 ,y B1 ), the coordinates of the upper right vertex C1 are (x C1 ,y C1 ), the vertex coordinates of the upper left corner D1 are (x D1 ,y D1 );

[0040] S32, suppose the equation of the straight line where the line segment A1C1 lies is y1=k1x1+b1, and the equation of the straight line where the line segment B1D1 lies is y2=k2x2+b2;

[0041] S33. When k1≠k2, the intersection point of the simultaneous linear equations k1 and k2 is the centroid m;

[0042] S34, draw a ray p horizontally from the center of mass m to the right, and follow y st ≤y m <y ed or ed ≤y m <y st Filter out the boundary line segment l that meets the conditions, then the boundary line segment l satisfies y st ≠y ed ;

[0043] S35. Let the equation of the line where the boundary line segment l lies be x=k l y+b l ;

[0044] S36, y m Substitute the equation of the line x = k l y+b l , determine whether the centroid point m is on the left side of the boundary segment l;

[0045] If x m <k l *y m +b l , then the centroid point m is located on the left side of the boundary segment l;

[0046] If not, the centroid point m is located on the right side of the boundary segment l;

[0047] S37, repeatedly calculating the total number of intersection points;

[0048] If the total number of intersection points is an odd number, the small rectangular working surface corresponding to the centroid point m is the effective working surface;

[0049] If the total number of intersection points is an even number, the small rectangular working surface corresponding to the centroid point m is an invalid working surface.

[0050] Furthermore, in step S4, the coordinates of the travel path points corresponding to the effective working surface are calculated, and the specific process includes the following steps:

[0051] S41, let the coordinates of the vertex A at the lower left corner of the complete working surface ABCD be (x A ,y A ), the coordinates of the lower right vertex B are (x B ,yB ), the coordinates of the upper right vertex C are (x C ,y C ), the vertex coordinates of the upper left corner D are (x D ,y D ), the coordinates of the path point P are (x P ,y P );

[0052] S42. Take a point E on line segment AB and set |AE| = d right , d right is the maximum deviation in the x direction when the spray robot is spraying on the ceiling, |PE| = d side , d side It is the distance between the spray robot and the long side AB of the working surface during ceiling spraying operation;

[0053] S43, calculating the coordinates of point E according to the unit vector between vertex A and vertex B;

[0054] S44. Calculate the coordinates of the travel path point P according to the coordinates of the point E:

[0055] S45, calculating the posture θ of the spraying robot at the travel path point P P .

[0056] Further, in step S5, it is determined whether the travel path point is indoors, and the specific process includes the following steps:

[0057] S51, let the coordinates of the lower left vertex A1 of the complete working surface A1B1C1D1 be The coordinates of the lower right vertex B1 are The coordinates of the upper right vertex C1 are The coordinates of the upper left vertex D1 are The coordinates of the path point P1 are The coordinates of the new path point P'1 are The starting point of boundary segment l is l st (x st ,y st ), the end point is l ed (x ed ,y ed );

[0058] S52, according to or Filter out the boundary line segment l that meets the conditions. It can be seen that the boundary line segment l satisfies y st ≠y ed ;

[0059] S53, let the equation of the line where the boundary line segment l lies be x=k l y+bl , k l =(y ed -y st ) / (x ed -x st ), b l =y st -k l *x st ;

[0060] like Then the boundary line segment l intersects the ray drawn from the travel path point P1;

[0061] S54, calculate back and forth in sequence, and obtain satisfaction The boundary segment l of the condition 总 The total number of

[0062] If the boundary segment l 总 If the total number of is an even number, then the path point P1 is outdoors;

[0063] If the boundary segment l 总 If the total number of is an odd number, then the path point P1 is indoors;

[0064] S55. Recalculate the outdoor travel path point P1 to obtain a new travel path point P'1.

[0065] Further, in step S6, it is determined whether the travel path point is too close to the wall, and the specific process includes the following steps:

[0066] S61. Let the coordinates of the vertex A2 at the lower left corner of the complete working surface A2B2C2D2 be The coordinates of the lower right vertex B2 are The coordinates of the upper right vertex C2 are The coordinates of the upper left vertex D2 are The coordinates of the path point P2 are The coordinates of the path point P'2 are The coordinates of point S are (x S ,y S ), the coordinates of point T are (x T ,y T );

[0067] S62. Let the equation of the line segment ST be: A ST x+B ST x+C ST = 0, calculate the coordinates (x H ,y H );

[0068] S63, respectively calculate the distance d from the travel path point P2 to the straight line where the line segment ST is located PST , the distance d from the path point P2 to the endpoint S of the line segment ST PS , the distance d from the path point P2 to the endpoint T of the line segment ST PT , the distance d from the foot of the perpendicular H to the endpoint S of the line segment ST HS , the distance d from the foot of the perpendicular H to the endpoint T of the line segment ST HT and the distance d from the endpoint S of the line segment ST to the endpoint T of the line segment ST ST ;

[0069] S64, from distance d PS , distance d PT and distance d PST Select the contrast value and the wall threshold S wall Compare and determine whether the path point P2 is too close to the wall;

[0070] If d HT +d HS >d ST , then select d PS and d PT Small and medium values ​​are used as comparison values. If d HT +d HS =d ST , then select d PST As a comparison value;

[0071] If the contrast value is less than the wall threshold S wall , then the path point P2 is too close to the wall;

[0072] If the contrast value is greater than the wall threshold S wall , the opposite is true;

[0073] S65. Recalculate the outdoor travel path point P2 to obtain a new travel path point P'2.

[0074] By means of the above technical solution, the present invention provides a method for detecting the path points of a spraying robot during ceiling spraying operation, which has at least the following beneficial effects:

[0075] 1. The present invention solves the technical problem that the prior art cannot detect whether the travel path points are indoors or too close to the wall. It can detect the accuracy of the travel path points generated by the spray robot during the spraying operation on the indoor ceiling, avoiding the phenomenon that the spray robot cannot travel to the specified position and is too close to the wall, thereby improving the quality and efficiency of the spray robot in performing spraying operations on the indoor ceiling.

[0076] 2. The present invention can judge the effectiveness of the work surfaces divided into small rectangles, avoiding the situation where the small rectangular work surfaces are completely outside the floor plan, and at the same time provide a guarantee for the subsequent detection of whether the travel path points are indoors and too close to the wall, thereby ensuring the accuracy of the divided small rectangular work surfaces in calculating the corresponding travel path points. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0078] Figure 1 is a flow chart of the method for detecting a travel path point of the present invention;

[0079] Figure 2 An example diagram of generating global path points for the spraying robot of the present invention;

[0080] Figure 3 It is a schematic diagram of the cross-cutting segmentation method of the present invention;

[0081] Figure 4 It is a schematic diagram of the vertical cutting method of the present invention;

[0082] Figure 5 A schematic diagram of the integrity judgment of the small rectangular working surface of the present invention;

[0083] Figure 6 A schematic diagram of dividing an incomplete working surface into sub-working surfaces according to the present invention;

[0084] Figure 7 It is a schematic diagram of the cross-cutting splitting method of the incomplete working surface of the present invention;

[0085] Figure 8 It is a schematic diagram of the vertical cutting and segmentation method of the incomplete working surface of the present invention;

[0086] Fig. 9 A schematic diagram of the completion of the regular sub-working surface of the present invention;

[0087] Fig.10 A schematic diagram of judging the effectiveness of a small rectangular working surface of the present invention;

[0088] Fig.11 A schematic diagram of the calculation of the travel path points of the present invention;

[0089] Fig.12 It is a schematic diagram of determining and recalculating outdoor travel path points and travel path points that are too close to a wall according to the present invention. DETAILED DESCRIPTION

[0090] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.

[0091] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, so the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0092] Please refer to Figure 1-Figure 12 , showing a specific implementation of the present embodiment, the present embodiment divides the floor plan into a number of small rectangular work surfaces of equal size, and calculates the travel path points corresponding to each individual small rectangular work surface to obtain their coordinates, and then judges whether the travel path points are indoors and whether they are too close to the wall. At the same time, the travel path points that do not meet the above two conditions are recalculated to obtain new travel path points, thereby ensuring the smooth movement and operation of the spray robot during the spraying operation, thereby ensuring that the calculated travel path points meet the continuous movement requirements of the spray robot during operation, avoiding the phenomenon that the spray robot cannot perform the spraying operation normally and repeats the spraying, thereby improving the quality and efficiency of the spray robot in performing spraying operations on indoor ceilings.

[0093] Please refer to Figure 1 This embodiment proposes a method for detecting the path points of a spray robot during ceiling spraying operation, comprising the following steps:

[0094] S1. Obtain the floor plan of the indoor ceiling to be sprayed. The floor plan of the indoor ceiling is in the form of an electronic CAD in this embodiment. The floor plan can be directly obtained from the architectural drawings before construction and matched with the architectural drawings, so as to obtain the floor plan data of the indoor ceiling to be constructed.

[0095] It should be noted that before the spraying robot performs the spraying operation, the staff needs to transmit the floor plan of the indoor ceiling to be sprayed to the spraying robot. The spraying robot automatically generates travel path points according to the working surface. Therefore, the global path points include all the travel path points in the floor plan of the indoor ceiling to be sprayed, such as Figure 2As shown, the range formed by the solid line part is the indoor ceiling to be sprayed, and each point in the figure is the planned travel path point of the spraying robot.

[0096] S2. Divide the floor plan into several small rectangular work surfaces of equal size, such as Figure 3 , Figure 4 As shown;

[0097] Specifically, in step S2, the floor plan is divided into a plurality of small rectangular work surfaces of equal size. The specific process includes the following steps:

[0098] S21. Select a rectangle A w B w C w D w Cover the entire floor plan, let A w The coordinates of the point are (x min ,y min ), B w The coordinates of the point are (x max ,y min ), C w The coordinates of the point are (x max ,y max ), D w The coordinates of the point are (x min ,y max ), with length as l s , width is w s Rectangle A w B w C w D w Divide into several small rectangular working surfaces;

[0099] In this step, it is necessary to extract all the inflection points of the indoor ceiling from the floor plan, compare the horizontal coordinates x and vertical coordinates y of all the inflection points, and select the minimum horizontal coordinate x among all the inflection points. min , minimum ordinate y min , maximum horizontal coordinate x max and the maximum ordinate y max In this step, the inflection point is the point corresponding to the corner in the floor plan, such as Figure 5 As shown in FIG. 1 , since the apartment types of buildings are different, there are corners between the walls. The point corresponding to the corner is the inflection point T in this embodiment. Its coordinates (x T ,y T ) are known parameters and can be directly obtained from the CAD floor plan.

[0100] like Figure 3 and Figure 4 As shown, in the rectangle A corresponding to the floor planw B w C w D w There are two ways of segmentation, namely vertical segmentation and horizontal segmentation.

[0101] Specifically, in Figure 3 The vertical segmentation method is adopted, and the effective areas of the small rectangular working surface inside the map are s1~s 36 , let s i is the effective area of ​​each small rectangular working surface, and the sum of the effective areas S v for:

[0102]

[0103] Rectangle A w B w C w D w The area S w for:

[0104] S w =|A w B w |*|C w D w |

[0105] Then, the effective area ratio λ in the vertical cutting method is v for:

[0106]

[0107] exist Figure 4 The cross-cutting method is adopted in the map, and the effective areas of the small rectangular working surface inside the map are s1~s 35 , let s j is the effective area of ​​each small rectangular working surface, and the sum of the effective areas S l for:

[0108]

[0109] Rectangle A w B w C w D w The area S w for:

[0110] S w =|A w B w |*|C w D w |

[0111] Then, the effective area ratio λ in the cross-cutting method isl for:

[0112]

[0113] If v <λ l , it is considered that the cross-cutting segmentation method of the small rectangular working surface is more efficient than the vertical cutting segmentation method, and then the cross-cutting segmentation method of the small rectangular working surface is selected, otherwise the vertical cutting segmentation method of the small rectangular working surface is selected.

[0114] In this embodiment, Figure 4 The floor plan of the indoor ceiling is used as an example to illustrate the above. The floor plan is divided into s1 to s 35 A small rectangular work surface.

[0115] S22, determining whether each small rectangular working surface is a complete working surface;

[0116] If so, then end;

[0117] If not, proceed to step S23;

[0118] like Figure 5 As shown in the figure, the floor plan is divided into several small rectangular work surfaces. There will be a situation where the work surface is divided by a wall. The small rectangular work surface divided by the wall is called an incomplete work surface. 14 They are all incomplete working surfaces, T0, T and T1 are all inflection points, such as Figure 5 It can be seen that T0 is the inflection point of the inner corner, T and T1 are the inflection points of the outer corner, and the minimum horizontal coordinate of the vertex of the divided small rectangular working surface is x s min , the maximum horizontal coordinate is x s max , the minimum ordinate is y s min , the maximum ordinate is y s max , the judgment on whether the small rectangular working surface is a complete working surface is as follows:

[0119] S221, obtaining the category of the inflection point formed by the small rectangular working surface P and the wall, which is divided into positive corner inflection point and negative corner inflection point, as exemplified by Figure 3 As shown, T0 is the inflection point of the inner corner, and T and T1 are the inflection points of the outer corner. Therefore, this situation exists in the small rectangular working surface located at the edge of the wall. In the floor plan, the wall boundary information of the indoor ceiling can be directly obtained from it. The wall boundaries are displayed in the form of corners in the floor plan, which corresponds to the inflection point. Moreover, the type of the inflection point, whether it is a outer corner inflection point or a inner corner inflection point, can be directly obtained from the floor plan, so it will not be described in detail here.

[0120] S222, let the minimum horizontal coordinate of the vertex of the small rectangular working surface P be x s min , the maximum horizontal coordinate is xs max , the minimum ordinate is y s min , the maximum ordinate is y s max ;

[0121] S223, determining whether the small rectangular working surface P is not complete;

[0122] If there is an inflection point G(x g ,y g ), so that x s min <x g <x s max And y s min <y g <y s max , then the small rectangular working surface P does not have integrity;

[0123] Specifically, if there is an inflection point G(x g ,y g ), so that x s min <x g <x s max And y s min <y g <y s max , then it can be determined that this small rectangular working surface does not have integrity, such as Figure 5 Small rectangular work surfaces s3, s5, s8, s 10 and 11 shown.

[0124] S224. Determine whether the small rectangular working surface P is an incomplete and regular working surface or an incomplete and irregular working surface.

[0125] Specifically, in step S224, the small rectangular working surface P is judged to be an incomplete and regular working surface or an incomplete and irregular working surface. The specific process includes the following steps:

[0126] S2241, let the coordinates of the next inflection point of inflection point G be G1(x g1 ,y g1 ), the coordinates of the previous inflection point of inflection point G are G0(x g0 ,y g0 );

[0127] S2242, respectively calculate the vectors between the inflection points G0 and G and the vector between G and G1

[0128] vector And vector The calculation formula is:

[0129]

[0130] S2243, according to vector And vector Determine whether the small rectangular working surface P is an incomplete and regular working surface;

[0131] If the inflection point G is the inflection point of the inner angle, and the small rectangular working surface P only contains the inflection point G, then the small rectangular working surface P is an incomplete and regular working surface, such as Figure 5 The small rectangular working surface s3;

[0132] If the inflection point G is the inflection point of the positive angle, no matter whether the next inflection point of the inflection point G is within the small rectangular working surface P, the small rectangular working surface P is an incomplete and irregular working surface that needs to be segmented, such as Figure 5 Small rectangular working surfaces s4 and s5;

[0133] If there are two adjacent inflection points G'(x g’ ,y g’ ) and G”(x g” ,y g” ), so that the line segment G'G" has two intersection points with the edge of the small rectangular working surface P, that is, when y s min <y g’ <y s max And y s min <y g” <y s max When x g’ ≤x s min or x g’ ≥x s max And x g” ≥x s max or x g” ≤x s max ;

[0134] Or when x s min <x g’ <x s max And x s min <x g” <x s max When g’ ≤y s min or g’ ≥y s max And y g” ≥y s max or g” ≤y s max , then, the small rectangular working surface P does not have integrity and is an incomplete and regular working surface, such as Figure 5 The small rectangular working surfaces s1, s7, s 12 、s 13 and 14 shown.

[0135] S23, completing the incomplete working surface into a complete working surface;

[0136] In this step, if the small rectangular working surface is an incomplete and regular working surface, the working surface can be directly completed to form a complete working surface and then the travel path points can be calculated. However, if it is an incomplete and irregular working surface, it needs to be divided into regular sub-working surfaces first, and then completed and then the travel path points can be calculated.

[0137] like Figure 6 As shown, the small rectangular working surfaces s4, s5, s 10 、s 11 、s 14 、s 15 and 16 They are all incomplete and irregular working surfaces, which are then divided into regular sub-working surfaces s 4.1 、s 4.2 、s 5.1 、s 5.2 、s 10.1 、s 10.2 、s 11.1 、s 11.2 、s 14.1 、s 14.2 、s 15.1 、s 15.2 、s 16.1 、s 16.2 and 16.3 When spraying, first spray the larger sub-working surface and then spray the smaller sub-working surface. The specific calculation for splitting into sub-working surfaces is as follows:

[0138] It should be noted that the segmentation method in this embodiment is divided into horizontal segmentation and vertical segmentation. Figure 7 The incomplete and irregular working surface in a is divided into s1, s2 and s3. a is the maximum area of ​​the sub-working surfaces s1, s2 and s3 obtained after segmentation. Figure 7 The incomplete and irregular working surface in b is divided into s4 and s5, let s b The maximum area of ​​the sub-working surfaces s4 and s5 obtained after segmentation is Figure 8 The incomplete and irregular working surface in a is divided into s6, s7 and s8. c is the maximum area of ​​the sub-working surfaces s6, s7 and s8 obtained after segmentation. Figure 8 The incomplete and irregular working surface in b is divided into s9 and s 10 , let s d The sub-working surfaces s9 and s 10 The maximum area in .

[0139] In cross-cutting and vertical cutting, Figure 7 a and Figure 8 a, if s a >s c , then it is considered that cross-cutting is more effective than vertical cutting, and the cross-cutting method is selected; otherwise, the vertical cutting method is selected;

[0140] like Figure 7 b and Figure 8 b, if s b >s d , then it is believed that cross-cutting is more effective than vertical cutting, and the cross-cutting method is selected; otherwise, the vertical cutting method is selected.

[0141] Let the coordinates of the vertex A of the small rectangular working surface be (x A ,y A ), the coordinates of vertex B are (x B ,y B ), the coordinates of vertex C are (x C ,y C ), the coordinates of vertex D are (x D ,y D ), it is known that the small rectangular working surface is an incomplete and irregular working surface. If the inflection point G(x g ,y g ) is the inflection point of the positive angle, and the previous inflection point of the inflection point G is G0(x g0 ,y g0 ), the next inflection point of inflection point G is G1(x g1 ,y g1 ), i represents the number of the incomplete and irregular working surface, that is, the i-th incomplete and irregular working surface, then:

[0142] If the inflection point G1(x g1 ,y g1 ) does not satisfy x A <x g1 <x B And y A <x g1 <y D , and y g0 <y g , x g <x g1 , then the sub-working surface s after segmentation i.2 The vertex coordinates are A i.2 (x A ,y A ), B i.2 (x g ,y A )C i.2 (x g ,y g )、Di.2 (x A ,y g ), sub-working surface s i.1 The vertex coordinates are A i.1 (x A ,y g ), B i.1 (x B ,y g ), C i.1 (x C ,y C )、D i.1 (x D ,y D ),like Figure 5 Working surface in 15 As shown, the sub-working surface s after segmentation 15.2 The vertex coordinates are A 15.2 (x A ,y A ), B 15.2 (x g ,y A ), C 15.2 (x g ,y g )、D 15.2 (x A ,y g ), sub-working surface s 15.1 The vertex coordinates are A 15.1 (x A ,y g ), B 15.1 (x B ,y g ), C 15.1 (x C ,y C )、D 15.1 1(x D ,y D );

[0143] If the inflection point G1(x g1 ,y g1 ) does not satisfy x A <x g1 <x B And y A <x g1 <y D , and x g0 <x g ,y g >y g1 , then the sub-working surface s after segmentation i.1 The vertex coordinates are A i.1 (x A ,y g), B i.1 (x B ,y g ), C i.1 (X C ,y C )、D i.1 (X D ,y D ), sub-working surface s i.2 The vertex coordinates are A i.2 (x g ,y A ), B i.2 (x B ,y B ), C i.2 (x B ,y g )、D i.2 (x g , g ),like Figure 5 Working surface in 14 As shown, the sub-working surface s after segmentation 14.1 The vertex coordinates are A 14.1 (x A ,y g ), B 14.1 (x B ,y g ), C 14.1 (x C ,y C )、D 14.1 (x D ,y D ), sub-working surface s 14.2 The vertex coordinates are A 14.2 (x g ,y A ), B 14.2 (x B ,y B ), C 14.2 (x B ,y g )、D 14.2 (x g ,y g );

[0144] If the inflection point G1(x g1 ,y g1 ) does not satisfy x A <x g1 <x B And y A <y g1 <y D , and x g0 >x g , xg >x g1 , then the sub-working surface s after segmentation i.1 The vertex coordinates are A i.1 (x A ,y A ), B i.1 (x B ,y B ), C i.1 (x B ,y g )、D i.1 (x A ,y g ), sub-working surface s i.2 The vertex coordinates are A i.2 (x g ,y g ), B i.2 (x B ,y g ), C i.2 (x C ,y C )、D i.2 (x g ,y D )like Figure 5 As shown in the working surface s5 in the figure, the sub-working surface s 5.1 The vertex coordinates are A 5.1 (x A ,y A ), B 5.1 (x B ,y B )C 5.1 (x B ,y g )、D 5.1 (x A ,y g ), sub-working surface s 5.2 The vertex coordinates are A 5.2 (x g ,y g ), B 5.2 (x B ,y g ), C 5.2 (x C ,y C )、D 5.2 (x g ,y D );

[0145] If the inflection point G1(x g1 ,y g1 ) does not satisfy x A <x g1 <x BAnd y A <y g1 <y D , and x g0 >x g ,y g <y g1 , then the sub-working surface s after segmentation i.1 The vertex coordinates are A i.1 (x A ,y A ), B i.1 (x B ,y B ), C i.1 (x B ,y g )、D i.1 (x A ,y g ), sub-working surface s i.2 The vertex coordinates are A i.2 (x A ,y g ), B i.2 (x g ,y g ), C i.2 (x g ,y C )、D i.2 (x D ,y D ),like Figure 5 As shown in the working surface s4 in the figure, the sub-working surface s 4.1 The vertex coordinates are A 4.1 (x A ,y A ), B 4.1 (x B ,y B )C 4.1 (x B ,y g )、D 4.1 (x A ,y g ), sub-working surface s 4.2 The vertex coordinates are A 4.2 (x g ,y g ), B 4.2 (x B ,y g ), C 4.2 (x C ,y C )、D 4.2 (x g ,y D );

[0146] If the inflection point G1(x g1 ,y g1 ) satisfies x A <x g1 <x B And y A <y g1 <y D , and y g0 <y g , x g <x g1 , then the sub-working surface s after segmentation i.1 The vertex coordinates are A i.1 (x A ,y g ), B i.1 (x B ,y g ), C i.1 (x C ,y C )、D i.1 (x D ,y D ), sub-working surface s i.2 The vertex coordinates are A i.2 (x A ,y A ), B i.2 (x g ,y B ), C i.2 (x g ,y g )、D i.2 (x A ,y g ), sub-working surface s i.3 The vertex coordinates are A i.3 (x g1 ,y A ), B i.3 (x B ,y B ), C i.3 (x B ,y g1 )、D i.3 (x g1 ,y g1 ),like Figure 5 Working surface in 16 As shown, the sub-working surface s after segmentation 16.1 The vertex coordinates are A 16.1 (x A ,y g ), B 16.1 (x B ,y g ), C 16.1 (xC ,y C )、D 16.1 (x D ,y D ), sub-working surface s 16.2 The vertex coordinates are A 16.2 (x A ,y A ), B 16.2 (x g ,y B ), C 16.2 ((x g ,y g )、D 16.2 (x A ,y g ) Sub-working surface 16.3 The vertex coordinates are A 16.3 (x g1 ,y A ), B 16.3 (x B ,y B ), C 16.3 (x B ,y g1 )、D 16.3 (x g1 ,y g1 );

[0147] If the inflection point G(x g ,y g ) is the inflection point of the positive angle, and the inflection point G1(x g1 ,y g1 ) is the inflection point of the positive angle, and the next inflection point of the inflection point G1 is G2(x g2 ,y g2 ),but:

[0148] If the inflection point G2(x g2 ,y g2 ) does not satisfy x A <x g2 <x B And y A <y g2 <y D , inflection point G1(x g1 ,y g1 ) satisfies x A <x g1 <x B And y A <y g1 <y D , and y g0 <y g , x g >x g1 ,yg1 <y g2 , then the sub-working surface s after segmentation i.1 The vertex coordinates are A i.1 (x g1 ,y A ), B i.1 (x g1 ,y B ), C i.1 (x D ,y D )、D i.1 (x A ,y A ), sub-working surface s i.2 The vertex coordinates are A i.2 (x g1 ,y A ), B i.2 (x g ,y B ), C i.2 (x g ,y g )、D i.2 (x g1 ,y g1 ),like Figure 5 Working surface in 11 As shown, the sub-working surface s after segmentation 11.1 The vertex coordinates are A 11.1 (x g1 ,y A ), B 11.1 (x g1 ,y B ), C 11.1 (x D ,y D )、D 11.1 (x A ,y A ), sub-working surface s 11.2 The vertex coordinates are A 11.2 (x g1 ,y A ), B 11.2 (x g y B ), C 11.2 (x g ,y g )、D 11.2 (x g1 ,y g1 );

[0149] If the inflection point G(x g ,y g ) is the inflection point of the positive angle, and the inflection point G1(x g1 ,yg1 ) is the inflection point of the inner angle, and the next inflection point of inflection point G1 is G2(x g2 ,y g2 )but;

[0150] If the inflection point G2((x g2 ,y g2 ) does not satisfy x A <x g2 <x B And y A <y g2 <y D , inflection point G1((x g1 ,y g1 ) satisfies x A <x g1 <x B And y A <y g1 <y D , and y g0 <y g , x g <x g1 ,y g1 <y g2 , then the sub-working surface s after segmentation i.1 The vertex coordinates are A i.1 (x g ,y A ), B i.1 (x g ,y D ), C i.1 (x D ,y D )、D i.1 (x A ,y A ), sub-working surface s i.2 The vertex coordinates are A i.2 (x g ,y g ), B i.2 (x g1 ,y g1 ), C i.2 (x g1 ,y C )、D i.2 (x g ,y D ),like Figure 5 Working surface in 10 As shown, the sub-working surface s after segmentation 10.1 The vertex coordinates are A 10.1 (x g ,y A ), B 10.1 (x g,y D )C 10.1 (x D ,y D )、D 10.1 (x A ,y A ), sub-working surface s 10.2 The vertex coordinates are A 10.2 (x g ,y g ), B 10.2 (x g1 ,y g1 ), C 10.2 ((x g1 ,y C )、D 10.2 (x g ,y D ).

[0151] The regular sub-working surfaces obtained after segmentation are completed into complete working surfaces. The specific calculation process is as follows:

[0152] Since the spraying robot performs ceiling spraying operations according to a fixed rectangular working surface, it is necessary to complete the incomplete and regular sub-working surface into a complete working surface before spraying. The incomplete working surface is actually caused by the wall obstacle being divided. It is known that the length of the small rectangular working surface is l s , width is w s , then when completing the incomplete working surface, three types of obstacle interference need to be considered, such as Fig. 9 As shown, there is wall obstacle interference on the short side of the regular sub-working surface, that is, when |AB|<l S And |BC|=w s ,according to Fig. 9 a) is completed; for the long side of the regular sub-working surface, there is interference from wall obstacles, that is, when |BC|<w s And |AB|=l s according to Fig. 9 b. For regular sub-working surfaces with both long and short sides interfering with wall obstacles, when w s <|AB|<l s And |BC|<w s ,according to Fig. 9 There are 4 working surface completion methods as shown in d; when 0<|BC|<W s And |BC|<w s ,according to Fig. 9 There are 8 working surface completion methods as shown in e. Fig. 9 The working surface completion method shown in c, the calculation process is as follows:

[0153] Let the coordinates of the lower left corner vertex A of the incomplete and regular sub-working surface be (x A ,y A ), the coordinates of the lower right vertex B are (x B ,y B )The coordinates of the upper right vertex C are (x C ,y C ), the vertex coordinates of the upper left corner D are (x D ,y D ), let the coordinates of the lower left corner vertex A' of the completed working surface be (x' A , y' A ), the coordinates of the lower right vertex B' are (x' B y' B ), the coordinates of the upper right vertex C' are (x' C , y' C )The coordinates of the upper left corner D' are (x' D , y' D ).

[0154] for Fig. 9 The completion method shown in a, when |AB| <l s , and |BC|=w s When the vector between vertex B and vertex A is for:

[0155]

[0156] vector Length of mold for:

[0157]

[0158] vector The unit vector for:

[0159]

[0160] Then the horizontal coordinate of vertex A' is The vertical coordinate of the vertex A'

[0161] The vector between vertex C and vertex D for:

[0162]

[0163] vector Length of mold for:

[0164]

[0165] vector The unit vector for:

[0166]

[0167] Then the horizontal coordinate of vertex D' The vertical coordinate of vertex D'

[0168] for Fig. 9 b shows the completion method, when |BC| <w s And |AB|=l s When the vector between vertex A and vertex D is for:

[0169]

[0170] vector Length of mold for:

[0171]

[0172] vector The unit vector for:

[0173]

[0174] Then the horizontal coordinate of vertex D' is The vertical coordinate of the vertex D'

[0175] The vector between vertex B and vertex C for:

[0176]

[0177] vector Length of mold for:

[0178]

[0179] vector The unit vector for:

[0180]

[0181] Then the horizontal coordinate of vertex C' The vertical coordinate of the vertex C'

[0182] for Fig. 9 The completion method shown in c, the vector between vertex A and vertex D for:

[0183]

[0184] vector Length of mold for:

[0185]

[0186] vector The unit vector for:

[0187]

[0188] Then the horizontal coordinate of vertex D' is The vertical coordinate of the vertex D'

[0189] The vector between vertex A and vertex B for:

[0190]

[0191] vector Length of mold for:

[0192]

[0193] vector The unit vector for:

[0194]

[0195] Then, the horizontal coordinate of vertex B' The vertical coordinate of the vertex B'

[0196] Then, the horizontal coordinate of vertex C' is x C’ =x B’ , the vertical coordinate y of the vertex C' C’ =y D’ .

[0197] For example, Fig. 9 The regular sub-working surface ABCD shown in c, according to the length of the small rectangular working surface is l s , width is w s, then the complete working surface is A'B'C'D'. At this time, the vertex A and the vertex A' are overlapped, and the overlapping point is the origin. After calculating the coordinates of the vertex C' and the vertex D', the actual coordinates of the vertices of A'B'C'D' can be obtained, and the sub-working surface is completed into a complete working surface.

[0198] S3, judging the effectiveness of several small rectangular working surfaces to obtain effective working surfaces;

[0199] like Fig.10 As shown in the figure, after the plan floor plan is divided into several small rectangular working surfaces, there will be a situation where the small rectangular working surface is completely outside the plan floor plan. The small rectangular working surface outside the effective working area is called an invalid working surface. For example, the small rectangular working surface s 15 shown.

[0200] Since the validity of the small rectangular work surface is determined based on whether the work surface is completely within the valid work area, the validity of the work surface can be determined based on whether the centroid of the small rectangular work surface is located inside the closed plane floor plan.

[0201] To determine whether a point is inside a closed figure, start a ray from this point and observe the number of intersections between this ray and the boundary line of the closed figure. If the number of intersections is an odd number, it means that the point is inside the closed figure. If the number of intersections is an even number, it means that the point is outside the closed figure. Fig.10 As shown, the floor plan consists of line segments l1 to l 16 For a small rectangular working surface, 15 , from its center of mass point m 15 A ray is emitted horizontally to the right, and the ray intersects with the boundary lines l4 and l6 of the floor plan at points With point If the number of intersection points is even, it means that the centroid m 15 Located outside the closed figure, that is, the small rectangular working surface s is determined 15 invalid;

[0202] For small rectangular work surfaces 20 , from its center of mass point m 20 A ray is emitted horizontally to the right, and the ray intersects with the boundary line l8 of the floor plan at point If the number of intersection points is odd, it means that the centroid point m 20 Located inside the closed figure, that is, the working surface s 20 is the effective working surface. Therefore, the specific calculation for judging the effectiveness of the small rectangular working surface is as follows:

[0203] In step S3, the validity of several small rectangular working surfaces is judged to obtain a valid working surface. The specific process includes the following steps:

[0204] S31, let the starting point of the boundary line segment l in the floor plan be l st (x st ,y st ), the end point is l ed (x ed ,y ed ), the coordinates of the vertex A1 at the lower left corner of the small rectangular working surface are (x A1 ,y A1 ), the coordinates of the lower right vertex B1 are (x B1 ,y B1 ), the coordinates of the upper right vertex C1 are (x C1 ,y C1 ), the vertex coordinates of the upper left corner D1 are (x D1 ,y D1 );

[0205] S32, suppose the equation of the straight line where the line segment A1C1 lies is y1=k1x1+b1, and the equation of the straight line where the line segment B1D1 lies is y2=k2x2+b2;

[0206] Specifically,

[0207]

[0208] S33. When k1≠k2, the intersection point of the simultaneous linear equations k1 and k2 is the centroid m;

[0209] The coordinates of the centroid m (x m ,y m )for:

[0210]

[0211] S34, draw a ray p horizontally from the center of mass m to the right, and follow y st ≤y m <y ed or ed ≤y m <y st Filter out the boundary line segment l that meets the conditions, then the boundary line segment l satisfies y st ≠y ed ;

[0212] S35. Let the equation of the line where the boundary line segment l lies be x=k l y+b l ;

[0213] Specifically, k l =(y ed -y st ) / (x ed-x st ), b l =y st -k l *x st ;

[0214] S36, y m Substitute the equation of the line x = k l y+b l , determine whether the centroid point m is on the left side of the boundary segment l;

[0215] If x m <k l *y m +b l , then the centroid point m is located on the left side of the boundary segment l;

[0216] If not, the centroid point m is located on the right side of the boundary segment l;

[0217] The boundary segment l satisfies y st ≠y ed And the centroid point m is located on the left side of the boundary segment l. This means that the boundary segment l has an intersection with the ray p drawn horizontally upward from the centroid point m. The total number of intersections is calculated back and forth in sequence. Finally, according to the parity of the total number, it is determined whether the centroid point m is located in the floor plan. The validity of the small rectangular working surface corresponding to the centroid point m can be determined.

[0218] S37, calculating the total number of intersections in turn, and determining whether the centroid point m is located within the floor plan according to the parity of the total number of intersections, so as to determine the validity of the small rectangular work surface corresponding to the centroid point m;

[0219] If the total number of intersection points is an odd number, the small rectangular working surface corresponding to the centroid point m is the effective working surface;

[0220] If the total number of intersection points is an even number, the small rectangular working surface corresponding to the centroid point m is an invalid working surface.

[0221] This embodiment can judge the validity of the work surfaces divided into small rectangles, avoid the situation where the small rectangular work surfaces are completely outside the floor plan, and at the same time provide protection for the subsequent detection of whether the travel path points are indoors and too close to the wall, thereby ensuring the accuracy of the divided small rectangular work surfaces in calculating the corresponding travel path points.

[0222] S4, calculating the coordinates of the travel path points corresponding to the effective working surface;

[0223] like Fig.11 As shown, let the coordinates of the vertex A at the lower left corner of the complete working surface ABCD be (x A ,yA ), the coordinates of the lower right vertex B are (x B ,y B ), the coordinates of the upper right vertex C are (x C ,y C )The vertex coordinates of the upper left corner D are (x D ,y D ), the coordinates of the path point P are (x P ,y P ), |AE|=d right , d right is the maximum deviation in the x direction when the spray robot is spraying on the ceiling, |PE| = d side , d side is the distance between the spray robot and the long side AB of the working surface during ceiling spraying operation, |AB| = l s , l s is the length of the complete working surface, |AD|=w s , w s is the width of the complete working surface, then:

[0224]

[0225] The angle θ between line segments AP and AE is:

[0226]

[0227] If there is no obstacle interference in the rectangular area ABFG, the travel path point P can be calculated as follows:

[0228] S41, let the coordinates of the vertex A at the lower left corner of the complete working surface ABCD be (x A ,y A ), the coordinates of the lower right vertex B are (x B ,y B ), the coordinates of the upper right vertex C are (x C ,y C )The vertex coordinates of the upper left corner D are (x D ,y D ), the coordinates of the path point P are (x P ,y P );

[0229] S42. Take a point E on line segment AB and set |AE| = d right , d right is the maximum deviation in the x direction when the spray robot is spraying on the ceiling, |PE| = d side , d side It is the distance between the spray robot and the long side AB of the working surface during ceiling spraying operation;

[0230] S43, calculating the coordinates of point E according to the unit vector between vertex A and vertex B;

[0231] In step S43, the coordinates of point E are calculated according to the unit vector between vertex A and vertex B. The specific process includes the following steps:

[0232] S431, calculate the vector between vertex A and vertex B

[0233]

[0234] S432, Calculate vector Length of mold And according to the mold length Calculating vectors The unit vector

[0235]

[0236] S433, through the unit vector Calculate the coordinates of point E (x E ,y E );

[0237] The horizontal coordinate x of point E E for:

[0238]

[0239] The horizontal coordinate y of point E E for:

[0240]

[0241] Therefore, the coordinates of point E are

[0242] S44, calculating the coordinates of the travel path point P according to the coordinates of the point E;

[0243] Under the premise of knowing the coordinates of point E, the unit vector of vector AP can be obtained in the same way as in step S53 above.

[0244]

[0245] In the above formula, λ1=cos(theta), λ'1=sin(theta), λ2=sin(theta), λ'2=cos(theta), where theta represents the angle between AE and AP.

[0246] Then, the coordinates of the path point P (x P ,y P) P And the vertical coordinate y P for:

[0247]

[0248] Therefore, the coordinates of the travel path point P are

[0249] S45, calculating the posture θ of the spraying robot at the travel path point P P .

[0250] like Fig.11 As shown in the figure, the floor plan has an original coordinate system with the origin at 0. It is necessary to calculate the posture θ of the spraying robot at the travel path point P. P Since the positive direction of the x-axis of the spray robot coordinate system is The direction is consistent, then:

[0251] If x A =x B And y A >y B , then θ P =π / 2;

[0252] If x A =x B And y A <y B , then θ P = -π / 2;

[0253] If x A ≠x B , then θ P =atan2(y A -y B , x A -x B ).

[0254] S5, determining whether the travel path point is indoors;

[0255] If yes, proceed to step S6;

[0256] If not, then recalculate the new travel path point corresponding to the effective working surface, and then return to step S5;

[0257] like Fig.12As shown, dividing the floor plan into several small rectangular work surfaces will encounter the situation where the travel path point P1 calculated for the complete work surface A1B1C1D1 appears outdoors. The coordinate calculation process of the travel path point P1 can be obtained through step S4. When the travel path point P1 appears outdoors and cannot be sprayed, it is an invalid path point. First, it is necessary to determine whether the travel path point calculated for the complete work surface is an outdoor travel path point, and then recalculate the new travel path point for the complete work surface corresponding to the travel path point that does not meet the conditions, as shown in the travel path point P'1. The specific calculation process is as follows:

[0258] S51, let the coordinates of the lower left vertex A1 of the complete working surface A1B1C1D1 be The coordinates of the lower right vertex B1 are The coordinates of the upper right vertex C1 are The coordinates of the upper left vertex D1 are The coordinates of the path point P1 are The coordinates of the new path point P'1 are The starting point of boundary segment l is l st (x st ,y st ), the end point is l ed (x ed ,y ed );

[0259] S52, according to or Filter out the boundary line segment l that meets the conditions. It can be seen that the boundary line segment l satisfies y st ≠y ed ;

[0260] S53, let the equation of the line where the boundary line segment l lies be x=k l y+b l , k l =(y ed -y st ) / (x ed -x st ), b l =y st -k l *x st

[0261] like Then the boundary line segment l intersects the ray drawn from the travel path point P1;

[0262] S54, calculate back and forth in sequence, and obtain satisfaction The boundary segment l of the condition 总 The total number of

[0263] If the boundary segment l总 If the total number of is an even number, then the path point P1 is outdoors;

[0264] If the boundary segment l 总 If the total number of is an odd number, then the path point P1 is indoors;

[0265] S55. Recalculate the outdoor travel path point P1 to obtain a new travel path point P'1.

[0266] After determining that the travel path point P1 is outdoors, a new travel path point needs to be calculated. The calculation method for the new travel path point P'1 is the same as step S4. The specific calculation process is as follows:

[0267] like Fig.12 As shown, if the travel path point P1 is outdoors, it is necessary to recalculate the travel path point P'1 for the complete working surface A1B1C1D1, take a point E'1 on the long side C1D1, and let |C1E'1| = d right , d right is the maximum deviation in the x direction when the spray robot is spraying on the ceiling, |P'1E'1|=d side , d side is the distance between the spray robot and the long side C1D1 of the working surface during ceiling spraying operation, |A1B1|=l s , l s is the length of the complete working surface, |A1D1|=w s , w s is the width of the complete working surface, then:

[0268]

[0269] The angle θ'1 between line segments C1P'1 and C1E'1 is:

[0270]

[0271] The vector between point C1 and point D1 for:

[0272]

[0273] vector Length of mold for:

[0274]

[0275] vector The unit vector for:

[0276]

[0277] Then the horizontal coordinate of point E'1 is for:

[0278]

[0279] The vertical coordinate of point E'1 for:

[0280]

[0281] Under the premise that the coordinates of point E'1 are known, The unit vector Using the same calculation method as above, we can get:

[0282] The unit vector for:

[0283]

[0284] In the above formula, λ1=cos(theta), λ'1=sin(theta), λ2=sin(theta), λ'2=cos(theta), where theta represents the angle between C1E'1 and C1P'1.

[0285] Then, the horizontal coordinate of the path point P'1 is for:

[0286]

[0287] The vertical coordinate of the path point P'1 for:

[0288]

[0289] After the calculations in the above steps, the coordinate value calculation of the new path point P'1 is completed, as shown in Fig.12 As shown in the figure, the floor plan has an original coordinate system with the origin O, and it is necessary to calculate the posture of the spraying robot at the travel path point P'1 Since the positive direction of the x-axis of the spray robot coordinate system is The direction is consistent, if and but

[0290] like and but

[0291] like but

[0292] The method for determining whether a travel path point is indoors provided in this embodiment can quickly and accurately determine whether a travel path point is outdoors, and recalculate the travel path points outdoors to obtain travel path points located indoors, thereby avoiding the phenomenon that the spray robot cannot travel to the specified position due to the travel path points being located outdoors, thereby ensuring the normal operation of the spray robot.

[0293] S6, determining whether the path point is too close to the wall;

[0294] If yes, then recalculate the new travel path point corresponding to the effective working surface, and then return to step S5;

[0295] If not, then end;

[0296] like Fig.12 As shown, dividing the floor plan into several small rectangular work surfaces will encounter the situation that the travel path point P2 calculated for the complete work surface A2B2C2D2 is too close to the wall. The coordinate calculation process of the travel path point P2 can be obtained through step S4. When the travel path point P2 is too close to the wall and cannot be sprayed, it is an invalid path point. First, it is necessary to determine whether the travel path point P2 calculated for the complete work surface is too close to the wall, and then recalculate the new travel path point for the complete work surface corresponding to the travel path point that does not meet the conditions, as shown in the travel path point P'2. The specific calculation process is as follows:

[0297] In step S6, it is determined whether the travel path point is too close to the wall. The specific process includes the following steps:

[0298] S61. Let the coordinates of the vertex A2 at the lower left corner of the complete working surface A2B2C2D2 be The coordinates of the lower right vertex B2 are The coordinates of the upper right vertex C2 are The coordinates of the upper left vertex D2 are The coordinates of the path point P2 are The coordinates of the path point P'2 are The coordinates of point S are (x S ,y S ), the coordinates of point T are (x T ,y T );

[0299] S62. Let the equation of the line segment ST be: A ST x+B ST x+C ST = 0, calculate the coordinates of the foot of the perpendicular line H from the path point p2 to the line segment ST (x H ,y H );

[0300] Coordinates of the foot of perpendicular H (x H ,y H )for:

[0301]

[0302] S63, respectively calculate the distance d from the travel path point P2 to the straight line where the line segment ST is located PST , the distance d from the path point P2 to the endpoint S of the line segment ST PS , the distance d from the path point P2 to the endpoint T of the line segment ST PT , the distance d from the foot of the perpendicular H to the endpoint S of the line segment ST HS , the distance d from the foot of the perpendicular H to the endpoint T of the line segment ST HT and the distance d from the endpoint S of the line segment ST to the endpoint T of the line segment ST ST ;

[0303] Specific:

[0304] The distance d from the path point P2 to the line segment ST PST for:

[0305]

[0306] The distance d from the path point P2 to the endpoint S of the line segment ST PS for:

[0307]

[0308] The distance d from the path point P2 to the endpoint T of the line segment ST PT for:

[0309]

[0310] The distance d from the foot of the perpendicular H to the end point S of the line segment ST HS for:

[0311]

[0312] The distance d from the foot of the perpendicular H to the end point T of the line segment ST HT for:

[0313]

[0314] The distance d between the endpoint S of the line segment ST and the endpoint T of the line segment ST ST for:

[0315]

[0316] S64, from distance d PS , distance dPT and distance d PST Select the contrast value and the wall threshold S wall Compare and determine whether the path point P2 is too close to the wall;

[0317] If d HT +d HS >d ST , then select d PS and d PT Small and medium values ​​are used as comparison values. If d HT +d HS =d ST , then select d PST As a comparison value;

[0318] If the contrast value is less than the wall threshold S wall , then the path point P2 is too close to the wall;

[0319] If the contrast value is greater than the wall threshold S wall , the opposite is true;

[0320] S65. Recalculate the outdoor travel path point P2 to obtain a new travel path point P'2.

[0321] After determining that the approach path point P2 is too close to the wall, a new travel path point needs to be calculated. The calculation method for the new travel path point P'2 is the same as step S4. The specific calculation process is as follows:

[0322] like Fig.12 As shown, if the travel path point P2 is too close to the wall, it is necessary to recalculate the travel path point P'2 for the complete working surface A2B2C2D2, take a point E'2 on the long side C2D2, and let |C2E'2| = d right , d right is the maximum deviation in the x direction when the spray robot is spraying on the ceiling, |P'2E'2| = d side , d side is the distance between the spray robot and the long side C2D2 of the working surface during ceiling spraying operation, |A2B2| = l s , l s is the length of the complete working surface, |A2D2|=w s , w s is the width of the complete working surface, then:

[0323]

[0324] The angle θ'2 between line segments C2P'2 and C2E'2 is:

[0325]

[0326] The vector between point C2 and point D1 for:

[0327]

[0328] vector Length of mold for:

[0329]

[0330] vector The unit vector for:

[0331]

[0332] Then the horizontal coordinate of point E'2 is for:

[0333]

[0334] The ordinate of point E'2 for:

[0335]

[0336] Under the premise that the coordinates of point E'2 are known, The unit vector Using the same calculation method as above, we can get:

[0337] The unit vector for:

[0338]

[0339] In the above formula, λ1=cos(theta), λ'1=sin(theta)λ2=sin(theta)λ'2=cos(theta), where theta represents the angle between C2E'2 and C2P'2.

[0340] Then, the horizontal coordinate of the path point P'2 is for:

[0341]

[0342] The vertical coordinate of the path point P'2 for:

[0343]

[0344] After the calculations in the above steps, the coordinate value calculation of the new path point P'2 is completed, as shown in Fig.12As shown in the figure, the floor plan has an original coordinate system with the origin O, and it is necessary to calculate the posture of the spraying robot at the travel path point P'2 Since the positive direction of the x-axis of the spray robot coordinate system is The direction is consistent, if and but

[0345] like and but

[0346] like but

[0347] The method for judging whether a travel path point is too close to a wall provided in this embodiment can quickly and accurately judge whether a travel path point is too close to a wall, and recalculate the travel path points that are too close to the wall, so as to avoid the situation where the spray robot cannot normally extend to perform the spraying operation due to the travel path points being too close to the wall, thereby ensuring the normal progress of the spraying operation of the spray robot.

[0348] The present invention solves the technical problem that the prior art is unable to detect whether the travel path points are indoors and too close to the wall. It can detect the accuracy of the travel path points generated by the spray robot during the spraying operation on the indoor ceiling, thereby avoiding the phenomenon that the spray robot cannot travel to the specified position and is too close to the wall, thereby improving the quality and efficiency of the spray robot in performing spraying operations on the indoor ceiling.

[0349] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for detecting path points of a spray robot during ceiling spraying operation, characterized in that: The following steps are involved: S1. Obtaining a floor plan of the indoor ceiling to be sprayed; S2, dividing the floor plan into a number of small rectangular work surfaces of equal size; S3, judging the validity of several small rectangular working surfaces to obtain effective working surfaces, the specific process includes the following steps: S31, let the starting point of the boundary line segment l in the floor plan be l st (x t ,t st ), the end point is l ed (x ed ,y ed ), the coordinates of the vertex A1 at the lower left corner of the small rectangular working surface are (x A1 ,y A1 ), the coordinates of the lower right vertex B1 are (x B1 ,y B1 ), the coordinates of the upper right vertex C1 are (x C1 ,y C1 ), the vertex coordinates of the upper left corner D1 are (x D1 ,y D1 ); S32, suppose the equation of the straight line where the line segment A1C1 lies is y1=k1x1+b1, and the equation of the straight line where the line segment B1D1 lies is y2=k2x2+b2; S33. When j1≠k2, the intersection point of the simultaneous linear equations j1 and j2 is the centroid m; S34, draw a ray p horizontally from the center of mass m to the right, and follow y st ≤y m <y ed or ed ≤y m <y st Filter out the boundary line segment l that meets the conditions, then the boundary line segment l satisfies y st ≠y ed ; S35. Let the equation of the line where the boundary line segment l lies be x=k l y+b l ; S36, y m Substitute the equation of the line x = k l y+b l , determine whether the centroid point m is on the left side of the boundary segment l; If x m <k l *y m +b l , then the centroid point m is located on the left side of the boundary segment l; If not, the centroid point m is located on the right side of the boundary segment l; S37, repeatedly calculating the total number of intersections between the ray p and the boundary line segment l; If the total number of intersection points is an odd number, the small rectangular working surface corresponding to the centroid point m is the effective working surface; If the total number of intersection points is an even number, the small rectangular working surface corresponding to the centroid point m is an invalid working surface; S4, calculating the coordinates of the travel path points corresponding to the effective working surface; S5, determining whether the travel path point is indoors; If yes, proceed to step S6; If not, then recalculate the new travel path point corresponding to the effective working surface, and then return to step S5; S6, determining whether the path point is too close to the wall; If yes, then recalculate the new travel path point corresponding to the effective working surface, and then return to step S5; If not, then end.

2. The detection method according to claim 1, characterized in that: In step S2, the floor plan is divided into a number of small rectangular work surfaces of equal size. The specific process includes the following steps: S21. Select a rectangle A w B w C w D w Cover the entire floor plan, let A w The coordinates of the point are (x min ,y min ), B w The coordinates of the point are (x max ,y min ), C w The coordinates of the point are (x max ,y max ), D w The coordinates of the point are (x min ,y max ), with length as l s , width is w s Rectangle A w B w C w D w Divide into several small rectangular working surfaces; S22, determining whether each small rectangular working surface is a complete working surface; If so, then end; If not, proceed to step S23; S23, completing the incomplete working surface into a complete working surface.

3. The detection method according to claim 2, characterized in that: In step S22, it is determined whether each small rectangular working surface is a complete working surface. The specific process includes the following steps: S221, obtaining the categories of the inflection points formed by the small rectangular working surface P and the wall, which are divided into positive corner inflection points and negative corner inflection points; S222, let the minimum horizontal coordinate of the vertex of the small rectangular working surface P be x s min , the maximum horizontal coordinate is x s max , the minimum ordinate is y s min , the maximum ordinate is y s max ; S223, determining whether the small rectangular working surface P is not complete; If there is an inflection point G(x g ,y g ), so that x s min <x g <x s max And y s min <y g <y s max , then the small rectangular working surface P does not have integrity; S224. Determine whether the small rectangular working surface P is an incomplete and regular working surface or an incomplete and irregular working surface.

4. The detection method according to claim 3, characterized in that: In step S224, the small rectangular working surface P is judged to be an incomplete and regular working surface or an incomplete and irregular working surface. The specific process includes the following steps: S2241, let the coordinates of the next inflection point of inflection point G be G1(x g1 ,y g1 ), the coordinates of the previous inflection point of inflection point G are G0(x g0 ,y g0 ); S2242, respectively calculate the vectors between the inflection points G0 and G and the vector between G and G1 S2243, according to vector And vector Determine whether the small rectangular working surface P is an incomplete and regular working surface; If the inflection point G is the inflection point of the inner angle, and the small rectangular working surface P only contains the inflection point G, then the small rectangular working surface P is an incomplete and regular working surface; If the inflection point G is the inflection point of the positive angle, no matter whether the next inflection point of the inflection point G is within the small rectangular working surface P, the small rectangular working surface P is an incomplete and irregular working surface that needs to be segmented; If there are two adjacent inflection points G'(x g’ ,y g’ ) and G”(x g” ,y g” ), so that the line segment G'G" has two intersection points with the edge of the small rectangular working surface P, that is, when y s min <y g’ <y s max And y s min <y g” <y s max When x g’ ≤x s min or x g’ ≥x s max And x g” ≥x s max or x g” ≤x s max ; Or when x s min <x g’ <x s max And x s min <x g” <x s max When g’ ≤y s min or g’ ≥y s max And y g” ≥y s max or g” ≤y s max , then, the small rectangular working surface P does not have integrity and is an incomplete and regular working surface.

5. The detection method according to claim 1, characterized in that: In step S4, the coordinates of the travel path points corresponding to the effective working surface are calculated. The specific process includes the following steps: S41, let the coordinates of the vertex A at the lower left corner of the complete working surface ABCD be (x A ,y A ), the coordinates of the lower right vertex B are (x B ,y B ), the coordinates of the upper right vertex C are (x C ,y C ), the vertex coordinates of the upper left corner D are (x D ,y D ), the coordinates of the path point P are (x P ,y P ); S42. Take a point E on line segment AB and set |AE| = d right , d right is the maximum deviation in the x direction when the spray robot is spraying on the ceiling, |PE| = d side , d side It is the distance between the spray robot and the long side AB of the working surface during ceiling spraying operation; S43, calculating the coordinates of point E according to the unit vector between vertex A and vertex B; S44. Calculate the coordinates of the travel path point P according to the coordinates of the point E: S45, calculating the posture θ of the spraying robot at the travel path point P P .

6. The detection method according to claim 1, characterized in that: In step S5, it is determined whether the travel path point is indoors. The specific process includes the following steps: S51, let the coordinates of the lower left vertex A1 of the complete working surface A1B1C1D1 be The coordinates of the lower right vertex B1 are The coordinates of the upper right vertex C1 are The coordinates of the upper left vertex D1 are The coordinates of the path point P1 are The coordinates of the new path point P'1 are The starting point of boundary segment l is l st (x st ,y st ), the end point is l ed (x ed ,y ed ); S52, according to or Filter out the boundary line segment l that meets the conditions. It can be seen that the boundary line segment l satisfies y st ≠y ed ; S53, let the equation of the line where the boundary line segment l lies be x=k l y+b l , k l =(y ed -y st ) / (x ed -x st ), b l =y st -k l *x st ; like Then the boundary line segment l intersects the ray drawn from the travel path point P1; S54, calculate back and forth in sequence, and obtain satisfaction The boundary line segment l of the condition 总 The total number of If the boundary segment l 总 If the total number of is an even number, then the path point P1 is outdoors; If the boundary segment l 总 If the total number of is an odd number, then the path point P1 is indoors; S55. Recalculate the outdoor travel path point P1 to obtain a new travel path point P'1.

7. The detection method according to claim 1, characterized in that: In step S6, it is determined whether the travel path point is too close to the wall. The specific process includes the following steps: S61. Let the coordinates of the vertex A2 at the lower left corner of the complete working surface A2B2C2D2 be The coordinates of the lower right vertex B2 are The coordinates of the upper right vertex C2 are The coordinates of the upper left vertex D2 are The coordinates of the path point P2 are The coordinates of the path point P'2 are The coordinates of point S are (x S ,y S ), the coordinates of point T are (x T ,y T ); S62. Let the equation of the line segment ST be: A ST x+B ST x+C ST = 0, calculate the coordinates (x H ,y H ); S63, respectively calculate the distance d from the travel path point P2 to the straight line where the line segment ST is located PST , the distance d from the path point P2 to the endpoint S of the line segment ST PS , the distance d from the path point P2 to the endpoint T of the line segment ST PT , the distance d from the foot of the perpendicular H to the endpoint S of the line segment ST HS , the distance d from the foot of the perpendicular H to the endpoint T of the line segment ST HT and the distance d from the endpoint S of the line segment ST to the endpoint T of the line segment ST ST ; S64, from distance d PS , distance d PT and distance D PST Select the contrast value and the wall threshold S wall Compare and determine whether the path point P2 is too close to the wall; If d HT +d HS >d ST , then select d PS and d PT Small and medium values ​​are used as comparison values. If d HT +d HS =d ST , then select d PST As a comparison value; If the contrast value is less than the wall threshold S wall , then the path point P2 is too close to the wall; If the contrast value is greater than the wall threshold S wall , the opposite is true; S65. Recalculate the outdoor travel path point P2 to obtain a new travel path point P'2.

Citation Information

Patent Citations

  • Method for judging operation path points of spraying robot advancing along wall

    CN115999803A