An improved RRT algorithm-based route planning method for ornithopter
By introducing maximum yaw angle and minimum step size constraints into the RRT algorithm, and combining pruning and B-spline curve fitting, the path planning of flapping-wing aircraft is optimized, solving the problems of low planning efficiency and tortuous paths in the traditional RRT algorithm, and achieving efficient and smooth path planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2026-03-31
AI Technical Summary
Traditional RRT algorithms cannot meet the constraints of maximum yaw angle and minimum step size in the path planning of flapping-wing aircraft, resulting in low planning efficiency, tortuous and redundant paths, and failing to meet the real-time and high-efficiency requirements of military reconnaissance missions of flapping-wing aircraft.
By setting the maximum yaw angle and minimum step size constraints for route planning, and combining the pruning strategy for the maximum yaw angle with cubic B-spline curve fitting, the RRT algorithm is optimized to simplify and smooth the route, thus satisfying the flight characteristics of flapping-wing aircraft.
It achieves efficient route planning under the constraints of flapping-wing aircraft flight, improves planning efficiency, simplifies paths, and ensures flight continuity and smoothness.
Smart Images

Figure CN115979267B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of flapping-wing aircraft technology, and specifically to a path planning method for flapping-wing aircraft based on an improved RRT algorithm. Background Technology
[0002] The unique propulsion principle and mechanism of biomimetic flapping-wing aircraft give them advantages over fixed-wing and rotary-wing aircraft, such as better stealth, lower flight noise, and greater portability, making them significantly superior in military reconnaissance missions. In military reconnaissance activities, route planning is crucial for enabling flapping-wing aircraft to autonomously complete reconnaissance missions.
[0003] Various algorithms have been proposed for path planning problems in traditional robots and robotic arms, such as A* and Dijkstra's algorithm based on map traversal, RRT and PRM based on probability sampling, and genetic algorithms and ant colony algorithms based on artificial intelligence. Among them, Rapidly Exploring Random Tree (RRT) obtains the path by continuously sampling randomly in the map and connecting it with the nearest point until the target point is sampled. Due to the strong randomness of its planning principle, this algorithm, when combined with flapping-wing aircraft, can achieve high stealth during reconnaissance missions and effectively improve the mission completion rate.
[0004] During flight, flapping-wing aircraft face challenges such as minimum turning radius and maximum pitch angle. When planning a flight path, the maximum yaw angle constraint must be considered. Furthermore, due to issues such as motion inertia and attitude adjustment delay, the minimum step size in the RRT algorithm needs to be constrained to avoid unexecutable operations.
[0005] Traditional route planning techniques (RRTs) not only fail to meet the flight constraints of maximum yaw angle and minimum step length for ornithopter aircraft, but also suffer from low planning efficiency, tortuous planned paths, and redundant paths. To enable ornithopter aircraft to achieve efficient autonomous flight for military reconnaissance missions, a method is designed that satisfies the flight constraints of ornithopter aircraft while possessing a certain degree of randomness, and simultaneously efficiently completes route planning, simplifying and smoothing the planned paths to better suit the flight characteristics of ornithopter aircraft.
[0006] Existing technology publication number CN108563243B discloses a UAV trajectory planning method based on an improved RRT algorithm. Based on the basic fast extended random tree algorithm framework, it introduces constraints on turning radius, turning angle, and total range, effectively reducing the sampling point density within the planning space. This method can be used for fast trajectory planning of UAVs and can also provide a reference for fast trajectory planning of other aircraft. Existing technology publication number CN109708640A discloses a 3D path planning method for mobile robots. It improves the constraints and new node acceptance criteria of the extended RRT algorithm, realizing 3D path planning for mobile robots, and has high practical and promotional value. However, neither method optimizes the route planning efficiency while satisfying the constraints of the maximum yaw angle and minimum step size of the flapping-wing aircraft, failing to meet the high-efficiency real-time requirements of military reconnaissance for flapping-wing aircraft. Furthermore, neither method optimizes the planned path, resulting in path redundancy and tortuous paths. Summary of the Invention
[0007] 1. The technical problem to be solved:
[0008] To address the aforementioned technical problems, this invention provides a flight path planning method for flapping-wing aircraft based on an improved RRT algorithm. By setting maximum yaw angle constraints and minimum step size constraints for flight path planning, the method solves the problem of low efficiency in traditional RRT planning. Furthermore, based on the pruning strategy of maximum yaw angle and cubic B-spline curve fitting, the method simplifies and smooths the flight path, thus solving the problems of tortuous paths in traditional RRT planning and failure to meet the actual flight conditions of flapping-wing aircraft.
[0009] 2. Technical Solution:
[0010] A path planning method for flapping-wing aircraft based on an improved RRT algorithm, characterized by the following steps:
[0011] Step 1: Initialize the scenario and variables based on the RRT algorithm; specifically, this includes initializing the aircraft's starting position, i.e., the parameter starting point X. init The target location is the target point X. goal The exploration space range, maximum number of iterations K, initial step size step and distance threshold Thr, maximum yaw angle θ, minimum step size step_min, and target heuristic variable i;
[0012] Step 2: Determine if the exploration conditions are met; determine if the current iteration count is greater than the set maximum iteration count K. If it is less, continue to Step 3; otherwise, end the iteration and output "Route planning failed".
[0013] Step 3: Obtain sampling points X by performing random sampling based on the target heuristic strategy. rand Find the nearest neighbor X of this point. nearand the adjacent point's parent node X parent ;
[0014] Step 4: Determine the yaw angle γ between the line connecting the sampling point and the adjacent point X rand X near and the line connecting the adjacent point and its parent node X near X parent If the yaw angle γ meets the maximum yaw angle θ constraint requirement, then continue to execute Step 5; otherwise, discard the sampling point and return to Step 2;
[0015] Step 5: Obtain the angle α between the line connecting the adjacent point and the sampling point X near X rand and the line connecting the adjacent point and the target point X near X goal Generate a node X through the dynamic step size strategy based on the target deviation angle and the minimum step size constraint new ;
[0016] Step 6: Determine whether the connection line between X near and X new collides with an obstacle. If there is no collision, then continue to execute Step 7; otherwise, return to Step 2;
[0017] Step 7: Add the new node X new to the exploration tree and connect it to X near ;
[0018] Step 8: Determine whether the distance between the new node X new and the target point X goal is less than the distance threshold Thr. If it is less, then continue to execute Step 9; otherwise, return to Step 2;
[0019] Step 9: Connect the new node X new to the target point X goal and output all the route nodes;
[0020] Step 10: Simplify the planned route through the pruning strategy based on the maximum yaw angle;
[0021] Step 11: Smooth the pruned route through cubic B-spline curve fitting and output the final route.
[0022] Furthermore, the specific content of Step 3 is as follows: Determine whether the target heuristic variable i (0 < i < 1) is greater than the preset threshold If i is greater than the preset threshold, then directly use the target point X goal as the sampling point X rand , otherwise, perform random sampling; Retrieve all points in the exploration tree T to find the nearest neighbor point X of the sampling point X randnear Then, search all points in the exploration tree T and find the nearest neighbor point X. near Except for sampling point X rand The nearest neighbor outside is used as the parent node X parent .
[0023] Furthermore, step four specifically includes:
[0024] S41: Calculate X rand X near With X near X parent The yaw angle γ between them is given by the following formula:
[0025] (1);
[0026] S42: Compare the yaw angle γ with the maximum yaw angle θ; if the yaw angle γ is less than the maximum yaw angle θ, proceed to step five to expand the new node X according to the dynamic step size strategy based on the target deviation angle. new If the yaw angle γ is at Then change the initial step size to Performing step five reduces the rejection rate and improves sampling efficiency. If the included angle γ is within... Then the sampling point X rand Filter out and return to step two.
[0027] Furthermore, step five specifically includes:
[0028] S51: Calculate the line X connecting the nearest point and the sampling point according to formula (1). near X rand X, the line connecting the nearest point and the target point near X goal The included angle α; based on the magnitude of the included angle α, a step size step_adapt is generated based on the target deviation angle, where the formula for calculating the included angle α and the formula for generating the step size step_adapt are:
[0029]
[0030] S52: Compare the generated step size step_adapt with the minimum step size step_min. The step size is then used to expand the new node X, which is the generated step size step_adapt. new Then proceed to step six; otherwise, use the minimum step size (step_min) to expand the new node X. new Then proceed to step six.
[0031] Furthermore, step eight specifically includes: determining the new node X new With target point Xgoal Is the distance between them less than the distance threshold? (Thr verifies the new node X) new Have we reached target point X? goal If the target point is nearby, proceed to step nine to complete the route planning; otherwise, continue random sampling. This step can prevent new nodes from repeatedly missing the target point, thus avoiding the inability to quickly complete the route planning.
[0032] Furthermore, step ten specifically includes: from target point X goal Start searching forward sequentially for waypoint X goal-k Where k = 1, 2, ..., n and n represents the number of nodes in the route; and the route nodes X are sequentially... goal-k and the starting point X init Make connections until one of the waypoint nodes X is obtained. i and the starting point X init If no collision occurs during the connection, record X. i A valid node; then from target point X goal Start searching forward sequentially for waypoint X goal-k With X i Whether a collision occurs, until X is obtained. j With X i If no collision occurs, measure the yaw angle γ. If the angle satisfies the maximum yaw angle θ constraint, then X... j Record it as a valid node; otherwise, discard the node and continue searching forward until the shortest route that satisfies the maximum yaw angle constraint is found.
[0033] Furthermore, step eleven specifically includes: the planned route, which is a multi-segment broken line, is completed by the RRT algorithm. In order to meet the requirements of smooth flight of the flapping-wing aircraft, this step uses cubic B-spline curve fitting to smooth the transition of the broken line, so that the final route meets the requirements of flight continuity and smoothness of the flapping-wing aircraft.
[0034] 3. Beneficial effects:
[0035] (1) The present invention discloses a flight path planning method for flapping-wing aircraft based on an improved RRT algorithm, which sets a maximum yaw angle constraint condition for flight path planning to address the problems of minimum turning radius and maximum pitch angle that exist in the flight process of flapping-wing aircraft.
[0036] (2) The present invention proposes a dynamic step size strategy based on the target deviation angle and adopts a target heuristic strategy, which can effectively solve the problem of low efficiency of traditional RRT planning.
[0037] (3) In this invention, in view of the problems of motion inertia and attitude adjustment delay during the flight of flapping-wing aircraft, the minimum step size constraint condition for route planning is set.
[0038] (4) In this invention, the path simplification and smoothing are achieved by using a pruning strategy based on the maximum yaw angle and cubic B-spline curve fitting, which solves the problems of the tortuous path planning of traditional RRT and the failure to meet the actual flight conditions of flapping-wing aircraft.
[0039] In summary, the scheme disclosed in this application not only ensures that the planned route meets the flight constraints of the flapping-wing aircraft, but also solves the shortcomings of the traditional RRT algorithm, such as low planning efficiency and tortuous planning paths. Attached Figure Description
[0040] Figure 1 A flowchart of a flight path planning method for flapping-wing aircraft based on an improved RRT algorithm;
[0041] Figure 2 This is a schematic diagram of the yaw angle in this invention;
[0042] Figure 3 This is a schematic diagram of the dynamic step size strategy based on the target deviation angle in this invention;
[0043] Figure 4 This is a schematic diagram of the pruning strategy based on the maximum yaw angle in this invention;
[0044] Figure 5 The above is a simulation diagram of the traditional RRT algorithm in a specific embodiment;
[0045] Figure 6 The above is a simulation diagram of the improved RRT algorithm of the present invention used in a specific embodiment;
[0046] Figure 7 This is the initial route simulation diagram before optimization processing in a specific embodiment;
[0047] Figure 8 This is a flight path simulation diagram after optimization in step eleven, as shown in a specific embodiment. Detailed Implementation
[0048] The present invention will now be described in detail with reference to the accompanying drawings.
[0049] As attached Figure 1 As shown: A path planning method for flapping-wing aircraft based on an improved RRT algorithm, characterized by the following steps:
[0050] Step 1: Initialize the scenario and variables based on the RRT algorithm; specifically, this includes initializing the aircraft's starting position, i.e., the parameter starting point X. init The target location is the target point X. goal, exploration space range, maximum number of iterations K, initial step size step, distance threshold Thr, maximum yaw angle θ, minimum step size step_min, target heuristic variable i;
[0051] In the present invention, the starting position and the ending position of the flight of the aircraft are set according to the actual application scenario, and the exploration space range is defined according to the size of the space that the aircraft can fly as needed. The maximum number of iterations, the initial step size, the target heuristic variable, and the distance threshold are set according to the actual planning requirements, and the maximum yaw angle and the minimum step size constraint condition parameters are given according to the flight parameters of the aircraft.
[0052] Step 2: Determine whether the exploration condition is satisfied; determine whether the current number of iterations is greater than the set maximum number of iterations K. If it is less, continue to execute Step 3; otherwise, end the iteration and output that the route planning fails.
[0053] This step verifies whether the current exceeds the maximum number of iterations K and checks whether it meets the iteration condition.
[0054] Step 3: Randomly sample according to the target heuristic strategy to obtain a sampling point X rand , find the neighboring point X near of the sampling point and the parent node X parent . Specifically, it includes: determining whether the target heuristic variable i (0 < i < 1) is greater than the preset If i is greater than the preset threshold, directly use the target point X goal as the sampling point X rand , otherwise, perform random sampling; retrieve all points in the exploration tree T to find the nearest neighboring point X rand of the sampling point X near ; then retrieve all points in the exploration tree T to find the nearest neighboring point X near other than the sampling point X rand as the parent node X parent .
[0055] In this step, random sampling is performed through the target heuristic strategy. By verifying the value of the target heuristic variable, the sampling method is determined; due to the constraint of the maximum yaw angle θ of the flapping-wing aircraft, if the initial route planning direction seriously deviates from the target, it is difficult to gradually adjust to the correct direction only through random sampling, while the target heuristic strategy can quickly adjust the sampling trend, avoid the above problem, and greatly improve the planning efficiency.
[0056] Step 4: Determine whether the line connecting the sampling point and the neighboring point X rand X near and the line connecting the neighboring point and the parent node X near X parentIf the included angle γ between the two points meets the maximum yaw angle θ constraint requirement, then continue to step five; otherwise, discard the sampling point and return to step two.
[0057] Step four specifically includes:
[0058] S41: Calculate X rand X near With X near X parent The included angle γ between them is given by the following formula:
[0059] (1);
[0060] S42: Compare the included angle γ with the maximum yaw angle θ; if the included angle γ is less than the maximum yaw angle θ, proceed to step five to expand the new node X according to the dynamic step size strategy based on the target deviation angle. new If the included angle γ is in Then change the initial step size to Performing step five reduces the rejection rate and improves sampling efficiency. If the included angle γ is within... Then the sampling point X rand Filter out and return to step two.
[0061] As attached Figure 2 The diagram shows the generation of the yaw angle γ. In this step, the yaw angle γ can be obtained by formula (1). It is determined whether the included angle γ meets the maximum yaw angle θ constraint requirement. The sampling point rejection rate is reduced by reverse expansion. Under the condition of meeting the maximum yaw angle constraint, the sampling efficiency is improved to a certain extent.
[0062] Step 5: Find the line X connecting the nearest point and the sampling point. near X rand X, the line connecting the nearest point and the target point near X goal The included angle α between them is used to generate node X through a dynamic step-size strategy based on the target deviation angle and a minimum step-size constraint. new ;
[0063] Step five specifically includes:
[0064] S51: Calculate the line X connecting the nearest point and the sampling point according to formula (1). near X rand X, the line connecting the nearest point and the target point near X goal The included angle α; based on the magnitude of the included angle α, a step size step_adapt is generated based on the target deviation angle, where the formula for calculating the included angle α and the formula for generating the step size step_adapt are:
[0065]
[0066] S52: Compare the generated step size step_adapt with the minimum step size step_min. The step size is then used to expand the new node X, which is the generated step size step_adapt. new Then proceed to step six; otherwise, use the minimum step size (step_min) to expand the new node X. new Then proceed to step six.
[0067] As attached Figure 3 As shown, in this step, according to X near X rand With X near X goal The size of the included angle α between the two points generates the step size step_adapt, a dynamic step size strategy based on the target deviation angle. This strategy will make the sampled point X... rand Direction inclined towards target point X goal When the step size is greater than the initial step size, a positive benefit amplification effect is achieved; conversely, at the sampled point X, rand Direction deviates from target point X goal When the step size is smaller than the initial step size, a negative return reduction effect is generated.
[0068] Step Six: Determine X near With X new Check if the line collides with an obstacle. If no collision occurs, continue to step seven; otherwise, return to step two.
[0069] This step determines X. near With X new Check whether the connection line collides with obstacles to avoid planning invalid routes.
[0070] Step 7: Add the new node X new Add it to the exploration tree and link it with X near Establish a connection;
[0071] This step confirms the new node X. new After confirming it as a valid waypoint node, connect it with X. near Make the connection and add it to the exploration tree T.
[0072] Step 8: Determine the new node X new With target point X goal Check if the distance between them is less than the distance threshold Thr; if it is less, continue to step nine; otherwise, return to step two.
[0073] Step eight specifically includes: determining the new node X new With target point X goalIs the distance between them less than the distance threshold? (Thr verifies the new node X) new Have we reached target point X? goal If the target point is nearby, proceed to step nine to complete the route planning; otherwise, continue random sampling. This step can prevent new nodes from repeatedly missing the target point, thus avoiding the inability to quickly complete the route planning.
[0074] This step involves determining the new node X. new With target point X goal This step verifies whether the distance between nodes is less than the distance threshold Thr. new Have we reached target point X? goal If the location is nearby, proceed to step nine to complete route planning; otherwise, continue random sampling. In the RRT algorithm, it is almost impossible to directly sample to the destination using only pure random sampling; this step is essential.
[0075] Step 9: Add the new node X new With target point X goal Connect and output all route nodes;
[0076] After completing the route planning, this step outputs all route nodes to prepare for subsequent simplification and smoothing processes.
[0077] Step 10: Simplify the planned route using a pruning strategy based on the maximum yaw angle; from target point X goal Start searching forward sequentially for waypoint X goal-k Where k = 1, 2, ..., n and n represents the number of nodes in the route; and the route nodes X are sequentially... goal-k and the starting point X init Make connections until one of the waypoint nodes X is obtained. i and the starting point X init If no collision occurs during the connection, record X. i A valid node; then from target point X goal Start searching forward sequentially for waypoint X goal-k With X i Whether a collision occurs, until X is obtained. j With X i If no collision occurs, measure the yaw angle γ. If the angle satisfies the maximum yaw angle θ constraint, then X... j Record it as a valid node; otherwise, discard the node and continue searching forward until the shortest route that satisfies the maximum yaw angle constraint is found.
[0078] This step modifies and optimizes the traditional pruning strategy so that it not only simplifies the route but also continuously verifies whether the yaw angle γ meets the maximum yaw angle θ constraint during the simplification process, thus ensuring route feasibility while simplifying the route.
[0079] Step 11: Smooth the pruned route by fitting a cubic B-spline curve and output the final route.
[0080] Step eleven specifically involves using the RRT algorithm to plan a multi-segment broken line route. To meet the requirements for smooth flight of the flapping-wing aircraft, this step uses cubic B-spline curve fitting to smooth the transition of the broken line, so that the final route meets the requirements for flight continuity and smoothness of the flapping-wing aircraft.
[0081] As attached Figure 7 As shown, the planned flight path consists of multiple broken lines. To meet the requirements for smooth flight of the flapping-wing aircraft, this step uses cubic B-spline curve fitting to smooth the transition of the broken lines. The final result is shown in the attached figure. Figure 8 As shown by the solid line, the final flight path meets the requirements for flight continuity and smoothness of the flapping-wing aircraft. Specific Implementation
[0082] As attached Figure 4 The simulation diagram shows the route planning using the traditional RRT algorithm. The planned route not only fails to meet the flight constraints of the flapping-wing aircraft but also exhibits low planning efficiency. Figure 5 The simulation diagram of the improved RRT algorithm for route planning in this invention significantly improves planning efficiency while satisfying the flight constraints of flapping-wing aircraft.
[0083] like Figure 5 The diagram illustrates a pruning strategy based on the maximum yaw angle, which involves pruning from the target point X... goal Start searching forward sequentially for waypoint X goal-k (k=1,2,……,n), and sequentially add route nodes X goal-k (k=1,2,……,n) and the starting point X init Establish connections until a certain route node X is obtained. i and the starting point X init If no collision occurs during the connection, record X. i As a valid node, then from the target point X goal Start searching forward sequentially for waypoint X goal-k (k=1,2,……,n) and X i Whether a collision occurs, until X is obtained. j With X i If no collision occurs, measure the yaw angle γ. If the angle satisfies the maximum yaw angle θ constraint, then X... jRecord it as a valid node; otherwise, discard the node and continue searching forward until the shortest route that satisfies the maximum yaw angle constraint is found.
[0084] Figure 7 To optimize the initial flight path simulation diagram before processing, the flight path is winding and contains many redundant flight path nodes. Figure 8 The image shows the route simulation diagram after optimization in step eleven. Solid nodes represent pruned route nodes, dashed lines represent the planned initial route, dotted lines represent the pruned route, and solid curves represent the final route after smoothing with cubic B-spline curves. This final route is simple and has smooth continuity.
[0085] Although the present invention has been disclosed above with reference to preferred embodiments, these are not intended to limit the invention. Any person skilled in the art can make various changes or modifications without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention should be defined by the scope of the claims of this application.
Claims
1. An improved RRT algorithm based route planning method for flapping wing aircraft, characterized in that: The method comprises the following steps: Step one: initialize the scene and variables based on the RRT algorithm; specifically including: initializing the flight starting position of the aircraft, i.e., the parameter starting point X init , the target position, i.e., the target point X goal , the exploration space range, the maximum iteration number K, the initial step length step, the distance threshold Thr, the maximum yaw angle θ, the minimum step length step_min, and the target heuristic variable i; Step two: judging whether the exploration condition is met; judging whether the current iteration number is greater than the set maximum iteration number K, if yes, continue to execute step three, otherwise, end the iteration and output the failure of the route planning; Step three: Random sampling according to the target heuristic strategy to obtain sampling point X rand , finding the adjacent point X near and the adjacent point parent node X parent of the sampling point Step 4: Determine the X-axis connecting the sampling point and its neighboring points. rand X near X, the line connecting the neighboring point and the parent node near X parent If the yaw angle γ between the sampling points meets the maximum yaw angle θ constraint requirement, then proceed to step five; otherwise, discard the sampling point and return to step two. Step five: find the angle a between the line X connecting the adjacent point and the sampling point and the line X connecting the adjacent point and the target point, generate the node X by the dynamic step strategy based on the target deviation angle and the minimum step constraint near X rand Step five: find the angle a between the line X connecting the adjacent point and the sampling point and the line X connecting the adjacent point and the target point, generate the node X by the dynamic step strategy based on the target deviation angle and the minimum step constraint near X goal Step five: find the angle a between the line X connecting the adjacent point and the sampling point and the line X connecting the adjacent point and the target point, generate the node X by the dynamic step strategy based on the target deviation angle and the minimum step constraint new ; Step Six: Determine X near With X new Check if the line collides with an obstacle. If no collision occurs, continue to step seven; otherwise, return to step two. Step seven: Add new node X new to the exploration tree and connect it with X near ; Step eight: judge whether the distance between the new node X new and the target point X goal is less than the distance threshold Thr; if yes, continue to step nine, otherwise return to step two; Step nine: Connect new node X new with target node X goal and output all waypoints Step ten: simplifying the planned route through the pruning strategy based on the maximum yaw angle; Step eleven: smoothing the pruned route through the cubic B-spline curve fitting and outputting the final route.
2. The method of claim 1, wherein the method is based on an improved RRT algorithm. The step three is specifically: judging whether the target heuristic variable i is greater than a preset threshold, wherein 0 < i < 1, if yes, directly taking the target point X goal as the sampling point X rand , otherwise, performing random sampling; searching all points in the exploration tree T to find the nearest neighbor point X rand of the sampling point X near ; then searching all points in the exploration tree T to find the nearest neighbor point X near other than the sampling point X rand as the parent node X parent .
3. The method of claim 2, wherein: Step four specifically comprises: S41: Calculate X rand X near between X near X parent the yaw angle γ, as follows: (1); S42: compare the size of the yaw angle γ and the maximum yaw angle θ; if the yaw angle γ is less than the maximum yaw angle θ, then execute step five to expand to get a new node X according to the dynamic step length strategy based on the target deviation angle new ; if the yaw angle γ is in , then change the initial step length to ; execute step five to reduce the rejection rate and improve the sampling efficiency; if the included angle γ is in , then the sampling point X rand is rejected and returns to step two.
4. The flight path planning method for flapping-wing aircraft based on the improved RRT algorithm according to claim 3, characterized in that: Step five specifically comprises: S51: Calculate the line X connecting the nearest point and the sampling point according to formula (1). near X rand X, the line connecting the nearest point and the target point near X goal The included angle α; based on the magnitude of the included angle α, a step size step_adapt is generated based on the target deviation angle, where the formulas for calculating the included angle α and generating the step size step_adapt are: S52: compare the size of the generated step size step_adapt with the minimum step size step_min, if then the step size is extended for the new node X with the generated step size step_adapt new after which step six is performed, otherwise the step size is extended for the new node X with the minimum step size step_min new after which step six is performed.
5. The method of claim 4, wherein: Step eight specifically includes: verifying whether the new node X new arrives near the target point X goal by judging whether the distance between the new node X new and the target point X goal is less than the distance threshold Thr, if yes, step nine is executed to complete the route planning, otherwise, the random sampling is continued, and through the step, the situation that the new node and the target point pass by each other and the route planning cannot be quickly completed can be avoided.
6. The method of claim 5, wherein: Step ten specifically includes: from the target point X goal Start to retrieve the route node X goal-k in turn, where k = 1, 2, …, n and n represents the number of nodes of the route; and connect the route node X goal-k with the starting point X init in turn until one of the route nodes X i with the starting point X init has no collision, then record X i as an effective node; then from the target point X goal Start to retrieve the route node X goal-k in turn with X i whether there is a collision, until X j with X i has no collision, at which time the yaw angle γ is measured; if the angle satisfies the maximum yaw angle θ constraint, then record X j as an effective node, otherwise discard the node and continue to retrieve forward, eventually obtaining a shortest route that satisfies the maximum yaw angle constraint.
7. The method of claim 6, wherein: Step eleven specifically comprises: the planned route completed through the RRT algorithm is a multi-segment polyline, in order to meet the smooth flight requirement of the flapping-wing aircraft, the polyline is smoothly transitioned through the cubic B-spline curve fitting, so that the final route meets the flight continuity and smoothness requirements of the flapping-wing aircraft.
Citation Information
Patent Citations
A UAV trajectory planning method based on an improved RRT algorithm
CN108563243B
3D path planning method of mobile robot
CN109708640A