A control method and device for automatic wall spraying
By automatically identifying the wall image and decomposing the area to be sprayed, calculating and planning the spraying path, it solves the inefficiency problem of relying on experience in the existing technology, and realizes the automation, health and safety of wall spraying.
Patent Information
- Application Number
- CN202211455146.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-11-21
AI Technical Summary
In the existing technology, wall spraying relies on the experience of the operator, the teaching process is cumbersome and inefficient, and the operator works in a toxic gas environment, which is harmful to health.
By acquiring the image of the target wall, identifying the area to be sprayed and decomposing it into sub-areas, calculating the full coverage spray path, constructing an adjacency graph and using a depth-first search algorithm to plan the optimal path to achieve automatic spraying.
It realizes the automation of wall spraying, improves spraying efficiency, ensures spraying quality, and reduces health hazards to operators.
Smart Images

Figure CN115726547B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of wall spraying, and in particular to a control method and device for automatic wall spraying. Background Art
[0002] Since the introduction of robot technology in the spraying industry, the industry has mostly used teaching programming, offline programming and other methods for spraying. The spraying effect on the wall often depends on the operator's spraying experience, that is, the operator is required to teach based on the spraying experience, and the teaching process is cumbersome and inefficient, and the operator is always in an environment containing toxic gases, which is harmful to the operator's health.
[0003] Therefore, the prior art has defects and needs to be improved and developed. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a control method and device for automatic wall spraying in view of the above-mentioned defects of the prior art, aiming to solve the problem in the prior art that when spraying the wall, the operator needs to be taught based on the spraying experience, which is inefficient.
[0005] The technical solution adopted by the present invention to solve the technical problem is as follows:
[0006] A control method for automatic wall spraying, comprising:
[0007] Acquire a target wall image, identify an area to be sprayed in the target wall image, and decompose the area to be sprayed into multiple sub-areas;
[0008] Calculating a full coverage spray path in each sub-region, and constructing an adjacency graph based on the multiple sub-regions, each sub-region being a node in the adjacency graph;
[0009] Perform path planning for each sub-area according to the adjacency graph to obtain an optimal path connecting the end point of each sub-area with the starting point of the next sub-area;
[0010] The area to be sprayed is sprayed according to the optimal path and the full coverage spray path.
[0011] In one implementation, the control method for automatically spraying a wall further includes:
[0012] Pre-built coating accumulation rate model;
[0013] Obtaining the opening angle and single spraying distance of the spray gun, and calculating the spray width of the spray gun according to the opening angle and single spraying distance;
[0014] Obtaining the maximum coating thickness obtained by running the spray gun in one direction once, and calculating the coating thickness using the coating accumulation rate model according to the spray width of the spray gun and the maximum coating thickness;
[0015] The thickness variance is used as a coating uniformity evaluation function to obtain the spraying overlap width, and the spraying speed is obtained according to the spraying overlap width.
[0016] In one implementation, the coating accumulation rate model is expressed as:
[0017]
[0018] Wherein, T(X) represents the coating thickness obtained by spraying the gun in one direction once, and T max represents the maximum coating thickness obtained by one operation of the spray gun in one direction, W represents the spray width of the spray gun, and X represents the coordinates within the spray coverage width of the spray gun, with the point of maximum coating thickness as the origin;
[0019] The coating uniformity evaluation function is expressed as:
[0020] Wherein, α is the spraying trajectory, A represents the area of the spraying region, S represents the area to be sprayed, and F(α,X,Y) represents the coating thickness of the point (X,Y) on the wall surface after spraying. m (α) represents the average thickness of the coating on the wall surface.
[0021] In one implementation, the calculating of the full coverage spray path in each sub-area includes:
[0022] Taking the spray width of the spray gun as a grid length, rasterizing the sub-areas to obtain a grid map of each sub-area;
[0023] The upper left corner grid of each grid map is taken as the starting point, and the full coverage spray path of each sub-area is calculated using the BCD algorithm.
[0024] In one implementation, the upper left corner grid of each grid map is used as a starting point, and the full coverage spraying path of each sub-area is calculated using a BCD algorithm, including:
[0025] Establishing a coordinate system for each of the grid maps, selecting the upper left corner grid of each of the grid maps as a starting point, and selecting a horizontal direction as a starting direction of movement;
[0026] When planning the full coverage spraying path for the current sub-area, the grid is covered along the x-axis direction of the coordinate system corresponding to the current sub-area;
[0027] When encountering an obstacle or reaching the edge of the current sub-area, move one vehicle distance in the y-axis direction of the coordinate system, and use the current grid as the starting point of the path to cover the grid in the opposite direction until the full coverage spraying of the current sub-area is completed, thereby obtaining the full coverage spraying path of the current sub-area.
[0028] In one implementation, path planning is performed for each sub-region according to the adjacency graph to obtain an optimal path connecting an end point of each sub-region with a starting point of the next sub-region, including:
[0029] According to the adjacency graph, the optimal path between the end point of each sub-region and the starting point of the next sub-region is calculated using a depth-first search algorithm.
[0030] In one implementation, spraying the area to be sprayed according to the optimal path and the full coverage spraying path includes:
[0031] When spraying the area to be sprayed according to the optimal path and the full coverage spraying path, obtaining a path starting point and a path ending point occurring during the spraying process according to the full coverage spraying path;
[0032] Setting an additional starting point before the path starting point and setting an additional ending point after the path ending point;
[0033] Controlling the spray gun to start moving along the full coverage spray path at the additional starting point, start spraying at the path starting point, stop spraying at the path ending point, and stop moving at the additional ending point;
[0034] The distance between the path starting point and the additional starting point and the distance between the path ending point and the additional ending point are both buffer distances; and the buffer distances are obtained according to the spraying speed.
[0035] The present invention also provides a control device for automatic wall spraying, which includes:
[0036] A decomposition module, used for acquiring a target wall image, identifying a region to be sprayed in the target wall image, and decomposing the region to be sprayed into a plurality of sub-regions;
[0037] A construction module, used for calculating a full coverage spray path in each sub-region, and constructing an adjacency graph according to the plurality of sub-regions, each sub-region being a node in the adjacency graph;
[0038] A planning module, used to plan paths for each sub-area according to the adjacency graph, and obtain an optimal path connecting the end point of each sub-area with the starting point of the next sub-area;
[0039] A spraying module is used to spray the area to be sprayed according to the optimal path and the full coverage spraying path.
[0040] The present invention also provides a terminal, which includes: a memory, a processor, and a control program for automatic spraying of walls stored in the memory and executable on the processor. When the control program for automatic spraying of walls is executed by the processor, the steps of the control method for automatic spraying of walls as described above are implemented.
[0041] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program can be executed to implement the steps of the control method for automatic spraying of walls as described above.
[0042] Beneficial effects of the present invention: The embodiment of the present invention obtains a target wall image, identifies the area to be sprayed in the target wall image, and decomposes the area to be sprayed into multiple sub-areas; calculates the full coverage spray path in each sub-area, and constructs an adjacency graph based on the multiple sub-areas, each sub-area being a node in the adjacency graph; performs path planning for each sub-area according to the adjacency graph to obtain the optimal path connecting the end point of each sub-area with the starting point of the next sub-area; sprays the area to be sprayed according to the optimal path and the full coverage spray path. The present invention realizes wall spraying automation, ensures spraying quality, and improves spraying efficiency by decomposing the area to be sprayed into multiple sub-areas and performing path planning for each sub-area. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flow chart of a preferred embodiment of the control method for automatic wall spraying in the present invention.
[0044] Figure 2 It is a schematic diagram of the conical spraying model in the present invention.
[0045] Figure 3 It is a spraying schematic diagram of a preferred embodiment of the control method for automatic wall spraying in the present invention.
[0046] Figure 4 It is a schematic diagram of decomposing sub-areas in a preferred embodiment of the control method for automatic wall spraying in the present invention.
[0047] Figure 5 It is an adjacency graph in a preferred embodiment of the control method for automatic wall spraying in the present invention.
[0048] Figure 6 It is a specific flow chart of wall spraying in a preferred embodiment of the control method for automatic wall spraying in the present invention.
[0049] Figure 7It is a functional principle block diagram of a preferred embodiment of the control device for automatic wall spraying in the present invention.
[0050] Figure 8 It is a functional principle block diagram of a preferred embodiment of the terminal in the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0052] In order to ensure the spraying quality, improve the spraying efficiency, reduce the spraying cost, and realize the automation of wall spraying, the present invention provides a control method for automatic wall spraying.
[0053] See also Figure 1 The control method of the automatic wall spraying according to the embodiment of the present invention comprises the following steps:
[0054] Step S100: Acquire a target wall image, identify a region to be sprayed in the target wall image, and decompose the region to be sprayed into a plurality of sub-regions.
[0055] Specifically, a wall image with identified obstacles is imported into a terminal (such as a robot) and used as a target wall image. After the wall image with obstacle identification is successfully imported, the image is binarized, the obstacle area is divided into a black area, and the area to be sprayed is divided into a white area. The area to be sprayed (white area) in the target wall image is decomposed into multiple sub-areas, and each sub-area is numbered.
[0056] In one implementation, the control method for automatically spraying a wall further includes:
[0057] Step S10, pre-constructing a coating accumulation rate model;
[0058] Step S20, obtaining the opening angle and single spraying distance of the spray gun, and calculating the spray width of the spray gun according to the opening angle and single spraying distance;
[0059] Step S30, obtaining the maximum coating thickness obtained by running the spray gun in one direction once, and calculating the coating thickness using the coating accumulation rate model according to the spray width of the spray gun and the maximum coating thickness;
[0060] Step S40: Using the thickness variance as a coating uniformity evaluation function to obtain a spraying overlap width, and obtaining a spraying speed according to the spraying overlap width.
[0061] Specifically, Figure 2As shown, a conical spray model is constructed, and a mathematical model of the coating accumulation rate is calculated and designed through factors such as spray gun parameters, spray distance, and spray gun opening angle. The coating accumulation rate model is used to calculate and automatically obtain the optimal spray height and spray speed to ensure spray uniformity and reduce costs. Different application scenarios and spray gun equipment require different spray models, and the paint accumulation rate model also needs to set different parameters as needed. If an air spray gun is used, a conical spray model is required. According to application needs, the opening angle and single spray distance are substituted into the cone model, and the spray width is calculated using simple trigonometric functions, or the single spray distance is calculated using the spray width and opening angle. In order to obtain the optimal spray speed, when the developer knows the maximum coating thickness and spray width obtained by running the spray gun in one direction, the coating accumulation rate model is used to calculate the coating thickness, and then the average coating thickness is calculated. The thickness variance is used as the coating uniformity evaluation function, and the spray overlap width corresponding to the thickness variance that the developer considers appropriate is selected, and then the corresponding spray speed is obtained.
[0062] In one embodiment, if Figure 3 As shown, in the step S40, the normalized spray width of the workpiece to be sprayed is l, the normalized spray overlap width of two adjacent spray paths is d, d∈[0,0.5], the normalized distance between the initial spray position of the spray gun and the center point of the first overlapping spray area is g, the normalized distance between the spray end position and the center point of the last overlapping spray area is r, n is an integer value of (1-g) / (1-d), then r is: r=lgn(1-d).
[0063] Normalized average coating thickness f m The calculation formula is:
[0064] In the formula, s n represents n(1-d) spraying interval; s g represents the spraying interval on the left side of n(1-d); s r Represents the spraying interval on the right side of n(1-d).
[0065] The normalized coating cumulative thickness can be calculated according to the coating accumulation rate model, that is, s = F (α, X, Y) / T max , l=L / W is used to represent the normalized spraying width.
[0066] The calculation formula of the normalized coating uniformity evaluation function thickness variance v is: v = v n +v g +v r ; where v n represents the variance value corresponding to the n(1-d) spraying interval; v grepresents the variance value corresponding to the spraying interval on the left side of n(1-d); v r It represents the variance value corresponding to the spraying interval on the right side of n(1-d). Each variance value (i.e. each v on the right side of the equal sign in the formula) can be expressed as: Where, f represents the normalized coating thickness, f m represents the normalized average coating thickness, and l represents the normalized spraying width.
[0067] From the above, we can know that the average coating thickness f m The thickness variance v used to evaluate the uniformity of the coating is related to the width l of the area to be sprayed, the spray overlap width d, and the distance g from the spray start position to the center point of the first overlap position, and d is the factor that affects f m The main factor is v, l and g are secondary factors, and l and g are obtained by measurement, and d is set by the user. The user can calculate the uniformity of the coating by setting different d values, and then select the appropriate d value that meets the user's own uniformity.
[0068] The spraying speed is the ratio of the distance between the centers of two sprayings to the spraying time. The distance between the centers of two sprayings can be calculated by the spraying overlap width d. The user can get the spraying speed by setting the time for spraying this distance.
[0069] In one embodiment, the coating accumulation rate model is expressed as:
[0070] Wherein, T(X) represents the coating thickness obtained by spraying the gun in one direction once, and T max It represents the maximum coating thickness obtained by one operation of the spray gun in one direction, W represents the spray width of the spray gun, and X represents the coordinates within the spray coverage width of the spray gun, with the point of maximum coating thickness as the origin; and X is within [-0.5W, 0.5W].
[0071] The coating uniformity evaluation function is expressed as:
[0072] Wherein, V is the coating thickness variance, α is the spraying trajectory, A represents the spraying area, S represents the area to be sprayed, F(α,X,Y) represents the coating thickness of the point (X,Y) on the wall surface after spraying, and F m (α) represents the average thickness of the coating on the wall surface.
[0073] The trajectory α includes the position and posture of the spray gun. The position refers to the planned path; the posture refers to the spray gun being perpendicular to the surface of the area to be sprayed. The spray gun sprays the working area along the trajectory α, that is, the spray gun sprays perpendicular to the surface along each planned path.
[0074] like Figure 1 As shown, the control method of the automatic wall spraying also includes the following steps:
[0075] Step S200, calculating the full coverage spray path in each sub-region, and constructing an adjacency graph based on the multiple sub-regions, each sub-region being a node in the adjacency graph.
[0076] Specifically, Figure 4 and Figure 5 As shown, each sub-area can be represented as a node in an adjacency graph, where the edges of adjacent sub-areas can connect the nodes. This embodiment requires path planning for each sub-area. Sub-area path planning is divided into connections between sub-areas and traversal within each sub-area, that is, finding the optimal path between different units that can connect the end point of each area and the starting point of the next area; each unit can achieve full coverage spray path planning in the area through an ox-plow path traversal.
[0077] In one embodiment, the step S200 of "calculating the full coverage spray path in each sub-area" specifically includes:
[0078] Step S210, taking the spray width of the spray gun as a grid length, rasterizing the sub-region to obtain a grid map of each sub-region;
[0079] Step S220: taking the upper left corner grid of each grid map as the starting point, and using the BCD algorithm to calculate the full coverage spray path of each sub-area.
[0080] Specifically, the sub-areas are gridded with a single spray diameter (i.e., spray width of the spray gun) as a grid length. The upper left corner of each sub-area is defined as the starting point, and the BCD algorithm is used to automatically design a full coverage spray path, and the spray end point can be obtained.
[0081] When constructing sub-regions, two types of events are defined: an IN event is when a region is decomposed into two regions, and an OUT event is when two regions are merged into one region. Assume that a vertical line (called a slice) sweeps from left to right across a wall image with boundaries and containing polygonal obstacles such as window frames. When the slice intersects with a polygon vertex, an event is triggered. By determining whether this is an IN event or an OUT event, it is determined whether the connectivity has changed, and then a series of opening and closing operations are performed to determine the decomposed sub-region.
[0082] If the triggered event is an IN event, it means that the connectivity increases (one area is decomposed into two areas). At this time, the current sub-area is closed to complete the construction of the sub-area, and two new sub-areas are opened to start the construction of the two sub-areas. If the triggered event is an OUT event, it means that the connectivity decreases (two areas are merged into one area). At this time, the current two sub-areas are closed to complete the construction of the sub-areas, and a new sub-area is opened to start the construction of the new sub-area.
[0083] Specifically, the IN event refers to the connection between multiple parts of the previous slice and the current slice. For example, [011100] and [010100], the 1 in the previous slice and the two 1s in the current slice are connected, and an IN event occurs. In the image, if a grid in a column is the left vertex of the obstacle, the grid value is 0, then the 1 in the previous column must be connected with multiple 1s in this column, and an IN event occurs. The OUT event refers to the connection between multiple parts of the current slice and the previous slice, such as [010100] and [011100], the 1 in the current slice and the two 1s in the previous slice are connected, and an OUT event occurs. In the image, if a grid in the previous column is the right vertex of the obstacle, the grid value is 0, then the 1 in this column must be connected with multiple 1s in the previous column, and an OUT event occurs. IN and OUT events are used to separate different areas and are used to determine the front and back doors of each sub-area.
[0084] Among them, the opening and closing operations are for a single slice. When the grid value in the slice changes from 0 to 1, it is opened, and when it changes from 1 to 0, it is closed. For example, the slice [00110110] is connected at two places, and the opening and closing operations occur twice respectively. The indexes of the sprayable area in a slice are (2,4) and (5,7). For example, (2,4) means that the opening occurs at 2 places and the closing occurs at 4 places.
[0085] After completing the construction of all sub-regions, each sub-region is regarded as a node, and each node is connected by adjacent edges to construct an adjacency graph. Then, the optimal path from the end point of each sub-region to the starting point of the next sub-region is found through the depth-first search algorithm.
[0086] In one embodiment, the step S220 specifically includes:
[0087] Step S221, establishing a coordinate system for each of the grid maps, selecting the upper left corner grid of each of the grid maps as a starting point, and selecting a horizontal direction as a starting direction of movement;
[0088] Step S222, when planning a full coverage spraying path for the current sub-region, covering the grid along the x-axis direction of the coordinate system corresponding to the current sub-region;
[0089] Step S223, when encountering an obstacle or reaching the edge of the current sub-area, move one vehicle distance in the y-axis direction of the coordinate system, and use the current grid as the starting point of the path, cover the grid in the opposite direction until the full coverage spraying of the current sub-area is completed, thereby obtaining the full coverage spraying path of the current sub-area.
[0090] Specifically, a starting point is selected in the coordinate system built in each sub-area, and the grid map modeling method is used to initialize the length and width of the grid as the size of the area sprayed by the nozzle each time. Since turning a machine requires more energy and time than walking in a straight line, in order to reduce the number of turns, the starting point is selected as the upper left corner grid of the sub-area, and the starting direction of movement is selected as horizontal. This is to avoid paint dripping when spraying the upper wall, causing damage to the sprayed wall below. In actual spraying, the spray gun is generally not allowed to spray from bottom to top.
[0091] Using the BCD algorithm as a basis, a special back-off operation is used when encountering obstacles, and further full coverage in the grid is achieved through the traversal coverage algorithm. For example, the robot starts from the starting point and covers the grid along the x-axis direction. When encountering an obstacle, it moves one vehicle distance in the y-axis direction, takes this point as the starting point of the designed path, and then performs a new round of coverage in the opposite direction until it reaches the edge position or other obstacles. The process is repeated until the entire sub-area is fully covered, and then a full coverage traversal path of the entire wall is obtained.
[0092] The traversal and coverage algorithm refers to the establishment of a coordinate system for the grid map. If the initial movement direction is downward and the grid coordinates are (i, j) at this time, if (i, j+1) is the grid to be sprayed, then (i, j) = (i, j+1); if (i, j+1) is an obstacle, then i = i+1 and the movement direction is changed to the opposite direction of the initial movement, and it is determined whether (i, j-1) is the area to be sprayed, and the operation is repeated. A "bow" or snake-shaped route can be obtained through simple traversal.
[0093] In this way, in order to avoid uneven coating when the spray gun turns, the path designed by the present invention only includes straight roads along the direction of starting movement and the opposite direction, and does not include other directions, that is, by setting the end point and the new starting point at the edge of the wall or the edge of the obstacle, it is ensured that there is no turn in the path.
[0094] like Figure 1 As shown, the control method of the automatic wall spraying also includes the following steps:
[0095] Step S300: Perform path planning for each sub-region according to the adjacency graph to obtain an optimal path connecting the end point of each sub-region with the starting point of the next sub-region.
[0096] In one implementation, the step S300 specifically includes: calculating the optimal path between the end point of each sub-region and the starting point of the next sub-region using a depth-first search algorithm according to the adjacency graph.
[0097] Specifically, depth-first search is a type of graph algorithm, abbreviated as DFS, which stands for Depth First Search. Depth-first search is a classic algorithm in graph theory. The depth-first search algorithm can generate a corresponding topological sorting table of the target graph. The topological sorting table can be used to easily solve many related graph theory problems, such as the maximum path problem, etc. The process is to go deep into each possible branch path until it cannot go any deeper, and each node can only be visited once.
[0098] like Figure 1 As shown, the control method of the automatic wall spraying also includes the following steps:
[0099] Step S400: spraying the area to be sprayed according to the optimal path and the full coverage spraying path.
[0100] Specifically, the robot can automatically spray the area to be sprayed according to the designed optimal path and full coverage spray path, without the need for operator operation. The spraying process is simple and the spraying efficiency is improved.
[0101] In one embodiment, the step S400 specifically includes:
[0102] Step S410, when spraying the area to be sprayed according to the optimal path and the full coverage spraying path, obtaining a path starting point and a path ending point appearing in the spraying process according to the full coverage spraying path;
[0103] Step S420, setting an additional starting point before the starting point of the path, and setting an additional ending point after the ending point of the path;
[0104] Step S430, controlling the spray gun to start moving along the full coverage spray path at the additional starting point, start spraying at the path starting point, stop spraying at the path ending point, and stop moving at the additional ending point.
[0105] The distance between the path starting point and the additional starting point and the distance between the path ending point and the additional ending point are both buffer distances; and the buffer distances are obtained according to the spraying speed.
[0106] Specifically, in order to ensure the uniformity of the paint and reduce mechanical damage to the spray gun, a buffer distance is set at the beginning and end of each path. That is, the buffer distance is calculated based on the spray gun spraying speed and the paint accumulation rate model, and additional spray gun movement starting and ending points are set outside the beginning and end of each path.
[0107] In this way, the spray gun will start to move along the path direction from the additional starting point of the path, start spraying at the original path starting point, stop spraying at the original path ending point, and stop moving at the additional ending point, and continue to reciprocate until the sub-area spraying is completed. After the sub-area spraying is completed, it moves to the new starting point of the next area, and repeats this process until the wall spraying is completed. This embodiment not only ensures the uniformity of the paint, but also reduces the mechanical damage to the spray gun.
[0108] A specific embodiment is listed below for illustration. Figure 6 shown.
[0109] Step A1, initializing the image;
[0110] Step A2, using the BCD algorithm to decompose and obtain sub-regions;
[0111] Step A3: Use DFS algorithm to connect each sub-area;
[0112] Step A4: Path planning within the sub-area;
[0113] Step A5, determine whether an area is missed; if so, execute step A6; if not, complete the wall spraying;
[0114] Step A6: Change the sub-area and return to step A4.
[0115] In one embodiment, if Figure 7 As shown, based on the above-mentioned control method for automatic spraying of walls, the present invention also provides a control device for automatic spraying of walls, including:
[0116] The decomposition module 100 is used to obtain a target wall image, identify a region to be sprayed in the target wall image, and decompose the region to be sprayed into a plurality of sub-regions;
[0117] A construction module 200 is used to calculate a full coverage spray path in each sub-region, and to construct an adjacency graph based on the multiple sub-regions, each sub-region being a node in the adjacency graph;
[0118] A planning module 300 is used to perform path planning for each sub-area according to the adjacency graph to obtain an optimal path connecting the end point of each sub-area with the starting point of the next sub-area;
[0119] The spraying module 400 is used to spray the area to be sprayed according to the optimal path and the full coverage spraying path.
[0120] In one embodiment, if Figure 8 As shown, based on the above-mentioned control method for automatic wall spraying, the present invention also provides a terminal, including a processor 10 and a memory 20. Figure 8 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0121] The memory 20 may be an internal storage unit of the terminal in some embodiments, such as a hard disk or memory of the terminal. The memory 20 may also be an external storage device of the terminal in other embodiments, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed in the terminal, such as program codes for installing the terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a control program 30 for an automatic spray-painted wall is stored on the memory 20, and the control program 30 for the automatic spray-painted wall can be executed by the processor 10, thereby realizing the control method for the automatic spray-painted wall in the present application.
[0122] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, which is used to run the program code or process data stored in the memory 20, such as executing the control method of the automatic wall spraying.
[0123] In one embodiment, when the processor 10 executes the control program 30 for automatically spraying a wall in the memory 20, the following steps are implemented:
[0124] Acquire a target wall image, identify an area to be sprayed in the target wall image, and decompose the area to be sprayed into multiple sub-areas;
[0125] Calculating a full coverage spray path in each sub-region, and constructing an adjacency graph based on the multiple sub-regions, each sub-region being a node in the adjacency graph;
[0126] Perform path planning for each sub-area according to the adjacency graph to obtain an optimal path connecting the end point of each sub-area with the starting point of the next sub-area;
[0127] The area to be sprayed is sprayed according to the optimal path and the full coverage spray path.
[0128] The control method of the automatic wall spraying also includes:
[0129] Pre-built coating accumulation rate model;
[0130] Obtaining the opening angle and single spraying distance of the spray gun, and calculating the spray width of the spray gun according to the opening angle and single spraying distance;
[0131] Obtaining the maximum coating thickness obtained by running the spray gun in one direction once, and calculating the coating thickness using the coating accumulation rate model according to the spray width of the spray gun and the maximum coating thickness;
[0132] The thickness variance is used as a coating uniformity evaluation function to obtain the spraying overlap width, and the spraying speed is obtained according to the spraying overlap width.
[0133] The coating accumulation rate model is expressed as:
[0134] Wherein, T(X) represents the coating thickness obtained by spraying the gun in one direction once, and T max represents the maximum coating thickness obtained by one operation of the spray gun in one direction, W represents the spray width of the spray gun, and X represents the coordinates within the spray coverage width of the spray gun, with the point of maximum coating thickness as the origin;
[0135] The coating uniformity evaluation function is expressed as:
[0136] Wherein, α is the spraying trajectory, A represents the area of the spraying region, S represents the area to be sprayed, and F(α,X,Y) represents the coating thickness of the point (X,Y) on the wall surface after spraying. m (α) represents the average thickness of the coating on the wall surface.
[0137] The calculating of the full coverage spray path in each sub-area includes:
[0138] Taking the spray width of the spray gun as a grid length, rasterizing the sub-areas to obtain a grid map of each sub-area;
[0139] The upper left corner grid of each grid map is taken as the starting point, and the full coverage spray path of each sub-area is calculated using the BCD algorithm.
[0140] The upper left corner grid of each grid map is used as the starting point, and the full coverage spraying path of each sub-area is calculated by using the BCD algorithm, including:
[0141] Establishing a coordinate system for each of the grid maps, selecting the upper left corner grid of each of the grid maps as a starting point, and selecting a horizontal direction as a starting direction of movement;
[0142] When planning the full coverage spraying path for the current sub-area, the grid is covered along the x-axis direction of the coordinate system corresponding to the current sub-area;
[0143] When encountering an obstacle or reaching the edge of the current sub-area, move one vehicle distance in the y-axis direction of the coordinate system, and use the current grid as the starting point of the path to cover the grid in the opposite direction until the full coverage spraying of the current sub-area is completed, thereby obtaining the full coverage spraying path of the current sub-area.
[0144] Path planning is performed for each sub-area according to the adjacency graph to obtain an optimal path connecting the end point of each sub-area with the starting point of the next sub-area, including:
[0145] According to the adjacency graph, the optimal path between the end point of each sub-region and the starting point of the next sub-region is calculated using a depth-first search algorithm.
[0146] The method of spraying the area to be sprayed according to the optimal path and the full coverage spray path includes:
[0147] When spraying the area to be sprayed according to the optimal path and the full coverage spraying path, obtaining a path starting point and a path ending point occurring during the spraying process according to the full coverage spraying path;
[0148] Setting an additional starting point before the path starting point and setting an additional ending point after the path ending point;
[0149] Controlling the spray gun to start moving along the full coverage spray path at the additional starting point, start spraying at the path starting point, stop spraying at the path ending point, and stop moving at the additional ending point;
[0150] The distance between the path starting point and the additional starting point and the distance between the path ending point and the additional ending point are both buffer distances; and the buffer distances are obtained according to the spraying speed.
[0151] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program can be executed to implement the steps of the control method for automatic wall spraying as described above.
[0152] In summary, the present invention discloses a control method and device for automatic wall spraying, the method comprising: obtaining a target wall image, identifying an area to be sprayed in the target wall image, and decomposing the area to be sprayed into multiple sub-areas; calculating a full coverage spraying path in each sub-area, and constructing an adjacency graph based on the multiple sub-areas, each sub-area being a node in the adjacency graph; performing path planning for each sub-area according to the adjacency graph to obtain an optimal path connecting the end point of each sub-area with the starting point of the next sub-area; spraying the area to be sprayed according to the optimal path and the full coverage spraying path. The present invention realizes wall spraying automation, ensures spraying quality, and improves spraying efficiency by decomposing the area to be sprayed into multiple sub-areas and performing path planning for each sub-area.
[0153] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A control method for automatic wall spraying, characterized in that: include: Acquire a target wall image, identify an area to be sprayed in the target wall image, and decompose the area to be sprayed into multiple sub-areas; Calculating a full coverage spray path in each sub-region, and constructing an adjacency graph based on the multiple sub-regions, each sub-region being a node in the adjacency graph; Perform path planning for each sub-area according to the adjacency graph to obtain an optimal path connecting the end point of each sub-area with the starting point of the next sub-area; Spraying the area to be sprayed according to the optimal path and the full coverage spray path; The control method of the automatic wall spraying also includes: Pre-built coating accumulation rate model; Obtaining the opening angle and single spraying distance of the spray gun, and calculating the spray width of the spray gun according to the opening angle and single spraying distance; Obtaining the maximum coating thickness obtained by running the spray gun in one direction once, and calculating the coating thickness using the coating accumulation rate model according to the spray width of the spray gun and the maximum coating thickness; Using thickness variance as a coating uniformity evaluation function to obtain a spray overlap width, and obtaining a spray speed according to the spray overlap width; The coating accumulation rate model is expressed as: Wherein, T(X) represents the coating thickness obtained by spraying the gun in one direction once, and T max represents the maximum coating thickness obtained by one operation of the spray gun in one direction, W represents the spray width of the spray gun, and X represents the coordinates within the spray coverage width of the spray gun, with the point of maximum coating thickness as the origin; The coating uniformity evaluation function is expressed as: Wherein, α is the spraying trajectory, A represents the area of the spraying region, S represents the area to be sprayed, and F(α,X,Y) represents the coating thickness of the point (X,Y) on the wall surface after spraying. m (α) represents the average thickness of the wall surface coating; The calculating of the full coverage spray path in each sub-area includes: Taking the spray width of the spray gun as a grid length, rasterizing the sub-areas to obtain a grid map of each sub-area; Taking the upper left corner grid of each grid map as the starting point, the full coverage spray path of each sub-area is calculated using the BCD algorithm; The upper left corner grid of each grid map is used as the starting point, and the full coverage spraying path of each sub-area is calculated by using the BCD algorithm, including: Establishing a coordinate system for each of the grid maps, selecting the upper left corner grid of each of the grid maps as a starting point, and selecting a horizontal direction as a starting direction of movement; When planning the full coverage spraying path for the current sub-area, the grid is covered along the x-axis direction of the coordinate system corresponding to the current sub-area; When encountering an obstacle or reaching the edge of the current sub-area, move a vehicle distance in the y-axis direction of the coordinate system, and use the current grid as the path starting point to cover the grid in the opposite direction until the full coverage spraying of the current sub-area is completed, thereby obtaining the full coverage spraying path of the current sub-area; Path planning is performed for each sub-area according to the adjacency graph to obtain an optimal path connecting the end point of each sub-area with the starting point of the next sub-area, including: According to the adjacency graph, the optimal path between the end point of each sub-region and the starting point of the next sub-region is calculated using a depth-first search algorithm; The method of spraying the area to be sprayed according to the optimal path and the full coverage spray path includes: When spraying the area to be sprayed according to the optimal path and the full coverage spraying path, obtaining a path starting point and a path ending point occurring during the spraying process according to the full coverage spraying path; Setting an additional starting point before the path starting point and setting an additional ending point after the path ending point; Controlling the spray gun to start moving along the full coverage spray path at the additional starting point, start spraying at the path starting point, stop spraying at the path ending point, and stop moving at the additional ending point; Wherein, the distance between the path starting point and the additional starting point and the distance between the path ending point and the additional ending point are both buffer distances; the buffer distance is obtained according to the spraying speed; The full coverage spraying path only includes a straight path along the direction of the start movement and the opposite direction thereof. By setting an end point and a new starting point at the edge of a wall or an obstacle, it is ensured that the full coverage spraying path does not contain a turn.
2. A control device for automatic wall spraying, characterized in that: include: A decomposition module, used for acquiring a target wall image, identifying a region to be sprayed in the target wall image, and decomposing the region to be sprayed into a plurality of sub-regions; A construction module, used for calculating a full coverage spray path in each sub-region, and constructing an adjacency graph based on a plurality of said sub-regions, each sub-region being a node in said adjacency graph; A planning module, used to plan paths for each sub-area according to the adjacency graph, and obtain an optimal path connecting the end point of each sub-area with the starting point of the next sub-area; A spraying module, used for spraying the area to be sprayed according to the optimal path and the full coverage spraying path; Pre-built coating accumulation rate model; Obtaining the opening angle and single spraying distance of the spray gun, and calculating the spray width of the spray gun according to the opening angle and single spraying distance; Obtaining the maximum coating thickness obtained by running the spray gun in one direction once, and calculating the coating thickness using the coating accumulation rate model according to the spray width of the spray gun and the maximum coating thickness; Using thickness variance as a coating uniformity evaluation function to obtain a spray overlap width, and obtaining a spray speed according to the spray overlap width; The coating accumulation rate model is expressed as: Wherein, T(X) represents the coating thickness obtained by spraying the gun in one direction once, and T max represents the maximum coating thickness obtained by one operation of the spray gun in one direction, W represents the spray width of the spray gun, and X represents the coordinates within the spray coverage width of the spray gun, with the point of maximum coating thickness as the origin; The coating uniformity evaluation function is expressed as: Wherein, α is the spraying trajectory, A represents the area of the spraying region, S represents the area to be sprayed, and F(α,X,Y) represents the coating thickness of the point (X,Y) on the wall surface after spraying. m (α) represents the average thickness of the wall surface coating; The calculating of the full coverage spray path in each sub-area includes: Taking the spray width of the spray gun as a grid length, rasterizing the sub-areas to obtain a grid map of each sub-area; Taking the upper left corner grid of each grid map as the starting point, the full coverage spray path of each sub-area is calculated using the BCD algorithm; The upper left corner grid of each grid map is used as the starting point, and the full coverage spraying path of each sub-area is calculated by using the BCD algorithm, including: Establishing a coordinate system for each of the grid maps, selecting the upper left corner grid of each of the grid maps as a starting point, and selecting a horizontal direction as a starting direction of movement; When planning the full coverage spraying path for the current sub-area, the grid is covered along the x-axis direction of the coordinate system corresponding to the current sub-area; When encountering an obstacle or reaching the edge of the current sub-area, move a vehicle distance in the y-axis direction of the coordinate system, and use the current grid as the path starting point to cover the grid in the opposite direction until the full coverage spraying of the current sub-area is completed, thereby obtaining the full coverage spraying path of the current sub-area; Path planning is performed for each sub-area according to the adjacency graph to obtain an optimal path connecting the end point of each sub-area with the starting point of the next sub-area, including: According to the adjacency graph, the optimal path between the end point of each sub-region and the starting point of the next sub-region is calculated using a depth-first search algorithm; The method of spraying the area to be sprayed according to the optimal path and the full coverage spray path includes: When spraying the area to be sprayed according to the optimal path and the full coverage spraying path, obtaining a path starting point and a path ending point occurring during the spraying process according to the full coverage spraying path; Setting an additional starting point before the path starting point and setting an additional ending point after the path ending point; Controlling the spray gun to start moving along the full coverage spray path at the additional starting point, start spraying at the path starting point, stop spraying at the path ending point, and stop moving at the additional ending point; Wherein, the distance between the path starting point and the additional starting point and the distance between the path ending point and the additional ending point are both buffer distances; the buffer distance is obtained according to the spraying speed; The full coverage spraying path only includes a straight path along the direction of the start movement and the opposite direction thereof. By setting an end point and a new starting point at the edge of a wall or an obstacle, it is ensured that the full coverage spraying path does not contain a turn.
3. A terminal, characterized in that: include: A memory, a processor, and a control program for automatic spray-painting walls stored in the memory and executable on the processor, wherein the control program for automatic spray-painting walls implements the steps of the control method for automatic spray-painting walls as claimed in claim 1 when executed by the processor.
4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program can be executed to implement the steps of the control method for automatic wall spraying as claimed in claim 1.
Citation Information
Patent Citations
Surface-curvature-based automatic path generation method for spraying robot
CN105381912A
Spraying robot, control method and device thereof and computer readable storage medium
CN109972827A
Spray control method and device, spray robot and storage medium
CN110202585A
Robot full-coverage path planning method based on secondary region division
CN112965485A
Spraying path planning method and device, equipment and storage medium
CN113496073A
