UAV control method, device, equipment and computer storage medium
Through UAV sensor detection data and kinematic planning, combined with the speed setting method and position setting method, the safety and real-time problems of UAV obstacle avoidance in complex environments are solved, and efficient flight control in dynamic environments is achieved. , improving flight safety and real-time planning.
Patent Information
- Application Number
- CN202111555008.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-12-17
AI Technical Summary
In complex environments, it is difficult for multi-rotor UAVs to effectively avoid obstacles during flight, resulting in insufficient flight safety and real-time planning. Existing technologies cannot meet the needs of real-time motion planning in dynamic environments.
Determine the current motion status and obstacle information through the sensor detection data of the UAV, use the maximum speed, maximum acceleration and maximum jerk as constraints to perform kinematic planning, determine the obstacle avoidance flight position, and control the flight of the UAV based on this In the process, the speed setting method and the position setting method are combined to establish a third-order motion model to improve the real-time and smoothness of planning.
It improves the safety of drone flight and the real-time nature of motion planning, ensures obstacle avoidance capabilities in dynamic environments, reduces computing resource requirements, is suitable for low-computing power flight control computers, and enhances flight efficiency and safety.
Smart Images

Figure CN114527783B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of unmanned aerial vehicles (UACs), and provides a control method, device, equipment, and computer storage medium for unmanned aerial vehicles. Background Art
[0002] Multi-rotor drones are widely used in public security firefighting, power inspection, and disaster relief. During the flight, the drone can measure its own motion state in real time. In addition, the target state of the drone will be given based on the flight mission. The goal of the drone's motion planning is to calculate a trajectory that meets all requirements, and then the drone will perform related tasks along this trajectory. In addition, these flight scenes are relatively complex, with various obstacles of different sizes. Once an obstacle is hit, the drone will crash and even hit people and objects on the ground.
[0003] Therefore, how to plan the safe flight motion of UAVs in complex environments is particularly important. Summary of the invention
[0004] The embodiments of the present application provide a control method, device, equipment and computer storage medium for a drone, which are used to improve the safety of drone flight and the real-time performance of motion planning.
[0005] In one aspect, a method for controlling a drone is provided, the method comprising:
[0006] Determine the current motion state of the drone and obstacle information in the flight direction according to detection data of various sensors included in the drone;
[0007] Determining an obstacle avoidance flight position of the UAV according to the obstacle information and the target flight position of the UAV;
[0008] Taking the maximum speed, maximum acceleration and maximum jerk of the UAV as constraints, and according to the current motion state and the obstacle avoidance flight position, determining a kinematic planning result for the UAV to reach the obstacle avoidance flight position;
[0009] The flight process of the UAV is controlled according to the kinematic planning result.
[0010] In one aspect, a control device for an unmanned aerial vehicle is provided, the device comprising:
[0011] A detection unit, used to determine the current motion state of the drone and obstacle information in the flight direction according to detection data of various sensors included in the drone;
[0012] An obstacle avoidance unit, configured to determine an obstacle avoidance flight position of the UAV according to the obstacle information and the target flight position of the UAV;
[0013] a motion planning unit, configured to determine a kinematic planning result for the UAV to reach the obstacle avoidance flight position based on the current motion state and the obstacle avoidance flight position, taking the maximum speed, maximum acceleration and maximum jerk of the UAV as constraints;
[0014] A flight control unit is used to control the flight process of the UAV according to the kinematic planning result.
[0015] Specifically, the motion planning unit is specifically used for:
[0016] Determine the cruising speed of the UAV according to the current motion state and the obstacle avoidance flight position, with the maximum speed, maximum acceleration and maximum jerk of the UAV as constraints;
[0017] According to the cruising speed, determining the estimated duration of the acceleration segment and the target motion state of the acceleration segment corresponding to the acceleration phase of the UAV, and the estimated duration of the deceleration segment and the target motion state of the deceleration segment corresponding to the deceleration phase;
[0018] When it is determined that a cruise phase is required according to the difference between the deceleration end position in the deceleration phase motion state and the obstacle avoidance flight position, the cruise phase duration corresponding to the cruise phase is determined according to the difference;
[0019] According to the acceleration segment duration, the acceleration segment target motion state, the deceleration segment duration, the deceleration segment target motion state and the cruise segment duration, the motion state at each moment is determined to obtain the kinematic planning result.
[0020] Specifically, the motion planning unit is specifically used for:
[0021] determining an assumed stopping speed according to an initial speed and an initial acceleration in the current motion state, the maximum jerk, and an expected acceleration when reaching the obstacle avoidance flight position;
[0022] determining a cruising acceleration of the UAV according to a comparison result between the assumed stopping speed and an expected speed of the UAV when the UAV reaches the obstacle avoidance flight position;
[0023] Determining an expected motion state of an acceleration segment based on the cruising acceleration, the initial speed, and the initial acceleration;
[0024] Determining an assumed stopping position at the end of the acceleration phase based on the expected motion state of the acceleration phase;
[0025] The cruising speed is determined based on a comparison result between the assumed stop position and the obstacle avoidance flight position.
[0026] Specifically, the motion planning unit is specifically used for:
[0027] If the assumed stopping speed is less than the expected speed, the cruising acceleration is determined to be the maximum acceleration, and the sign is positive;
[0028] If the assumed stopping speed is greater than the expected speed, the cruising acceleration is determined to be the maximum acceleration, and a negative sign is determined.
[0029] Specifically, the motion planning unit is specifically used for:
[0030] determining a first sub-duration of an acceleration sub-phase in the acceleration phase according to a difference between the cruising acceleration and the initial acceleration;
[0031] Determining the acceleration jerk of the UAV in the acceleration sub-phase according to the comparison result between the cruising acceleration and the initial acceleration;
[0032] Determining the acceleration segment terminal velocity at the end of the acceleration sub-stage according to the initial velocity, the initial acceleration, the first sub-duration, and the acceleration segment jerk;
[0033] The expected motion states of the deceleration sub-phase and the cruising sub-phase in the acceleration phase are determined according to the cruising acceleration and the maximum jerk.
[0034] Specifically, the motion planning unit is specifically used for:
[0035] determining a second sub-duration of the deceleration sub-phase according to the cruising acceleration and the maximum jerk;
[0036] Determining a deceleration jerk of the deceleration sub-stage according to the direction of the cruise acceleration;
[0037] determining a speed change of the deceleration segment of the deceleration sub-stage according to the cruising acceleration, the second sub-duration and the deceleration segment jerk;
[0038] Determining a speed change of a cruising section in a cruising sub-section of the acceleration phase according to the final speed of the acceleration section, the speed change of the deceleration section and the desired speed;
[0039] The third sub-duration of the cruise sub-phase is determined according to the cruise segment speed change and the cruise acceleration.
[0040] Specifically, the motion planning unit is specifically used for:
[0041] When it is determined that no cruise stage is required according to the difference between the deceleration end time position in the deceleration stage motion state and the obstacle avoidance flight position, an iterative dichotomy method is used to re-determine the target duration of the acceleration stage and the target duration of the deceleration stage; wherein, in one iteration, the following steps are included:
[0042] Determine the updated duration of the acceleration segment based on the first duration variable and the second duration variable input in this iteration, wherein the initial value of the first duration variable is the estimated duration of the acceleration segment, and the value of the second duration variable is zero;
[0043] Based on the acceleration segment update duration, updating the deceleration end time position, and determining whether the difference between the updated deceleration end time position and the obstacle avoidance flight position is less than a preset threshold;
[0044] If it is less than, determining the updated duration of the acceleration segment as the target duration of the acceleration segment, and determining the target duration of the deceleration segment according to the target duration of the acceleration segment;
[0045] If not less than, based on the difference between the updated deceleration end time position and the obstacle avoidance flight position, update the first duration variable and the second duration variable.
[0046] Optionally, the drone includes a millimeter wave radar sensor disposed at the nose of the drone and facing the flight direction;
[0047] The obstacle avoidance unit is specifically used for:
[0048] Determine the position information of each obstacle in the flight direction based on the sensor signal in the flight direction detected by the millimeter wave radar sensor;
[0049] Based on the position information of each obstacle, determine the target obstacle that is closest to the drone from among the obstacles;
[0050] The obstacle avoidance flight position is determined based on the position information of the target obstacle and the target flight position.
[0051] Optionally, the obstacle avoidance unit is further used for:
[0052] Determine the target flight position based on the flight control amount received from the remote control device; or,
[0053] Based on the set waypoint mission information, the target flight position is determined.
[0054] On the one hand, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above methods when executing the computer program.
[0055] In one aspect, a computer storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the steps of any of the above methods are implemented.
[0056] In one aspect, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any of the above methods.
[0057] In the embodiment of the present application, the current motion state of the drone and the obstacle information in the flight direction are determined based on the detection data of each sensor included in the drone, and the obstacle avoidance flight position of the drone is determined based on the obstacle information and the target flight position of the drone. The maximum speed, maximum acceleration and maximum jerk of the drone are used as constraints, and the kinematic planning result of the drone reaching the obstacle avoidance flight position is determined based on the current motion state and the obstacle avoidance flight position, and then the flight process of the drone is controlled based on the kinematic planning result. It can be seen that the obstacle avoidance flight position is determined based on the dynamically changing environment in the flight direction of the drone to meet the obstacle avoidance requirements and improve the safety of the drone flight. In addition, the kinematic constraint equation of the drone is used to establish a third-order model of speed, acceleration and jerk, which not only improves the real-time performance of the planning, but also makes the planning result smoother and meets the time optimization, thereby improving the flight efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0059] Figure 1 A schematic diagram of the architecture of a drone control system provided in an embodiment of the present application;
[0060] Figure 2 A schematic diagram of the structure of the obstacle avoidance sensing module provided in the embodiment of the present application;
[0061] Figure 3 A schematic diagram of a flow chart of a method for controlling a drone provided in an embodiment of the present application;
[0062] Figure 4 A schematic diagram of the flight control logic of the drone provided in the embodiment of the present application;
[0063] Figure 5 A schematic diagram of a process of motion planning using a position setting method provided in an embodiment of the present application;
[0064] Figure 6 A schematic diagram of a flow chart of determining a desired motion state in an acceleration phase using a speed setting method provided in an embodiment of the present application;
[0065] Figure 7 A schematic diagram of the process flow of the iterative dichotomy method provided in the embodiment of the present application;
[0066] Figure 8 A simulation data diagram provided for an embodiment of the present application;
[0067] Fig. 9 A schematic diagram of a structure of a control device for a drone provided in an embodiment of the present application;
[0068] Fig.10 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0070] To facilitate understanding of the technical solutions provided in the embodiments of the present application, some key terms used in the embodiments of the present application are explained here:
[0071] UAV: As the name implies, a UAV is an unmanned aircraft without a cockpit and controlled by radio remote control equipment and self-contained program control devices. UAVs are equipped with autopilots, program control devices and other equipment. Personnel on the ground, on ships or at the remote control station of the mother aircraft use radar and other equipment to track, locate, remotely control, telemeter and digitally transmit them. Compared with manned aircraft, it has the advantages of small size, low cost, easy use, low requirements for the combat environment, and strong battlefield survivability. UAVs can include unmanned helicopters, unmanned fixed-wing aircraft, unmanned multi-rotor aircraft, unmanned airships, and unmanned paragliders.
[0072] Take multi-rotor drones as an example. They are special unmanned rotorcraft with three or more rotor shafts. They are highly maneuverable and can take off and land vertically and hover. They are mainly suitable for low-altitude, low-speed missions that require vertical take-off and landing and hovering. The motors on each shaft rotate to drive the rotors, thereby generating lift thrust. The total pitch of the rotors is fixed, unlike a general helicopter, which is variable. By changing the relative speed between different rotors, the size of the single-axis propulsion force can be changed, thereby controlling the trajectory of the aircraft.
[0073] Motion planning: It is the process of establishing time-related constraints based on the UAV's dynamics and kinematic models, and then combining the environmental conditions to solve the optimal trajectory curve that meets all constraints. Generally speaking, motion planning can include three stages, namely the acceleration stage, the cruising stage, and the deceleration stage. Of course, in practical applications, not every motion planning needs to include three stages. The specific stages need to be judged based on the actual situation.
[0074] The following is a brief introduction to the design concept of the embodiments of the present application.
[0075] During the flight of a UAV, it is very important to plan the safe flight motion of the UAV in a complex environment.
[0076] In view of this, an embodiment of the present application provides a control method for a drone, in which the current motion state of the drone and obstacle information in the flight direction are determined based on the detection data of each sensor included in the drone, and the obstacle avoidance flight position of the drone is determined based on the obstacle information and the target flight position of the drone. The maximum speed, maximum acceleration and maximum jerk of the drone are used as constraints, and the kinematic planning result of the drone reaching the obstacle avoidance flight position is determined based on the current motion state and the obstacle avoidance flight position, and then the flight process of the drone is controlled based on the kinematic planning result. It can be seen that the obstacle avoidance flight position is determined based on the dynamically changing environment in the flight direction of the drone to meet the obstacle avoidance requirements and improve the safety of the drone flight. In addition, the kinematic constraint equation of the drone is used to establish a third-order model of speed, acceleration and jerk, so that the planning result is smoother and meets the time optimization, thereby improving the flight efficiency.
[0077] Furthermore, considering that in the related art, high-performance airborne computers are usually relied on for map generation and trajectory planning, and the size of high-performance airborne computers is usually large, which makes the UAV consume more power, and the overall size of the UAV is large, which makes the applicable scenarios of the UAV have certain limitations. Moreover, in the related art, state constraints will introduce a large number of inequality constraints, and the use of convex optimization methods will extend the polynomial solution time. In an unknown and dynamic environment, the current trajectory may appear invalid during the execution process and need to be replanned, which will cause the motion planning path to be unrealistic. Therefore, the embodiment of the present application adopts a method that combines the speed setting method with the position setting method, and uses analytical expressions to solve the motion planning problem. There is no need to solve the polynomial convex optimization problem, which greatly saves computing resources, and can calculate the motion trajectory that meets the kinematic constraints of the UAV in a very short time. It can be deployed in a low-computing power flight control computer and run directly.
[0078] In addition, the embodiment of the present application also uses millimeter-wave radar to cluster obstacles into single points, eliminating the need for dense point cloud information, thereby improving the real-time performance of the obstacle avoidance algorithm and greatly improving the efficiency and safety of the flight mission.
[0079] The solution provided in the embodiment of the present application can be applied to UAV flight scenarios, such as automatic waypoint flight or manual flight. Figure 1 As shown, it is a schematic diagram of the architecture of a drone control system provided in an embodiment of the present application. In this architecture, an obstacle avoidance perception module 101, a motion planning module 102 and a flight control module 103 may be included, which will be introduced separately below.
[0080] (1) Obstacle Avoidance Perception Module 101
[0081] The obstacle avoidance sensing module 101 integrates the detection data of various sensors through a combined navigation algorithm to obtain the information representing the motion state of the drone and the surrounding environment, such as the drone's own position, speed, acceleration, attitude angle, and obstacle distance, so as to assist in subsequent trajectory planning and control the flight process of the drone. The obstacle avoidance sensing module 101 is mainly composed of various sensors, such as Figure 2 As shown, one or more of the following sensors may be included:
[0082] 1) Inertial Measurement Unit (IMU) is a sensor used to detect and measure acceleration and rotational motion. Its principle is based on the law of inertia. These sensors range from ultra-small micro-electro-mechanical system (MEMS) sensors to laser gyroscopes with very high measurement accuracy.
[0083] 2) Global Positioning System (GPS), used to locate and output location information.
[0084] 3) Barometer
[0085] 4) Magnetometer
[0086] 5) Infrared sensor
[0087] 6) Millimeter wave radar sensors are characterized by small size, easy integration and high spatial resolution. Compared with optical sensors such as cameras, infrared and lasers, millimeter wave radar sensors have strong ability to penetrate fog, smoke and dust, have strong anti-interference capabilities, and can adapt to more complex flight environments.
[0088] In the specific implementation process, the millimeter wave radar sensor can be installed in the direction of the UAV's flight, so that the millimeter wave radar sensor always points to the forward flight direction of the UAV, for example, it can be installed in the direction of the nose. The millimeter wave radar sensor can output clustered points, that is, it only outputs the obstacle information closest to the UAV in the forward direction of the UAV.
[0089] Of course, in actual applications, other possible sensors may also be provided, and the embodiments of the present application do not limit this.
[0090] (2) Motion Planning Module 102
[0091] The motion planning module 102 will use the motion planning algorithm based on the constraints of the UAV kinematics and dynamics model according to the current motion state of the UAV, obstacle distance and waypoint mission information obtained by the obstacle avoidance perception module, and quickly calculate a motion trajectory that meets all constraints in real time, and send the motion trajectory to the flight control module to execute specific flight missions.
[0092] (3) Flight control module 103
[0093] The flight control module 103 may include a control solver, an electronic speed regulator, and a power system, etc. Among them, the control solver is responsible for tracking and controlling the motion state parameters such as the attitude, speed, and position of the drone, and strictly executes the instructions issued by the motion planning module, so that the drone can better track the pre-planned motion trajectory and complete business goals and obstacle avoidance tasks. The electronic speed regulator and the power system provide the pulling force required for the drone to fly and generate torque, so that the drone can complete behaviors such as attitude changes, speed changes, and position changes.
[0094] Of course, the method provided in the embodiment of the present application is not limited to Figure 1 The embodiments of the present application are not limited to the architecture shown.
[0095] See also Figure 3 , which is a flow chart of a method for controlling a drone provided in an embodiment of the present application.
[0096] Step 301: Determine the current motion state of the drone and obstacle information in the flight direction based on detection data from various sensors included in the drone.
[0097] In an embodiment of the present application, a plurality of sensors may be provided on the drone, such as the various sensors included in the above-mentioned obstacle avoidance sensing module, for detecting the current motion state of the drone and information such as the surrounding environment.
[0098] As introduced in the above architecture, the nose position of the drone provided in the embodiment of the present application is equipped with a millimeter-wave radar sensor. Different from the generation of dense point cloud information in the related art, the millimeter-wave radar sensor can cluster obstacles into a single point, that is, it only outputs the nearest obstacle information in the flight direction of the drone, thereby reducing the complexity of the obstacle avoidance algorithm, improving the real-time performance of the obstacle avoidance algorithm, and greatly improving the efficiency and safety of the flight mission.
[0099] Step 302: Determine the obstacle avoidance flight position of the UAV based on the obstacle information and the target flight position of the UAV.
[0100] In the embodiment of the present application, when the drone is flying, it is necessary to pre-set the target flight position so that motion planning can be performed based on the target flight position later.
[0101] In one embodiment, in a manually controlled flight scenario, the flight of the drone can be controlled by a remote control device. After the remote control device sends a control command to the drone, the drone can determine the target flight position based on the flight control amount indicated in the received control command. For example, if the control command is to control the flight forward 10 meters, the target flight position is 10 meters forward of the current position. Alternatively, the control command can also give parameters such as speed and direction, and the target flight position can be determined based on these parameters.
[0102] In one embodiment, in an automatic waypoint flight scenario, waypoint mission information can be given in advance, and the waypoint mission information specifies the destination to be flown for the mission, so that the drone will automatically navigate to the destination. Therefore, after the waypoint mission information is set, the drone can determine the target flight position, that is, the position corresponding to the destination, based on the set waypoint mission information.
[0103] In an embodiment of the present application, after obtaining information such as the target flight position, current motion state, and surrounding environment of the drone, motion planning of the drone can be performed based on this information.
[0104] In actual application, the motion planning process is carried out in real time, and considering that there may be obstacles in the flight direction, the trajectory planned each time is not necessarily a trajectory that directly reaches the target flight position. For example, when there are no obstacles in the flight direction, it is possible to fly directly to the target flight position. When there are obstacles in the flight direction, in order to avoid the obstacle, it may first reach a certain position before the obstacle, and change the flight direction to avoid the obstacle. Therefore, it is first necessary to determine the obstacle avoidance flight position that the drone can fly to in order to avoid the obstacle, as the expected position of the current motion planning. Of course, in addition to considering obstacles, other factors can also be considered comprehensively, and the embodiments of the present application do not limit this.
[0105] Specifically, based on the sensor signal in the flight direction detected by the millimeter-wave radar sensor, the position information of each obstacle in the flight direction can be determined, and based on the position information of each obstacle, the target obstacle closest to the UAV can be determined from the various obstacles, and the obstacle avoidance flight position can be determined based on the position information of the target obstacle and the target flight position. Therefore, by clustering the obstacles into single points, there is no need for dense point cloud information, which improves the real-time performance of the obstacle avoidance algorithm and greatly improves the efficiency and safety of the flight mission.
[0106] Step 303: Taking the maximum speed, maximum acceleration and maximum jerk of the UAV as constraints, and according to the current motion state and obstacle avoidance flight position, determine the kinematic planning result of the UAV to reach the obstacle avoidance flight position.
[0107] In an embodiment of the present application, the motion planning module will adopt a motion planning algorithm based on the constraints of the UAV's kinematic and dynamic models according to the UAV's current motion state, obstacle distance, and waypoint mission information obtained by the obstacle avoidance perception module, and quickly calculate a motion trajectory that meets all constraints in real time, and send the motion trajectory to the flight control module to perform a specific flight mission.
[0108] In one embodiment, in order to synchronize the trajectory phase of the UAV, the motion state obtained by the UAV obstacle avoidance perception module through the combined navigation solution method can be converted into the UAV track coordinate system for motion planning. Therefore, in the motion planning process, there will be no situation where the motion is not synchronized due to the separate planning of different directions of the UAV (such as the x and y axes), such as the appearance of curves in the UAV flight trajectory, which does not meet the expected planning results. The UAV motion planning problem can be simplified to a single-axis planning problem, which greatly reduces the complexity of the algorithm. The subsequent motion planning algorithm is performed in the UAV track coordinate system by default.
[0109] The process of motion planning will be introduced in detail in the subsequent process, so it will not be introduced here.
[0110] Step 304: Control the flight process of the UAV according to the kinematic planning result.
[0111] Specifically, through the above kinematic planning results, the motion state of the UAV at each moment can be obtained, so that the power system can be controlled to provide corresponding power and the flight trajectory of the UAV can be controlled to conform to the pre-planned motion trajectory.
[0112] Specifically, referring to the above-mentioned architecture department, the flight control-related processes can be implemented by the flight control module. The flight control module can be specifically composed of a control solver, an electronic speed regulator, and a power system. Among them, the control solver is responsible for the attitude, speed, and position tracking control of the UAV. It will strictly execute the instructions issued by the motion planning module, so that the UAV can better track the pre-planned motion trajectory, complete business goals and obstacle avoidance tasks, and the electronic speed regulator and power system provide the pulling force required for the UAV to fly and generate torque, so that the UAV can complete attitude changes, speed changes, and position changes.
[0113] See also Figure 4 The figure shows the flight control logic diagram of the UAV. According to the planned position in the motion planning result and the current position, speed and attitude angle fed back in real time, the Proportional-Integral-Differential (PID) controller and the anti-disturbance control controller included in the UAV can adjust the power in real time, so that the power system can provide the pulling force required for the UAV flight and generate torque, so that the UAV can complete the behavior of attitude change, speed change and position change.
[0114] The following is an introduction to the motion planning process of the drone with reference to the accompanying drawings.
[0115] In an embodiment of the present application, when performing motion planning, a combination of a position setting method and a speed setting method is adopted, wherein the speed setting method is a subsystem of the position setting method. When the speed setting method is adopted, path planning is performed based on assumed expected speed and expected acceleration. When the position setting method is adopted, motion planning is performed based on the expected position and expected speed combined with various motion states obtained by the speed setting method.
[0116] In the present application examples, see Figure 5 As shown, it is a flowchart of the motion planning process using the position setting method.
[0117] Step 501: Acquire motion planning preparation data.
[0118] Specifically, the motion planning preparation data may include data such as the current motion state, constraint conditions, and obstacle avoidance flight position of the UAV obtained in the above process.
[0119] Specifically, the motion state may include parameters such as position p, velocity v, acceleration a, and jerk j, and the current motion state may include parameters such as initial position p0, initial velocity v0, initial acceleration a0, and initial jerk j0, which may be obtained through the detection data of each sensor included in the motion state. Of course, other parameters may also be included, such as attitude angle, etc., which are not limited in the embodiments of the present application.
[0120] In the specific implementation process, the constraint conditions are updated in advance based on the maximum speed, maximum acceleration and maximum jerk. The constraint conditions may include the following conditions:
[0121] (1) Speed constraint: -v max <v<v max , where v max is the maximum speed value.
[0122] (2) Acceleration constraint: -a max <a<a max , where a max is the value of maximum acceleration.
[0123] (3) Acceleration constraint condition: -j max <j<j max , where j max is the value of the maximum acceleration.
[0124] In the specific application process, the values of the above maximum speed, maximum acceleration and maximum jerk can be set according to the actual situation, for example, they can be the limit values of the drone. In addition, the flight mode of the drone can also be set, and the limit values in different flight modes can be different, such as fast mode and low energy mode. The values of maximum speed, maximum acceleration and maximum jerk in fast mode can be higher than those in low energy mode, so that the user can select the corresponding flight mode according to the actual situation, and then set the corresponding constraint conditions according to the selected flight mode.
[0125] It should be noted that once the constraints are set and not updated, there is no need to set the constraints again.
[0126] In the embodiment of the present application, the obstacle avoidance flight position p ref The desired flight location can be obtained based on the input manual control amount or waypoint mission information combined with obstacle information.
[0127] Step 502: Determine the desired motion state during the acceleration phase using a speed setting method.
[0128] Specifically, in the embodiment of the present application, the speed of the drone when it reaches the obstacle avoidance flight position is 0, so the expected speed v when the drone reaches the obstacle avoidance flight position can be ref Set to 0, use the speed setting method, and determine the cruising speed of the drone based on the current motion state and obstacle avoidance flight position, with the maximum speed, maximum acceleration, and maximum jerk of the drone as constraints.
[0129] See also Figure 6 As shown, it is a flow chart of determining the expected motion state in the acceleration phase by using the speed setting method.
[0130] Step 5020: Determine the assumed stopping speed based on the initial speed and initial acceleration in the current motion state, as well as the maximum jerk and the expected acceleration when reaching the obstacle avoidance flight position.
[0131] In the embodiment of the present application, the input of the speed setting method includes the initial speed v0 and initial acceleration a0 in the current state of the drone, and the constraint condition includes the acceleration constraint condition -a max <a<a max and jerk constraints-j max <j<j max .
[0132] The flight process of a drone generally includes three stages, namely the acceleration stage, the cruising stage and the deceleration stage. Generally speaking, the acceleration of the drone when it reaches the obstacle avoidance flight position is 0, so the expected acceleration v when the drone reaches the obstacle avoidance flight position can be calculated. ref Set to 0, and then, according to the initial velocity v0, initial acceleration a0, and maximum jerk j max and the expected acceleration 0 when reaching the obstacle avoidance flight position, determine the assumed stopping speed, the assumed stopping speed v stp It can be expressed as follows:
[0133]
[0134] Step 5021: Determine the cruising acceleration of the UAV based on the comparison result between the assumed stopping speed and the expected speed when the UAV reaches the obstacle avoidance flight position.
[0135] Specifically, we will assume that the stopping speed v stp With the expected speed v ref For comparison, based on the assumed stopping speed v stp With the expected speed v ref The comparison results between them are used to determine the cruising acceleration of the UAV.
[0136] Specifically, if we assume that the stopping speed v stp Less than the expected speed v ref , that is, vref >v stp , then the cruise acceleration is determined to be the maximum acceleration, and the sign is positive, that is, the cruise acceleration is set to a cru =a max Otherwise, if the stopping speed v is assumed stp Greater than the expected speed v ref , that is, v ref <v stp , then the cruise acceleration is determined to be the maximum acceleration, and the sign is negative, that is, the cruise acceleration can be set to a cru =-a max .
[0137] Step 5022: Determine the first sub-duration of the acceleration sub-phase in the acceleration phase according to the difference between the cruising acceleration and the initial acceleration.
[0138] In the embodiment of the present application, the cruising acceleration a can be used to cru , initial velocity v0 and initial acceleration a0 to determine the expected motion state of the UAV during the acceleration phase.
[0139] In the embodiment of the present application, the acceleration stage may still include multiple stages, namely, the acceleration sub-stage, the cruising sub-stage and the deceleration sub-stage. However, unlike the acceleration stage, the acceleration sub-stage, the cruising sub-stage and the deceleration sub-stage are distinguished by the speed of speed increase. That is, in these stages, the speed is still increasing, but the growth rate is different. In the acceleration sub-stage, the speed increases faster, in the cruising sub-stage, the speed increases at a uniform rate, and in the deceleration sub-stage, the speed growth rate gradually decreases until the acceleration is 0.
[0140] Specifically, according to the cruising acceleration a cru The difference between the initial acceleration a0 and the acceleration time a1 is used to determine the first sub-duration Δt1 of the acceleration sub-phase in the acceleration phase. Δt1 can be calculated as follows:
[0141]
[0142] Step 5023: Determine the acceleration of the UAV in the acceleration sub-phase according to the comparison result between the cruising acceleration and the initial acceleration.
[0143] Specifically, compare the initial acceleration a0 with the cruising acceleration a cru Size, if a cru > a0, the acceleration of the acceleration section is determined to be the maximum jerk, and the sign is positive, that is, the acceleration of the acceleration section is set to j acc =j max Otherwise, if a cru<a0, the acceleration of the acceleration section is determined to be the maximum acceleration, and the sign is negative, that is, the acceleration of the acceleration section j can be set acc =-j max .
[0144] Step 5024: Determine the final velocity of the acceleration segment at the end of the acceleration sub-stage according to the initial velocity, the initial acceleration, the first sub-duration, and the acceleration of the acceleration segment.
[0145] Specifically, the final velocity v1 of the acceleration section can be calculated as follows:
[0146]
[0147] In addition, the expected motion states of the deceleration sub-phase and the cruise sub-phase in the acceleration phase can be determined according to the cruise acceleration and the maximum jerk, as described below:
[0148] Step 5025: Determine the second sub-duration of the deceleration sub-phase in the acceleration phase according to the cruising acceleration and the maximum jerk.
[0149] Specifically, the second sub-time length Δt3 can be calculated as follows:
[0150] Δt3:
[0151] Step 5026: Determine the deceleration jerk of the deceleration sub-phase according to the direction of the cruising acceleration.
[0152] Specifically, determine whether the sign of the cruise acceleration is positive. If a cru >0, that is, the sign is positive, then the deceleration jerk j dec =-j max Otherwise, if a cru <0, that is, the sign is negative, the deceleration stage acceleration j dec =j max .
[0153] Step 5027: Determine the speed change of the deceleration segment of the deceleration sub-phase according to the cruising acceleration, the second sub-duration and the deceleration segment jerk.
[0154] Specifically, the speed change in the deceleration stage can be calculated as follows:
[0155]
[0156] Step 5028: Determine the speed change of the cruise segment in the cruise sub-stage of the acceleration phase according to the final speed of the acceleration phase, the speed change of the deceleration phase and the expected speed.
[0157] In one embodiment, if the v calculated in step 5021 is stp =v ref , then the third sub-time length Δt2 corresponding to the cruise sub-phase is 0, and there is no cruise sub-phase.
[0158] In one embodiment, if the v calculated in step 5020 is stp ≠v ref , the cruise speed change Δv2 of the cruise sub-phase can be determined according to the final speed of the acceleration phase and the speed change of the deceleration phase obtained in the above steps 5024 and 5026, which can be calculated as follows:
[0159] Δv2=v ref -v1-Δv3
[0160] Step 5029: Determine the third sub-duration of the cruise sub-phase according to the cruise speed change and the cruise acceleration.
[0161] Specifically, the third sub-time length Δt2 can be calculated as follows:
[0162]
[0163] Step 503: Determine the cruising speed based on the expected motion state in the acceleration phase.
[0164] Through the above steps, the expected motion state of the acceleration segment corresponding to the acceleration phase can be obtained, that is, the required duration of each sub-phase of the above acceleration phase and the value of each state parameter. Then, through the obtained expected motion state of the acceleration segment, the assumed stopping position at the end of the acceleration phase can be determined, and then the cruising speed can be determined based on the comparison result between the assumed stopping position and the obstacle avoidance flight position.
[0165] Specifically, according to the duration, speed, acceleration, and jerk of each of the above sub-stages, the assumed stop position p at the end of the acceleration stage can be stp , calculate the sign of the difference between the assumed stopping position and the obstacle avoidance flight position as follows:
[0166] d p =sign(p ref -p stp )
[0167] Among them, sign represents the sign function, if d p >0, the cruising speed v cru =v max Otherwise, if d p <0, the cruising speed v cru =-v max .
[0168] Please continue to see Figure 5 .
[0169] Step 504: Determine the estimated duration of the acceleration segment and the target motion state of the acceleration segment corresponding to the acceleration phase of the UAV according to the cruising speed.
[0170] Specifically, according to the cruising speed, the speed setting method is used to re-determine the estimated duration of the acceleration segment and the target motion state of the acceleration segment corresponding to the acceleration phase, as well as the estimated duration of the deceleration segment and the target motion state of the deceleration segment corresponding to the deceleration phase.
[0171] For the acceleration phase, the cruising speed is used as the expected speed in the speed setting method, and the above speed setting method is executed again to obtain the sub-duration and motion state of each sub-phase corresponding to the acceleration phase. Then, the estimated duration of the acceleration segment t is obtained based on the sum of the sub-durations of these sub-phases. a , and according to the duration, speed, acceleration and jerk of each sub-stage, the acceleration segment end time position p at the end time of the acceleration stage can be a .
[0172] For the deceleration stage, the cruising speed is taken as the initial speed and the expected speed is zero. The above speed setting method is executed again to obtain the sub-duration and motion state of each sub-stage corresponding to the deceleration stage. Then, the estimated deceleration stage duration t is obtained according to the sum of the sub-durations of these sub-stages. b , and according to the duration, speed, acceleration and jerk of each sub-stage, the acceleration segment end time position p at the end time of the deceleration stage can be b .
[0173] Since this process is similar to the above process, it will not be described again here.
[0174] Step 505: Determine whether a cruising phase is required.
[0175] Specifically, whether a cruising stage is needed can be determined based on the difference between the deceleration end position in the deceleration stage motion state and the obstacle avoidance flight position, that is, whether the obstacle avoidance flight position can be reached by using the motion state obtained above. If it can be reached, there is no need for a cruising stage. If it cannot be reached, a cruising stage needs to be set.
[0176] Specifically, it is determined whether the following conditions are met to determine whether the cruising phase is required. The conditions are:
[0177] sign(p b -p ref )·d p ≤0
[0178] Step 506: If the result of step 505 is yes, the duration of the cruise segment is determined based on the end time position of the acceleration segment.
[0179] If the above conditions are met, it is determined that a cruising phase is required, and the final acceleration phase target duration is determined to be the estimated acceleration phase duration t obtained above. a The target duration of the deceleration segment is the estimated duration of the acceleration segment obtained above, t b , and the cruise duration t corresponding to the cruise phase cru The calculation is done as follows:
[0180]
[0181] Step 507: If the result of step 505 is no, an iterative binary search method is used to determine the target duration of the acceleration segment and the target duration of the deceleration segment.
[0182] If the above conditions are not met, that is, if sign(p b -p ref )·d p >0, it means that the original obstacle avoidance flight position has been exceeded, so there is no need for a cruise phase, and the acceleration and deceleration durations obtained above cannot be used and need to be re-determined.
[0183] In one implementation, the final acceleration segment target duration and deceleration segment target duration can be re-determined by using an iterative binary search method. Figure 7 As shown in FIG. 1 , it is a flowchart of the iterative binary division method. Since each iterative process is similar, one iteration is specifically used as an example for introduction. One iteration process specifically includes the following steps:
[0184] Step 5071: Determine the updated duration of the acceleration segment based on the first duration variable and the second duration variable input in this iteration, wherein the initial value of the first duration variable is the estimated duration of the acceleration segment, and the value of the second duration variable is zero.
[0185] Among them, the first duration variable is a larger value, and the second duration variable is a smaller value. When initializing, the first duration variable t is set H =t a , the second duration variable t L =0, and then obtain the new acceleration segment update duration
[0186] Step 5072: Based on the acceleration segment update duration, obtain the re-planned deceleration end time position, that is, recalculate the planned end point p using the above speed setting method b .
[0187] Step 5073: Determine whether the iteration termination condition is met, that is, whether the difference between the updated deceleration end position and the obstacle avoidance flight position is less than a preset threshold.
[0188] For example, the preset threshold is set to 0.01m, that is, the acceptable planning error is 0.01m, so as to determine whether the following iteration termination conditions are met:
[0189] |p b -p ref |<0.01m
[0190] Step 5074: If not satisfied, update the search condition and reset the new acceleration segment update duration. That is, based on the difference between the updated deceleration end position and the obstacle avoidance flight position, update the first duration variable and the second duration variable, and reset the acceleration segment update duration until the iterative process converges to obtain the final acceleration segment target duration t a and the target duration of the deceleration segment t b .
[0191] That is, if sign(p b -p ref )·d p <0, then t L =t a , otherwise if sign(p b -p ref )·d p >0,t H =t a
[0192] Step 5075: If satisfied, the iterative process converges, and the updated duration of the acceleration segment is determined to be the target duration of the acceleration segment, and the target duration of the deceleration segment is determined based on the target duration of the acceleration segment.
[0193] Please continue to see Figure 5 .
[0194] Step 508: Obtain kinematic planning results according to the target durations and target motion states obtained above.
[0195] Through the above process, the target duration of the acceleration segment, the target motion state of the acceleration segment, the target duration of the deceleration segment, the target motion state of the deceleration segment and the cruise segment duration can be obtained, so as to determine the motion state at each moment and obtain the kinematic planning results. The obtained kinematic planning results can be used for subsequent flight control.
[0196] In the embodiment of the present application, the above motion planning is only one of the motion planning processes. In the actual application process, the motion planning can be updated according to the real-time status to meet the actual flight needs. In addition, the above method combines the speed setting method with the position setting method, uses analytical expressions to solve the motion planning problem, and does not need to solve polynomial convex optimization problems, which greatly saves computing resources and can calculate the motion trajectory that meets the kinematic constraints of the drone in a very short time. It can be deployed in a low-computing-power flight control computer and run directly.
[0197] See also Figure 8 As shown, it is a simulation data diagram obtained by the above method in the embodiment of the present application. Among them, the simulation data is obtained by the above motion planning algorithm with the initial position of 0, the initial speed of 0, the initial acceleration of 0, the expected position of 5, the maximum value of the acceleration modulus of 5, and the maximum value of the jerk modulus of 15 as an example. Among them, the horizontal axis is the duration, and the vertical axis is the value of each parameter. For example, the time is 0 to 0.8, and this stage is the acceleration stage. It can be seen that in this stage, the maximum jerk in the positive direction is first used to increase the acceleration, and then the maximum jerk in the opposite direction is used to reduce the acceleration. Correspondingly, the change in acceleration is to increase uniformly. After an acceleration cruising stage (acceleration remains unchanged), the acceleration decreases uniformly, and the speed gradually increases to the cruising acceleration, and the position also gradually increases. The same applies to other stages.
[0198] In summary, in the embodiment of the present application, obstacles are clustered into single points using millimeter wave radar, and dense point cloud information is not required, thereby improving the real-time performance of the obstacle avoidance algorithm. In addition, by converting the state of the drone to the drone track coordinate system for motion planning, the trajectory of the drone can achieve phase synchronization, that is, in the motion planning process, there will be no situation where the motion is not synchronized due to the separate planning of different directions of the drone, such as the appearance of curves in the flight trajectory of the drone, which does not meet the expected planning results, so that the motion planning problem of the drone can be simplified to a single-axis planning problem, greatly reducing the complexity of the algorithm. In addition, by using the speed setting method and the position setting method to analytically solve the motion planning results while satisfying the speed constraints, acceleration constraints, and jerk constraints, the algorithm has a small amount of computation and strong real-time performance. It can be directly run in the flight control computer without the need for additional dedicated onboard computers, thereby reducing the cost and power consumption of the obstacle avoidance system.
[0199] See also Fig. 9 Based on the same inventive concept, the embodiment of the present application further provides a control device 90 for a drone, the device comprising:
[0200] The detection unit 901 is used to determine the current motion state of the drone and obstacle information in the flight direction according to the detection data of each sensor included in the drone;
[0201] The obstacle avoidance unit 902 is used to determine the obstacle avoidance flight position of the UAV according to the obstacle information and the target flight position of the UAV;
[0202] The motion planning unit 903 is used to determine the kinematic planning result of the UAV to reach the obstacle avoidance flight position according to the current motion state and the obstacle avoidance flight position, taking the maximum speed, maximum acceleration and maximum jerk of the UAV as constraints;
[0203] The flight control unit 904 is used to control the flight process of the UAV according to the kinematic planning results.
[0204] Specifically, the motion planning unit 903 is specifically used for:
[0205] According to the current motion state and obstacle avoidance flight position, the cruising speed of the UAV is determined with the maximum speed, maximum acceleration and maximum jerk of the UAV as constraints;
[0206] According to the cruising speed, determine the estimated duration of the acceleration segment and the target motion state of the acceleration segment corresponding to the acceleration phase of the UAV, and the estimated duration of the deceleration segment and the target motion state of the deceleration segment corresponding to the deceleration phase;
[0207] When it is determined that a cruise phase is required based on the difference between the deceleration end position in the deceleration phase motion state and the obstacle avoidance flight position, the cruise phase duration corresponding to the cruise phase is determined based on the difference;
[0208] According to the acceleration segment duration, the target motion state of the acceleration segment, the deceleration segment duration, the target motion state of the deceleration segment and the cruise segment duration, the motion state at each moment is determined to obtain the kinematic planning result.
[0209] Specifically, the motion planning unit 903 is specifically used for:
[0210] Determine the assumed stopping speed according to the initial speed and initial acceleration in the current motion state, as well as the maximum jerk and the expected acceleration when reaching the obstacle avoidance flight position;
[0211] Determine the cruising acceleration of the UAV based on the comparison between the assumed stopping speed and the expected speed when the UAV reaches the obstacle avoidance flight position;
[0212] Determine the desired motion state of the acceleration segment based on the cruise acceleration, the initial speed and the initial acceleration;
[0213] Determine the assumed stopping position at the end of the acceleration phase based on the expected motion state of the acceleration phase;
[0214] The cruising speed is determined based on the comparison between the assumed stopping position and the obstacle avoidance flight position.
[0215] Specifically, the motion planning unit 903 is specifically used for:
[0216] If the stopping speed is assumed to be less than the expected speed, the cruising acceleration is determined to be the maximum acceleration and has a positive sign;
[0217] If the stopping speed is assumed to be greater than the expected speed, the cruising acceleration is determined to be the maximum acceleration and has a negative sign.
[0218] Specifically, the motion planning unit 903 is specifically used for:
[0219] Determining a first sub-duration of an acceleration sub-phase in the acceleration phase according to a difference between the cruising acceleration and the initial acceleration;
[0220] According to the comparison result between the cruising acceleration and the initial acceleration, the acceleration of the UAV in the acceleration sub-phase is determined;
[0221] Determine the final velocity of the acceleration segment at the end of the acceleration sub-stage according to the initial velocity, the initial acceleration, the first sub-duration, and the acceleration of the acceleration segment;
[0222] The desired motion states of the deceleration sub-phase and the cruise sub-phase in the acceleration phase are determined according to the cruise acceleration and the maximum jerk.
[0223] Specifically, the motion planning unit 903 is specifically used for:
[0224] Determine the second sub-duration of the deceleration sub-phase according to the cruising acceleration and the maximum jerk;
[0225] According to the direction of the cruise acceleration, the deceleration jerk of the deceleration sub-stage is determined;
[0226] Determine the speed change of the deceleration section of the deceleration sub-stage according to the cruising acceleration, the second sub-duration and the deceleration section jerk;
[0227] Determine the speed change of the cruise segment in the cruise sub-stage of the acceleration phase according to the final speed of the acceleration phase, the speed change of the deceleration phase and the expected speed;
[0228] The third sub-duration of the cruise sub-phase is determined according to the speed change of the cruise segment and the cruise acceleration.
[0229] Specifically, the motion planning unit 903 is specifically used for:
[0230] When it is determined that no cruise phase is required based on the difference between the deceleration end position and the obstacle avoidance flight position in the deceleration phase motion state, the target duration of the acceleration phase and the target duration of the deceleration phase are re-determined by using an iterative dichotomy method; wherein, in one iteration, the following steps are included:
[0231] Determine the updated duration of the acceleration segment based on the first duration variable and the second duration variable input in this iteration, wherein the initial value of the first duration variable is the estimated duration of the acceleration segment, and the value of the second duration variable is zero;
[0232] Based on the acceleration segment update duration, update the deceleration end time position, and determine whether the difference between the updated deceleration end time position and the obstacle avoidance flight position is less than a preset threshold;
[0233] If it is less than, determine the updated duration of the acceleration segment as the target duration of the acceleration segment, and determine the target duration of the deceleration segment according to the target duration of the acceleration segment;
[0234] If not, the first duration variable and the second duration variable are updated based on the difference between the updated deceleration end position and the obstacle avoidance flight position.
[0235] Optionally, the drone includes a millimeter wave radar sensor disposed at the nose of the drone and facing the flight direction;
[0236] The obstacle avoidance unit 902 is specifically used for:
[0237] Based on the sensor signal in the flight direction detected by the millimeter wave radar sensor, the position information of each obstacle in the flight direction is determined;
[0238] Based on the position information of each obstacle, determine the target obstacle closest to the drone from among the obstacles;
[0239] The obstacle avoidance flight position is determined based on the position information of the target obstacle and the target flight position.
[0240] Optionally, the obstacle avoidance unit 902 is further used for:
[0241] Determine the target flight position based on the flight control quantity sent by the received remote control device; or,
[0242] Based on the set waypoint mission information, determine the target flight position.
[0243] Through the above device, obstacles are clustered into single points using millimeter wave radar, without dense point cloud information, thus improving the real-time performance of the obstacle avoidance algorithm. In addition, by using the speed setting method and the position setting method, the motion planning result is solved analytically while satisfying the speed constraint, acceleration constraint, and jerk constraint. The algorithm has a small amount of computation and strong real-time performance. It can be directly run in the flight control computer without the need for an additional dedicated onboard computer, thus reducing the cost and power consumption of the obstacle avoidance system.
[0244] The device can be used to execute the methods shown in the various embodiments of the present application. Therefore, for the functions that can be implemented by the various functional modules of the device, reference can be made to the description of the aforementioned embodiments and no further details will be given.
[0245] See also Fig.10 Based on the same technical concept, an embodiment of the present application also provides a computer device 100, which can be set in a drone, such as a flight control computer of a drone. The computer device 100 may include a memory 1001 and a processor 1002.
[0246] The memory 1001 is used to store computer programs executed by the processor 1002. The memory 1001 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the computer device, etc. The processor 1002 may be a central processing unit (CPU), or a digital processing unit, etc. The specific connection medium between the above-mentioned memory 1001 and the processor 1002 is not limited in the embodiments of the present application. The embodiments of the present application are Fig.10 In the embodiment, the memory 1001 and the processor 1002 are connected via a bus 1003. The bus 1003 is connected to the processor 1002 via a bus 1003. Fig.10 The connection between other components is shown by bold lines, and is not intended to be limiting. The bus 1003 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0247] The memory 1001 may be a volatile memory, such as a random-access memory (RAM); the memory 1001 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 1001 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1001 may be a combination of the above memories.
[0248] The processor 1002 is used to execute the method executed by the device in each embodiment of the present application when calling the computer program stored in the memory 1001.
[0249] In some possible implementations, various aspects of the method provided in the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the method according to the various exemplary implementations of the present application described above in this specification. For example, the computer device can execute the method executed by the device in each embodiment of the present application.
[0250] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0251] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0252] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for controlling an unmanned aerial vehicle, characterized in that: The method comprises: Determine the current motion state of the drone and obstacle information in the flight direction according to detection data of various sensors included in the drone; Determining an obstacle avoidance flight position of the UAV according to the obstacle information and the target flight position of the UAV; Determine the cruising speed of the UAV according to the current motion state and the obstacle avoidance flight position, with the maximum speed, maximum acceleration and maximum jerk of the UAV as constraints; According to the cruising speed, determining the estimated duration of the acceleration segment and the target motion state of the acceleration segment corresponding to the acceleration phase of the UAV, and the estimated duration of the deceleration segment and the target motion state of the deceleration segment corresponding to the deceleration phase; When it is determined that a cruise phase is required according to the difference between the deceleration end time position in the deceleration phase target motion state and the obstacle avoidance flight position, the cruise phase duration corresponding to the cruise phase is determined according to the difference; According to the estimated duration of the acceleration segment, the target motion state of the acceleration segment, the estimated duration of the deceleration segment, the target motion state of the deceleration segment, and the duration of the cruise segment, the motion state at each moment is determined to obtain a kinematic planning result; The flight process of the UAV is controlled according to the kinematic planning result.
2. The method according to claim 1, characterized in that The determining the cruising speed of the UAV according to the current motion state and the obstacle avoidance flight position and taking the maximum speed, maximum acceleration and maximum jerk of the UAV as constraints includes: determining an assumed stopping speed according to an initial speed and an initial acceleration in the current motion state, the maximum jerk, and an expected acceleration when reaching the obstacle avoidance flight position; determining a cruising acceleration of the UAV according to a comparison result between the assumed stopping speed and an expected speed of the UAV when the UAV reaches the obstacle avoidance flight position; Determining an expected motion state of an acceleration segment based on the cruising acceleration, the initial speed, and the initial acceleration; Determining an assumed stopping position at the end of the acceleration phase based on the expected motion state of the acceleration phase; The cruising speed is determined based on a comparison result between the assumed stop position and the obstacle avoidance flight position.
3. The method according to claim 2, characterized in that Determining the cruising acceleration of the UAV according to a comparison result between the assumed stopping speed and the expected speed of the UAV when the UAV reaches the obstacle avoidance flight position includes: If the assumed stopping speed is less than the expected speed, the cruising acceleration is determined to be the maximum acceleration, and the sign is positive; If the assumed stopping speed is greater than the expected speed, the cruising acceleration is determined to be the maximum acceleration, and a negative sign is determined.
4. The method according to claim 2, characterized in that Determining an expected motion state of an acceleration segment based on the cruising acceleration, the initial speed, and the initial acceleration includes: determining a first sub-duration of an acceleration sub-phase in the acceleration phase according to a difference between the cruising acceleration and the initial acceleration; Determining an acceleration jerk of the UAV in the acceleration sub-phase according to a comparison result between the cruising acceleration and the initial acceleration; Determine the final speed of the acceleration segment at the end of the acceleration sub-stage according to the initial speed, the initial acceleration, the first sub-duration, and the acceleration of the acceleration segment; The expected motion states of the deceleration sub-phase and the cruising sub-phase in the acceleration phase are determined according to the cruising acceleration and the maximum jerk.
5. The method according to claim 4, characterized in that Determining the desired motion states of the deceleration sub-phase and the cruise sub-phase in the acceleration phase according to the cruise acceleration and the maximum jerk includes: determining a second sub-duration of the deceleration sub-phase according to the cruising acceleration and the maximum jerk; Determining a deceleration jerk of the deceleration sub-stage according to the direction of the cruise acceleration; determining a speed change of the deceleration segment of the deceleration sub-stage according to the cruising acceleration, the second sub-duration and the deceleration segment jerk; Determining a speed change of a cruising section in a cruising sub-section of the acceleration phase according to the final speed of the acceleration section, the speed change of the deceleration section and the desired speed; The third sub-duration of the cruise sub-phase is determined according to the cruise segment speed change and the cruise acceleration.
6. The method according to claim 1, characterized in that After determining the estimated duration of the acceleration segment and the target motion state of the acceleration segment corresponding to the acceleration phase of the UAV and the estimated duration of the deceleration segment and the target motion state of the deceleration segment corresponding to the deceleration phase according to the cruising speed, the method further includes: When it is determined that no cruise stage is required according to the difference between the deceleration end time position in the deceleration stage target motion state and the obstacle avoidance flight position, an iterative dichotomy method is used to re-determine the acceleration stage target duration and the deceleration stage target duration; wherein, in one iteration, the following steps are included: Determine the updated duration of the acceleration segment based on the first duration variable and the second duration variable input in this iteration, wherein the initial value of the first duration variable is the estimated duration of the acceleration segment, and the value of the second duration variable is zero; Based on the acceleration segment update duration, updating the deceleration end time position, and determining whether the difference between the updated deceleration end time position and the obstacle avoidance flight position is less than a preset threshold; If it is less than, determining the updated duration of the acceleration segment as the target duration of the acceleration segment, and determining the target duration of the deceleration segment according to the target duration of the acceleration segment; If not less than, based on the difference between the updated deceleration end time position and the obstacle avoidance flight position, update the first duration variable and the second duration variable.
7. The method according to any one of claims 1 to 6, characterized in that: The drone includes a millimeter wave radar sensor disposed at the nose of the drone and facing the flight direction; Determining an obstacle avoidance flight position of the UAV according to the obstacle information and the target flight position of the UAV includes: Determine the position information of each obstacle in the flight direction based on the sensor signal in the flight direction detected by the millimeter wave radar sensor; Based on the position information of each obstacle, determine the target obstacle that is closest to the drone from among the obstacles; The obstacle avoidance flight position is determined based on the position information of the target obstacle and the target flight position.
8. The method according to claim 7, characterized in that Before determining the obstacle avoidance flight position based on the position information of the target obstacle and the target flight position, the method further includes: Determine the target flight position based on the flight control amount received from the remote control device; or, Based on the set waypoint mission information, the target flight position is determined.
9. A control device for an unmanned aerial vehicle, characterized in that: The device comprises: A detection unit, used to determine the current motion state of the drone and obstacle information in the flight direction according to detection data of various sensors included in the drone; An obstacle avoidance unit, configured to determine an obstacle avoidance flight position of the UAV according to the obstacle information and the target flight position of the UAV; A motion planning unit is used to determine the cruising speed of the UAV according to the current motion state and the obstacle avoidance flight position, with the maximum speed, maximum acceleration and maximum jerk of the UAV as constraints; determine the estimated duration of the acceleration segment and the target motion state of the acceleration segment corresponding to the acceleration phase of the UAV, and the estimated duration of the deceleration segment and the target motion state of the deceleration segment corresponding to the deceleration phase according to the cruising speed; when it is determined that a cruising phase is required according to the difference between the deceleration end moment position in the target motion state of the deceleration segment and the obstacle avoidance flight position, determine the cruising segment duration corresponding to the cruising phase according to the difference; determine the motion state at each moment according to the estimated duration of the acceleration segment, the target motion state of the acceleration segment, the estimated duration of the deceleration segment, the target motion state of the deceleration segment and the duration of the cruising segment, and obtain a kinematic planning result; A flight control unit is used to control the flight process of the UAV according to the kinematic planning result.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product comprising computer program instructions, characterized in that When the computer program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
