A Method for Spatiotemporal Optimal Coverage Trajectory Planning of Robots
Through predator-prey biological heuristic method and nonlinear planning, the UAV trajectory planning method is generated, which solves the dynamic and space-time optimization problems in UAV detection, improves detection efficiency and image quality, and adapts to complex environments.
Patent Information
- Application Number
- CN202310024210.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-09
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2043-01-09
AI Technical Summary
The existing UAV trajectory planning methods fail to effectively combine dynamic constraints and space-time optimization in infrastructure detection, resulting in low detection efficiency, poor image quality, and inability to adapt to complex environmental changes.
The predator-prey biological heuristic method is used to search the coverage path, and nonlinear planning problems are constructed in combination with progress variables and flight belt constraints, generating time-space optimal trajectory planning methods, considering UAV dynamic constraints and confined spatial conditions.
It realizes efficient coverage detection on the surface of complex facilities, improves detection efficiency and image quality, ensures stable flight of drones and adapts to dynamic environmental changes.
Smart Images

Figure CN116088571B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of robots, and particularly relates to a method for planning a spatio-temporal optimal coverage trajectory of a robot. Background Art
[0002] Robot coverage planning methods are widely used in military (area mine sweeping and explosive disposal, area full-coverage surveillance), agriculture (unmanned aerial vehicle autonomous pesticide spraying), disaster search and rescue (air crash search and rescue, fire search and rescue, rapid disaster assessment), commerce (cleaning robots), infrastructure inspection (unmanned aerial vehicle large-span bridge inspection), etc. Taking infrastructure inspection as an example, in recent years, with the improvement of economic strength and the development of infrastructure construction level, a large number of large-scale infrastructures have been built in China, including highway bridges, cross-river and cross-sea bridges, large-scale hydropower stations and wind power stations, etc. Along with the passage of the service time of the infrastructure, it is inevitable that aging, deformation or even more serious damage will occur, thus threatening people's lives and property. Infrastructure inspection can help relevant departments regularly evaluate the health status of the infrastructure, timely maintain the damaged facilities, and prevent and avoid disasters. Traditional infrastructure inspection mainly relies on the way of manually carrying equipment or manual remote operation, which has many disadvantages such as high personal risk, low operation efficiency and high cost. Benefiting from the development of fields such as robots in recent years, it has gradually become possible to autonomously inspect the infrastructure. As mentioned above, using flying vehicles such as quadcopters to comprehensively inspect and evaluate bridges can be modeled as a CCPP problem. According to the literature, the CCPP problem is NP-Complete, so heuristic methods are commonly used to seek better feasible solutions rather than optimal solutions. However, most CCPP problems only consider the planning problem of the coverage path, but often ignore the spatio-temporal optimality problem of the actual execution path of the flying vehicle, resulting in the loss of efficiency and inspection quality in the actual inspection process. Therefore, it is of great significance to consider coverage planning, spatio-temporal optimality and dynamic models together and study the full-process planning technology from the model to be inspected to the actual inspection flight trajectory.
[0003] The article "PPCPP: A Predator–Prey-Based Approach to Adaptive Coverage Path Planning" proposed a bio-inspired coverage planning method for the problem that the existing coverage planning methods cannot cope with accidental environmental dynamic changes, such as dynamic obstacles. However, since problems such as the dynamics of the unmanned aerial vehicle and spatio-temporal optimality are not considered, the planned path cannot be directly used as the flight trajectory of the unmanned aerial vehicle, and there will be many sharp turns in the path when covering a region with a specific shape, resulting in sudden braking and stopping of the unmanned aerial vehicle, and finally affecting the shooting quality of the inspection camera.
[0004] The article "Time-optimal planning for quadrotor waypoint flight" proposes a time-optimal trajectory planning method that uses nonlinear programming to optimize the time performance of the trajectory of a given waypoint, so as to achieve fast crossing of a given door frame during drone competitions. However, the trajectory obtained by this method has excessive distortion between two adjacent waypoints, which may cause unnecessary collisions in restricted scenarios and sometimes reduce the time performance of the trajectory. In addition, the trajectory with excessive distortion between adjacent waypoints may destroy the coverage of the trajectory of the area to be detected, resulting in the loss of part of the detection area, and may even cause danger. Therefore, this method is not suitable for infrastructure detection scenarios.
[0005] Considering the overall demand for trajectory planning of UAVs with limited endurance in large-scale infrastructure inspection tasks, the existing CCPP methods generally ignore the dynamic constraints of UAVs and generally do not consider the common problem of time-space optimality under dynamics and constrained space constraints, as well as the possible adverse effects on UAV endurance and inspection effects. Summary of the invention
[0006] In order to overcome the shortcomings of the prior art, the present invention provides a robot spatiotemporal optimal coverage trajectory planning method, which uses the biological heuristic rules that prey try to stay away from predators as much as possible during foraging and try to conduct coverage search on the map to obtain more food to seek a better feasible coverage path, and uses "progress variables" and "flight belt" constraints to construct a nonlinear programming problem to achieve time-space optimization of the coverage trajectory under constrained space and dynamic constraints. Finally, a coverage trajectory that can be directly executed by a drone is obtained for the disease detection task of a given infrastructure, and the effectiveness of the proposed method is verified in a simulation environment.
[0007] The technical solution adopted by the present invention to solve the technical problem includes the following steps:
[0008] Step 1: Initialize the guidance point;
[0009] The data to be measured are divided into two types of guide points, namely range points and tunnel points;
[0010] The range points are an ordered sequence of coordinates, and the polygonal area formed by them indicates a continuous surface of the facility to be inspected, and the polygonal area is non-overlapping and non-convex;
[0011] The tunnel points are coordinate tuples that appear in pairs and connect different polygonal areas to guide the trajectory from one polygonal area to another adjacent polygonal area;
[0012] Step 2: polygon rasterization;
[0013] Enclose the polygon area formed by the range points with a larger rectangular area, and rasterize the rectangular area according to the measurement range of the detection sensor; then use the raster scanning algorithm to complete the rasterization of the polygon area and determine all the raster points actually included in the polygon area;
[0014] Step 3: Full-coverage path search; Use a predator-prey-based bio-inspired method to search for the full-coverage path on the grid map, and merge and simplify the searched path to obtain sparse path points, specifically as follows;
[0015] Define the position of the predator as p Ψ and keep it fixed. The position of the prey at time k is p k , and at this time the position of the j-th neighbor grid point of the prey is p j . Define the distance between the two as D(p j ) = ||p j - Ψ||. The maximum distance between the predator and the neighbor grid point of p k is D max (p k ), and the minimum distance is D min (p k ); The reward function of the predator-prey rule is:
[0016]
[0017] To reduce the turning of the UAV and thus increase the flight stability, the turning in the coverage path should be reduced, that is, the straight-line path is better than the turning path, which is described by the following straight-line reward formula:
[0018]
[0019] The boundary reward function is set as:
[0020]
[0021] Among them, is the maximum number of neighbor points, and n N (p j ) is the number of all neighbor points of the j-th neighbor point of the current prey;
[0022] The prey selects a neighbor point with the maximum comprehensive reward as the next covered position, and the comprehensive reward is obtained by the following formula:
[0023] R(p j ) = R d (p j ) + ω s R s (p j ) + ωb R b (p j ), (4)
[0024] Among them, ω s and ω b are the weight hyperparameters of the linear return and the boundary return respectively;
[0025] During the search process, an exponentially expanding search radius is used to help the predator jump out of the dead end and resume the coverage search process; after obtaining the coverage path, all the path points on the same straight line on the path are merged into the two endpoints of the line segment; the coverage path points of multiple different polygon regions are connected by tunnel points to finally form a complete coverage path;
[0026] Step 4: Spatiotemporal optimization trajectory generation;
[0027] Assume that all N + 1 generated trajectory points have the same time interval dt = t N / N, where t N is the total time of the generated trajectory and N is the number of small path segments used for discretization; define the total state variable as x = [t N , x0,..., x N , where x k = [x d,k , u k , λ k , μ k , ν k , k ∈ [0, N), when k = N, x k = [x d,N , λ N ; the dynamic state of the UAV is x d,k = [p k , v k , q k , ω k , where p k is the three-dimensional position vector, v k is the linear velocity, q k is the attitude quaternion, ω k is the angular velocity;
[0028] Use the progress constraint to make the final generated trajectory pass through all the coverage path points; the progress constraint is defined as follows:
[0029]
[0030] Among them, λ k and μ kis a vector with the same dimension as the number of path points, indicating respectively the path points that the trajectory at time k has passed and the path points that it is about to pass; ideally, when the previous j path points have a tolerance less than that of the trajectory from time 0 to k, λ k the first j positions of are set to 1 and the rest are set to zero; when the trajectory is about to pass the j-th path point at time k, μ k the j-th bit of is set to 1 and the rest are set to zero; if no path point is being passed, then all are zero;
[0031] Construct the flight zone constraint:
[0032]
[0033] where k ∈ [0, N), j ∈ [0, M), specifies the two adjacent path points where the trajectory point at time k is located; ideally, if then the current trajectory point is located between the flight zones formed by the j-th and j + 1-th path points; ∈ gives the width of the flight zone;
[0034] Taking the above constraints (5) and (6) together with the dynamic constraints of the quadrotor UAV as constraints, set the optimization objective as mint N , which constitutes a nonlinear programming problem, and use the standard solver Ipopt to solve it to obtain the time trajectory;
[0035] Step 5: Trajectory saving and execution; Save the trajectory obtained in the previous step, and load the trajectory during detection, and use the nonlinear model predictive trajectory tracking method to perform trajectory tracking to complete the coverage detection task;
[0036] The trajectory is stored in the form of trajectory points, and each trajectory point contains (t k , p k , v k , γ k , a k ), where t k is the timestamp of the k-th path point, p k is the three-dimensional position reference of the UAV, v k and a k are the speed and acceleration references, and γ k is the yaw angle reference; during the execution of the detection task, these path points are loaded from the file, and a nonlinear model predictive trajectory tracker is used to achieve trajectory tracking.
[0037] Preferably, in the said step 1, if there is a BIM model of the infrastructure to be detected, the guiding points are directly marked on the BIM model.
[0038] Preferably, the method for determining all the grid points actually included in the polygon area in step 2 is the winding number algorithm.
[0039] Preferably, the
[0040] Preferably, the ω s = 0.53, ω b = 0.16.
[0041] The beneficial effects of the present invention are as follows:
[0042] The present invention proposes a hierarchical bio-inspired spatio-temporal optimal coverage trajectory planning method. The predator-prey bio-inspired method is used to search for the coverage path in the polygon area. Even if the polygon area is non-overlapping and non-convex, the search for the coverage path can be quickly realized, meeting the detection requirements for the surface of complex inspection facilities. The proposed "flight band" constraint method combined with the "progress variable" constraint is used for time-space optimal trajectory planning under limited space and dynamic constraints without violating the coverage constraint. Due to the satisfaction of time and space optimality, the detection efficiency is effectively guaranteed, and the addition of dynamic constraints avoids image blurring caused by excessive jitter of the UAV in the coverage path, ensuring the quality of the detection image. The present invention is mainly oriented to the UAV infrastructure detection task scenario and has potential application value in rescue search, large-scale scene modeling, cleaning robots, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a schematic diagram of the predator-prey bio-inspired coverage planning path according to an embodiment of the present invention.
[0044] Figure 2 It is a schematic diagram of the time-space optimal trajectory optimization result according to an embodiment of the present invention.
[0045] Figure 3 It is a schematic diagram of the application in the real bridge detection according to an embodiment of the present invention.
[0046] Figure 4 It is the final optimization result of the progress variable and the slack variable according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0047] The present invention will be further described below with reference to the drawings and embodiments.
[0048] The present invention designs a method for spatio-temporal optimal coverage trajectory planning of a robot, and mainly takes its application in the scenario of autonomous detection of unmanned aerial vehicle (UAV) infrastructure as an example to illustrate the effectiveness and advancement of the method. The planning problem of using a quadrotor UAV for bridge detection can be modeled as a complete coverage path planning (CCPP) problem, which can usually be solved by heuristic search or other theories based on the Traveling Salesman Problem (TSP). However, these methods do not consider strict dynamic constraints and spatio-temporal optimality, which may limit the flight ability of the quadrotor and the efficiency of the detection task, and even affect the quality of the images captured by the detection camera. The present invention designs a heuristic spatio-temporal optimal planner (HSTOP) method to make up for the above defects of traditional methods. HSTOP adopts a two-layer planning mechanism: in the first layer, a predator-prey based heuristic algorithm is used to search for a low-cost coverage path in a polygonal area; in the second layer, an improved time-optimal planning algorithm is designed, and it is proposed to use a "flight band" to achieve spatial optimality in a restricted area, and nonlinear programming is used to ensure the spatio-temporal optimality of the coverage planning. The simulation and experimental results show that HSTOP can make full use of the maneuverability of the UAV, improve the efficiency of the detection task, and reduce the jitter blur of the detection images.
[0049] 1. Initialize the guiding points. In this stage, two types of guiding points are created, namely range points and tunnel points. The ordered range points enclose the polygonal range of the area to be detected, and the paired tunnel points indicate a direct path from one polygonal area to another.
[0050] 2. Polygonal gridification. The polygonal area enclosed by the range points is divided into grids according to the sensing range of the detection sensor, and subsequent coverage is mainly carried out according to the grids.
[0051] 3. Search for a full-coverage path. A predator-prey based heuristic method is used to search for a full-coverage path on the grid map, and the searched path is merged and simplified to obtain sparse path points.
[0052] 4. Generate a spatio-temporally optimal trajectory. The sparse path points generated in each polygonal area are combined with their corresponding tunnel points to obtain an ordered sequence of points, a nonlinear programming problem is constructed, and the designed "progress variable" and "flight band" are used to constrain the arrival and spatial range of the path points, and a standard solver is used to solve it.
[0053] 5. Save and execute the trajectory. Save the trajectory obtained in the previous step, load the trajectory during detection, and use the nonlinear model to predict the trajectory tracking method and perform trajectory tracking to complete the coverage detection task. Specific embodiment:
[0055] Step 1 initializes the guide points. Assuming that there is no three-dimensional model of the infrastructure to be inspected, then before conducting infrastructure inspection, the data of the facilities to be inspected must first be measured. In the present invention, according to the characteristics of the task, the data to be tested are divided into two categories, namely range points and tunnel points. Range points are some ordered coordinate sequences, and the polygonal area they constitute indicates a continuous surface of the facility to be inspected. This polygonal area can be non-overlapping and non-convex. Tunnel points are coordinate tuples that appear in pairs and connect different polygonal areas to guide the trajectory from one polygonal area to another adjacent polygonal area. This step is done manually and only needs to be done once for the same infrastructure to be inspected. In addition, if there is a BIM model of the infrastructure to be inspected, the guide points can be directly marked on the BIM model, which will reduce the workload and simplify the workflow. At this point, the guide points are initialized.
[0056] Step 2: polygon rasterization. In the guide point initialization step, multiple polygonal areas surrounded by range points are obtained. In this step, these polygonal areas need to be rasterized separately. Since the rasterization method of each polygon in the present invention is the same, only the rasterization of a polygonal area is used as an example to illustrate. Specifically, first, a larger rectangular area is used to enclose the polygonal area, which can be obtained by simply calculating the upper and lower limits of the coordinates of each endpoint of the polygon. Subsequently, the rectangular area is rasterized according to the measurement range of the detection sensor. Finally, a raster scanning algorithm is used to complete the rasterization of the polygonal area and determine all the grid points actually included in the polygonal area. Among them, the winding number algorithm is used to determine whether a point is within the polygonal area. Since this algorithm can be applied to non-convex polygons, the trajectory planning method of the present invention can be applied to non-overlapping non-convex polygon scenes. After completing the rasterization, it is necessary to search for the coverage path, see the next step.
[0057] Step 3 Full-coverage path search. Finding the shortest path passing through all grid points on a known grid is an NP-Hard Travelling Salesman Problem (TSP). Since NP-Hard problems cannot be solved within polynomial time, generally some heuristic strategies are used to find a feasible and relatively optimal solution. The present invention utilizes the principle in the biological world that when foraging in an area, prey needs to cover the entire area while staying as far away from predators as possible to ensure its own safety. Intuitively, based on the position of the predator, the prey performs a spatial sorting on the current area to be covered, that is, the priority of the position far from the predator is higher than that of the position close to the predator.
[0058] Define the position of the predator as p Ψ and keep it fixed. The position of the prey at time k is p k , and at this time, the position of the j-th neighbor grid point of the prey is p j . Define the distance between them as D(p j ) = ||p j - Ψ||. The maximum distance between the predator and the neighbor grid point of p k is D max (p k ), and the minimum distance is D min (p k ). Then, the reward function of the predator-prey rule is:
[0059]
[0060] In addition, to reduce the turning of the drone and thus increase the flight stability, there should be as few turns as possible in the coverage path. In other words, a straight path is better than a turning path, which can be described by the following straight-line reward formula.
[0061]
[0062] To better cover the boundary of the area, the boundary reward function can be set as:
[0063]
[0064] Among them, is the maximum number of neighbor points, and n N (p j ) is the number of all neighbor points of the j-th neighbor point of the current prey. Since a square grid is used to divide the area, there is (four co-edge points and four diagonal points). Subsequently, the prey selects a neighbor point with the maximum comprehensive reward as the next position to be covered. The comprehensive reward can be obtained by the following formula:
[0065] R(p j ) = R d (p j ) + ω s R s (p j ) + ω b R b (p j ), (4)
[0066] where ω s and ω b are the weight hyperparameters of the linear return and the boundary return respectively. In the experiment, ω s = 0.53 and ω b = 0.16 are set. During the search process, the prey may enter a dead end. The exponential expansion search radius is used to help the predator jump out of the dead end and resume the coverage search process. After obtaining the coverage path, all the path points on the same straight line on the path are merged into the two endpoints of the line segment. In this way, the entire coverage path is greatly simplified, which is beneficial to reducing the computational amount during the spatio-temporal optimization. The coverage path points of multiple different polygon regions are connected by tunnel points to finally form a complete coverage path, as shown in Figure 1 .
[0067] Step 4 Spatio-temporal optimal trajectory generation. After the coverage path search and merging are performed in the first layer of HSTOP, a zigzag coverage path is obtained. Although this path can already achieve the purpose of coverage, directly executing this geometric path without considering the dynamic constraints and spatio-temporal optimality of the UAV may lead to waste of the UAV's working time and energy, which are very precious and limited resources for the UAV. In addition, executing a geometric path may lead to a reduction in the quality of the detected images. To solve the above problems, all the optimization objectives and constraints are modeled as a non-linear optimization problem, and finally a directly executable time trajectory is optimized. Assume that all N + 1 generated trajectory points have the same time interval dt = t N / N, where t N is the total time of the generated trajectory and N is the number of small path segments used for discretization. Define the total state variable as x = [t N , x0, …, x N , where x k = [x d,k , u k , λ k , μ k , ν k , k ∈ [0, N), and when k = N, x k = [x d,N , λ N . The dynamic state of the UAV is xd,k = [p k , v k , q k , ω k , where p k is a three-dimensional position vector, v k is the linear velocity, q k is the attitude quaternion, ω k is the angular velocity.
[0068] The present invention uses a progress constraint to make the final generated trajectory pass through all the covered path points. Using the soft "progress variables" λ k and μ k are used to indicate whether each path point has been reached or not, allowing a tolerance d tol for the arrival of the path point. The tolerance specifies the upper limit of the maximum distance between the generated trajectory and the path point. The progress constraint is defined as follows:
[0069]
[0070] where λ k and μ k are vectors with the same dimension as the number of path points, indicating the path points that the trajectory has passed through and the path points that are about to be passed through at time k, respectively. Ideally, when the previous j path points are within the tolerance of the trajectory from time 0 to k, the first j positions of λ k are set to 1 and the rest are set to 0. When the trajectory is about to pass through the j-th path point at time k, the j-th position of μ k is set to 1 and the rest are set to 0. If no path point is being passed through, then all are set to 0. The second term in the above constraint ensures the order in which the path points are passed through by the trajectory, and the last term uses complementary slackness to ensure that a tolerance can be allowed for the arrival of the path point. Therefore,
[0071] The "flight band" constraint used in the present invention is used to limit the spatial range of the trajectory, ensure that the full-coverage condition is not violated during the optimization process, and restrict the optimization from developing in a direction that is not conducive to improving efficiency. Improving the detection efficiency can be achieved by saving the execution time of the trajectory. Generally, there are two ways to save time, namely increasing the speed or shortening the distance. Although the straight line between two points is the shortest, directly executing a straight line will result in a non-smooth final trajectory. Therefore, the present invention proposes a "flight band" constraint to achieve time and space optimization within a limited space. The "flight band" constraint is constructed as follows:
[0072]
[0073] where k ∈ [0, N), j ∈ [0, M), Specifies two adjacent path points where the trajectory point at time k is located. Ideally, if then the current trajectory point is between the "flight zone" formed by the j-th and (j + 1)-th path points. The cross product and the norm term calculate the distance between the current trajectory point and the line formed by these two path points, and ∈ gives the width of the "flight zone". Taking all the above constraints together with the dynamic constraints of the quadrotor drone as constraints and setting the optimization objective as mint N , a nonlinear programming problem is formed. By using the standard solver Ipopt to solve it, the time trajectory can be obtained, as shown in Figure 2 , and the final optimization result of the "progress variable" is as shown in Figure 4 .
[0074] Step 5 Trajectory saving and execution. The trajectory is stored in the form of trajectory points, and each trajectory point contains (t k , p k , v k , γ k , a k ), where t k is the timestamp of the k-th path point, p k is the 3D position reference of the drone, v k and a k are the speed and acceleration references, and γ k is the yaw angle reference. When performing the detection task, these path points are loaded from the file, and a nonlinear model predictive trajectory tracker is used to achieve trajectory tracking. Figure 3 This is the application of the method invented in this paper in the large bridge inspection by drones.
Claims
1. A method for robot spatio-temporal optimal coverage trajectory planning, characterized in that, It includes the following steps: Step 1: Initialize the guiding points; Divide the data to be measured into two types of guiding points, namely range points and tunnel points; The range points are an ordered coordinate sequence, and the polygon area formed by them indicates a continuous surface of the facility to be detected. This polygon area is non-overlapping and non-convex; The tunnel points are paired coordinate tuples that connect different polygon areas and are used to guide the trajectory from one polygon area to another adjacent polygon area; Step 2: Polygon rasterization; Enclose the polygon area formed by the range points with a larger rectangular area, rasterize the rectangular area according to the measurement range of the detection sensor; then use the raster scanning algorithm to complete the rasterization of the polygon area and determine all the raster points actually included in the polygon area; Step 3: Full-coverage path search; Use a predator-prey-based bio-inspired method to search for the full-coverage path on the grid map, and merge and simplify the searched path to obtain sparse path points, specifically as follows; Define the position of the predator as p Ψ and keep it fixed. The position of the prey at time k is p k . At this time, the position of the j-th neighbor grid point of the prey is p j . Define the distance between the two as D(p j ) = ||p j - Ψ||. The maximum distance between the predator and the neighbor grid points of p k is D max (p k ), and the minimum distance is D min (p k ); The reward function of the predator-prey rule is as follows: In order to reduce the turning of the UAV and thus increase the flight stability, the turning in the coverage path should be reduced, that is, the straight-line path is better than the turning path, which is described by the following straight-line reward formula: The boundary reward function is set as: Among them, is the maximum number of neighbor points, n N (p j ) is the number of all neighbor points of the j-th neighbor point of the current prey; The prey selects a neighbor point with the maximum comprehensive reward as the next coverage position, and the comprehensive reward is obtained by the following formula: R(p j ) = R d (p j ) + ω s R s (p j ) + ω b R b (p j ), (4) where ω s and ω b are the weight hyperparameters of the linear return and the boundary return, respectively; During the search process, use an exponential expansion search radius to help the predator jump out of the dead end and resume the coverage search process; after obtaining the coverage path, all the path points on the same straight line on the path are merged into the two endpoints of the line segment; connect the coverage path points of multiple different polygon areas through the tunnel points to finally form a complete coverage path; Step 4: Spatiotemporal optimization trajectory generation; Assume that all N+1 generated trajectory points have the same time interval dt = t N / N, where t N is the total time of the generated trajectory and N is the number of small path segments used for discretization; Define the total state variable as x = [t N , x0, …, x N , where x k = [x d,k , u k , λ k , μ k , ν k , k ∈ [0, N), when k = N, x k = [x d,N , λ N ; The dynamic state of the UAV is x d,k = [p k , v k , q k , ω k , where p k is the three-dimensional position vector, v k is the linear velocity, q k is the attitude quaternion, ω k is the angular velocity; Use the progress constraint to make the finally generated trajectory pass through all the coverage path points; the progress constraint is defined as follows: where λ k and μ k are vectors with the same dimension as the number of path points, indicating respectively the path points that the trajectory at time k has passed through and the path points that the trajectory is about to pass through; ideally, when the previous j path points are less than the tolerance with the trajectory from time 0 to k, the first j positions of λ k are set to 1 and the rest are set to 0; when the trajectory is about to pass through the j-th path point at time k, the j-th position of μ k is set to 1 and the rest are set to 0; if no path point is being passed through, all are set to 0; Construct the flight band constraint: where \(k\in[0,N)\) and \(j\in[0,M)\). specifies two adjacent path points where the trajectory point at time \(k\) is located; ideally, if then the current trajectory point is located between the flight strips formed by the \(j\)th and \((j + 1)\)th path points; \(\epsilon\) gives the width of the flight strip. Taking the above constraint equations (5) and (6) together with the dynamic constraints of the quadrotor UAV as constraints and setting the optimization objective as min t N , a nonlinear programming problem is formed. By using the standard solver Ipopt to solve it, the time trajectory can be obtained; Step 5: Trajectory saving and execution; Save the trajectory obtained in the previous step, load the trajectory during detection, and use the nonlinear model predictive trajectory tracking method to perform trajectory tracking to complete the coverage detection task; The trajectory is stored in the form of trajectory points, each trajectory point containing (t k , p k , v k , γ k , a k ), where t k is the timestamp of the k-th path point, p k is the three-dimensional position reference of the UAV, v k and a k are the speed and acceleration references, and γ k is the yaw angle reference; when performing the detection task, these path points are loaded from a file and a non-linear model predictive trajectory tracker is used to achieve trajectory tracking.
2. The method for robot spatio-temporal optimal coverage trajectory planning according to claim 1, wherein, In the said Step 1, if there is a BIM model of the infrastructure to be detected, directly mark the guiding points on the BIM model.
3. A method for robot spatio-temporal optimal coverage trajectory planning according to claim 1, characterized in that, The method for determining all the raster points actually included in the polygon area in the said Step 2 is the winding number algorithm.
4. A method for robot spatio-temporal optimal coverage trajectory planning according to claim 1, characterized in that, The 5. The method for robot spatio-temporal optimal coverage trajectory planning according to claim 1, wherein Said ω s = 0.53, ω b = 0.16.