Three-dimensional spray flight path planning method and apparatus for autonomous unmanned aerial vehicle spraying
Patent Information
- Application Number
- PCT/SG2026/050246
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-04-18
- Filing Date
- 2026-04-14
- Publication Date
- 2026-10-22
Smart Images

Figure SG2026050246_22102026_PF_FP_ABST
Abstract
Description
[0001] THREE-DIMENSIONAL SPRAY FLIGHT PATH PLANNING METHOD AND APPARATUS FOR AUTONOMOUS UNMANNED AERIAL VEHICLE SPRAYING
[0002] TECHNICAL FIELD
[0003] The present application relates to the field of unmanned aerial vehicle (UAV) spray flight path planning, and specifically to a three-dimensional spray flight path planning method and apparatus for achieving autonomous spraying by a UAV.
[0004] BACKGROUND ART
[0005] With the continuous rise in labour costs both domestically and internationally, and growing concerns over the safety of workers performing operations at height, an increasing number of enterprises have begun considering the use of spray-coating UAVs as a substitute for manual painting of building exterior walls, with a view to reducing production costs and mitigating personnel safety risks. Enterprises are adopting spray-coating UAVs in the fields of building facade painting, maintenance, and cleaning. Spray-coating UAVs are considerably more cost-effective than hiring workers and offer higher efficiency with shorter construction periods.
[0006] At present, there is no mature flight path planning solution for autonomous spray-coating operations by spray UAVs. Manual control of the UAV is still required for spray-coating operations, and it is difficult to achieve precise coverage of the spray area through manual control. The spray flight path planning method is the key to enabling spray-coating UAVs to autonomously coat building facades. The spray UAV must execute the spray task along a preset flight path, which ensures that the UAV maintains a stable wall-to-spray distance during the spraying process, reaches the designated spray position, and achieves a precise spray coating result.
[0007] SUMMARY
[0008] The object of the present application is to overcome the shortcomings of the prior art by providing a three-dimensional spray flight path planning method and apparatus for autonomous UAV spraying, which achieves three-dimensional spray flight path planning for autonomous UAV spraying and improves both the efficiency and accuracy of spray coating.
[0009] The present application adopts the following technical solution to achieve the above object. In a first aspect, the present application provides a three-dimensional spray flight path planning method for autonomous UAV spraying, comprising:
[0010] S1. Acquiring an oblique photogrammetric three-dimensional model of a building to be sprayed, and rendering the oblique photogrammetric 3D model in a three-dimensional visualisation platform;52. Performing coordinate system data conversion on the oblique photogrammetric 3D model in the three-dimensional visualisation platform, converting it into positioning coordinate data for use by the UAV, wherein the coordinate data comprises longitude, latitude, and altitude;
[0011] 53. Drawing a two-dimensional or three-dimensional spray mesh graphic on the oblique photogrammetric 3D model using a 3D model editing tool within the three-dimensional visualisation platform, to obtain a planar or curved spray work zone corresponding to the building surface to be sprayed;
[0012] 54. For a planar spray work zone of the building to be sprayed, applying a pixel-level flight path planning algorithm; for a curved spray work zone of the building to be sprayed, applying an improved A* algorithm adapted for full-coverage path planning; and in conjunction with the positioning coordinate data for the UAV, generating a spray flight path for the UAV to perform automated spray coating of a building facade.
[0013] In a further embodiment, drawing a three-dimensional spray mesh graphic on the oblique photogrammetric 3D model using the 3D model editing tool within the three-dimensional visualisation platform, to obtain a curved spray work zone corresponding to the building surface to be sprayed, specifically comprises:
[0014] using a line segment tool of the three-dimensional visualisation platform to delineate a closed three-dimensional mesh graphic on the surface of the building in the oblique photogrammetric 3D model using line segments;
[0015] based on the three-dimensional mesh graphic, computing the triangles that are respectively located inside the region, outside the region, and on the boundary of the region; using the region boundary to cut the triangles located on the boundary, so that each boundary triangle is divided into an interior portion and an exterior portion;
[0016] combining the interior portions of the boundary-cut triangles together with the triangles originally inside the region to form a new three-dimensional mesh graphic, wherein the new three-dimensional mesh graphic constitutes the curved spray work zone.
[0017] In a further embodiment, drawing a two-dimensional spray mesh graphic on the oblique photogrammetric 3D model using the 3D model editing tool within the three-dimensional visualisation platform, to obtain a planar spray work zone corresponding to the building surface to be sprayed, specifically comprises:
[0018] using a point-selection tool of the three-dimensional visualisation platform to select at least six vertices on the building surface in the oblique photogrammetric 3D model, and fitting a geometric plane to the selected vertices by means of the least squares method and matrix singular value decomposition (SVD), wherein the geometric plane serves as an auxiliary plane;using a drawing tool of the three-dimensional visualisation platform to draw a two-dimensional mesh graphic on the auxiliary plane, wherein the two-dimensional mesh graphic constitutes the planar spray work zone.
[0019] The planar spray work zone drawn on the auxiliary plane is conformally parallel to the building surface. If there exist non-sprayable areas on the building surface, a non-sprayable area marking tool is used to mark a non-sprayable two-dimensional mesh graphic, so that such areas are avoided during the flight path generation process.
[0020] Two-dimensional Boolean operations are performed on the drawn two-dimensional mesh graphics, supporting union and difference operations among multiple two-dimensional mesh graphics. When two two-dimensional rectangular mesh graphics are drawn on the same auxiliary plane and they partially overlap: if the colour adjustment tool of the three-dimensional visualisation platform is used to set both to the same colour (i.e. the spray work zone is to be coated with the same colour of paint), the two two- dimensional rectangular mesh graphics will be merged into a single rectangular planar spray work zone; when the two graphics have different colours, the overlapping portion of the first-drawn rectangular mesh graphic will be subtracted from the original region and will become part of the subsequently-drawn two-dimensional rectangular mesh graphic.
[0021] The planar spray work zone defaults to a rectangular shape. The planar spray work zone supports the addition and deletion of vertices on the basis of the rectangular two- dimensional mesh graphic, and the dragging of existing vertex positions, so as to modify the shape of the two-dimensional mesh graphic. The modified shape may be a triangle, a trapezoid, a star, or a shape with holes.
[0022] In a further embodiment, for a planar spray work zone of the building to be sprayed, applying a pixel-level flight path planning algorithm and, in conjunction with the positioning coordinate data for the UAV, generating a spray flight path for the UAV to perform automated spray coating of a building facade, comprises the following specific steps:
[0023] acquiring the two-dimensional mesh graphic of the building facade, i.e. the planar spray work zone, and converting the planar spray work zone data into a two-dimensional image; based on the converted two-dimensional image, generating a flight path in a pixel coordinate system, comprising the following specific steps:
[0024] expanding the non-sprayable area: determining an erosion kernel based on the width and height of the nozzle spray pattern, and applying the kernel to erode the image so as to expand the non-sprayable area, thereby protecting the non-sprayable area; performing flight path planning on the original spray work zone: generating grid coordinates for the flight path waypoints and the flight path index, and storing the actual coordinates of the waypoints;if non-sprayable areas exist within the spray work zone, using the non-sprayable area in the two-dimensional image as a mask to apply to the initial flight path, regenerating new spray flight path segments, and simultaneously generating a map for use by the A* algorithm;
[0025] applying a nearest-distance rule to pair the spray flight path segments to be sprayed, so as to obtain the spraying sequence;
[0026] based on the pairing result, using the A* algorithm to connect the individual spray flight path segments to form a complete pixel-level flight path;
[0027] traversing each segment of the flight path, and adding nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the corresponding distances;
[0028] finally, post-processing the pixel-level flight path by converting the flight path in the pixel coordinate system into a flight path in the three-dimensional coordinate system required by the UAV.
[0029] In a further embodiment, converting the planar spray work zone data into a two-dimensional image specifically comprises:
[0030] computing the size of the two-dimensional image and preparing a base map, wherein the base map is the minimum bounding rectangle calculated from the polygon vertex coordinates of the two-dimensional mesh graphic;
[0031] determining the image width and height based on the physical width and height of the minimum bounding rectangle in conjunction with the pixel resolution set in the configuration file, and initialising a base map of all zeros according to the image width and height; converting the physical coordinates of the polygon vertices to be sprayed into pixel coordinates; using different grey levels to draw, respectively on the initialised base map, the normal spray work zone and the non-sprayable areas within the spray work zone.
[0032] In a further embodiment, performing flight path planning on the original spray work zone and generating grid coordinates for the flight path waypoints specifically comprises: computing the spray width and spray height of the spray gun based on the set spray width and height parameters;
[0033] setting the spray interval according to the path priority, wherein the path priority is either verticalaxis-first or horizontal-axis-first;
[0034] adjusting the non-divisible remainder by computing the offset between the image dimensions and the spray interval, to ensure uniform coverage of the spray work zone over the image;
[0035] if vertical-axis-first is selected, generating a vertical-axis-first flight path grid;
[0036] if horizontal-axis-first is selected, generating a horizontal-axis-first flight path grid.In a further embodiment, generating the map for use by the A* algorithm specifically comprises: creating an A* map for marking traversable areas;
[0037] traversing each waypoint to determine whether it is located within a sprayable area, comprising the following specific steps:
[0038] determining, according to the path priority, whether the waypoint lies outside the image boundary, i.e., whether it is a valid waypoint;
[0039] if the waypoint is within the sprayable work zone and not on the boundary, marking it as a traversable area in the A* map;
[0040] if the path is horizontal-axis-first, reversing the flight path so that the starting point of the spray flight path is at the upper position of the spray work zone plane;
[0041] returning the filtered obstacle-free waypoints and the map for use by the A* algorithm.
[0042] In a further embodiment, for a curved spray work zone of the building to be sprayed, applying an improved A* algorithm adapted for full-coverage path planning and, in conjunction with the positioning coordinate data for the UAV, generating a spray flight path for the UAV to perform automated spray coating of a building facade, comprises the following specific steps: acquiring the three-dimensional mesh graphic of the building wall surface, i.e. the curved spray work zone, and computing the vertex normal vectors; after loading the mesh graphic data, performing pre-processing comprising: converting the mesh data into point cloud data, filtering the point cloud data to remove noise points, and computing normal vectors based on the adjacency relationships among the mesh vertices; performing UAV body positioning: translating the pre-processed point cloud outward along the direction of the normal vectors by a set distance to obtain the target position of the UAV body, wherein the set distance is the sum of the distance from the nozzle to the UAV body positioning module and the optimal spray distance of the nozzle; optimising the path to achieve full-coverage spraying: applying a full-coverage path planning algorithm to connect the discrete UAV poses into a complete segmented flight path, comprising the following specific steps:
[0043] slicing the outward-translated point cloud along the Z-axis at the set spray interval, and performing voxel downsampling on each slice to generate individual strip-shaped point clouds; processing each strip-shaped point cloud as follows:
[0044] projecting the point cloud onto a horizontal plane to form two-dimensional points;
[0045] fitting a two-dimensional flight path to the two-dimensional points using the Douglas-Peucker algorithm;
[0046] adding the z-dimension to the two-dimensional flight path to restore it to a three-dimensional flight path;
[0047] connecting the fitted flight paths of each strip-shaped point cloud in three-dimensional flight path order to form a continuous flight path within the mesh graphic, wherein the flightheading of the path is the normal vector of the current path facing the wall surface; the fitted flight paths of the strip-shaped point clouds constitute the spray flight paths, and the line segments connecting adjacent fitted paths constitute the non-spray flight paths; traversing each segment of the flight path, and adding nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the corresponding distances;
[0048] performing flight path post-processing: computing the waypoint heading angle and the relative heading angle.
[0049] In a further embodiment, converting the mesh data into point cloud data, filtering the point cloud data to remove noise points, and computing normal vectors based on the adjacency relationships among the mesh vertices, specifically comprises:
[0050] converting the mesh graphic data into OFF format, and creating a triangle mesh object from the mesh data using the Open3D library;
[0051] sampling the mesh data into point cloud data: first computing the number of resampled point cloud points, then performing point cloud resampling using the Poisson disk sampling algorithm in the Open3D library;
[0052] performing smoothing and denoising on all resampled point cloud data: using the normal vector angles and the inter-point distances to perform clustering, filtering out points that do not satisfy the distance requirements and the normal vector angle requirements, and applying region-growing filtering to the point cloud to extract point cloud clusters that satisfy the normal vector angle and distance conditions.
[0053] In a further embodiment, traversing each segment of the flight path and adding nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the corresponding distances, comprises the following specific steps:
[0054] if the current flight path segment requires spraying, computing the spray direction and spray distance of the current segment based on the path priority;
[0055] if the spray distance of the current segment is greater than or equal to the sum of the nozzle activation and deactivation distances, adding nozzle activation and deactivation points; computing the position of the spray gun activation point at a distance from the starting point, and setting its spraying state to inactive;
[0056] computing the position of the spray gun deactivation point at a distance from the end point, and setting its spraying state to active;
[0057] setting the spraying state of both the starting point and the end point to inactive, and returning them to the flight path planning results.In a further embodiment, rendering the oblique photogrammetric 3D model in the three- dimensional visualisation platform specifically comprises:
[0058] conducting oblique photography using an oblique photography UAV, and performing three- dimensional modelling using a third-party modelling platform to obtain an oblique photogrammetric 3D model of the building to be sprayed;
[0059] establishing a three-dimensional visualisation platform supporting 3D editing tools, based on the three.js open-source library;
[0060] rendering the oblique photogrammetric 3D model tiles into the three-dimensional visualisation platform using the three.js rendering engine.
[0061] In a further embodiment, performing coordinate system data conversion on the oblique photogrammetric 3D model in the three-dimensional visualisation platform and converting it into positioning coordinate data for use by the UAV specifically comprises:
[0062] the metadata of the oblique photogrammetric 3D model contains a matrix composed of 16 floating-point numbers, wherein the local coordinate system of this matrix is the East- North-Up (ENU) coordinate system; multiplying the three-dimensional coordinates in the oblique photogrammetric 3D model coordinate system by this matrix to convert them into three-dimensional coordinates in the Earth-Centred Earth-Fixed (ECEF) coordinate system;
[0063] using the conversion method in the Cesium open-source library to convert the three- dimensional coordinates in the ECEF coordinate system into positioning coordinates for use by the UAV, comprising longitude, latitude, and altitude.
[0064] In a second aspect, the present application provides a three-dimensional spray flight path planning apparatus for autonomous UAV spraying, comprising:
[0065] a rendering module, configured to acquire an oblique photogrammetric three-dimensional model of a building to be sprayed and to render the oblique photogrammetric 3D model in a three-dimensional visualisation platform;
[0066] a coordinate conversion module, configured to perform coordinate system data conversion on the oblique photogrammetric 3D model in the three-dimensional visualisation platform, converting it into positioning coordinate data for use by the UAV, wherein the coordinate data comprises longitude, latitude, and altitude;
[0067] a spray work zone acquisition module, configured to draw a two-dimensional or three- dimensional spray mesh graphic on the oblique photogrammetric 3D model using a 3D model editing tool within the three-dimensional visualisation platform, to obtain a planar or curved spray work zone corresponding to the building surface to be sprayed; a spray flight path planning module, configured to apply a pixel-level flight path planning algorithm for a planar spray work zone of the building to be sprayed; to apply an improved A* algorithm adapted for full-coverage path planning for a curved spray workzone of the building to be sprayed; and in conjunction with the positioning coordinate data for the UAV, to generate a spray flight path for the UAV to perform automated spray coating of a building facade.
[0068] In a further embodiment, the spray work zone acquisition module is specifically configured to: use a line segment tool of the three-dimensional visualisation platform to delineate a closed three-dimensional mesh graphic on the surface of the building in the oblique photogrammetric 3D model using line segments;
[0069] based on the three-dimensional mesh graphic, compute the triangles that are respectively located inside the region, outside the region, and on the boundary of the region; use the region boundary to cut the triangles located on the boundary, so that each boundary triangle is divided into an interior portion and an exterior portion;
[0070] combine the interior portions of the boundary-cut triangles together with the triangles originally inside the region to form a new three-dimensional mesh graphic, wherein the new three-dimensional mesh graphic constitutes the curved spray work zone.
[0071] In a further embodiment, the spray work zone acquisition module is specifically configured to: use a point-selection tool of the three-dimensional visualisation platform to select at least six vertices on the building surface in the oblique photogrammetric 3D model, and fit a geometric plane to the selected vertices by means of the least squares method and matrix singular value decomposition (SVD), wherein the geometric plane serves as an auxiliary plane;
[0072] use a drawing tool of the three-dimensional visualisation platform to draw a two-dimensional mesh graphic on the auxiliary plane, wherein the two-dimensional mesh graphic constitutes the planar spray work zone.
[0073] In a further embodiment, the spray work zone acquisition module is specifically configured to: ensure that the planar spray work zone drawn on the auxiliary plane is conformally parallel to the building surface; if there exist non-sprayable areas on the building surface, use a non-sprayable area marking tool to mark a non-sprayable two-dimensional mesh graphic, so that such areas are avoided during the flight path generation process. In a further embodiment, the spray work zone acquisition module is specifically configured to: perform two-dimensional Boolean operations on the drawn two-dimensional mesh graphics, supporting union and difference operations among multiple two-dimensional mesh graphics; when two two-dimensional rectangular mesh graphics are drawn on the same auxiliary plane and partially overlap, if the colour adjustment tool of the three- dimensional visualisation platform is used to set them to the same colour, the two graphics will be merged into a single rectangular planar spray work zone; when they have different colours, the overlapping portion of the first-drawn graphic will besubtracted from the original region and will become part of the subsequently-drawn graphic.
[0074] In a further embodiment, the planar spray work zone defaults to a rectangular shape. The planar spray work zone supports the addition and deletion of vertices on the basis of the rectangular two-dimensional mesh graphic, and the dragging of existing vertex positions, so as to modify the shape of the two-dimensional mesh graphic. The modified shape may be a triangle, a trapezoid, a star, or a shape with holes.
[0075] In a further embodiment, the spray flight path planning module is specifically configured to: acquiring the two-dimensional mesh graphic of the building facade, i.e. the planar spray work zone, and converting the planar spray work zone data into a two-dimensional image; based on the converted two-dimensional image, generating a flight path in a pixel coordinate system, comprising the following specific steps:
[0076] expanding the non-sprayable area: determining an erosion kernel based on the width and height of the nozzle spray pattern, and applying the kernel to erode the image so as to expand the non-sprayable area, thereby protecting the non-sprayable area; performing flight path planning on the original spray work zone: generating grid coordinates for the flight path waypoints and the flight path index, and storing the actual coordinates of the waypoints;
[0077] if non-sprayable areas exist within the spray work zone, using the non-sprayable area in the two-dimensional image as a mask to apply to the initial flight path, regenerating new spray flight path segments, and simultaneously generating a map for use by the A* algorithm;
[0078] applying a nearest-distance rule to pair the spray flight path segments to be sprayed, so as to obtain the spraying sequence;
[0079] based on the pairing result, using the A* algorithm to connect the individual spray flight path segments to form a complete pixel-level flight path;
[0080] traversing each segment of the flight path, and adding nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the corresponding distances;
[0081] finally, post-processing the pixel-level flight path by converting the flight path in the pixel coordinate system into a flight path in the three-dimensional coordinate system required by the UAV.
[0082] In a further embodiment, the spray flight path planning module is specifically configured to: computing the size of the two-dimensional image and preparing a base map, wherein the base map is the minimum bounding rectangle calculated from the polygon vertex coordinates of the two-dimensional mesh graphic;determining the image width and height based on the physical width and height of the minimum bounding rectangle in conjunction with the pixel resolution set in the configuration file, and initialising a base map of all zeros according to the image width and height; converting the physical coordinates of the polygon vertices to be sprayed into pixel coordinates; using different grey levels to draw, respectively on the initialised base map, the normal spray work zone and the non-sprayable areas within the spray work zone.
[0083] In a further embodiment, the spray flight path planning module is specifically configured to: computing the spray width and spray height of the spray gun based on the set spray width and height parameters;
[0084] setting the spray interval according to the path priority, wherein the path priority is either verticalaxis-first or horizontal-axis-first;
[0085] adjusting the non-divisible remainder by computing the offset between the image dimensions and the spray interval, to ensure uniform coverage of the spray work zone over the image;
[0086] if vertical-axis-first is selected, generating a vertical-axis-first flight path grid;
[0087] if horizontal-axis-first is selected, generating a horizontal-axis-first flight path grid.
[0088] In a further embodiment, the spray flight path planning module is specifically configured to: creating an A* map for marking traversable areas;
[0089] traversing each waypoint to determine whether it is located within a sprayable area, comprising the following specific steps:
[0090] determining, according to the path priority, whether the waypoint lies outside the image boundary, i.e., whether it is a valid waypoint;
[0091] if the waypoint is within the sprayable work zone and not on the boundary, marking it as a traversable area in the A* map;
[0092] if the path is horizontal-axis-first, reversing the flight path so that the starting point of the spray flight path is at the upper position of the spray work zone plane;
[0093] returning the filtered obstacle-free waypoints and the map for use by the A* algorithm.
[0094] In a further embodiment, the spray flight path planning module is specifically configured to: acquiring the three-dimensional mesh graphic of the building wall surface, i.e. the curved spray work zone, and computing the vertex normal vectors; after loading the mesh graphic data, performing pre-processing comprising: converting the mesh data into point cloud data, filtering the point cloud data to remove noise points, and computing normal vectors based on the adjacency relationships among the mesh vertices; performing UAV body positioning: translating the pre-processed point cloud outward along the direction of the normal vectors by a set distance to obtain the target position of theUAV body, wherein the set distance is the sum of the distance from the nozzle to the UAV body positioning module and the optimal spray distance of the nozzle; optimising the path to achieve full-coverage spraying: applying a full-coverage path planning algorithm to connect the discrete UAV poses into a complete segmented flight path, comprising the following specific steps:
[0095] slicing the outward-translated point cloud along the Z-axis at the set spray interval, and performing voxel downsampling on each slice to generate individual strip-shaped point clouds; processing each strip-shaped point cloud as follows:
[0096] projecting the point cloud onto a horizontal plane to form two-dimensional points;
[0097] fitting a two-dimensional flight path to the two-dimensional points using the Douglas-Peucker algorithm;
[0098] adding the z-dimension to the two-dimensional flight path to restore it to a three-dimensional flight path;
[0099] connecting the fitted flight paths of each strip-shaped point cloud in three-dimensional flight path order to form a continuous flight path within the mesh graphic, wherein the flight heading of the path is the normal vector of the current path facing the wall surface; the fitted flight paths of the strip-shaped point clouds constitute the spray flight paths, and the line segments connecting adjacent fitted paths constitute the non-spray flight paths; traversing each segment of the flight path, and adding nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the corresponding distances;
[0100] performing flight path post-processing: computing the waypoint heading angle and the relative heading angle.
[0101] In a further embodiment, the spray flight path planning module is specifically configured to: converting the mesh graphic data into OFF format, and creating a triangle mesh object from the mesh data using the Open3D library;
[0102] sampling the mesh data into point cloud data: first computing the number of resampled point cloud points, then performing point cloud resampling using the Poisson disk sampling algorithm in the Open3D library;
[0103] performing smoothing and denoising on all resampled point cloud data: using the normal vector angles and the inter-point distances to perform clustering, filtering out points that do not satisfy the distance requirements and the normal vector angle requirements, and applying region-growing filtering to the point cloud to extract point cloud clusters that satisfy the normal vector angle and distance conditions.
[0104] In a further embodiment, the spray flight path planning module is specifically configured to:if the current flight path segment requires spraying, computing the spray direction and spray distance of the current segment based on the path priority;
[0105] if the spray distance of the current segment is greater than or equal to the sum of the nozzle activation and deactivation distances, adding nozzle activation and deactivation points; computing the position of the spray gun activation point at a distance from the starting point, and setting its spraying state to inactive;
[0106] computing the position of the spray gun deactivation point at a distance from the end point, and setting its spraying state to active;
[0107] setting the spraying state of both the starting point and the end point to inactive, and returning them to the flight path planning results.
[0108] In a further embodiment, the rendering module is specifically configured to:
[0109] conducting oblique photography using an oblique photography UAV, and performing three- dimensional modelling using a third-party modelling platform to obtain an oblique photogrammetric 3D model of the building to be sprayed;
[0110] establishing a three-dimensional visualisation platform supporting 3D editing tools, based on the three.js open-source library;
[0111] rendering the oblique photogrammetric 3D model tiles into the three-dimensional visualisation platform using the three.js rendering engine.
[0112] In a further embodiment, the coordinate conversion module is specifically configured to: the metadata of the oblique photogrammetric 3D model contains a matrix composed of 16 floating-point numbers, wherein the local coordinate system of this matrix is the East- North-Up (ENU) coordinate system; multiplying the three-dimensional coordinates in the oblique photogrammetric 3D model coordinate system by this matrix to convert them into three-dimensional coordinates in the Earth-Centred Earth-Fixed (ECEF) coordinate system;
[0113] using the conversion method in the Cesium open-source library to convert the three- dimensional coordinates in the ECEF coordinate system into positioning coordinates for use by the UAV, comprising longitude, latitude, and altitude.
[0114] ADVANTAGEOUS TECHNICAL EFFECTS
[0115] The present application achieves automated three-dimensional spray flight path planning for autonomous UAV spraying, enabling the spray UAV to complete spray coating tasks autonomously without manual intervention or assistance, thereby improving the level of automation of UAV spray operations. It ensures that the UAV reaches the designated position during spraying, achieves precise spray coating, and eliminates the need for traditional manual control of the UAV to spray building facades.The present application is capable of generating flight paths based on real-scene three-dimensional models of buildings. Combined with the parameters of the spray UAV, it can precisely control the spray coating range on the building facade, achieving high-precision positioning and spray coating.
[0116] The present application completes the delineation of the spray work zone based on a three-dimensional visualisation platform, and is capable of adapting to building facades of various complex shapes and structures (planar or curved). It also enables the spray coating of complex patterns and textures, thereby enhancing the aesthetic appearance of building facades.
[0117] The present application employs an improved A* algorithm adapted for full-coverage path planning, which, given a specified start point and end point, is capable of finding a feasible path from the start point to the end point that covers all key points in a given region, achieving comprehensive coverage of the spray work zone. This ensures that the spray UAV can visit and cover every area of the environment, thereby avoiding missed spraying.
[0118] BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a flow diagram of the three-dimensional spray flight path planning method for autonomous UAV spraying provided by the present application;
[0119] FIG. 2 is a schematic diagram of the drawing process for the curved and planar spray work zones provided by the present application;
[0120] FIG. 3 is a flow diagram of the spray flight path planning algorithm for a curved building spray work zone provided by the present application;
[0121] FIG. 4 is a flow diagram of the spray flight path planning algorithm for a planar building spray work zone provided by the present application;
[0122] FIG. 5 is a structural block diagram of the three-dimensional spray flight path planning apparatus for autonomous UAV spraying provided by the present application;
[0123] FIG. 6 is a schematic diagram of the spray flight path planning result for a planar building spray work zone provided by the present application;
[0124] FIG. 7 is a schematic diagram of the spray flight path planning result for a curved building spray work zone provided by the present application.
[0125] In the drawings: 1 denotes a regular planar building; 2 denotes a planar spray work zone; 3 denotes the spray flight path of the planar spray work zone; 4 denotes a curved spray work zone; 5 denotes a curved special-shaped building; 6 denotes the spray flight path of the curved spray work zone; 100 denotes the rendering module; 200 denotes the coordinate conversionmodule; 300 denotes the spray work zone acquisition module; 400 denotes the spray flight path planning module.
[0126] DESCRIPTION OF EMBODIMENTS
[0127] In order to render the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions of the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.
[0128] The present application provides a three-dimensional spray flight path planning method for autonomous UAV spraying, as shown in FIG. 1, comprising the following steps:
[0129] 51. Acquiring an oblique photogrammetric three-dimensional model of a building to be sprayed, and rendering the oblique photogrammetric 3D model in a three-dimensional visualisation platform, comprising the following specific steps:
[0130] conducting oblique photography using an oblique photography UAV, and performing three- dimensional modelling using a third-party modelling platform to obtain an oblique photogrammetric 3D model of the building to be sprayed;
[0131] establishing a three-dimensional visualisation platform supporting 3D editing tools, based on the three.js open-source library;
[0132] finally, rendering the oblique photogrammetric 3D model tiles into the three-dimensional visualisation platform using the three.js rendering engine.
[0133] 52. Performing coordinate system data conversion on the oblique photogrammetric 3D model in the three-dimensional visualisation platform, converting it into positioning coordinate data for use by the UAV, comprising the following specific steps:
[0134] the metadata of the oblique photogrammetric 3D model contains a matrix composed of 16 floating-point numbers, wherein the local coordinate system of this matrix is the East- North-Up (ENU) coordinate system; multiplying the three-dimensional coordinates in the 3D model coordinate system by this matrix converts them into three-dimensional coordinates in the Earth-Centred Earth-Fixed (ECEF) coordinate system;
[0135] using the Cartographic.fromCartesian conversion method in the Cesium open-source library to convert the three-dimensional coordinates in the ECEF coordinate system into positioning coordinates for use by the UAV, comprising longitude, latitude, and altitude (WGS84 coordinate system).
[0136] 53. Drawing a two-dimensional or three-dimensional spray mesh graphic on the oblique photogrammetric 3D model using a 3D model editing tool within the three-dimensional visualisation platform, to obtain a planar or curved spray work zone corresponding to the building surface to be sprayed.This step involves two types of spray work zone: the curved spray work zone and the planar spray work zone. The delineation steps for the two types differ, as shown in FIG. 2. A three-dimensional visualisation platform is established using Three.js and the oblique photogrammetric 3D model of the building to be sprayed is rendered therein. The specific steps for obtaining the curved spray work zone corresponding to the building surface to be sprayed are as follows:
[0137] 531. Using the line segment tool of the three-dimensional visualisation platform to delineate a closed three-dimensional mesh graphic (curved spray work zone) on the surface of the building in the oblique photogrammetric 3D model using line segments.
[0138] 532. Based on the three-dimensional mesh graphic, computing the triangles that are respectively located inside the region, outside the region, and on the boundary of the region within the three-dimensional mesh graphic.
[0139] 533. For the triangles located on the boundary, using the region boundary to cut these triangles, so that each boundary triangle is divided into an interior portion and an exterior portion.
[0140] 534. Combining the interior portions of the boundary-cut triangles with the triangles originally inside the region to form a new three-dimensional mesh graphic; the new three- dimensional mesh graphic constitutes the curved spray work zone.
[0141] The specific steps for obtaining the planar spray work zone corresponding to the building surface to be sprayed are as follows:
[0142] 535. Using the point-selection tool of the three-dimensional visualisation platform to select at least six vertices on the building surface in the oblique photogrammetric 3D model, and fitting a geometric plane to these three-dimensional vertices by means of the least squares method and matrix singular value decomposition (SVD). This geometric plane is substantially parallel to the exterior wall of the building model to be sprayed, and serves as the auxiliary plane.
[0143] 536. Using the drawing tool of the three-dimensional visualisation platform to draw a two- dimensional mesh graphic (planar spray work zone) on the auxiliary plane. The two- dimensional mesh graphic is the planar spray work zone. The spray work zone drawn on the auxiliary plane will be conformally parallel to the building surface. If there exist non-sprayable areas on the building surface, the non-sprayable area marking tool may be used to mark non-sprayable two-dimensional mesh graphics, which will be avoided during the flight path generation process.
[0144] Furthermore, the following functions are supported within the three-dimensional visualisation platform of the present application for drawing two-dimensional mesh graphics (planar spray work zones):
[0145] On one hand, the planar spray work zone defaults to a rectangular shape. Vertices may be added and deleted on the basis of the rectangular two-dimensional mesh graphic, and existing vertex positions may be dragged to modify the shape of the two-dimensionalmesh graphic (planar spray work zone), enabling the creation of various two- dimensional shapes including triangles, trapezoids, stars, and shapes with holes. On the other hand, two-dimensional Boolean operations are performed on the drawn two- dimensional mesh graphics (planar spray work zones), supporting union and difference operations among multiple two-dimensional mesh graphics (planar spray work zones). When two two-dimensional rectangular mesh graphics (rectangular planar spray work zones) are drawn on the same auxiliary plane and they partially overlap, if the colour adjustment tool of the three-dimensional visualisation platform is used to set both to the same colour (i.e. the spray work zone is to be coated with the same colour of paint), the two two-dimensional rectangular mesh graphics will be merged into a single rectangular planar spray work zone. When the two graphics have different colours, the overlapping portion of the first-drawn graphic will be subtracted from the original region and will become part of the subsequently-drawn two- dimensional rectangular mesh graphic.
[0146] S4. For a planar spray work zone of the building to be sprayed, applying a pixel-level flight path planning algorithm; for a curved spray work zone of the building to be sprayed, applying an improved A* algorithm adapted for full-coverage path planning; and in conjunction with the positioning coordinate data for the UAV, generating a spray flight path for the UAV to perform automated spray coating of a building facade.
[0147] Specifically, as shown in FIG. 3 and FIG. 7, for a curved spray work zone, i.e. when the target spray work zone on the building surface is curved, the specific path planning steps for the spray flight path 6 of the curved spray work zone are as follows:
[0148] S41. Acquiring the three-dimensional mesh graphic of the wall surface of the curved specialshaped building 5 (i.e., the curved spray work zone 4) and computing the vertex normal vectors. After loading the mesh graphic data, performing pre-processing comprising: converting the mesh data into point cloud data, filtering the point cloud data to remove noise points, and computing normal vectors based on the adjacency relationships among the mesh vertices. The specific steps are as follows:
[0149] 5411. Converting the spray work zone mesh data drawn on the building surface into OFF format, and creating a triangle mesh object from the mesh data using the Open3D library. 5412. Sampling the mesh data into point cloud data: first computing the number of resampled point cloud points, then performing point cloud resampling using the Poisson disk sampling algorithm (poisson_disk) in the Open3D library.
[0150] 5413. Performing smoothing and denoising on all resampled point cloud data. Using the normal vector angles and the inter-point distances to perform clustering, filtering out points that do not satisfy the distance requirements (positional outliers) and the normal vector angle requirements (normal vector outliers), and applying region-growing filtering tothe point cloud to extract point cloud clusters that satisfy the normal vector angle and distance conditions.
[0151] 542. UAV body positioning: translating the pre-processed point cloud outward along the direction of the normal vectors by a set distance. The set distance is generally the sum of the distance from the nozzle to the UAV body positioning module and the optimal spray distance of the nozzle. The target position of the UAV body is thereby obtained.
[0152] 543. Optimising the path to achieve full-coverage spraying. Applying a full-coverage path planning algorithm to connect the discrete UAV poses into a complete segmented flight path. The specific steps are as follows:
[0153] 5431. Slicing the outward-translated point cloud along the Z-axis at the set spray interval, and performing voxel downsampling on each slice to generate individual strip-shaped point clouds.
[0154] 5432. Processing each strip-shaped point cloud as follows:
[0155] projecting the point cloud onto a horizontal plane to form two-dimensional points (this step retains only the XY coordinates of the point cloud, for use in subsequent flight path fitting);
[0156] fitting a flight path to the two-dimensional points using the Douglas-Peucker algorithm (to reduce unnecessary waypoints);
[0157] restoring the two-dimensional flight path to a three-dimensional flight path (by adding the z- dimension; the z-value of each flight path generated from a strip-shaped point cloud corresponds to the z-coordinate of the centre point of that strip-shaped point cloud).
[0158] 5433. Connecting the fitted flight paths of each strip-shaped point cloud in flight path order to form a continuous flight path within the mesh graphic. The flight heading of the path is the normal vector of the current path facing the wall surface. The fitted flight paths of the strip-shaped point clouds constitute the spray flight paths, and the line segments connecting adjacent fitted flight paths constitute the non-spray flight paths.
[0159] 5434. Traversing each segment of the flight path, and adding nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the appropriate distances. The specific steps are as follows:
[0160] if the current flight path segment requires spraying, computing the spray direction and spray distance of the current segment based on the path priority (horizontal-axis-first or vertical-axis- first);
[0161] if the spray distance of the current segment is greater than or equal to the sum of the nozzle activation and deactivation distances, adding nozzle activation and deactivation points; computing the position of the spray gun activation point at a distance from the starting point, and setting its spraying state to inactive;computing the position of the spray gun deactivation point at a distance from the end point, and setting its spraying state to active;
[0162] setting the spraying state of both the starting point and the end point to inactive, and returning them to the flight path planning results.
[0163] 544. Finally, performing flight path post-processing: computing the waypoint heading angle and the relative heading angle (i.e. the angle through which the UAV needs to turn upon reaching the designated position).
[0164] Specifically, as shown in FIG. 4 and FIG. 6, for a planar spray work zone, i.e. when the target spray work zone on the building surface is planar, the specific path planning steps for the spray flight path 3 of the planar spray work zone are as follows:
[0165] 545. Acquiring the two-dimensional mesh graphic of the facade of the regular planar building 1 (i.e., the planar spray work zone 2), and converting the planar spray work zone data into a two-dimensional image. The specific steps are as follows:
[0166] 5451. Computing the size of the two-dimensional image and preparing a base map: the base map is the minimum bounding rectangle calculated from the polygon vertex coordinates of the two-dimensional mesh graphic.
[0167] 5452. Determining the image width and height based on the physical width and height of the minimum bounding rectangle in conjunction with the pixel resolution set in the configuration file, and initialising a base map of all zeros according to the image width and height.
[0168] 5453. Converting the physical coordinates of the polygon vertices to be sprayed into pixel coordinates.
[0169] 5454. Using different grey levels to draw, respectively on the base map, the normal spray work zone and the non-sprayable areas within the spray work zone.
[0170] 546. Based on the converted two-dimensional image, implementing pixel-level flight path planning to generate a flight path in a pixel coordinate system. The specific steps are as follows:
[0171] 5461. Expanding the non-sprayable area: determining an erosion kernel based on the width and height of the nozzle spray pattern, and applying the kernel to erode the image so as to expand the non-sprayable area, protecting the non-sprayable area and preventing paint from being inadvertently applied thereto during the spray operation.
[0172] 5462. Performing flight path planning on the original spray work zone:
[0173] computing the spray width and spray height of the spray gun based on the set spray width and height parameters;
[0174] setting the spray interval according to the path priority (vertical-axis-first or horizontal-axis-first); adjusting the non-divisible remainder by computing the offset between the image dimensions and the spray interval, to ensure uniform coverage of the spray work zone over the image;generating grid coordinates for the flight path waypoints: if vertical-axis-first, generating a vertical-axis-first flight path grid; if horizontal-axis-first, generating a horizontal-axis- first flight path grid;
[0175] generating the flight path index and storing the actual coordinates of the waypoints.
[0176] 5463. If non-sprayable areas exist within the spray work zone, using the non-sprayable area in the two-dimensional image as a mask to apply to the initial flight path, regenerating new spray flight path segments, and simultaneously generating a map for use by the A* algorithm. The specific steps for generating the A* map are as follows: creating an A* map for marking traversable areas;
[0177] traversing each waypoint to determine whether it is within a sprayable area: determining, according to the path priority (horizontal-axis-first or vertical-axis-first), whether the waypoint lies outside the image boundary (i.e., whether it is a valid waypoint); if the waypoint is within the sprayable work zone and not on the boundary, marking it as a traversable area in the A* map;
[0178] if the path is horizontal-axis-first, reversing the flight path so that the starting point of the spray flight path is at the upper position of the spray work zone plane;
[0179] finally, returning the filtered obstacle-free waypoints and the map for use by the A* algorithm.
[0180] 5464. Applying a nearest-distance rule to pair the spray flight path segments to be sprayed, so as to obtain the spraying sequence.
[0181] 5465. Based on the pairing result, using the A* algorithm to connect the individual spray flight path segments to form a complete pixel-level flight path.
[0182] 5466. Traversing each segment of the flight path, and adding nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the appropriate distances. The specific steps are as follows:
[0183] if the current flight path segment requires spraying, computing the spray direction and spray distance of the current segment based on the path priority (horizontal-axis-first or vertical-axis- first);
[0184] if the spray distance of the current segment is greater than or equal to the sum of the nozzle activation and deactivation distances, adding nozzle activation and deactivation points; computing the position of the spray gun activation point at a distance from the starting point, and setting its spraying state to inactive;
[0185] computing the position of the spray gun deactivation point at a distance from the end point, and setting its spraying state to active;
[0186] setting the spraying state of both the starting point and the end point to inactive, and returning them to the flight path planning results.S47. Finally, post-processing the pixel-level flight path by converting the flight path in the pixel coordinate system into a flight path in the three-dimensional coordinate system required by the UAV.
[0187] As shown in FIG. 5, the present application further provides a three-dimensional spray flight path planning apparatus for autonomous UAV spraying, comprising:
[0188] Rendering module 100, configured to acquire an oblique photogrammetric 3D model of a building to be sprayed and to render the oblique photogrammetric 3D model in a three- dimensional visualisation platform.
[0189] In one embodiment of the present application, the rendering module 100 is specifically configured to:
[0190] conduct oblique photography using an oblique photography UAV, and perform three- dimensional modelling using a third-party modelling platform to obtain an oblique photogrammetric 3D model of the building to be sprayed;
[0191] establish a three-dimensional visualisation platform supporting 3D editing tools, based on the three.js open-source library;
[0192] render the oblique photogrammetric 3D model tiles into the three-dimensional visualisation platform using the three.js rendering engine.
[0193] Coordinate conversion module 200, configured to perform coordinate system data conversion on the oblique photogrammetric 3D model in the three-dimensional visualisation platform, converting it into positioning coordinate data for use by the UAV, wherein the coordinate data comprises longitude, latitude, and altitude.
[0194] In one embodiment of the present application, the coordinate conversion module 200 is specifically configured to:
[0195] the metadata of the oblique photogrammetric 3D model contains a matrix composed of 16 floating-point numbers, wherein the local coordinate system of this matrix is the East- North-Up (ENU) coordinate system; multiplying the three-dimensional coordinates in the oblique photogrammetric 3D model coordinate system by this matrix converts them into three-dimensional coordinates in the Earth-Centred Earth-Fixed (ECEF) coordinate system;
[0196] using the conversion method in the Cesium open-source library to convert the three- dimensional coordinates in the ECEF coordinate system into positioning coordinates for use by the UAV, comprising longitude, latitude, and altitude.
[0197] Spray work zone acquisition module 300, configured to draw a two-dimensional or three- dimensional spray mesh graphic on the oblique photogrammetric 3D model using a 3D model editing tool within the three-dimensional visualisation platform, to obtain a planar or curved spray work zone corresponding to the building surface to be sprayed.In one embodiment of the present application, the spray work zone acquisition module 300 is specifically configured to:
[0198] use a line segment tool of the three-dimensional visualisation platform to delineate a closed three-dimensional mesh graphic on the surface of the building in the oblique photogrammetric 3D model using line segments;
[0199] based on the three-dimensional mesh graphic, compute the triangles that are respectively located inside the region, outside the region, and on the boundary of the region; use the region boundary to cut the triangles located on the boundary, so that each boundary triangle is divided into an interior portion and an exterior portion;
[0200] combine the interior portions of the boundary-cut triangles together with the triangles originally inside the region to form a new three-dimensional mesh graphic, wherein the new three-dimensional mesh graphic constitutes the curved spray work zone.
[0201] In one embodiment of the present application, the spray work zone acquisition module 300 is specifically configured to:
[0202] use a point-selection tool of the three-dimensional visualisation platform to select at least six vertices on the building surface in the oblique photogrammetric 3D model, and fit a geometric plane to the selected vertices by means of the least squares method and matrix singular value decomposition (SVD), wherein the geometric plane serves as an auxiliary plane;
[0203] use a drawing tool of the three-dimensional visualisation platform to draw a two-dimensional mesh graphic on the auxiliary plane, wherein the two-dimensional mesh graphic constitutes the planar spray work zone.
[0204] In one embodiment of the present application, the spray work zone acquisition module 300 is specifically configured to:
[0205] ensure that the planar spray work zone drawn on the auxiliary plane is conformally parallel to the building surface; if there exist non-sprayable areas on the building surface, use a non-sprayable area marking tool to mark a non-sprayable two-dimensional mesh graphic, so that such areas are avoided during the flight path generation process.
[0206] In one embodiment of the present application, the spray work zone acquisition module 300 is specifically configured to:
[0207] perform two-dimensional Boolean operations on the drawn two-dimensional mesh graphics, supporting union and difference operations among multiple two-dimensional mesh graphics; when two two-dimensional rectangular mesh graphics drawn on the same auxiliary plane partially overlap and are set to the same colour, the two graphics willbe merged into a single rectangular planar spray work zone; when they have different colours, the overlapping portion of the first-drawn graphic will be subtracted from the original region and will become part of the subsequently-drawn graphic.
[0208] Furthermore, the planar spray work zone defaults to a rectangular shape. The planar spray work zone supports the addition and deletion of vertices on the basis of the rectangular two-dimensional mesh graphic, and the dragging of existing vertex positions, so as to modify the shape of the two-dimensional mesh graphic. The modified shape may be a triangle, a trapezoid, a star, or a shape with holes.
[0209] Spray flight path planning module 400, configured to apply a pixel-level flight path planning algorithm for a planar spray work zone of the building to be sprayed; to apply an improved A* algorithm adapted for full-coverage path planning for a curved spray work zone of the building to be sprayed; and in conjunction with the positioning coordinate data for the UAV, to generate a spray flight path for the UAV to perform automated spray coating of a building facade.
[0210] In one embodiment of the present application, the spray flight path planning module 400 is specifically configured to:
[0211] acquire the two-dimensional mesh graphic of the building facade, i.e. the planar spray work zone, and convert the planar spray work zone data into a two-dimensional image; based on the converted two-dimensional image, generate a flight path in a pixel coordinate system:
[0212] expanding the non-sprayable area: determining an erosion kernel based on the width and height of the nozzle spray pattern, and applying the kernel to erode the image so as to expand the non-sprayable area, thereby protecting the non-sprayable area; performing flight path planning on the original spray work zone: generating grid coordinates for the flight path waypoints and the flight path index, and storing the actual coordinates of the waypoints;
[0213] if non-sprayable areas exist within the spray work zone, using the non-sprayable area in the two-dimensional image as a mask to apply to the initial flight path, regenerating new spray flight path segments, and simultaneously generating a map for use by the A* algorithm;
[0214] applying a nearest-distance rule to pair the spray flight path segments to obtain the spraying sequence;
[0215] based on the pairing result, using the A* algorithm to connect the individual spray flight path segments to form a complete pixel-level flight path;
[0216] traversing each segment of the flight path, and adding nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the corresponding distances;finally, post-processing the pixel-level flight path by converting the flight path in the pixel coordinate system into a flight path in the three-dimensional coordinate system required by the UAV.
[0217] In one embodiment of the present application, the spray flight path planning module 400 is specifically configured to:
[0218] compute the size of the two-dimensional image and prepare a base map, wherein the base map is the minimum bounding rectangle calculated from the polygon vertex coordinates of the two-dimensional mesh graphic;
[0219] determine the image width and height based on the physical width and height of the minimum bounding rectangle in conjunction with the pixel resolution set in the configuration file, and initialise a base map of all zeros;
[0220] convert the physical coordinates of the polygon vertices to be sprayed into pixel coordinates; use different grey levels to draw, respectively on the initialised base map, the normal spray work zone and the non-sprayable areas within the spray work zone.
[0221] In one embodiment of the present application, the spray flight path planning module 400 is specifically configured to:
[0222] compute the spray width and spray height of the spray gun based on the set spray width and height parameters;
[0223] set the spray interval according to the path priority, wherein the path priority is either verticalaxis-first or horizontal-axis-first;
[0224] adjust the non-divisible remainder by computing the offset between the image dimensions and the spray interval, to ensure uniform coverage of the spray work zone over the image; if vertical-axis-first is selected, generate a vertical-axis-first flight path grid;
[0225] if horizontal-axis-first is selected, generate a horizontal-axis-first flight path grid.
[0226] In one embodiment of the present application, the spray flight path planning module 400 is specifically configured to:
[0227] create an A* map for marking traversable areas;
[0228] traverse each waypoint to determine whether it is within a sprayable area:
[0229] determine, according to the path priority, whether the waypoint lies outside the image boundary, i.e., whether it is a valid waypoint;
[0230] if the waypoint is within the sprayable work zone and not on the boundary, mark it as a traversable area in the A* map;
[0231] if the path is horizontal-axis-first, reverse the flight path so that the starting point of the spray flight path is at the upper position of the spray work zone plane;
[0232] return the filtered obstacle-free waypoints and the map for use by the A* algorithm.In one embodiment of the present application, the spray flight path planning module 400 is specifically configured to:
[0233] acquire the three-dimensional mesh graphic of the building wall surface, i.e. the curved spray work zone, and compute the vertex normal vectors; after loading the mesh graphic data, perform pre-processing comprising: converting the mesh data into point cloud data, filtering the point cloud data to remove noise points, and computing normal vectors based on the adjacency relationships among the mesh vertices; perform UAV body positioning: translate the pre-processed point cloud outward along the direction of the normal vectors by a set distance to obtain the target position of the UAV body, wherein the set distance is the sum of the distance from the nozzle to the UAV body positioning module and the optimal spray distance of the nozzle; optimise the path to achieve full-coverage spraying: apply a full-coverage path planning algorithm to connect the discrete UAV poses into a complete segmented flight path: slice the outward-translated point cloud along the Z-axis at the set spray interval, and perform voxel downsampling on each slice to generate individual strip-shaped point clouds; process each strip-shaped point cloud as follows:
[0234] project the point cloud onto a horizontal plane to form two-dimensional points;
[0235] fit a two-dimensional flight path to the two-dimensional points using the Douglas-Peucker algorithm;
[0236] add the z-dimension to the two-dimensional flight path to restore it to a three-dimensional flight path;
[0237] connect the fitted flight paths of each strip-shaped point cloud in three-dimensional flight path order to form a continuous flight path within the mesh graphic; the flight heading of the path is the normal vector of the current path facing the wall surface; the fitted flight paths of the strip-shaped point clouds constitute the spray flight paths, and the line segments connecting adjacent fitted paths constitute the non-spray flight paths; traverse each segment of the flight path, and add nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the corresponding distances;
[0238] perform flight path post-processing: compute the waypoint heading angle and the relative heading angle.
[0239] In one embodiment of the present application, the spray flight path planning module 400 is specifically configured to:
[0240] convert the mesh graphic data into OFF format, and create a triangle mesh object from the mesh data using the Open3D library;
[0241] sample the mesh data into point cloud data: first compute the number of resampled point cloud points, then perform point cloud resampling using the Poisson disk sampling algorithm in the Open3D library;perform smoothing and denoising on all resampled point cloud data: use the normal vector angles and the inter-point distances to perform clustering, filter out points that do not satisfy the distance requirements and the normal vector angle requirements, and apply region-growing filtering to extract point cloud clusters that satisfy the normal vector angle and distance conditions.
[0242] In one embodiment of the present application, the spray flight path planning module 400 is specifically configured to:
[0243] if the current flight path segment requires spraying, compute the spray direction and spray distance of the current segment based on the path priority;
[0244] if the spray distance of the current segment is greater than or equal to the sum of the nozzle activation and deactivation distances, add nozzle activation and deactivation points; compute the position of the spray gun activation point at a distance from the starting point, and set its spraying state to inactive;
[0245] compute the position of the spray gun deactivation point at a distance from the end point, and set its spraying state to active;
[0246] set the spraying state of both the starting point and the end point to inactive, and return them to the flight path planning results.
[0247] The foregoing descriptions represent only preferred embodiments of the present application. It should be understood that the present application is not limited to the forms disclosed herein, and should not be construed as excluding other embodiments. Rather, it may be used in various other combinations, modifications, and environments, and may be modified within the scope of the inventive concept described herein through the teachings above or through the skill or knowledge of the relevant field. Modifications and variations made by persons skilled in the art that do not depart from the spirit and scope of the present application shall fall within the scope of protection of the appended claims of the present application.
Claims
CLAIMS1. A three-dimensional spray flight path planning method for autonomous unmanned aerial vehicle (UAV) spraying, characterised in that the method comprises the following steps:
51. Acquiring an oblique photogrammetric three-dimensional model of a building to be sprayed, and rendering the oblique photogrammetric 3D model in a three-dimensional visualisation platform;52. Performing coordinate system data conversion on the oblique photogrammetric 3D model in the three-dimensional visualisation platform, converting it into positioning coordinate data for use by the UAV, wherein the coordinate data comprises longitude, latitude, and altitude; 53. Drawing a two-dimensional or three-dimensional spray mesh graphic on the oblique photogrammetric 3D model using a 3D model editing tool within the three-dimensional visualisation platform, to obtain a planar or curved spray work zone corresponding to the building surface to be sprayed;54. For a planar spray work zone of the building to be sprayed, applying a pixel-level flight path planning algorithm; for a curved spray work zone of the building to be sprayed, applying an improved A* algorithm adapted for full-coverage path planning; and in conjunction with the positioning coordinate data for the UAV, generating a spray flight path for the UAV to perform automated spray coating of a building facade.
2. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 1, characterised in that drawing a three-dimensional spray mesh graphic on the oblique photogrammetric 3D model using the 3D model editing tool within the three-dimensional visualisation platform, to obtain a curved spray work zone corresponding to the building surface to be sprayed, specifically comprises:using a line segment tool of the three-dimensional visualisation platform to delineate a closed three-dimensional mesh graphic on the surface of the building in the oblique photogrammetric 3D model using line segments;based on the three-dimensional mesh graphic, computing the triangles that are respectively located inside the region, outside the region, and on the boundary of the region within the three-dimensional mesh graphic;using the region boundary to cut the triangles located on the boundary, so that each boundary triangle is divided into an interior portion and an exterior portion;combining the interior portions of the boundary-cut triangles together with the triangles originally located inside the region to form a new three-dimensional mesh graphic, wherein the new three-dimensional mesh graphic constitutes the curved spray work zone.
3. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 1, characterised in that drawing a two-dimensional spray mesh graphic on the oblique photogrammetric 3D model using the 3D model editing tool within the three-dimensional visualisation platform, to obtain a planar spray work zone corresponding to the building surface to be sprayed, specifically comprises:using a point-selection tool of the three-dimensional visualisation platform to select at least six vertices on the building surface in the oblique photogrammetric 3D model, and fitting a geometric plane to the selected vertices by means of the least squares method and matrix singular value decomposition (SVD), wherein the geometric plane serves as an auxiliary plane; using a drawing tool of the three-dimensional visualisation platform to draw a two-dimensional mesh graphic on the auxiliary plane, wherein the two-dimensional mesh graphic constitutes the planar spray work zone.
4. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 3, characterised in that drawing a two-dimensional spray mesh graphic on the oblique photogrammetric 3D model using the 3D model editing tool within the three-dimensional visualisation platform, to obtain a planar spray work zone corresponding to the building surface to be sprayed, further specifically comprises:the planar spray work zone drawn on the auxiliary plane is conformally parallel to the building surface; if there exist non-sprayable areas on the building surface, a non-sprayable area marking tool is used to mark a non-sprayable two-dimensional mesh graphic, so that such areas are avoided during the flight path generation process.
5. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 3, characterised in that drawing a two-dimensional spray mesh graphic on the oblique photogrammetric 3D model using the 3D model editing tool within the three-dimensional visualisation platform, to obtain a planar spray work zone corresponding to the building surface to be sprayed, further specifically comprises:performing two-dimensional Boolean operations on the drawn two-dimensional mesh graphics, supporting union and difference operations among multiple two-dimensional mesh graphics; when two two-dimensional rectangular mesh graphics are drawn on the same auxiliary plane and they partially overlap, if the colour adjustment tool of the three-dimensional visualisation platform is used to set both two-dimensional rectangular mesh graphics to the same colour, meaning the spray work zone will be coated with the same colour of paint, the two two-dimensional rectangular mesh graphics will be merged into a single rectangular planar spray work zone; when the two two-dimensional rectangular mesh graphics have different colours, the overlapping portion of the first-drawn rectangular mesh graphic will be subtracted from the original region and will become part of the subsequently-drawn two-dimensional rectangularmesh graphic.
6. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 1 , characterised in that the planar spray work zone defaults to a rectangular shape; the planar spray work zone supports the addition and deletion of vertices on the basis of the rectangular two-dimensional mesh graphic, and the dragging of existing vertex positions, so as to modify the shape of the two-dimensional mesh graphic; the modified two-dimensional mesh graphic may take the shape of a triangle, a trapezoid, a star, or a shape with holes.
7. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 1, characterised in that for a planar spray work zone of the building to be sprayed, applying a pixel-level flight path planning algorithm and, in conjunction with the positioning coordinate data for the UAV, generating a spray flight path for the UAV to perform automated spray coating of a building facade, comprises the following specific steps: acquiring the two-dimensional mesh graphic of the building facade, i.e. the planar spray work zone, and converting the planar spray work zone data into a two-dimensional image; based on the converted two-dimensional image, generating a flight path in a pixel coordinate system, comprising the following specific steps:expanding the non-sprayable area: determining an erosion kernel based on the width and height of the nozzle spray pattern, and applying the kernel to erode the image so as to expand the non-sprayable area, thereby protecting the non-sprayable area;performing flight path planning on the original spray work zone: generating grid coordinates for the flight path waypoints and the flight path index, and storing the actual coordinates of the waypoints;if non-sprayable areas exist within the spray work zone, using the non-sprayable area in the two-dimensional image as a mask to apply to the initial flight path, regenerating new spray flight path segments, and simultaneously generating a map for use by the A* algorithm; applying a nearest-distance rule to pair the spray flight path segments to be sprayed, so as to obtain the spraying sequence;based on the pairing result, using the A* algorithm to connect the individual spray flight path segments to form a complete pixel-level flight path;traversing each segment of the flight path, and adding nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the corresponding distances;finally, post-processing the pixel-level flight path by converting the flight path in the pixel coordinate system into a flight path in the three-dimensional coordinate system required by the UAV.
8. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 7, characterised in that converting the planar spray work zone data into a two-dimensional image specifically comprises:computing the size of the two-dimensional image and preparing a base map, wherein the base map is the minimum bounding rectangle calculated from the polygon vertex coordinates of the two-dimensional mesh graphic;determining the image width and height based on the physical width and height of the minimum bounding rectangle in conjunction with the pixel resolution set in the configuration file, and initialising a base map of all zeros according to the image width and height;converting the physical coordinates of the polygon vertices to be sprayed into pixel coordinates; using different grey levels to draw, respectively on the initialised base map, the normal spray work zone and the non-sprayable areas within the spray work zone.
9. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 7, characterised in that performing flight path planning on the original spray work zone and generating grid coordinates for the flight path waypoints specifically comprises: computing the spray width and spray height of the spray gun based on the set spray width and height parameters;setting the spray interval according to the path priority, wherein the path priority is either verticalaxis-first or horizontal-axis-first;adjusting the non-divisible remainder by computing the offset between the image dimensions and the spray interval, to ensure uniform coverage of the spray work zone over the image; if vertical-axis-first is selected, generating a vertical-axis-first flight path grid;if horizontal-axis-first is selected, generating a horizontal-axis-first flight path grid.
10. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 7, characterised in that generating the map for use by the A* algorithm specifically comprises:creating an A* map for marking traversable areas;traversing each waypoint to determine whether it is located within a sprayable area, comprising the following specific steps:determining, according to the path priority, whether the waypoint lies outside the image boundary, i.e. whether it is a valid waypoint;if the waypoint is within the sprayable work zone and not on the boundary, marking it as a traversable area in the A* map;if the path is horizontal-axis-first, reversing the flight path so that the starting point of the spray flight path is at the upper position of the spray work zone plane;returning the filtered obstacle-free waypoints and the map for use by the A* algorithm.
11. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 1, characterised in that for a curved spray work zone of the building to be sprayed, applying an improved A* algorithm adapted for full-coverage path planning and, in conjunction with the positioning coordinate data for the UAV, generating a spray flight path for the UAV to perform automated spray coating of a building facade, comprises the following specific steps:acquiring the three-dimensional mesh graphic of the building wall surface, i.e. the curved spray work zone, and computing the vertex normal vectors; after loading the mesh graphic data, performing pre-processing comprising: converting the mesh data into point cloud data, filtering the point cloud data to remove noise points, and computing normal vectors based on the adjacency relationships among the mesh vertices;performing UAV body positioning: translating the pre-processed point cloud outward along the direction of the normal vectors by a set distance to obtain the target position of the UAV body, wherein the set distance is the sum of the distance from the nozzle to the UAV body positioning module and the optimal spray distance of the nozzle;optimising the path to achieve full-coverage spraying: applying a full-coverage path planning algorithm to connect the discrete UAV poses into a complete segmented flight path, comprising the following specific steps:slicing the outward-translated point cloud along the Z-axis at the set spray interval, and performing voxel downsampling on each slice to generate individual strip-shaped point clouds; processing each strip-shaped point cloud as follows:projecting the point cloud onto a horizontal plane to form two-dimensional points;fitting a two-dimensional flight path to the two-dimensional points using the Douglas-Peucker algorithm;adding the z-dimension to the two-dimensional flight path to restore it to a three-dimensional flight path;connecting the fitted flight paths of each strip-shaped point cloud in three-dimensional flight path order to form a continuous flight path within the mesh graphic, wherein the flight heading of the path is the normal vector of the current path facing the wall surface; the fitted flight paths of the strip-shaped point clouds constitute the spray flight paths, and the line segments connecting the fitted paths of adjacent strip-shaped point clouds constitute the non-spray flight paths;traversing each segment of the flight path, and adding nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the corresponding distances;performing flight path post-processing: computing the waypoint heading angle and the relative heading angle.
12. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 11, characterised in that converting the mesh data into point cloud data, filtering the point cloud data to remove noise points, and computing normal vectors based on the adjacency relationships among the mesh vertices, specifically comprises: converting the mesh graphic data into OFF format, and creating a triangle mesh object from the mesh data using the Open3D library;sampling the mesh data into point cloud data: first computing the number of resampled point cloud points, then performing point cloud resampling using the Poisson disk sampling algorithm in the Open3D library;performing smoothing and denoising on all resampled point cloud data: using the normal vector angles and the inter-point distances to perform clustering, filtering out points that do not satisfy the distance requirements and the normal vector angle requirements, and applying regiongrowing filtering to the point cloud to extract point cloud clusters that satisfy the normal vector angle and distance conditions.
13. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 7 or claim 11, characterised in that traversing each segment of the flight path and adding nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the corresponding distances, comprises the following specific steps:if the current flight path segment requires spraying, computing the spray direction and spray distance of the current segment based on the path priority;if the spray distance of the current segment is greater than or equal to the sum of the nozzle activation and deactivation distances, adding nozzle activation and deactivation points; computing the position of the spray gun activation point at a distance from the starting point, and setting its spraying state to inactive;computing the position of the spray gun deactivation point at a distance from the end point, and setting its spraying state to active;setting the spraying state of both the starting point and the end point to inactive, and returning them to the flight path planning results.
14. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 1, characterised in that in step S1, rendering the oblique photogrammetric 3D model in the three-dimensional visualisation platform specifically comprises: conducting oblique photography using an oblique photography UAV, and performing three-dimensional modelling using a third-party modelling platform to obtain an oblique photogrammetric 3D model of the building to be sprayed;establishing a three-dimensional visualisation platform supporting 3D editing tools, based onthe three.js open-source library;rendering the oblique photogrammetric 3D model tiles into the three-dimensional visualisation platform using the three.js rendering engine.
15. The three-dimensional spray flight path planning method for autonomous UAV spraying according to claim 1, characterised in that performing coordinate system data conversion on the oblique photogrammetric 3D model in the three-dimensional visualisation platform and converting it into positioning coordinate data for use by the UAV specifically comprises: the metadata of the oblique photogrammetric 3D model contains a matrix composed of 16 floating-point numbers, wherein the local coordinate system of this matrix is the East-North-Up (ENU) coordinate system; multiplying the three-dimensional coordinates in the oblique photogrammetric 3D model coordinate system by this matrix to convert them into three-dimensional coordinates in the Earth-Centred Earth-Fixed (ECEF) coordinate system; using the conversion method in the Cesium open-source library to convert the three-dimensional coordinates in the ECEF coordinate system into positioning coordinates for use by the UAV, comprising longitude, latitude, and altitude.
16. A three-dimensional spray flight path planning apparatus for autonomous unmanned aerial vehicle (UAV) spraying, characterised in that the apparatus comprises:a rendering module, configured to acquire an oblique photogrammetric three-dimensional model of a building to be sprayed and to render the oblique photogrammetric 3D model in a three-dimensional visualisation platform;a coordinate conversion module, configured to perform coordinate system data conversion on the oblique photogrammetric 3D model in the three-dimensional visualisation platform, converting it into positioning coordinate data for use by the UAV, wherein the coordinate data comprises longitude, latitude, and altitude;a spray work zone acquisition module, configured to draw a two-dimensional or three-dimensional spray mesh graphic on the oblique photogrammetric 3D model using a 3D model editing tool within the three-dimensional visualisation platform, to obtain a planar or curved spray work zone corresponding to the building surface to be sprayed;a spray flight path planning module, configured to apply a pixel-level flight path planning algorithm for a planar spray work zone of the building to be sprayed; to apply an improved A* algorithm adapted for full-coverage path planning for a curved spray work zone of the building to be sprayed; and in conjunction with the positioning coordinate data for the UAV, to generate a spray flight path for the UAV to perform automated spray coating of a building facade.
17. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 16, characterised in that the spray work zone acquisition module is specifically configured to:use a line segment tool of the three-dimensional visualisation platform to delineate a closed three-dimensional mesh graphic on the surface of the building in the oblique photogrammetric 3D model using line segments;based on the three-dimensional mesh graphic, compute the triangles that are respectively located inside the region, outside the region, and on the boundary of the region;use the region boundary to cut the triangles located on the boundary, so that each boundary triangle is divided into an interior portion and an exterior portion;combine the interior portions of the boundary-cut triangles together with the triangles originally inside the region to form a new three-dimensional mesh graphic, wherein the new three-dimensional mesh graphic constitutes the curved spray work zone.
18. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 16, characterised in that the spray work zone acquisition module is specifically configured to:use a point-selection tool of the three-dimensional visualisation platform to select at least six vertices on the building surface in the oblique photogrammetric 3D model, and fit a geometric plane to the selected vertices by means of the least squares method and matrix singular value decomposition (SVD), wherein the geometric plane serves as an auxiliary plane;use a drawing tool of the three-dimensional visualisation platform to draw a two-dimensional mesh graphic on the auxiliary plane, wherein the two-dimensional mesh graphic constitutes the planar spray work zone.
19. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 18, characterised in that the spray work zone acquisition module is specifically configured to: ensure that the planar spray work zone drawn on the auxiliary plane is conformally parallel to the building surface; if there exist non-sprayable areas on the building surface, use a non-sprayable area marking tool to mark a non-sprayable two-dimensional mesh graphic, so that such areas are avoided during the flight path generation process.
20. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 18, characterised in that the spray work zone acquisition module is specifically configured to:perform two-dimensional Boolean operations on the drawn two-dimensional mesh graphics, supporting union and difference operations among multiple two-dimensional mesh graphics;when two two-dimensional rectangular mesh graphics drawn on the same auxiliary plane partially overlap and the colour adjustment tool of the three-dimensional visualisation platform is used to set them to the same colour, the two graphics will be merged into a single rectangular planar spray work zone; when the two graphics have different colours, the overlapping portion of the first-drawn rectangular mesh graphic will be subtracted from the original region and will become part of the subsequently-drawn two-dimensional rectangular mesh graphic.
21. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 18, characterised in that the planar spray work zone defaults to a rectangular shape; the planar spray work zone supports the addition and deletion of vertices on the basis of the rectangular two-dimensional mesh graphic, and the dragging of existing vertex positions, so as to modify the shape of the two-dimensional mesh graphic; the modified shape may be a triangle, a trapezoid, a star, or a shape with holes.
22. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 16, characterised in that the spray flight path planning module is specifically configured to:acquire the two-dimensional mesh graphic of the building facade, i.e. the planar spray work zone, and convert the planar spray work zone data into a two-dimensional image; based on the converted two-dimensional image, generate a flight path in a pixel coordinate system:expanding the non-sprayable area: determining an erosion kernel based on the width and height of the nozzle spray pattern, and applying the kernel to erode the image so as to expand the non-sprayable area, thereby protecting the non-sprayable area;performing flight path planning on the original spray work zone: generating grid coordinates for the flight path waypoints and the flight path index, and storing the actual coordinates of the waypoints;if non-sprayable areas exist within the spray work zone, using the non-sprayable area in the two-dimensional image as a mask to apply to the initial flight path, regenerating new spray flight path segments, and simultaneously generating a map for use by the A* algorithm; applying a nearest-distance rule to pair the spray flight path segments to obtain the spraying sequence;based on the pairing result, using the A* algorithm to connect the individual spray flight path segments to form a complete pixel-level flight path;traversing each segment of the flight path, and adding nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the corresponding distances;finally, post-processing the pixel-level flight path by converting the flight path in the pixelcoordinate system into a flight path in the three-dimensional coordinate system required by the UAV.
23. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 22, characterised in that the spray flight path planning module is specifically configured to:compute the size of the two-dimensional image and prepare a base map, wherein the base map is the minimum bounding rectangle calculated from the polygon vertex coordinates of the two-dimensional mesh graphic;determine the image width and height based on the physical width and height of the minimum bounding rectangle in conjunction with the pixel resolution set in the configuration file, and initialise a base map of all zeros according to the image width and height;convert the physical coordinates of the polygon vertices to be sprayed into pixel coordinates; use different grey levels to draw, respectively on the initialised base map, the normal spray work zone and the non-sprayable areas within the spray work zone.
24. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 22, characterised in that the spray flight path planning module is specifically configured to:compute the spray width and spray height of the spray gun based on the set spray width and height parameters;set the spray interval according to the path priority, wherein the path priority is either verticalaxis-first or horizontal-axis-first;adjust the non-divisible remainder by computing the offset between the image dimensions and the spray interval, to ensure uniform coverage of the spray work zone over the image;if vertical-axis-first is selected, generate a vertical-axis-first flight path grid;if horizontal-axis-first is selected, generate a horizontal-axis-first flight path grid.
25. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 22, characterised in that the spray flight path planning module is specifically configured to:create an A* map for marking traversable areas;traverse each waypoint to determine whether it is located within a sprayable area: determine, according to the path priority, whether the waypoint lies outside the image boundary, i.e., whether it is a valid waypoint;if the waypoint is within the sprayable work zone and not on the boundary, mark it as a traversable area in the A* map;if the path is horizontal-axis-first, reverse the flight path so that the starting point of the sprayflight path is at the upper position of the spray work zone plane;return the filtered obstacle-free waypoints and the map for use by the A* algorithm.
26. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 16, characterised in that the spray flight path planning module is specifically configured to:acquire the three-dimensional mesh graphic of the building wall surface, i.e. the curved spray work zone, and compute the vertex normal vectors; after loading the mesh graphic data, perform pre-processing comprising: converting the mesh data into point cloud data, filtering the point cloud data to remove noise points, and computing normal vectors based on the adjacency relationships among the mesh vertices;perform UAV body positioning: translate the pre-processed point cloud outward along the direction of the normal vectors by a set distance to obtain the target position of the UAV body, wherein the set distance is the sum of the distance from the nozzle to the UAV body positioning module and the optimal spray distance of the nozzle;optimise the path to achieve full-coverage spraying: apply a full-coverage path planning algorithm to connect the discrete UAV poses into a complete segmented flight path: slice the outward-translated point cloud along the Z-axis at the set spray interval, and perform voxel downsampling on each slice to generate individual strip-shaped point clouds; process each strip-shaped point cloud as follows:project the point cloud onto a horizontal plane to form two-dimensional points;fit a two-dimensional flight path to the two-dimensional points using the Douglas-Peucker algorithm;add the z-dimension to the two-dimensional flight path to restore it to a three-dimensional flight path;connect the fitted flight paths of each strip-shaped point cloud in three-dimensional flight path order to form a continuous flight path within the mesh graphic; the flight heading of the path is the normal vector of the current path facing the wall surface; the fitted flight paths of the stripshaped point clouds constitute the spray flight paths, and the line segments connecting adjacent fitted paths constitute the non-spray flight paths;traverse each segment of the flight path, and add nozzle activation and deactivation action points within the segments requiring spraying, to ensure that the nozzle is activated and deactivated at the corresponding distances;perform flight path post-processing: compute the waypoint heading angle and the relative heading angle.
27. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 26, characterised in that the spray flight path planning module is specifically configured to:convert the mesh graphic data into OFF format, and create a triangle mesh object from the mesh data using the Open3D library;sample the mesh data into point cloud data: first compute the number of resampled point cloud points, then perform point cloud resampling using the Poisson disk sampling algorithm in the Open3D library;perform smoothing and denoising on all resampled point cloud data: use the normal vector angles and the inter-point distances to perform clustering, filter out points that do not satisfy the distance requirements and the normal vector angle requirements, and apply region-growing filtering to extract point cloud clusters that satisfy the normal vector angle and distance conditions.
28. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 22 or claim 26, characterised in that the spray flight path planning module is specifically configured to:if the current flight path segment requires spraying, compute the spray direction and spray distance of the current segment based on the path priority;if the spray distance of the current segment is greater than or equal to the sum of the nozzle activation and deactivation distances, add nozzle activation and deactivation points; compute the position of the spray gun activation point at a distance from the starting point, and set its spraying state to inactive;compute the position of the spray gun deactivation point at a distance from the end point, and set its spraying state to active;set the spraying state of both the starting point and the end point to inactive, and return them to the flight path planning results.
29. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 16, characterised in that the rendering module is specifically configured to:conduct oblique photography using an oblique photography UAV, and perform three-dimensional modelling using a third-party modelling platform to obtain an oblique photogrammetric 3D model of the building to be sprayed;establish a three-dimensional visualisation platform supporting 3D editing tools, based on the three.js open-source library;render the oblique photogrammetric 3D model tiles into the three-dimensional visualisation platform using the three.js rendering engine.
30. The three-dimensional spray flight path planning apparatus for autonomous UAV spraying according to claim 16, characterised in that the coordinate conversion module is specifically configured to:the metadata of the oblique photogrammetric 3D model contains a matrix composed of 16 floating-point numbers, wherein the local coordinate system of this matrix is the East-North-Up (ENU) coordinate system; multiply the three-dimensional coordinates in the oblique photogrammetric 3D model coordinate system by this matrix to convert them into three-dimensional coordinates in the Earth-Centred Earth-Fixed (ECEF) coordinate system; use the conversion method in the Cesium open-source library to convert the three-dimensional coordinates in the ECEF coordinate system into positioning coordinates for use by the UAV, comprising longitude, latitude, and altitude.