WO2021013110A1 - 一种基于目标跟踪的无人机避障方法、装置及无人机 - Google Patents

一种基于目标跟踪的无人机避障方法、装置及无人机 Download PDF

Info

Publication number
WO2021013110A1
WO2021013110A1 PCT/CN2020/102878 CN2020102878W WO2021013110A1 WO 2021013110 A1 WO2021013110 A1 WO 2021013110A1 CN 2020102878 W CN2020102878 W CN 2020102878W WO 2021013110 A1 WO2021013110 A1 WO 2021013110A1
Authority
WO
WIPO (PCT)
Prior art keywords
forward speed
drone
optimal
obstacle
detection area
Prior art date
Application number
PCT/CN2020/102878
Other languages
English (en)
French (fr)
Inventor
黄金鑫
Original Assignee
深圳市道通智能航空技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市道通智能航空技术有限公司 filed Critical 深圳市道通智能航空技术有限公司
Publication of WO2021013110A1 publication Critical patent/WO2021013110A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B11/00Automatic controllers
    • G05B11/01Automatic controllers electric
    • G05B11/36Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential
    • G05B11/42Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential for obtaining a characteristic which is both proportional and time-dependent, e.g. P. I., P. I. D.
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
    • G05B13/04Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators
    • G05B13/042Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators in which a parameter or coefficient is automatically adjusted to optimise the performance
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/12Target-seeking control

Definitions

  • This application relates to the technical field of autonomous obstacle avoidance for UAVs, and in particular to a method and device for UAV obstacle avoidance based on target tracking and UAV.
  • UAV is an unmanned aerial vehicle operated by radio remote control equipment or its own program control device.
  • the requirements for UAV's automatic sensing capabilities and path planning algorithms are getting higher and higher.
  • no one is required.
  • the aircraft can fly safely and without collision in an environment with obstacles, avoiding collisions with obstacles.
  • the embodiments of the present invention aim to provide a method, device and unmanned aerial vehicle for obstacle avoidance based on target tracking, which can plan the entire flight space and improve the accuracy of autonomous obstacle avoidance in the target tracking process.
  • a technical solution adopted in the embodiments of the present invention is to provide a method for avoiding obstacles for drones based on target tracking, the method including:
  • the drone is controlled to fly along the optimal flight direction at the optimal flight speed to avoid obstacles in the environment in front of the drone.
  • the determining the expected forward speed of the drone includes:
  • PID adjustment is performed on the current horizontal distance to determine the expected forward speed of the drone.
  • the drone includes a pan/tilt
  • the method further includes:
  • the determining the current horizontal distance between the drone and the target includes:
  • the method further includes:
  • the determining the optimal flight direction of the drone and the minimum distance between the drone and the obstacle according to the grid map includes:
  • the optimal flight direction of the drone and the minimum distance between the drone and the obstacle are determined.
  • the determining an obstacle detection area in the grid map according to the current forward speed and the expected forward speed includes:
  • the larger the expected forward speed the larger the obstacle detection area
  • the larger the current forward speed the larger the obstacle detection area.
  • the determining the optimal flight direction of the drone in the obstacle detection area includes:
  • the passable area is an area where there are no obstacles
  • the candidate flight direction with the smallest cost function value is determined as the optimal flight direction of the UAV.
  • the determining the passable area of the drone in the obstacle detection area includes:
  • the coordinates of the sampling obstacle include:
  • the center point coordinates of the grid occupied by the obstacle and/or the corner coordinates of the grid occupied by the obstacle in the obstacle detection area are sampled.
  • the cost function is:
  • g (direc goal , direc cur ) represents the consistency of one of the candidate flight directions with the direction of the target
  • g (direc pre , direc cur ) represents the candidate flight direction and the previous one
  • the consistency of the optimal flight direction of the decision, sum represents the number of passable areas
  • k 1 , k 2 , and k 3 are weight coefficients.
  • said determining the minimum distance between the drone and the obstacle in the obstacle detection area includes:
  • the distance between the target obstacle and the drone is determined as the minimum distance.
  • the optimal flight speed includes an optimal forward speed and an optimal lateral speed
  • the determining the optimal flight speed of the drone according to the minimum distance, the expected forward speed, and the optimal flight direction includes:
  • the optimal lateral speed is determined according to the optimal forward speed and the optimal flight direction.
  • the determining the optimal forward speed according to the maximum forward speed and the expected forward speed includes:
  • the maximum forward speed is not greater than the expected forward speed, it is determined that the maximum forward speed is the optimal forward speed.
  • the optimal flight direction corresponds to the optimal flight angle
  • the determining the optimal lateral speed according to the optimal forward speed and the optimal flight direction includes:
  • the optimal lateral speed is determined according to the product of the tangent value of the optimal flight angle and the optimal forward speed.
  • the acquiring a depth map of the environment in front of the drone includes:
  • the method before determining a grid map centered on the drone according to the depth map, the method further includes:
  • the depth sensor is a depth camera
  • performing depth compensation on the depth map includes:
  • the number of pixel rows for depth compensation is calculated, and the number of pixel rows for depth compensation is:
  • the row index of the image plane of the drone on the depth map is determined according to the number of pixel rows for depth compensation, and the row index row_horizon of the image plane of the drone on the depth map is:
  • row_horizon row_half+row_see, where row_half is half of the number of rows in the depth map.
  • a UAV obstacle avoidance device based on target tracking the device including:
  • the first determining module is used to determine the expected forward speed of the drone, and the expected forward speed is used to keep the drone and the target at an initial horizontal distance;
  • An acquisition module configured to acquire a depth map of the environment in front of the drone, and determine a raster map centered on the drone according to the depth map;
  • the second determining module is configured to determine the optimal flight direction of the drone and the minimum distance between the drone and the obstacle according to the grid map;
  • the control module is used to control the UAV to fly along the optimal flight direction at the optimal flight speed to avoid obstacles in the environment in front of the UAV.
  • the first determining module is specifically configured to:
  • PID adjustment is performed on the current horizontal distance to determine the expected forward speed of the drone.
  • the drone includes a pan/tilt
  • the control module is further used for:
  • the first determining module is specifically configured to:
  • the first determining module is further configured to:
  • the second determining module is specifically configured to:
  • the optimal flight direction of the drone and the minimum distance between the drone and the obstacle are determined.
  • the second determining module is specifically configured to:
  • the larger the expected forward speed the larger the obstacle detection area
  • the larger the current forward speed the larger the obstacle detection area.
  • the second determining module is specifically configured to:
  • the passable area is an area where there are no obstacles
  • the candidate flight direction with the smallest cost function value is determined as the optimal flight direction of the UAV.
  • the second determining module is specifically configured to:
  • the second determining module is specifically configured to:
  • the center point coordinates of the grid occupied by the obstacle and/or the corner coordinates of the grid occupied by the obstacle in the obstacle detection area are sampled.
  • the cost function is:
  • g (direc goal , direc cur ) represents the consistency of one of the candidate flight directions with the direction of the target
  • g (direc pre , direc cur ) represents the candidate flight direction and the previous one
  • the consistency of the optimal flight direction of the decision, sum represents the number of passable areas
  • k 1 , k 2 , and k 3 are weight coefficients.
  • the second determining module is specifically configured to:
  • the distance between the target obstacle and the drone is determined as the minimum distance.
  • the optimal flight speed includes an optimal forward speed and an optimal lateral speed
  • the second determining module is specifically configured to:
  • the optimal lateral speed is determined according to the optimal forward speed and the optimal flight direction.
  • the second determining module is specifically configured to:
  • the maximum forward speed is not greater than the expected forward speed, it is determined that the maximum forward speed is the optimal forward speed.
  • the optimal flight direction corresponds to the optimal flight angle
  • the second determining module is specifically configured to:
  • the optimal lateral speed is determined according to the product of the tangent value of the optimal flight angle and the optimal forward speed.
  • the acquisition module is specifically configured to:
  • the acquiring module is further configured to:
  • the depth sensor is a depth camera
  • the acquiring module is specifically used for:
  • the number of pixel rows for depth compensation is calculated, and the number of pixel rows for depth compensation is:
  • the row index of the image plane of the drone on the depth map is determined according to the number of pixel rows for depth compensation, and the row index row_horizon of the image plane of the drone on the depth map is:
  • row_horizon row_half+row_see, where row_half is half of the number of rows in the depth map.
  • a drone including:
  • An arm connected to the fuselage
  • the power device is arranged on the arm;
  • a depth camera connected to the body
  • At least one processor located in the body;
  • a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor
  • the device can be used in the above-mentioned UAV obstacle avoidance method based on target tracking.
  • another technical solution adopted by the embodiments of the present invention is to provide a non-volatile computer-readable storage medium, characterized in that the non-volatile computer-readable storage medium stores a computer Executing instructions, the computer-executable instructions are used to make the drone execute the above-mentioned target tracking-based drone avoidance method.
  • the embodiments of the present invention provide a target tracking-based UAV obstacle avoidance method, device, and UAV.
  • the expected forward speed used to keep the drone and the target at the initial horizontal distance is determined, and the grid map centered on the drone is determined according to the depth map of the environment in front of the drone.
  • the map determines the optimal flight direction of the UAV and the minimum distance between the UAV and the obstacle, and determines the optimal flight speed of the UAV according to the determined minimum distance, expected forward speed and optimal flight direction, and then controls The UAV flies in the optimal flight direction at the optimal flight speed to avoid obstacles in the environment ahead.
  • the grid determined according to the depth map of the environment in front of the drone is used to determine the optimal flight direction of the UAV, so that the UAV can plan the entire flight space and respond to the dynamic changes in the flight space in real time.
  • the optimal flight speed of the UAV in the optimal flight direction determines the optimal flight speed of the UAV in the optimal flight direction, so that the UAV can plan the optimal flight speed according to the actual environmental conditions, prevent the UAV from colliding with obstacles due to too fast speed, and improve the target tracking process The accuracy of autonomous obstacle avoidance in China.
  • Figure 1 is a schematic structural diagram of an unmanned aerial vehicle provided by an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of the principle of performing depth compensation on the depth map when the depth sensor has a pitch angle in a target tracking-based UAV obstacle avoidance method according to an embodiment of the present invention
  • Figure 3 is a schematic diagram of the structure of a grid map
  • FIG. 4 is a schematic flowchart of a method for avoiding obstacles for drones based on target tracking according to an embodiment of the present invention
  • Figure 5 is a schematic structural diagram of a UAV obstacle avoidance device based on target tracking provided by an embodiment of the present invention
  • Fig. 6 is a schematic diagram of the hardware structure of a drone provided by an embodiment of the present invention.
  • the present invention provides a UAV obstacle avoidance method and device based on target tracking.
  • the method and device are applied to the UAV, so that the UAV can plan the path in the entire flight space according to actual flight conditions and plan out Optimal flight direction and optimal flight speed, and fly along the optimal flight direction at the optimal flight speed to accurately avoid obstacles in the front environment.
  • the optimal flight direction refers to the direction where there are no obstacles.
  • the UAV in the present invention may be any suitable type of high-altitude UAV or low-altitude UAV, including fixed-wing UAV, rotary wing UAV, para-wing UAV, or flapping wing UAV.
  • FIG. 1 is an unmanned aerial vehicle 100 provided by one embodiment of the present invention.
  • the unmanned aerial vehicle 100 is a four-rotor unmanned aerial vehicle, and includes a fuselage 10, an arm 20, a power unit 30, and a pan/tilt 40.
  • Camera 50 depth sensor (not shown), first gyroscope (not shown), second gyroscope (not shown), landing gear 60, smart battery (not shown), and flight control system (not shown) Not shown).
  • the arm 20, the pan/tilt 40, the depth sensor and the landing gear 60 are all connected to the fuselage 10, the power unit 30 is arranged on the arm 20, the camera 50 and the first gyroscope are mounted on the pan/tilt 40, and the second gyroscope, The smart battery and the flight control system are arranged in the fuselage 10.
  • the power unit 30, the pan/tilt 40, the camera device 50, the depth sensor, the first gyroscope, the second gyroscope, and the landing gear 60 are all communicatively connected to the flight control system, so that the flight control system can control the unmanned vehicle through the power device 30.
  • the flight of the drone 100 can obtain the environmental conditions in front of the flight path of the drone 100 through the depth sensor. It can also control the rotation of the platform 40, control the aerial photography of the camera 50, and control the opening and closing of the landing gear 60. It can also receive the first gyroscope. , The measurement data of the second gyroscope.
  • the number of arms 20 is 4, evenly distributed around the fuselage 10, and fixedly connected to the fuselage 10 for carrying the power device 30.
  • the arm 20 and the body 10 are integrally formed.
  • the power unit 30 includes a motor and a propeller connected to the motor shaft.
  • the motor can drive the propeller to rotate to provide lift or thrust for the drone 100 to achieve flight; the motor can also change the flight direction of the drone 100 by changing the speed and direction of the propeller .
  • the flight control system can control the flight of the drone 100 by controlling the motor.
  • the power device 30 is arranged at an end of the arm 20 that is not connected to the fuselage 10 and is connected to the arm 20 through a motor.
  • a power device 30 is provided on the four arms of the drone 100 so that the drone 100 can fly smoothly.
  • the pan/tilt 40 is arranged at the bottom of the fuselage 10 and is used to mount the camera 50.
  • the pan/tilt head 40 is an electric pan/tilt head, which can be rotated under the control of the flight control system to achieve target tracking. Wherein, when the flight control system controls the pan/tilt 40 to rotate, the center of the pan/tilt 40 is controlled to align with the target.
  • the electric pan/tilt includes, but is not limited to, a horizontal rotating pan/tilt, an omnidirectional pan/tilt, etc.
  • the flight control system can control the gimbal 40 to rotate left and right in the horizontal direction; when the gimbal 40 is an omnidirectional gimbal, the flight control system can control the gimbal 40 in the horizontal direction. Rotate, and control the pan/tilt 40 to rotate up and down in the vertical direction.
  • the pan-tilt 40 is an omni-directional pan-tilt so as to be able to track the target in all directions.
  • the photographing device 50 may be an electronic device capable of photographing video images, such as a camera or a video camera, for aerial photography under the control of the flight control system.
  • the photographing device 50 is fixed to the pan/tilt 40 and can rotate with the rotation of the pan/tilt 40; and the photographing lens of the photographing device 50 is located on the center line of the pan/tilt 40.
  • the shooting lens of the shooting device 50 is also aimed at the target. At this time, if the shooting device 50 shoots a video image, the target is located at the center of the video image shot by the shooting device 50.
  • the first gyroscope is installed on the pan/tilt 40 for measuring the attitude information of the pan/tilt 40, and the attitude information of the pan/tilt 40 includes the pitch angle of the pan/tilt. Wherein, when the pitch angle of the pan/tilt 40 is 0, the center line of the pan/tilt 40 is parallel to the horizontal direction.
  • the flight control system can obtain the attitude information of the pan/tilt 40 from the first gyroscope.
  • the depth sensor is fixed to the fuselage 10 and its attitude is consistent with the attitude of the fuselage 10.
  • the depth sensor is used to collect a depth map (Depth Map) of the environment in front of the drone 100.
  • the depth map is an image or image channel containing information about the surface distance of the scene object of the viewpoint.
  • each The pixel value represents the actual distance between the depth sensor and the object, so the depth sensor collects the depth map, that is, the actual distance between the depth sensor and the front environmental object.
  • the flight control system can obtain the depth map of the environment in front of the drone from the depth sensor, that is, obtain the actual distance between the depth sensor and the environmental object in front of the drone to obtain the flight path of the drone 100 Environmental conditions.
  • the depth sensor is a depth camera, including but not limited to: binocular camera, TOF (Time of Flight) camera, etc.
  • the second gyroscope is installed in the fuselage 10 to measure the attitude information of the fuselage 10, that is, to measure the attitude information of the depth sensor, and the attitude information of the depth sensor includes the pitch angle of the depth sensor. Wherein, when the pitch angle of the depth sensor is 0, the detection direction of the depth sensor is the horizontal direction.
  • the flight control system can obtain the attitude information of the depth sensor from the second gyroscope.
  • the direction of the center line of the pan/tilt head 40 is consistent with the detection direction of the depth sensor.
  • the landing gear 60 is arranged on opposite sides of the bottom of the fuselage 10 and is connected to the fuselage 10 through a driving device.
  • the landing gear 60 can be opened and retracted under the driving of the driving device.
  • the driving device controls the landing gear 60 to open so that the drone 100 can contact the ground through the landing gear 60; during the flight of the drone 100, the driving device controls the landing gear 60 to retract , To prevent the landing gear 60 from affecting the flight of the UAV 100.
  • the flight control system can control the opening and closing of the landing gear 60 by controlling the driving device.
  • the smart battery is used to power the drone 100 so that the power unit 30, the gimbal 40, the camera 50, the depth sensor, the first gyroscope, the second gyroscope, the landing gear 60 and the flight control of the drone 100
  • the system can be powered on.
  • smart batteries include, but are not limited to: dry batteries, lead storage batteries, and lithium batteries.
  • the flight control system communicates with the power unit 30, the pan/tilt 40, the camera 50, the depth sensor, the first gyroscope, the second gyroscope, and the landing gear 60 through a wired connection or a wireless connection.
  • wireless connections include but are not limited to: WiFi, Bluetooth, ZigBee, etc.
  • the flight control system is used to implement the UAV obstacle avoidance method based on target tracking to plan the entire flight space of the UAV and improve the accuracy of autonomous obstacle avoidance in the target tracking process.
  • the flight control system controls the center of the pan/tilt 40 to align with the target, so as to realize the tracking of the target by the drone 100.
  • the target is the object tracked during the flight of the UAV.
  • the target is located on the ground and can move on the ground.
  • the flight control system controls the center of the pan/tilt 40 to align with the target, it acquires the direction of the target in real time, and then controls the pan/tilt 40 to rotate according to the direction of the target until the center of the pan/tilt 40 faces the direction of the target and is aligned with the target.
  • the flight control system determines the expected forward speed of the drone 100, which is used to keep the drone 100 at the initial horizontal distance from the target, that is, the drone When the forward speed of 100 is the expected forward speed, the UAV 100 can maintain the initial horizontal distance from the target.
  • the initial horizontal distance is the relative distance in the horizontal direction between the location of the UAV 100 when it is initialized and the location of the target.
  • the initial horizontal distance can be set by the user and stored in the memory, or it can be used by the flight control system in When the machine 100 is initialized, it is calculated and stored in the memory.
  • the initial horizontal distance between the drone 100 and the target can be acquired in the memory.
  • the current horizontal distance is the relative distance in the horizontal direction between the current location of the drone 100 and the current location of the target.
  • the relative distance between the drone 100 and the target in the horizontal direction can be calculated through the pitch angle of the gimbal 40 and the height of the gimbal 40 to the ground. That is, the horizontal distance between the drone 100 and the target. Specifically, the horizontal distance between the drone 100 and the target H is the height of the gimbal 40 to the ground, and ⁇ 1 is the pitch angle of the gimbal 40.
  • the flight control system determines the current horizontal distance between the drone and the target, it obtains the current ground height of the gimbal 40 and the current pitch angle of the gimbal 40, and calculates it based on the acquired current ground height and current pitch angle The current horizontal distance between the drone 100 and the target.
  • the flight control system can calculate the initial horizontal distance between the drone 100 and the target according to the pitch angle of the gimbal 40 and the height of the gimbal 40 when the drone 100 is initialized, and store it in the memory.
  • a PID controller In the step of performing PID adjustment on the determined current horizontal distance based on the acquired initial horizontal distance to determine the expected forward speed of the UAV 100, a PID controller is used for closed-loop control.
  • the initial horizontal distance is the expected value of the controlled variable
  • the current horizontal distance is the actual value of the controlled variable
  • the expected forward speed is the response output of the PID controller.
  • the flight control system determines the expected forward speed of the drone 100, it acquires a depth map of the environment in front of the drone 100 through a depth sensor, and determines a grid map centered on the drone 100 based on the depth map.
  • the grid map is formed by mapping the depth information in the depth map to a plane grid map centered on the body.
  • Each grid is given a possible value, indicating the probability that the grid is occupied by obstacles. .
  • the obstacle occupies a grid in the grid map, and the position of the obstacle can be known through the coordinates of the occupied grid.
  • the grids of the grid map are arranged in a matrix, for example, the grids of the grid map are arranged in a matrix of 10*10.
  • the drone 100 if the drone 100 generates a pitch angle during flight, the front view of the drone 100 is no longer horizontal. At this time, the depth map collected by the depth sensor is no longer unmanned. The depth map in the horizontal front of the machine 100 makes the depth information reflected by the depth map have errors, resulting in inaccuracy of the raster map. Therefore, before the flight control system determines the raster map centered on the drone 100 based on the depth map, it also needs to determine whether the depth sensor has a pitch angle. If the depth sensor has a pitch angle, the flight control system performs depth compensation on the depth map. Then, a grid map centered on the drone 100 is determined according to the depth map after depth compensation.
  • the flight control system can measure the three-axis attitude angle of the UAV 100 through the second gyroscope to determine whether the depth sensor has a pitch angle according to the three-axis attitude angle.
  • the depth compensation of the depth map by the flight control system specifically includes: the flight control system calculates the number of pixel rows for depth compensation, and after calculating the number of pixel rows for depth compensation, determines the image plane of the drone according to the number of pixel rows for depth compensation.
  • the row index on the depth map specifically includes: the flight control system calculates the number of pixel rows for depth compensation, and after calculating the number of pixel rows for depth compensation, determines the image plane of the drone according to the number of pixel rows for depth compensation.
  • the row index on the depth map is a depth map.
  • the number of pixel rows row_see for the depth compensation is:
  • the row index row_horizon of the image plane of the drone on the depth map is:
  • row_horizon row_half+row_see, where row_half is half of the number of rows in the depth map.
  • the flight control system determines the grid map centered on the UAV 100, it determines the optimal flight direction of the UAV 100 and the minimum distance between the UAV 100 and the obstacle according to the determined grid map.
  • the flight control system before determining the optimal flight direction of the drone 100 and the minimum distance between the drone 100 and the obstacle according to the determined grid map, the flight control system also needs to determine the current forward speed of the drone 100. Then, according to the current forward speed and expected forward speed, the obstacle detection area is determined in the grid map, and then in the obstacle detection area, the optimal flight direction of the UAV 100 and the UAV 100 and obstacles are determined The minimum distance between objects. That is, the forward speed of the drone 100 is combined with the detection range of obstacles, and an appropriate obstacle detection range is determined according to the forward speed of the drone 100 to increase the accuracy of obstacle detection.
  • the obstacle detection area is the area used to detect obstacles in the grid map.
  • the obstacle detection area is located in the upper half of the grid map (that is, in front of the drone 100).
  • the number of columns of the obstacle detection area is equal to The number of columns of the grid map is the same, and the number of rows is less than or equal to one-half of the number of rows of the grid map, that is, the obstacle detection area is less than or equal to one-half of the grid map.
  • the solid line area P1 is the obstacle detection area.
  • the optimal flight direction of the drone 100 is the direction where there are no obstacles; the minimum distance between the drone 100 and the obstacle is the distance between the drone 100 and the nearest obstacle in the field of view.
  • the obstacle detection area is determined in the grid map, including: comparing the current forward speed with the expected forward speed, if the current forward speed is less than the expected forward speed, then Determine the obstacle detection area in the grid map according to the expected forward speed. At this time, the greater the expected forward speed, the larger the determined obstacle detection area; if the current forward speed is greater than the expected forward speed, the current The forward speed determines the obstacle detection area in the grid map. At this time, the greater the current forward speed, the larger the determined obstacle detection area.
  • determining the optimal flight direction of the UAV 100 includes: first, determining the passable area of the UAV 100 in the determined obstacle detection area.
  • the passable area is an area where there are no obstacles in the obstacle detection area.
  • the flight control system determines the passable area of the UAV 100 in the determined obstacle detection area, which specifically includes: Taking the UAV 100 as the center and the preset angle as the interval, dividing the obstacle detection area to divide The obstacle detection area is divided into multiple areas. Then, the coordinates of the obstacle are sampled, and it is judged whether the sampled obstacle coordinates fall into the area divided by the obstacle detection area, and the area where the obstacle coordinates do not fall is determined as acceptable Passable area.
  • each area divided by the flight control system in the obstacle detection area is a fan-shaped area.
  • the coordinates of the obstacle sampled by the flight control system include: the coordinates of the center point of the grid occupied by the obstacle in the sampling obstacle detection area and/or the coordinates of the corner point of the grid occupied by the obstacle.
  • the flight control system determines the area where neither the center point coordinates of the grid occupied by obstacles and/or the corner point coordinates of the grid occupied by obstacles fall into the passable area. Based on this, if the area of the grid map is too small, the area is easily covered by obstacles, but none of the sampled coordinates falls into the area. At this time, the impassable area is mistakenly judged as a passable area; and If the area of the grid map is too large, it will cause too few flight directions, which is not conducive to the determination of the optimal flight direction. Therefore, in order to ensure the reliability of the flight control system path planning, the flight control system will adjust the preset angle according to the actual flight effect.
  • the flight control system adjusts the preset angle according to the robustness of the depth map data and the accuracy of the planning direction.
  • the candidate flight direction of the drone 100 is determined.
  • the candidate flight direction determined based on the passable area is the direction without obstacles, and the flight control system determines the direction corresponding to all passable areas as the candidate flight direction.
  • the cost function value of the candidate flight direction is calculated according to the cost function, and the candidate flight direction with the smallest cost function value is determined as the optimal flight direction of the drone 100.
  • the aforementioned minimum cost function value is the minimum flight cost calculated by the cost function, that is, the candidate flight direction with the smallest flight cost is determined to be the optimal flight direction of the UAV 100.
  • the cost function is:
  • g (direc goal , direc cur ) represents the consistency of one of the candidate flight directions with the direction of the target
  • g (direc pre , direc cur ) represents the candidate flight direction and the optimal flight direction of the previous decision
  • the consistency of, sum represents the number of passable areas
  • k 1 , k 2 , and k 3 are weight coefficients.
  • the relative size of, and determines the priority order of the three factors If the determined candidate flight direction is as consistent as possible with the target's direction, it is necessary to make; if the determined candidate flight direction is to be as consistent as possible with the optimal flight direction of the previous decision, then so; if the determined candidate flight direction is to be guaranteed The direction is safe enough, then make it.
  • determining the minimum distance between the UAV 100 and the obstacle includes: determining the obstacle with the smallest distance from the UAV 100 in the obstacle detection area as the target obstacle, and then determining the target obstacle The distance between the object and the drone 100 is determined as the minimum distance. For example, referring to Figure 3, the flight control system determines that the distance between obstacle Z1 and UAV 100 is the smallest, so the flight control system determines obstacle Z1 as the target obstacle, and then determines the distance between obstacle Z1 and UAV 100 Is the minimum distance.
  • the flight control system determines the optimal flight direction of the UAV 100 and the minimum distance between the UAV 100 and the obstacle, it determines the UAV according to the determined minimum distance, expected forward speed, and optimal flight direction. Optimal flight speed of 100.
  • the optimal flight speed includes the optimal forward speed and the optimal lateral speed.
  • determining the optimal flight speed of the UAV 100 includes: calculating the maximum forward velocity of the UAV 100 according to the minimum distance, and then , Determine the optimal forward speed according to the maximum forward speed and the expected forward speed, and then determine the optimal lateral speed according to the optimal forward speed and the optimal flight direction.
  • the maximum forward speed of the drone 100 is the forward speed to ensure that the drone 100 will not collide with the nearest obstacle. If the forward speed of the drone 100 is greater than the maximum forward speed, the drone 100 may Crash into the nearest obstacle.
  • the optimal forward speed which specifically includes: compare the maximum forward speed with the expected forward speed, if the maximum forward speed is greater than the expected forward speed, determine the expected forward speed as The optimal forward speed.
  • the optimal forward speed can not only ensure that the UAV 100 will not collide with the nearest obstacle, but also ensure that the UAV 100 and the target maintain the initial horizontal distance; if the maximum forward speed is not greater than Expected forward speed, the maximum forward speed is determined to be the optimal forward speed.
  • the maximum forward speed is determined as the optimal forward speed to ensure that the drone 100 will not collide with the nearest obstacle.
  • the flight control system determines the optimal flight direction of the UAV 100 in the obstacle detection area, it determines the optimal flight direction from the candidate flight directions corresponding to the passable area divided by the preset angle, so the optimal flight direction The flight direction corresponds to the optimal flight angle.
  • the optimal lateral velocity is determined based on the product of the tangent of the optimal flight angle and the optimal forward velocity.
  • the optimal forward speed and the optimal lateral speed determined by the flight control system together constitute the optimal flight speed for guiding the flight of the UAV 100.
  • the flight control system determines the optimal flight speed of the UAV 100, it controls the UAV 100 to fly along the optimal flight direction at the optimal flight speed to avoid obstacles in the environment in front of the UAV 100.
  • the flight control system controls the UAV 100 to fly in the optimal flight direction at the optimal flight speed, and the UAV 100 can accurately avoid obstacles;
  • the optimal forward speed in the optimal flight speed is the expected forward speed, when the flight control system controls the UAV 100 to fly in the optimal flight direction at the optimal flight speed, the UAV 100 can accurately avoid obstacles, Maintain an initial horizontal distance from the target.
  • the drone can determine the grid map based on the acquired depth map of the front environment by executing the drone obstacle avoidance method based on target tracking, and then determine the optimal flight direction based on the grid map. And according to the determined minimum distance, expected forward speed and optimal flight direction, determine the optimal flight speed in the optimal flight direction, realize path planning of the entire flight space, and respond to the dynamic changes of the flight space in real time to improve the target The accuracy of autonomous obstacle avoidance in the tracking process.
  • FIG. 4 is a schematic flowchart of a target tracking-based UAV obstacle avoidance method according to one embodiment of the present invention, which is applied to a UAV, and the UAV is the unmanned vehicle described in the above embodiment.
  • the method provided by the embodiment of the present invention is executed by the above-mentioned flight control system, and is used to plan the entire flight space of the UAV to improve the accuracy of autonomous obstacle avoidance in the target tracking process.
  • Man-machine obstacle avoidance methods include:
  • the aforementioned "expected forward speed” is used to maintain the initial horizontal distance between the drone and the target, that is, when the forward speed of the drone is the expected forward speed, the drone can maintain the initial horizontal distance from the target.
  • the target is the object tracked during the flight of the UAV.
  • the target is located on the ground and can move on the ground.
  • the initial horizontal distance is the relative distance in the horizontal direction between the location of the drone when it is initialized and the location of the target.
  • the initial horizontal distance can be set by the user and stored in the memory, or it can be set by the flight control system in the drone. It is calculated during initialization and then stored in the memory.
  • the initial horizontal distance between the drone and the target can be obtained in the memory.
  • the current horizontal distance is the relative distance between the current location of the drone and the current location of the target in the horizontal direction.
  • the method further includes: controlling the center of the pan-tilt to aim at the target.
  • the center of the pan/tilt is controlled to align with the target
  • the direction of the target is obtained in real time, and then, according to the direction of the target, the pan/tilt is controlled to rotate until the center of the pan/tilt is facing the direction of the target and aligned with the target to achieve unmanned Machine to target tracking.
  • the relative distance between the drone and the target in the horizontal direction can be calculated through the pitch angle of the gimbal and the height of the gimbal to the ground, that is, , The horizontal distance between the drone and the target.
  • the horizontal distance between the drone and the target H is the height of the gimbal to the ground
  • ⁇ 1 is the pitch angle of the gimbal.
  • the drone and the target are calculated according to the current ground height and current pitch angle obtained.
  • the current horizontal distance when determining the current horizontal distance between the drone and the target, after obtaining the current ground height of the gimbal and the current pitch angle of the gimbal, the drone and the target are calculated according to the current ground height and current pitch angle obtained. The current horizontal distance.
  • the initial horizontal distance between the drone and the target can be calculated according to the pitch angle of the gimbal and the height of the gimbal when the drone is initialized and stored in the memory.
  • a PID controller In the step of performing PID adjustment on the determined current horizontal distance based on the acquired initial horizontal distance to determine the expected forward speed of the UAV, a PID controller is used for closed-loop control.
  • the initial horizontal distance is the expected value of the controlled variable
  • the current horizontal distance is the actual value of the controlled variable
  • the expected forward speed is the response output of the PID controller.
  • S200 Acquire a depth map of the environment in front of the drone, and determine a grid map centered on the drone according to the depth map.
  • Depth Map is an image or image channel containing information about the surface distance of the scene object of the viewpoint.
  • each pixel value represents the actual distance of the depth sensor from the object.
  • the depth map of the environment in front of the drone is acquired through the depth sensor, and the depth map of the environment in front of the drone is acquired through the depth sensor, that is, the actual distance between the depth sensor and the object in the front environment is acquired.
  • the above-mentioned "grid map” is formed by mapping the depth information in the depth map to a plane grid map centered on the body. Each grid is given a possible value, indicating that the grid is occupied by obstacles. Probability. When there is an obstacle in the environment depth map, the obstacle occupies a grid in the grid map, and the position of the obstacle can be known through the coordinates of the occupied grid.
  • the grids of the grid map are arranged in a matrix, for example, the grids of the grid map are arranged in a 10*10 matrix.
  • the front view of the drone will no longer be horizontal.
  • the depth map collected by the depth sensor is no longer horizontal in front of the drone.
  • the depth map makes errors in the depth information reflected by the depth map, resulting in inaccuracy of the raster map. Therefore, before determining the raster map centered on the drone based on the depth map, it is also necessary to determine whether the depth sensor has a pitch angle. If the depth sensor has a pitch angle, the depth map will be compensated according to the depth compensation. The depth map determines the raster map centered on the drone.
  • the three-axis attitude angle of the UAV can be measured by the second gyroscope to determine whether the depth sensor has a pitch angle according to the three-axis attitude angle.
  • Depth compensation of the depth map specifically includes: calculating the number of pixel rows for depth compensation, and after calculating the number of pixel rows for depth compensation, determine the image plane of the drone on the depth map according to the number of pixel rows for depth compensation. index.
  • the number of pixel rows row_see for the depth compensation is:
  • the row index row_horizon of the image plane of the drone on the depth map is:
  • row_horizon row_half+row_see, where row_half is half of the number of rows in the depth map.
  • S300 According to the grid map, determine the optimal flight direction of the drone and the minimum distance between the drone and the obstacle.
  • the greater the forward speed of the drone the greater the probability of collision with obstacles. It is necessary to consider the obstacle distribution in the environment in front of the drone earlier; and the forward direction of the drone The lower the speed, the smaller the probability of collision with obstacles. Premature consideration of the obstacle distribution in the environment in front of the drone will easily take unnecessary obstacles into consideration, resulting in inaccurate judgment of the optimal flight direction.
  • the current forward direction of the drone needs to be determined.
  • Speed and then, according to the current forward speed and expected forward speed, the obstacle detection area is determined in the grid map, and then in the obstacle detection area, the optimal flight direction of the drone and the drone and obstacles are determined
  • the minimum distance between objects That is, the forward speed of the drone is combined with the detection range of obstacles, and an appropriate obstacle detection range is determined according to the forward speed of the drone, so as to increase the accuracy of obstacle detection.
  • the obstacle detection area is the area used to detect obstacles in the grid map.
  • the obstacle detection area is located in the upper half of the grid map (that is, in front of the drone 100).
  • the number of columns of the obstacle detection area is equal to The number of columns of the grid map is the same, and the number of rows is less than or equal to one-half of the number of rows of the grid map, that is, the obstacle detection area is less than or equal to one-half of the grid map.
  • the solid line area P1 is the obstacle detection area.
  • the optimal flight direction of the drone is the direction where there are no obstacles; the minimum distance between the drone and the obstacle is the distance between the drone and the nearest obstacle in the field of view.
  • determining the obstacle detection area in the grid map according to the current forward speed and the expected forward speed includes: comparing the current forward speed and the expected forward speed, if the current forward speed If the speed is less than the expected forward speed, the obstacle detection area is determined in the grid map according to the expected forward speed. At this time, the greater the expected forward speed, the larger the determined obstacle detection area; if the current forward speed is greater than For the expected forward speed, the obstacle detection area is determined in the grid map according to the current forward speed. At this time, the greater the current forward speed, the larger the determined obstacle detection area.
  • determining the optimal flight direction of the drone includes: first, in the determined obstacle detection area, determining the drone's Passable area.
  • the passable area is an area where there are no obstacles in the obstacle detection area.
  • determining the passable area of the drone includes: taking the drone as the center and the preset angle as the interval, dividing the obstacle detection area to divide the obstacle detection area For multiple areas, the coordinates of the obstacles are sampled, and it is determined whether the sampled obstacle coordinates fall into the area divided by the obstacle detection area, and the area where the obstacle coordinates do not fall is determined as the passable area.
  • each area divided in the obstacle detection area is a fan-shaped area.
  • the coordinates of the sampling obstacle include: the coordinates of the center point of the grid occupied by the obstacle and/or the coordinates of the corner point of the grid occupied by the obstacle in the sampling obstacle detection area.
  • the area in which neither the center point coordinates of the grid occupied by obstacles and/or the corner point coordinates of the grid occupied by obstacles fall into is determined as the passable area. Based on this, if the area of the grid map is too small, the area is easily covered by obstacles, but none of the sampled coordinates falls into the area. At this time, the impassable area is mistakenly judged as a passable area; and If the area of the grid map is too large, it will cause too few flight directions, which is not conducive to the determination of the optimal flight direction. Therefore, in order to ensure the reliability of path planning, the preset angle will be adjusted according to the actual flight effect.
  • the candidate flight direction determined based on the passable area is a direction without obstacles, and all the directions corresponding to the passable area are determined as the candidate flight direction.
  • the cost function value of the candidate flight direction is calculated according to the cost function, and the candidate flight direction with the smallest cost function value is determined as the optimal flight direction of the UAV.
  • the aforementioned minimum cost function value is the minimum flight cost calculated by the cost function, that is, the candidate flight direction with the smallest flight cost is determined as the optimal flight direction of the UAV.
  • the cost function is:
  • g (direc goal , direc cur ) represents the consistency of one of the candidate flight directions with the direction of the target
  • g (direc pre , direc cur ) represents the candidate flight direction and the optimal flight direction of the previous decision
  • the consistency of, sum represents the number of passable areas
  • k 1 , k 2 , and k 3 are weight coefficients.
  • the relative size of, and determines the priority order of the three factors If the determined candidate flight direction is as consistent as possible with the target's direction, it is necessary to make; if the determined candidate flight direction is to be as consistent as possible with the optimal flight direction of the previous decision, then so; if the determined candidate flight direction is to be guaranteed The direction is safe enough, then make it.
  • determining the minimum distance between the drone and the obstacle includes: determining the obstacle with the smallest distance from the drone in the obstacle detection area as Target obstacle, and then determine the distance between the target obstacle and the drone as the minimum distance. For example, referring to FIG. 3, it is determined that the distance between the obstacle Z1 and the drone 100 is the smallest, so the obstacle Z1 is determined as the target obstacle, and then the distance between the obstacle Z1 and the drone 100 is determined as the minimum distance.
  • S400 Determine the optimal flight speed of the drone according to the minimum distance, the expected forward speed, and the optimal flight direction.
  • the optimal flight speed includes an optimal forward speed and an optimal lateral speed.
  • the optimal flight speed of the UAV is determined, which specifically includes: calculating the maximum forward speed of the UAV according to the minimum distance, and then according to The maximum forward speed and the expected forward speed are used to determine the optimal forward speed, and then the optimal lateral speed is determined according to the optimal forward speed and optimal flight direction.
  • the maximum forward speed of the drone is the forward speed to ensure that the drone will not collide with the nearest obstacle. If the forward speed of no one is greater than the maximum forward speed, the drone may collide with the nearest obstacle .
  • determining the optimal forward speed according to the maximum forward speed and the expected forward speed includes: comparing the maximum forward speed with the expected forward speed, if the maximum forward speed is greater than the expected forward speed , The expected forward speed is determined to be the optimal forward speed. At this time, the optimal forward speed can not only ensure that the drone will not collide with the nearest obstacle, but also ensure that the drone maintains the initial horizontal distance from the target; if If the maximum forward speed is not greater than the expected forward speed, the maximum forward speed is determined to be the optimal forward speed.
  • the expected forward speed is greater than the maximum forward speed
  • the maximum forward speed is determined as the optimal forward speed to ensure that the drone will not collide with the nearest obstacle .
  • the optimal flight direction when determining the optimal flight direction of the UAV in the obstacle detection area, is determined from the candidate flight directions corresponding to the passable area divided by the preset angle. , So the optimal flight direction corresponds to the optimal flight angle.
  • the optimal lateral velocity is determined based on the product of the tangent of the optimal flight angle and the optimal forward velocity.
  • S500 Control the drone to fly along the optimal flight direction at the optimal flight speed to avoid obstacles in the environment in front of the drone.
  • the drone can accurately avoid obstacles when the drone is controlled to fly in the optimal flight direction at the optimal flight speed;
  • the optimal forward speed of is the expected forward speed, when the drone is controlled to fly in the optimal flight direction at the optimal flight speed, the drone can accurately avoid obstacles while maintaining the initial horizontal distance from the target.
  • the optimal flight direction of the drone is determined by obtaining the grid map determined by the depth map of the environment in front of the drone, so that the drone can plan the entire flight space and adapt the flight space in real time.
  • the optimal flight speed of the UAV in the optimal flight direction is determined, so that the UAV can plan the optimal flight speed according to the actual environmental conditions. Optimize the flight speed and improve the accuracy of autonomous obstacle avoidance during target tracking.
  • module is a combination of software and/or hardware that can implement predetermined functions.
  • devices described in the following embodiments can be implemented by software, implementation by hardware or a combination of software and hardware is also possible.
  • FIG. 5 is a UAV obstacle avoidance device based on target tracking provided by one embodiment of the present invention, which is applied to a UAV, and the UAV is the UAV described in the above embodiment 100, and the functions of the various modules of the device provided by the embodiment of the present invention are executed by the above-mentioned flight control system, which is used to plan the entire flight space of the UAV and improve the accuracy of autonomous obstacle avoidance in the target tracking process.
  • the tracked UAV obstacle avoidance devices include:
  • the first determining module 200 is configured to determine the expected forward speed of the drone, and the expected forward speed is used to maintain the initial horizontal distance between the drone and the target;
  • the obtaining module 300 is configured to obtain a depth map of the environment in front of the drone, and determine a raster map centered on the drone according to the depth map;
  • the second determining module 400 is configured to determine the optimal flight direction of the drone and the minimum distance between the drone and the obstacle according to the grid map;
  • the control module 500 is configured to control the drone to fly along the optimal flight direction at the optimal flight speed to avoid obstacles in the environment in front of the drone.
  • the first determining module 200 is specifically configured to:
  • PID adjustment is performed on the current horizontal distance to determine the expected forward speed of the drone.
  • the drone includes a pan/tilt
  • the control module 500 is further used to:
  • the first determining module 200 is specifically configured to:
  • the first determining module 200 is further configured to:
  • the second determining module 400 is specifically configured to:
  • the optimal flight direction of the drone and the minimum distance between the drone and the obstacle are determined.
  • the second determining module 400 is specifically configured to:
  • the larger the expected forward speed the larger the obstacle detection area
  • the larger the current forward speed the larger the obstacle detection area.
  • the second determining module 400 is specifically configured to:
  • the passable area is an area where there are no obstacles
  • the candidate flight direction with the smallest cost function value is determined as the optimal flight direction of the UAV.
  • the second determining module 400 is specifically configured to:
  • the second determining module 400 is specifically configured to:
  • the center point coordinates of the grid occupied by the obstacle and/or the corner coordinates of the grid occupied by the obstacle in the obstacle detection area are sampled.
  • the cost function is:
  • g (direc goal , direc cur ) represents the consistency of one of the candidate flight directions with the direction of the target
  • g (direc pre , direc cur ) represents the candidate flight direction and the previous one
  • the consistency of the optimal flight direction of the decision, sum represents the number of passable areas
  • k 1 , k 2 , and k 3 are weight coefficients.
  • the second determining module 400 is specifically configured to:
  • the distance between the target obstacle and the drone is determined as the minimum distance.
  • the optimal flight speed includes an optimal forward speed and an optimal lateral speed
  • the second determining module 400 is specifically configured to:
  • the optimal lateral speed is determined according to the optimal forward speed and the optimal flight direction.
  • the second determining module 400 is specifically configured to:
  • the maximum forward speed is not greater than the expected forward speed, it is determined that the maximum forward speed is the optimal forward speed.
  • the optimal flight direction corresponds to the optimal flight angle
  • the second determining module 400 is specifically configured to:
  • the optimal lateral speed is determined according to the product of the tangent value of the optimal flight angle and the optimal forward speed.
  • the acquiring module 300 is specifically configured to:
  • the acquiring module 300 before determining the raster map centered on the drone based on the depth map, the acquiring module 300 is further configured to:
  • the depth sensor is a depth camera
  • the acquiring module 300 is specifically used for:
  • the number of pixel rows for depth compensation is calculated, and the number of pixel rows for depth compensation is:
  • the row index of the image plane of the drone on the depth map is determined according to the number of pixel rows for depth compensation, and the row index row_horizon of the image plane of the drone on the depth map is:
  • row_horizon row_half+row_see, where row_half is half of the number of rows in the depth map.
  • first determination module 200, acquisition module 300, second determination module 400, and control module 500 may be flight control chips in the flight control system.
  • the content of the device embodiment can be quoted from the method embodiment on the premise that the content does not conflict with each other, which will not be repeated here.
  • the optimal flight direction of the drone is determined by obtaining the grid map determined by the depth map of the environment in front of the drone, so that the drone can plan the entire flight space and adapt the flight space in real time.
  • the optimal flight speed of the UAV in the optimal flight direction is determined, so that the UAV can plan the optimal flight speed according to the actual environmental conditions. Optimize the flight speed and improve the accuracy of autonomous obstacle avoidance during target tracking.
  • FIG. 6 is a schematic diagram of the hardware structure of an unmanned aerial vehicle provided by one of the embodiments of the present invention.
  • the hardware modules provided by the embodiments of the present invention can be integrated into the flight control system described in the above embodiments, and can also be used directly as a flight control system
  • the control system is arranged in the fuselage 10, so that the UAV 100 can execute the target tracking-based UAV obstacle avoidance method described in the above embodiments, and can also implement the target tracking-based method described in the above embodiments.
  • the drone 100 includes:
  • processors 110 and memory 120. Among them, one processor 110 is taken as an example in FIG. 6.
  • the processor 110 and the memory 120 may be connected by a bus or in other ways.
  • the connection by a bus is taken as an example.
  • the memory 120 can be used to store non-volatile software programs, non-volatile computer-executable programs and modules, such as a target tracking-based method in the above-mentioned embodiments of the present invention.
  • Program instructions corresponding to the UAV obstacle avoidance method and modules corresponding to a target tracking-based UAV obstacle avoidance device for example, the first determination module 200, the acquisition module 300, the second determination module 400, and the control module 500, etc.
  • the processor 110 executes various functional applications and data processing of a target tracking-based UAV obstacle avoidance method by running non-volatile software programs, instructions, and modules stored in the memory 120, that is, to implement the above method
  • a target tracking-based UAV obstacle avoidance method by running non-volatile software programs, instructions, and modules stored in the memory 120, that is, to implement the above method
  • an obstacle avoidance method for UAV based on target tracking and the function of each module in the above device embodiment.
  • the memory 120 may include a storage program area and a storage data area, where the storage program area can store an operating system and an application program required by at least one function; the storage data area can store information according to a target tracking-based UAV obstacle avoidance device Use the created data, etc.
  • the storage data area also stores preset data, including initial horizontal distance, preset angle, and so on.
  • the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the memory 120 may optionally include memories remotely provided with respect to the processor 110, and these remote memories may be connected to the processor 110 through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the program instructions and one or more modules are stored in the memory 120, and when executed by the one or more processors 110, a target tracking-based drone avoidance in any of the foregoing method embodiments is executed.
  • a target tracking-based drone avoidance in any of the foregoing method embodiments is executed.
  • the above-mentioned product can execute the method provided in the above-mentioned embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
  • the above-mentioned product can execute the method provided in the above-mentioned embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
  • the embodiment of the present invention also provides a non-volatile computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, for example, FIG. 6
  • a processor 110 in any of the foregoing method embodiments can make a computer execute each step of a target tracking-based UAV obstacle avoidance method in any of the foregoing method embodiments, or implement a target tracking-based method in any of the foregoing device embodiments.
  • the function of each module of the UAV obstacle avoidance device can make a computer execute each step of a target tracking-based UAV obstacle avoidance method in any of the foregoing method embodiments, or implement a target tracking-based method in any of the foregoing device embodiments.
  • the function of each module of the UAV obstacle avoidance device can make a computer execute each step of a target tracking-based UAV obstacle avoidance method in any of the foregoing method embodiments, or implement a target tracking-based method in any of the fore
  • the embodiment of the present invention also provides a computer program product, the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, the computer program includes program instructions, when the program instructions are Or multiple processors, such as a processor 110 in FIG. 6, can make a computer execute each step of a target tracking-based UAV obstacle avoidance method in any of the foregoing method embodiments, or implement any of the foregoing devices The function of each module of a UAV obstacle avoidance device based on target tracking in the embodiment.
  • the device embodiments described above are merely illustrative.
  • the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each embodiment can be implemented by software plus a general hardware platform, and of course, it can also be implemented by hardware.
  • Those of ordinary skill in the art can understand that all or part of the processes in the methods of the foregoing embodiments can be implemented by computer programs instructing relevant hardware.
  • the programs can be stored in a computer readable storage medium, and the program is executed At the time, it may include the process of the implementation method of the above-mentioned methods.
  • the storage medium may be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

一种基于目标跟踪的无人机避障方法、装置及无人机。其中,基于目标跟踪的无人机避障方法包括:确定无人机的预期前向速度,预期前向速度用于使无人机与目标保持初始水平距离(S100);获取无人机前方环境的深度图,并根据深度图,确定以无人机为中心的栅格地图(S200);根据栅格地图,确定无人机的最优飞行方向以及无人机与障碍物的最小距离(S300);根据最小距离、预期前向速度以及最优飞行方向,确定无人机的最优飞行速度(S400);控制无人机以最优飞行速度沿最优飞行方向飞行,以躲避无人机前方环境的障碍物(S500)。本方法能够对整个飞行空间进行路径规划,提高目标跟踪过程中自主避障的准确性。

Description

一种基于目标跟踪的无人机避障方法、装置及无人机
本申请要求于2019年7月19日提交中国专利局、申请号为201910655674.8、申请名称为“一种基于目标跟踪的无人机避障方法、装置及无人机”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及无人机自主避障技术领域,特别是涉及一种基于目标跟踪的无人机避障方法、装置及无人机。
背景技术
无人机是一种由无线电遥控设备或自身程序控制装置操纵的无人驾驶飞行器。随着无人机相关技术的发展及其应用场景的复杂变化,对无人机自动感知能力及路径规划算法的要求越来越高,尤其在无人机的自主避障技术中,需要无人机通过感知自身的运动状态和周围的环境,并结合路径规划算法,在有障碍物的环境中安全地、无碰撞地飞行,避免与障碍物发生碰撞。
目前,无人机基于目标跟踪进行自主避障时,主要通过轨迹库中设定好的飞行轨迹以及飞行轨迹上设定的各个时刻的飞行速度进行飞行,但该种方式所设定的飞行轨迹无法覆盖整个飞行空间,使得无人机无法对飞行轨迹外的区域进行路径规划,若飞行空间中存在动态变化,则无人机无法进行准确避障。
发明内容
本发明实施例旨在提供一种基于目标跟踪的无人机避障方法、装置及无人机,能够对整个飞行空间进行路径规划,提高目标跟踪过程中自主避障的准确性。
为解决上述技术问题,本发明实施例采用的一个技术方案是:提供一种基于目标跟踪的无人机避障方法,所述方法包括:
确定无人机的预期前向速度,所述预期前向速度用于使所述无人机与目标保持初始水平距离;
获取所述无人机前方环境的深度图,并根据所述深度图,确定以所述无人机为中心的栅格地图;
根据所述栅格地图,确定所述无人机的最优飞行方向以及所述无人机与障碍物的最小距离;
根据所述最小距离、所述预期前向速度以及所述最优飞行方向,确定所述无人机的最优飞行速度;
控制所述无人机以所述最优飞行速度沿所述最优飞行方向飞行,以躲避所述无人机前方环境的障碍物。
可选地,所述确定无人机的预期前向速度,包括:
获取所述无人机与所述目标的初始水平距离;
确定所述无人机与所述目标的当前水平距离;
基于所述初始水平距离,对所述当前水平距离进行PID调节,以确定所述无人机的所述预期前向速度。
可选地,所述无人机包括云台,所述方法还包括:
控制所述云台的中心对准所述目标;则,
所述确定所述无人机与所述目标的当前水平距离,包括:
获取所述云台的当前对地高度和当前俯仰角;
根据所述当前对地高度以及所述当前俯仰角确定所述无人机与所述目标的当前水平距离。
可选地,所述方法还包括:
确定所述无人机的当前前向速度;则,
所述根据所述栅格地图,确定所述无人机的最优飞行方向以及所述无人机与障碍物的最小距离,包括:
根据所述当前前向速度和所述预期前向速度,在所述栅格地图中确定障碍物检测区域;
在所述障碍物检测区域中,确定所述无人机的最优飞行方向以及所述无人机与障碍物的最小距离。
可选地,所述根据所述当前前向速度和所述预期前向速度,在所述栅格地图中确定障碍物检测区域,包括:
比较所述当前前向速度和所述预期前向速度;
若所述当前前向速度小于所述预期前向速度,则根据所述预期前向速度在所述栅格地图中确定所述障碍物检测区域;
若所述当前前向速度大于所述预期前向速度,则根据所述当前前向速度在所述栅格地图中确地所述障碍物检测区域。
可选地,当根据所述预期前向速度在所述栅格地图中确定障碍物检测区域时,所述预期前向速度越大,所述障碍物检测区域越大;
当根据所述当前前向速度在所述栅格地图中确定障碍物检测区域时,所述当前前向速度越大,所述障碍物检测区域越大。
可选地,所述在所述障碍物检测区域中,确定所述无人机的最优飞行方向,包括:
在所述障碍物检测区域中,确定所述无人机的可通行区域,其中,所述可通行区域为不存在障碍物的区域;
根据所述可通行区域,确定所述无人机的候选飞行方向;
根据代价函数计算所述候选飞行方向的代价函数值;
将所述代价函数值最小的候选飞行方向确定为所述无人机的最优飞行方向。
可选地,所述在所述障碍物检测区域中,确定所述无人机的可通行区域,包括:
以所述无人机为中心,预设角度为间隔,对所述障碍物检测区域进行划分,以将所述障碍物检测区域划分为多个区域;
采样障碍物的坐标;
确定所述坐标未落入的区域为所述可通行区域。
可选地,所述采样障碍物的坐标,包括:
采样所述障碍物检测区域中被所述障碍物占据的栅格的中心点坐标和/或被所述障碍物占据的栅格的角点坐标。
可选地,所述代价函数为:
f=k 1×g(direc goal,direc cur)+k 2×g(direc pre,direc cur)-k 3×sum
其中,g(direc goal,direc cur)表示所述候选飞行方向中的其中一个候选飞行方向与所述目标的方向的一致性,g(direc pre,direc cur)表示所述候选飞行方向与前一次决策的最优飞行方向的一致性,sum表示所述可通行区域的数量,k 1、k 2、k 3为权重系数。
可选地,所述在所述障碍物检测区域中,确定所述无人机与障碍物的最小距离,包括:
确定所述障碍物检测区域中与所述无人机距离最小的障碍物作为目标障碍物;
将所述目标障碍物与所述无人机的距离确定为所述最小距离。
可选地,所述最优飞行速度包括最优前向速度和最优侧向速度;则,
所述根据所述最小距离、所述预期前向速度以及所述最优飞行方向,确定所述无人机的最优飞行速度,包括:
根据所述最小距离,计算所述无人机的最大前向速度;
根据所述最大前向速度和所述预期前向速度,确定所述最优前向速度;
根据所述最优前向速度和所述最优飞行方向,确定所述最优侧向速度。
可选地,所述根据所述最大前向速度和所述预期前向速度,确定所述最优前向速度,包括:
比较所述最大前向速度和所述预期前向速度;
若所述最大前向速度大于所述预期前向速度,则确定所述预期前向速度为所述最优前向速度;
若所述最大前向速度不大于所述预期前向速度,则确定所述最大前向速度为所述最优前向速度。
可选地,所述最优飞行方向对应最优飞行角度;则,
所述根据所述最优前向速度和所述最优飞行方向,确定所述最优侧向速度,包括:
根据所述最优飞行角度的正切值与所述最优前向速度的乘积确定所述最优侧向速度。
可选地,所述获取所述无人机前方环境的深度图,包括:
通过所述无人机的深度传感器获取所述无人机前方环境的深度图。
可选地,在所述根据所述深度图,确定以所述无人机为中心的栅格地图之前,所述方法还包括:
判断所述深度传感器是否存在俯仰角;
若是,则对所述深度图进行深度补偿。
可选地,所述深度传感器为深度相机;则,
若所述深度传感器存在俯仰角,则所述对所述深度图进行深度补偿,包括:
计算所述深度补偿的像素行数,所述深度补偿的像素行数为:
row_see=tanθ 2×f,其中,θ 2为所述深度相机的俯仰角,f为所述深度相机的焦距;
根据所述深度补偿的像素行数确定所述无人机的像平面在所述深度图上的行索引,所述无人机的像平面在所述深度图上的行索引row_horizon为:
row_horizon=row_half+row_see,其中,row_half为所述深度图行数的一半。
为解决上述技术问题,本发明实施例采用的另一个技术方案是:提供一种基于目标跟踪的无人机避障装置,所述装置包括:
第一确定模块,用于确定无人机的预期前向速度,所述预期前向速度用于使所述无人机与目标保持初始水平距离;
获取模块,用于获取所述无人机前方环境的深度图,并根据所述深度图,确定以所述无人机为中心的栅格地图;
第二确定模块,用于根据所述栅格地图,确定所述无人机的最优飞行方向以及所述无人机与障碍物的最小距离;以及
用于根据所述最小距离、所述预期前向速度以及所述最优飞行方向,确定所述无人机的最优飞行速度;
控制模块,用于控制所述无人机以所述最优飞行速度沿所述最优飞行方向飞行,以躲避所述无人机前方环境的障碍物。
可选地,所述第一确定模块具体用于:
获取所述无人机与所述目标的初始水平距离;
确定所述无人机与所述目标的当前水平距离;
基于所述初始水平距离,对所述当前水平距离进行PID调节,以确定所述无人机的所述预期前向速度。
可选地,所述无人机包括云台,所述控制模块还用于:
控制所述云台的中心对准所述目标;则,
所述第一确定模块具体用于:
获取所述云台的当前对地高度和当前俯仰角;
根据所述当前对地高度以及所述当前俯仰角确定所述无人机与所述目标的当前水平距离。
可选地,所述第一确定模块还用于:
确定所述无人机的当前前向速度;则,
所述第二确定模块具体用于:
根据所述当前前向速度和所述预期前向速度,在所述栅格地图中确定障碍物检测区域;
在所述障碍物检测区域中,确定所述无人机的最优飞行方向以及所述无人机与障碍物的最小距离。
可选地,所述第二确定模块具体用于:
比较所述当前前向速度和所述预期前向速度;
若所述当前前向速度小于所述预期前向速度,则根据所述预期前向速度在所述栅格地图中确定所述障碍物检测区域;
若所述当前前向速度大于所述预期前向速度,则根据所述当前前向速度在所述栅格地图中确地所述障碍物检测区域。
可选地,当根据所述预期前向速度在所述栅格地图中确定障碍物检测区域时,所述预期前向速度越大,所述障碍物检测区域越大;
当根据所述当前前向速度在所述栅格地图中确定障碍物检测区域时,所述当前前向速度越大,所述障碍物检测区域越大。
可选地,所述第二确定模块具体用于:
在所述障碍物检测区域中,确定所述无人机的可通行区域,其中,所述可通行区域为不存在障碍物的区域;
根据所述可通行区域,确定所述无人机的候选飞行方向;
根据代价函数计算所述候选飞行方向的代价函数值;
将所述代价函数值最小的候选飞行方向确定为所述无人机的最优飞行方向。
可选地,所述第二确定模块具体用于:
以所述无人机为中心,预设角度为间隔,对所述障碍物检测区域进行划分,以将所述障碍物检测区域划分为多个区域;
采样障碍物的坐标;
确定所述坐标未落入的区域为所述可通行区域。
可选地,所述第二确定模块具体用于:
采样所述障碍物检测区域中被所述障碍物占据的栅格的中心点坐标和/或被所述障碍物占据的栅格的角点坐标。
可选地,所述代价函数为:
f=k 1×g(direc goal,direc cur)+k 2×g(direc pre,direc cur)-k 3×sum
其中,g(direc goal,direc cur)表示所述候选飞行方向中的其中一个候选飞行方向与所述目标的方向的一致性,g(direc pre,direc cur)表示所述候选飞行方向与前一次决策的最优飞行方向的一致性,sum表示所述可通行区域的数量,k 1、k 2、k 3为权重系数。
可选地,所述第二确定模块具体用于:
确定所述障碍物检测区域中与所述无人机距离最小的障碍物作为目标障碍物;
将所述目标障碍物与所述无人机的距离确定为所述最小距离。
可选地,所述最优飞行速度包括最优前向速度和最优侧向速度;则,
所述第二确定模块具体用于:
根据所述最小距离,计算所述无人机的最大前向速度;
根据所述最大前向速度和所述预期前向速度,确定所述最优前向速度;
根据所述最优前向速度和所述最优飞行方向,确定所述最优侧向速度。
可选地,所述第二确定模块具体用于:
比较所述最大前向速度和所述预期前向速度;
若所述最大前向速度大于所述预期前向速度,则确定所述预期前向速度为所述最优前向速度;
若所述最大前向速度不大于所述预期前向速度,则确定所述最大前向速度为所述最优前向速度。
可选地,所述最优飞行方向对应最优飞行角度;则,
所述第二确定模块具体用于:
根据所述最优飞行角度的正切值与所述最优前向速度的乘积确定所述最优侧向速度。
可选地,所述获取模块具体用于:
通过所述无人机的深度传感器获取所述无人机前方环境的深度图。
可选地,在所述根据所述深度图,确定以所述无人机为中心的栅格地图之前,所述获取模块还用于:
判断所述深度传感器是否存在俯仰角;
若是,则对所述深度图进行深度补偿。
可选地,所述深度传感器为深度相机;则,
所述获取模块具体用于:
计算所述深度补偿的像素行数,所述深度补偿的像素行数为:
row_see=tanθ 2×f,其中,θ 2为所述深度相机的俯仰角,f为所述深度相机的焦距;
根据所述深度补偿的像素行数确定所述无人机的像平面在所述深度图上的行索引,所述无人机的像平面在所述深度图上的行索引row_horizon为:
row_horizon=row_half+row_see,其中,row_half为所述深度图行数的一半。
为解决上述技术问题,本发明实施例采用的另一个技术方案是:提供一种无人机,包括:
机身;
机臂,与所述机身相连;
动力装置,设置于所述机臂;
云台,与所述机身相连;
深度相机,与所述机身相连;
至少一个处理器,设于所述机身内;以及
与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够用于以上所述的基于目标跟踪的无人机避障方法。
为解决上述技术问题,本发明实施例采用的另一个技术方案是:提供一种非易失性计算机可读存储介质,其特征在于,所述非易失性计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使无人机执行以上所述的基于目标跟踪的无人机避障方法。
本发明实施例的有益效果是:区别于现有技术的情况下,本发明实施例提供一种基于目标跟踪的无人机避障方法、装置及无人机,在基于目标跟踪的无人机避障方法中,确定用于使无人机与目标保持初始水平距离的预期前向速度,并根据无人机前方环境的深度图确定以无人机为中心的栅格地图后,根据栅格地图确定无人机的最优飞行方向以及无人机与障碍物的最小距离,并根据所确定的最小距离、预期前向速度以及最优飞行方向确定无人机的最优飞行速度,然后控制无人机以最优飞行速度沿最优飞行方向飞行,以躲避前方环境的障碍物。在上述方式中,由于无人机前方环境的深度图能够随着无人机的飞行过程实时反映无人机飞行路径上的环境状况,因此,根据无人机前方环境的深度图确定的栅格地图来确定无人机的最优飞行方向,使得无人机能够对整个飞行空间进行路径规划,实时应变飞行空间中的动态变化;同时,根据所确定的最小距离、预期前向速度以及最优飞行方向,确定无人机在最优飞行方向上的最优飞行速度,使得无人机能够根据实际环境状况规划最优飞行速度,防止无人机因速度太快碰撞障碍物,提高目标跟踪过程中自主避障的准确性。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。
图1是本发明实施例提供的一种无人机的结构示意图;
图2是本发明实施例提供的一种基于目标跟踪的无人机避障方法中当深度传感器存在俯仰角,对深度图进行深度补偿的原理示意图;
图3是栅格地图的结构示意图;
图4是本发明实施例提供的一种基于目标跟踪的无人机避障方法的流程示意图;
图5是本发明实施例提供的一种基于目标跟踪的无人机避障装置的结构示 意图;
图6是本发明实施例提供的一种无人机的硬件结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
需要说明的是,当元件被表述“固定于”另一个元件,它可以直接在另一个元件上、或者其间可以存在一个或多个居中的元件。当一个元件被表述“连接”另一个元件,它可以是直接连接到另一个元件、或者其间可以存在一个或多个居中的元件。本说明书所使用的术语“垂直的”、“水平的”、“左”、“右”以及类似的表述只是为了说明的目的。
此外,下面所描述的本发明各个实施例中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。
本发明提供了一种基于目标跟踪的无人机避障方法及装置,该方法及装置应用于无人机,从而使得该无人机能够根据实际飞行情况在整个飞行空间进行路径规划,规划出最优飞行方向及最优飞行速度,并以最优飞行速度沿最优飞行方向飞行,以准确地躲避前方环境的障碍物。其中,最优飞行方向指不存在障碍物的方向。
本发明中的无人机可以是任何合适类型的高空无人机或者低空无人机,包括固定翼无人机、旋翼无人机、伞翼无人机或者扑翼无人机等。
下面,将通过具体实施例对本发明进行具体阐述。
实施例一
请参阅图1,是本发明其中一实施例提供的一种无人机100,该无人机100为四旋翼无人机,包括:机身10、机臂20、动力装置30、云台40、拍摄装置50、深度传感器(图未示)、第一陀螺仪(图未示)、第二陀螺仪(图未示)、起落架60、智能电池(图未示)以及飞控系统(图未示)。机臂20、云台40、深度传感器以及起落架60均与机身10连接,动力装置30设置于机臂20上,拍摄装置50以及第一陀螺仪安装于云台40,第二陀螺仪、智能电池以及飞控系统则设置于机身10内。其中,动力装置30、云台40、拍摄装置50、深度传感器、第一陀螺仪、第二陀螺仪以及起落架60均与飞控系统通信连接,使得飞控系统能够通过动力装置30控制无人机100的飞行、通过深度传感器获得无人机100飞行路径前方的环境情况,还能够控制云台40转动、控制拍摄装置50航拍以及控制起落架60打开与收起,还能够接收第一陀螺仪、第二陀螺仪的测量 数据。
优选地,机臂20数量为4,均匀分布于机身10四周,与机身10固定连接,用于承载动力装置30。其中,机臂20与机身10一体成型。
动力装置30包括电机以及与电机轴连接的螺旋桨,电机能够带动螺旋桨旋转以为无人机100提供升力或推力,实现飞行;电机还能够通过改变螺旋桨的转速及方向来改变无人机100的飞行方向。当动力装置30与飞控系统通信连接时,飞控系统能够通过控制电机来控制无人机100的飞行。
该动力装置30设置于机臂20未与机身10连接的一端,并通过电机连接机臂20。
优选地,在无人机100的4个机臂上均设置有动力装置30,以使无人机100能够平稳飞行。
云台40则设置于机身10底部,用于搭载拍摄装置50。优选地,该云台40为电动云台,能够在飞控系统的控制下进行转动,以实现对目标的跟踪。其中,飞控系统控制云台40转动时,控制云台40的中心对准目标。
该电动云台包括但不限于水平旋转云台、全方位云台等。
当云台40为水平旋转云台时,飞控系统能够控制该云台40在水平方向左右转动;当云台40为全方位云台时,飞控系统能够控制该云台40在水平方向左右转动,以及,控制该云台40在竖直方向上下转动。
优选地,在本发明实施例中,云台40为全方位云台,以能够全方位对目标进行跟踪。
拍摄装置50则可以为照相机、摄像机等能够拍摄视频图像的电子设备,用于在飞控系统的控制下进行航拍。
该拍摄装置50固定于云台40,能够随着云台40的转动而转动;并且,该拍摄装置50的拍摄镜头位于云台40的中心线上,当云台40的中心对准目标时,拍摄装置50的拍摄镜头也对准目标,此时,若拍摄装置50拍摄视频图像,则目标位于拍摄装置50所拍摄的视频图像的中心。
第一陀螺仪则安装于云台40,用于测量云台40的姿态信息,该云台40的姿态信息包括云台的俯仰角。其中,当云台40的俯仰角为0时,云台40的中心线平行于水平方向。
当第一陀螺仪与飞控系统通信连接后,飞控系统能够从第一陀螺仪获取云台40的姿态信息。
深度传感器则固定于机身10,其姿态与机身10的姿态保持一致。该深度传感器用于采集无人机100前方环境的深度图(Depth Map),该深度图是包含与视点的场景对象的表面距离有关的信息的图像或图像通道,在深度图中,其每个像素值表示深度传感器距离物体的实际距离,故深度传感器采集深度图也即采集深度传感器与前方环境物体的实际距离。当深度传感器与飞控系统通信连接时,飞控系统能够从深度传感器获取无人机前方环境的深度图,也即获取深度传感器与前方环境物体的实际距离,以获得无人机100飞行路径前方的环 境情况。
该深度传感器为深度相机,包括但不限于:双目相机、TOF(Time of Flight,飞行时间)相机等。
第二陀螺仪则安装于机身10内,用于测量机身10的姿态信息,亦即,测量深度传感器的姿态信息,该深度传感器的姿态信息包括深度传感器的俯仰角。其中,当深度传感器的俯仰角为0时,深度传感器的检测方向为水平方向。
当第二陀螺仪与飞控系统通信连接后,飞控系统能够从第二陀螺仪获取深度传感器的姿态信息。
进一步地,当第一陀螺仪和第二陀螺仪均未产生姿态变化时,云台40的中心线朝向与深度传感器的检测方向一致。
起落架60则设置于机身10底部相对两侧,通过驱动装置连接于机身10,起落架60在驱动装置的驱动下能够进行打开与收起。在无人机100与地面接触时,驱动装置控制起落架60打开,以使无人机100能够通过起落架60与地面接触;在无人机100飞行过程中,驱动装置控制起落架60收起,以避免起落架60影响无人机100飞行。当起落架60与飞控系统通信连接时,飞控系统能够通过控制驱动装置来控制起落架60的打开与收起。
智能电池则用于为无人机100供电,以使无人机100的动力装置30、云台40、拍摄装置50、深度传感器、第一陀螺仪、第二陀螺仪、起落架60以及飞控系统能够通电运行。其中,智能电池包括但不限于:干电池、铅蓄电池以及锂电池等。
飞控系统则与动力装置30、云台40、拍摄装置50、深度传感器、第一陀螺仪、第二陀螺仪以及起落架60通过有线连接或者无线连接的方式进行通信连接。其中,无线连接包括但不限于:WiFi、蓝牙、ZigBee等。
该飞控系统用于执行基于目标跟踪的无人机避障方法,以对无人机的整个飞行空间进行路径规划,提高目标跟踪过程中自主避障的准确性。
具体地,在无人机100飞行过程中,飞控系统控制云台40的中心对准目标,以实现无人机100对目标的跟踪。
其中,目标为无人机飞行过程中跟踪的物体,该目标位于地面,能够在地面移动。
飞控系统控制云台40的中心对准目标时,实时获取目标的方向,然后,根据目标的方向,控制云台40进行转动,直至云台40的中心朝向目标的方向,与目标对准。
在无人机100对目标进行跟踪的过程中,飞控系统确定无人机100的预期前向速度,该预期前向速度用于使无人机100与目标保持初始水平距离,即无人机100的前向速度为预期前向速度时,无人机100才能与目标保持初始水平距离。
于是,确定无人机100的预期前向速度时,首先,获取无人机100与目标的初始水平距离;然后,确定无人机100与目标的当前水平距离;最后,基于 所获取的初始水平距离,对所确定的当前水平距离进行PID调节,以确定无人机100的预期前向速度。
其中,初始水平距离为无人机100初始化时所在位置与目标所在位置在水平方向上的相对距离,该初始水平距离能够由用户进行设定后存储至存储器,也能够由飞控系统在无人机100初始化时计算得出后存储至存储器。
因此,能够在存储器中获取无人机100与目标的初始水平距离。
当前水平距离则为无人机100当前所在位置与目标当前所在位置在水平方向上的相对距离。
由于目标位于地面且与云台40的中心对准,因此,能够通过云台40的俯仰角以及云台40的对地高度,计算出无人机100与目标在水平方向上的相对距离,亦即,无人机100与目标之间的水平距离。具体地,无人机100与目标之间的水平距离
Figure PCTCN2020102878-appb-000001
H为云台40的对地高度,θ 1为云台40的俯仰角。
于是,飞控系统确定无人机与目标的当前水平距离时,获取云台40的当前对地高度和云台40的当前俯仰角后,根据所获取的当前对地高度和当前俯仰角计算出无人机100与目标的当前水平距离。
同理,飞控系统能够根据无人机100初始化时云台40的俯仰角以及云台40的对地高度,计算出无人机100与目标的初始水平距离并存储至存储器。
在基于所获取的初始水平距离,对所确定的当前水平距离进行PID调节,以确定无人机100的预期前向速度的步骤中,则运用PID控制器进行闭环控制。
在PID控制器中,初始水平距离为被控变量的期望值,当前水平距离为被控变量的实际值,而预期前向速度则为PID控制器的响应输出。当当前水平距离与初始水平距离存在偏差时,则调节预期前向速度使当前水平距离能够达到初始水平距离。
进一步地,飞控系统确定无人机100的预期前向速度后,通过深度传感器获取无人机100前方环境的深度图,并根据深度图,确定以无人机100为中心的栅格地图。
其中,栅格地图则是通过将深度图中的深度信息映射到以机体为中心的平面栅格图中形成的,每一栅格给定一个可能值,表示该栅格被障碍物占据的概率。当环境深度图中存在障碍物时,障碍物在栅格地图中占据栅格,能够通过被占据栅格的坐标获知障碍物的位置。
栅格地图的栅格排列成矩阵,比如,栅格地图的栅格排列成10*10的矩阵。
在本发明其他一些实施例中,若无人机100在飞行过程中产生俯仰角,会使得无人机100前视不再是水平的,此时,深度传感器采集的深度图不再是无人机100水平前方的深度图,使得深度图所反映的深度信息出现误差,造成栅格地图的不准确。于是,飞控系统在根据深度图确定以无人机100为中心的栅格地图之前,还需判断深度传感器是否存在俯仰角,若深度传感器存在俯仰角,则飞控系统对深度图进行深度补偿后再根据深度补偿后的深度图确定以无人机 100为中心的栅格地图。
其中,飞控系统能够通过第二陀螺仪测量无人机100的三轴姿态角,以根据三轴姿态角判断深度传感器是否存在俯仰角。
飞控系统对深度图进行深度补偿具体包括:飞控系统计算深度补偿的像素行数,并在计算得到深度补偿的像素行数之后,根据该深度补偿的像素行数确定无人机的像平面在深度图上的行索引。
具体地,请参阅图2,深度传感器为深度相机时,该深度补偿的像素行数row_see为:
row_see=tanθ 2×f,其中,θ 2为深度相机的俯仰角,f为深度相机的焦距;
该无人机的像平面在深度图上的行索引row_horizon为:
row_horizon=row_half+row_see,其中,row_half为深度图行数的一半。
进一步地,飞控系统确定以无人机100为中心的栅格地图后,根据所确定的栅格地图,确定无人机100的最优飞行方向以及无人机100与障碍物的最小距离。
其中,由于无人机飞行过程中,无人机100的前向速度越大,与障碍物碰撞的几率就越大,需要更早考虑无人机100前方环境的障碍物分布情况;而无人机100的前向速度越小,与障碍物碰撞的几率就越小,过早的考虑无人机100前方环境的障碍物分布情况,容易将不必要的障碍物考虑进去,导致最优飞行方向的判断不准确。
于是,在根据所确定的栅格地图,确定无人机100的最优飞行方向以及无人机100与障碍物的最小距离之前,飞控系统还需要确定无人机100的当前前向速度,然后,根据当前前向速度和预期前向速度,在栅格地图中确定障碍物检测区域后,再在障碍物检测区域中,确定无人机100的最优飞行方向以及无人机100与障碍物的最小距离。即,将无人机100的前向速度与障碍物的检测范围结合,根据无人机100的前向速度确定一个合适的障碍物检测范围,以增加障碍物检测的准确性。
其中,障碍物检测区域为栅格地图中用于检测障碍物的区域,该障碍物检测区域位于栅格地图的上半部分(即无人机100前方),该障碍物检测区域的列数与栅格地图的列数相同、行数小于或等于栅格地图的行数的二分之一,即该障碍物检测区域小于或等于栅格地图的二分之一。比如,请参阅图3,实线区域P1为障碍物检测区域。
无人机100的最优飞行方向为不存在障碍物的方向;无人机100与障碍物的最小距离即无人机100与视野范围内最近障碍物的距离。
具体地,根据当前前向速度和预期前向速度,在栅格地图中确定障碍物检测区域,包括:比较当前前向速度和预期前向速度,若当前前向速度小于预期前向速度,则根据预期前向速度在栅格地图中确定障碍物检测区域,此时,预 期前向速度越大,所确定的障碍物检测区域越大;若当前前向速度大于预期前向速度,则根据当前前向速度在栅格地图中确定障碍物检测区域,此时,当前前向速度越大,所确定的障碍物检测区域越大。
在所确定的障碍物检测区域中,确定无人机100的最优飞行方向,包括:首先,在所确定的障碍物检测区域中,确定无人机100的可通行区域。
其中,可通行区域为障碍物检测区域中不存在障碍物的区域。
飞控系统在所确定的障碍物检测区域中,确定无人机100的可通行区域,具体包括:以无人机100为中心,预设角度为间隔,对障碍物检测区域进行划分,以将障碍物检测区域划分为多个区域,然后,采样障碍物的坐标,并判断采样得到的障碍物坐标是否落入障碍物检测区域划分的区域中,将障碍物坐标未落入的区域确定为可通行区域。比如,请参阅图3,以无人机100为中心,预设角度为间隔,在障碍物检测区域P1中划分多个扇形区域,所划分的扇形区域由左至右分别为B1至B11;然后,采样障碍物Z1、Z2和Z3的坐标,确定障碍物Z1的坐标落入B2和B3区域,障碍物Z2的坐标落入B6至B9区域,而障碍物Z3的坐标未落入障碍物检测区域P1中,因此,确定障碍物未落入的区域B1、B4、B5、B10和B11为可通行区域。
其中,飞控系统在障碍物检测区域中划分出的每个区域均为扇形区域。
在对障碍物检测区域进行划分时,预设角度越大,划分的区域越大,划分出的区域数量则越少;预设角度越小,划分的区域越小,划分出的区域数量则越多。
飞控系统采样障碍物的坐标,包括:采样障碍物检测区域中被障碍物占据的栅格的中心点坐标和/或被障碍物占据的栅格的角点坐标。
飞控系统将被障碍物占据的栅格的中心点坐标和/或被障碍物占据的栅格的角点坐标均未落入的区域确定为可通行区域。基于此,若栅格地图的区域划分的过小,则容易出现区域被障碍物覆盖,但采样的坐标均未落入区域的情况,此时,不可通行区域被误判为可通行区域;而栅格地图的区域划分若过大,则会导致飞行方向过少,不利于最优飞行方向的判定。于是,为了保证飞控系统路径规划的可靠性,飞控系统会根据实际飞行效果调整预设角度的大小。
飞控系统调整预设角度依据深度图数据的鲁棒性以及规划方向的精确度。
其次,在所确定的可通行区域中,确定无人机100的候选飞行方向。
基于可通行区域确定的候选飞行方向为不存在障碍物的方向,飞控系统将所有可通行区域对应的方向确定为候选飞行方向。
然后,根据代价函数计算候选飞行方向的代价函数值,将代价函数值最小的候选飞行方向确定为无人机100的最优飞行方向。
上述最小代价函数值即通过代价函数计算出的最小飞行代价,即确定飞行代价最小的候选飞行方向为无人机100的最优飞行方向。
其中,代价函数为:
f=k 1×g(direc goal,direc cur)+k 2×g(direc pre,direc cur)-k 3×sum
其中,g(direc goal,direc cur)表示候选飞行方向中的其中一个候选飞行方向与目标的方向的一致性,g(direc pre,direc cur)表示候选飞行方向与前一次决策的最优飞行方向的一致性,sum表示可通行区域的数量,k 1、k 2、k 3为权重系数。
与目标的方向的一致性越高、与前一次决策的最优飞行方向的一致性越高以及可通行区域的数量越多的候选飞行方向的代价越小。
、、的相对大小决定三种因素的优先级顺序。若要使得确定的候选飞行方向与目标的方向尽量保持一致,则使得;若要使得确定的候选飞行方向与前一次决策的最优飞行方向尽量保持一致,则使得;若要保证确定的候选飞行方向足够安全,则使得。
在所确定的障碍物检测区域中,确定无人机100与障碍物的最小距离,包括:确定障碍物检测区域中与无人机100距离最小的障碍物作为目标障碍物,然后,将目标障碍物与无人机100的距离确定为最小距离。比如,请参阅图3,飞控系统确定障碍物Z1与无人机100的距离最小,故飞控系统确定障碍物Z1为目标障碍物,然后,将障碍物Z1与无人机100的距离确定为最小距离。
进一步地,飞控系统确定无人机100的最优飞行方向以及无人机100与障碍物的最小距离后,根据所确定的最小距离、预期前向速度以及最优飞行方向,确定无人机100的最优飞行速度。
其中,最优飞行速度包括最优前向速度和最优侧向速度。
基于此,根据所确定的最小距离、预期前向速度以及最优飞行方向,确定无人机100的最优飞行速度,具体包括:根据最小距离,计算无人机100的最大前向速度,然后,根据最大前向速度和预期前向速度,确定最优前向速度,然后,根据最优前向速度和最优飞行方向,确定最优侧向速度。
其中,无人机100的最大前向速度为保证无人机100不会碰撞到最近障碍物的前向速度,若无人机100的前向速度大于最大前向速度,则无人机100可能碰撞到最近障碍物。
根据最大前向速度和预期前向速度,确定最优前向速度,具体包括:比较最大前向速度和预期前向速度,若最大前向速度大于预期前向速度,则确定预期前向速度为最优前向速度,此时,最优前向速度既能保证无人机100不会碰撞到最近障碍物,又能保证无人机100与目标保持初始水平距离;若最大前向速度不大于预期前向速度,则确定最大前向速度为最优前向速度,此时,由于预期前向速度大于最大前向速度,若以预期前向速度作为最优前向速度,虽然能保证无人机100与目标保持初始水平距离,但无人机100可能碰撞到最近障碍物,故确定最大前向速度为最优前向速度,以保证无人机100不会碰撞到最近障碍物。
由于飞控系统在障碍物检测区域中确定无人机100的最优飞行方向时,是从按预设角度划分的可通行区域对应的候选飞行方向中确定出最优飞行方向的,故最优飞行方向对应最优飞行角度。
基于此,根据最优前向速度和最优飞行方向,确定最优侧向速度时,根据 最优飞行角度的正切值与最优前向速度的乘积确定最优侧向速度。
飞控系统所确定的最优前向速度和最优侧向速度共同组成指导无人机100飞行的最优飞行速度。
进一步地,飞控系统确定无人机100的最优飞行速度后,控制无人机100以最优飞行速度沿最优飞行方向飞行,以躲避无人机100前方环境的障碍物。
当最优飞行速度中的最优前向速度为最大前向速度时,飞控系统控制无人机100以最优飞行速度沿最优飞行方向飞行时,无人机100能够精准避障;当最优飞行速度中的最优前向速度为预期前向速度时,飞控系统控制无人机100以最优飞行速度沿最优飞行方向飞行时,无人机100能够精准避障的同时,与目标保持初始水平距离。
在本发明实施例中,无人机通过执行基于目标跟踪的无人机避障方法,而能够根据所获取的前方环境的深度图确定栅格地图,进而根据栅格地图确定最优飞行方向,并根据所确定的最小距离、预期前向速度以及最优飞行方向,确定最优飞行方向上的最优飞行速度,实现对整个飞行空间进行路径规划,以实时应变飞行空间的动态变化,提高目标跟踪过程中自主避障的准确性。
实施例二
请参阅图4,是本发明其中一实施例提供的一种基于目标跟踪的无人机避障方法的流程示意图,应用于无人机,该无人机为上述实施例中所述的无人机100,而本发明实施例提供的方法由上述飞控系统执行,用于对无人机的整个飞行空间进行路径规划,提高目标跟踪过程中自主避障的准确性,该基于目标跟踪的无人机避障方法包括:
S100:确定无人机的预期前向速度。
上述“预期前向速度”用于使无人机与目标保持初始水平距离,即无人机的前向速度为预期前向速度时,无人机才能与目标保持初始水平距离。其中,目标为无人机飞行过程中跟踪的物体,该目标位于地面,能够在地面移动。
于是,确定无人机的预期前向速度时,首先,获取无人机与目标的初始水平距离;然后,确定无人机与目标的当前水平距离;最后,基于所获取的初始水平距离,对所确定的当前水平距离进行PID调节,以确定无人机的预期前向速度。
其中,初始水平距离为无人机初始化时所在位置与目标所在位置在水平方向上的相对距离,该初始水平距离能够由用户进行设定后存储至存储器,也能够由飞控系统在无人机初始化时计算得出后存储至存储器。
基于此,能够在存储器中获取无人机与目标的初始水平距离。
当前水平距离则为无人机当前所在位置与目标当前所在位置在水平方向上的相对距离。
由于预期前向速度基于无人机的目标跟踪过程进行确定,故在确定无人机的预期前向速度之前,该方法还包括:控制云台的中心对准目标。
具体地,控制云台的中心对准目标时,实时获取目标的方向,然后,根据 目标的方向,控制云台进行转动,直至云台的中心朝向目标的方向,与目标对准,实现无人机对目标的跟踪。
基于此,由于目标位于地面且与云台的中心对准,因此,能够通过云台的俯仰角以及云台的对地高度,计算出无人机与目标在水平方向上的相对距离,亦即,无人机与目标之间的水平距离。具体地,无人机与目标之间的水平距离
Figure PCTCN2020102878-appb-000002
H为云台的对地高度,θ 1为云台的俯仰角。
于是,确定无人机与目标的当前水平距离时,获取云台的当前对地高度和云台的当前俯仰角后,根据所获取的当前对地高度和当前俯仰角计算出无人机与目标的当前水平距离。
同理,能够根据无人机初始化时云台的俯仰角以及云台的对地高度,计算出无人机与目标的初始水平距离并存储至存储器。
在基于所获取的初始水平距离,对所确定的当前水平距离进行PID调节,以确定无人机的预期前向速度的步骤中,则运用PID控制器进行闭环控制。
在PID控制器中,初始水平距离为被控变量的期望值,当前水平距离为被控变量的实际值,而预期前向速度则为PID控制器的响应输出。当当前水平距离与初始水平距离存在偏差时,则调节预期前向速度使当前水平距离能够达到初始水平距离。
S200:获取所述无人机前方环境的深度图,并根据所述深度图,确定以所述无人机为中心的栅格地图。
上述“深度图(Depth Map)”是包含与视点的场景对象的表面距离有关的信息的图像或图像通道,在深度图中,其每个像素值表示深度传感器距离物体的实际距离。
在本发明一实施例中,通过深度传感器来获取无人机前方环境的深度图,通过深度传感器获取无人机前方环境的深度图即获取深度传感器与前方环境物体的实际距离。
上述“栅格地图”则是通过将深度图中的深度信息映射到以机体为中心的平面栅格图中形成的,每一栅格给定一个可能值,表示该栅格被障碍物占据的概率。当环境深度图中存在障碍物时,障碍物在栅格地图中占据栅格,能够通过被占据栅格的坐标获知障碍物的位置。
栅格地图的栅格排列成矩阵,比如,栅格地图的栅格排列成10*10的矩阵。
在本发明一实施例中,若无人机在飞行过程中产生俯仰角,会使得无人机前视不再是水平的,此时,深度传感器采集的深度图不再是无人机水平前方的深度图,使得深度图所反映的深度信息出现误差,造成栅格地图的不准确。于是,在根据深度图确定以无人机为中心的栅格地图之前,还需判断深度传感器是否存在俯仰角,若深度传感器存在俯仰角,则对深度图进行深度补偿后再根据深度补偿后的深度图确定以无人机为中心的栅格地图。
其中,能够通过第二陀螺仪测量无人机的三轴姿态角,以根据三轴姿态角 判断深度传感器是否存在俯仰角。
对深度图进行深度补偿具体包括:计算深度补偿的像素行数,并在计算得到深度补偿的像素行数之后,根据该深度补偿的像素行数确定无人机的像平面在深度图上的行索引。
具体地,请参阅图2,深度传感器为深度相机时,该深度补偿的像素行数row_see为:
row_see=tanθ 2×f,其中,θ 2为深度相机的俯仰角,f为深度相机的焦距;
该无人机的像平面在深度图上的行索引row_horizon为:
row_horizon=row_half+row_see,其中,row_half为深度图行数的一半。
S300:根据所述栅格地图,确定所述无人机的最优飞行方向以及所述无人机与障碍物的最小距离。
由于无人机飞行过程中,无人机的前向速度越大,与障碍物碰撞的几率就越大,需要更早考虑无人机前方环境的障碍物分布情况;而无人机的前向速度越小,与障碍物碰撞的几率就越小,过早的考虑无人机前方环境的障碍物分布情况,容易将不必要的障碍物考虑进去,导致最优飞行方向的判断不准确。
于是,在本发明一实施例中,在根据所确定的栅格地图,确定无人机的最优飞行方向以及无人机与障碍物的最小距离之前,还需要确定无人机的当前前向速度,然后,根据当前前向速度和预期前向速度,在栅格地图中确定障碍物检测区域后,再在障碍物检测区域中,确定无人机的最优飞行方向以及无人机与障碍物的最小距离。即,将无人机的前向速度与障碍物的检测范围结合,根据无人机的前向速度确定一个合适的障碍物检测范围,以增加障碍物检测的准确性。
其中,障碍物检测区域为栅格地图中用于检测障碍物的区域,该障碍物检测区域位于栅格地图的上半部分(即无人机100前方),该障碍物检测区域的列数与栅格地图的列数相同、行数小于或等于栅格地图的行数的二分之一,即该障碍物检测区域小于或等于栅格地图的二分之一。比如,请参阅图3,实线区域P1为障碍物检测区域。
无人机的最优飞行方向为不存在障碍物的方向;无人机与障碍物的最小距离即无人机与视野范围内最近障碍物的距离。
进一步地,在本发明一实施例中,根据当前前向速度和预期前向速度,在栅格地图中确定障碍物检测区域,包括:比较当前前向速度和预期前向速度,若当前前向速度小于预期前向速度,则根据预期前向速度在栅格地图中确定障碍物检测区域,此时,预期前向速度越大,所确定的障碍物检测区域越大;若当前前向速度大于预期前向速度,则根据当前前向速度在栅格地图中确定障碍物检测区域,此时,当前前向速度越大,所确定的障碍物检测区域越大。
进一步地,在本发明一实施例中,在所确定的障碍物检测区域中,确定无 人机的最优飞行方向,包括:首先,在所确定的障碍物检测区域中,确定无人机的可通行区域。
其中,可通行区域为障碍物检测区域中不存在障碍物的区域。
在所确定的障碍物检测区域中,确定无人机的可通行区域,具体包括:以无人机为中心,预设角度为间隔,对障碍物检测区域进行划分,以将障碍物检测区域划分为多个区域,然后,采样障碍物的坐标,并判断采样得到的障碍物坐标是否落入障碍物检测区域划分的区域中,将障碍物坐标未落入的区域确定为可通行区域。比如,请参阅图3,以无人机100为中心,预设角度为间隔,在障碍物检测区域P1中划分多个扇形区域,所划分的扇形区域由左至右分别为B1至B11;然后,采样障碍物Z1、Z2和Z3的坐标,确定障碍物Z1的坐标落入B2和B3区域,障碍物Z2的坐标落入B6至B9区域,而障碍物Z3的坐标未落入障碍物检测区域P1中,因此,确定障碍物未落入的区域B1、B4、B5、B10和B11为可通行区域。
其中,在障碍物检测区域中划分出的每个区域均为扇形区域。
在对障碍物检测区域进行划分时,预设角度越大,划分的区域越大,划分出的区域数量则越少;预设角度越小,划分的区域越小,划分出的区域数量则越多。
采样障碍物的坐标,包括:采样障碍物检测区域中被障碍物占据的栅格的中心点坐标和/或被障碍物占据的栅格的角点坐标。
将被障碍物占据的栅格的中心点坐标和/或被障碍物占据的栅格的角点坐标均未落入的区域确定为可通行区域。基于此,若栅格地图的区域划分的过小,则容易出现区域被障碍物覆盖,但采样的坐标均未落入区域的情况,此时,不可通行区域被误判为可通行区域;而栅格地图的区域划分若过大,则会导致飞行方向过少,不利于最优飞行方向的判定。于是,为了保证路径规划的可靠性,会根据实际飞行效果调整预设角度的大小。
调整预设角度依据深度图数据的鲁棒性以及规划方向的精确度。
其次,在所确定的可通行区域中,确定无人机的候选飞行方向。
基于可通行区域确定的候选飞行方向为不存在障碍物的方向,将所有可通行区域对应的方向确定为候选飞行方向。
然后,根据代价函数计算候选飞行方向的代价函数值,将代价函数值最小的候选飞行方向确定为无人机的最优飞行方向。
上述最小代价函数值即通过代价函数计算出的最小飞行代价,即确定飞行代价最小的候选飞行方向为无人机的最优飞行方向。
其中,代价函数为:
f=k 1×g(direc goal,direc cur)+k 2×g(direc pre,direc cur)-k 3×sum
其中,g(direc goal,direc cur)表示候选飞行方向中的其中一个候选飞行方向与目标的方向的一致性,g(direc pre,direc cur)表示候选飞行方向与前一次决策的最优飞行方向的一致性,sum表示可通行区域的数量,k 1、k 2、k 3为权重系数。
与目标的方向的一致性越高、与前一次决策的最优飞行方向的一致性越高以及可通行区域的数量越多的候选飞行方向的代价越小。
、、的相对大小决定三种因素的优先级顺序。若要使得确定的候选飞行方向与目标的方向尽量保持一致,则使得;若要使得确定的候选飞行方向与前一次决策的最优飞行方向尽量保持一致,则使得;若要保证确定的候选飞行方向足够安全,则使得。
进一步地,在本发明一实施例中,在所确定的障碍物检测区域中,确定无人机与障碍物的最小距离,包括:确定障碍物检测区域中与无人机距离最小的障碍物作为目标障碍物,然后,将目标障碍物与无人机的距离确定为最小距离。比如,请参阅图3,确定障碍物Z1与无人机100的距离最小,故确定障碍物Z1为目标障碍物,然后,将障碍物Z1与无人机100的距离确定为最小距离。
S400:根据所述最小距离、所述预期前向速度以及所述最优飞行方向,确定所述无人机的最优飞行速度。
在本发明一实施例中,最优飞行速度包括最优前向速度和最优侧向速度。
基于此,根据所确定的最小距离、预期前向速度以及最优飞行方向,确定无人机的最优飞行速度,具体包括:根据最小距离,计算无人机的最大前向速度,然后,根据最大前向速度和预期前向速度,确定最优前向速度,然后,根据最优前向速度和最优飞行方向,确定最优侧向速度。
其中,无人机的最大前向速度为保证无人机不会碰撞到最近障碍物的前向速度,若无人的前向速度大于最大前向速度,则无人机可能碰撞到最近障碍物。
在本发明一实施例中,根据最大前向速度和预期前向速度,确定最优前向速度,具体包括:比较最大前向速度和预期前向速度,若最大前向速度大于预期前向速度,则确定预期前向速度为最优前向速度,此时,最优前向速度既能保证无人机不会碰撞到最近障碍物,又能保证无人机与目标保持初始水平距离;若最大前向速度不大于预期前向速度,则确定最大前向速度为最优前向速度,此时,由于预期前向速度大于最大前向速度,若以预期前向速度作为最优前向速度,虽然能保证无人机与目标保持初始水平距离,但无人机可能碰撞到最近障碍物,故确定最大前向速度为最优前向速度,以保证无人机不会碰撞到最近障碍物。
在本发明一实施例中,由于在障碍物检测区域中确定无人机的最优飞行方向时,是从按预设角度划分的可通行区域对应的候选飞行方向中确定出最优飞行方向的,故最优飞行方向对应最优飞行角度。
基于此,根据最优前向速度和最优飞行方向,确定最优侧向速度时,根据最优飞行角度的正切值与最优前向速度的乘积确定最优侧向速度。
所确定的最优前向速度和最优侧向速度共同组成指导无人机飞行的最优飞行速度。
S500:控制所述无人机以所述最优飞行速度沿所述最优飞行方向飞行,以躲避所述无人机前方环境的障碍物。
当最优飞行速度中的最优前向速度为最大前向速度时,控制无人机以最优飞行速度沿最优飞行方向飞行时,无人机能够精准避障;当最优飞行速度中的最优前向速度为预期前向速度时,控制无人机以最优飞行速度沿最优飞行方向飞行时,无人机能够精准避障的同时,与目标保持初始水平距离。
在本发明实施例中,通过获取无人机前方环境的深度图确定的栅格地图来确定无人机的最优飞行方向,使得无人机能够对整个飞行空间进行路径规划,实时应变飞行空间的动态变化,同时,根据所确定的最小距离、预期前向速度以及最优飞行方向,确定无人机在最优飞行方向上的最优飞行速度,使得无人机能够根据实际环境状况规划最优飞行速度,提高目标跟踪过程中自主避障的准确性。
实施例三
以下所使用的术语“模块”为可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置可以以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能被构想的。
请参阅图5,是本发明其中一实施例提供的一种基于目标跟踪的无人机避障装置,该装置应用于无人机,该无人机为上述实施例中所述的无人机100,而本发明实施例提供的装置各个模块的功能由上述飞控系统执行,用于对无人机的整个飞行空间进行路径规划,提高目标跟踪过程中自主避障的准确性,该基于目标跟踪的无人机避障装置包括:
第一确定模块200,用于确定无人机的预期前向速度,所述预期前向速度用于使所述无人机与目标保持初始水平距离;
获取模块300,用于获取所述无人机前方环境的深度图,并根据所述深度图,确定以所述无人机为中心的栅格地图;
第二确定模块400,用于根据所述栅格地图,确定所述无人机的最优飞行方向以及所述无人机与障碍物的最小距离;以及
用于根据所述最小距离、所述预期前向速度以及所述最优飞行方向,确定所述无人机的最优飞行速度;
控制模块500,用于控制所述无人机以所述最优飞行速度沿所述最优飞行方向飞行,以躲避所述无人机前方环境的障碍物。
在其他一些实施例中,所述第一确定模块200具体用于:
获取所述无人机与所述目标的初始水平距离;
确定所述无人机与所述目标的当前水平距离;
基于所述初始水平距离,对所述当前水平距离进行PID调节,以确定所述无人机的所述预期前向速度。
在其他一些实施例中,所述无人机包括云台,所述控制模块500还用于:
控制所述云台的中心对准所述目标;则,
所述第一确定模块200具体用于:
获取所述云台的当前对地高度和当前俯仰角;
根据所述当前对地高度以及所述当前俯仰角确定所述无人机与所述目标的当前水平距离。
在其他一些实施例中,所述第一确定模块200还用于:
确定所述无人机的当前前向速度;则,
所述第二确定模块400具体用于:
根据所述当前前向速度和所述预期前向速度,在所述栅格地图中确定障碍物检测区域;
在所述障碍物检测区域中,确定所述无人机的最优飞行方向以及所述无人机与障碍物的最小距离。
在其他一些实施例中,所述第二确定模块400具体用于:
比较所述当前前向速度和所述预期前向速度;
若所述当前前向速度小于所述预期前向速度,则根据所述预期前向速度在所述栅格地图中确定所述障碍物检测区域;
若所述当前前向速度大于所述预期前向速度,则根据所述当前前向速度在所述栅格地图中确地所述障碍物检测区域。
在其他一些实施例中,当根据所述预期前向速度在所述栅格地图中确定障碍物检测区域时,所述预期前向速度越大,所述障碍物检测区域越大;
当根据所述当前前向速度在所述栅格地图中确定障碍物检测区域时,所述当前前向速度越大,所述障碍物检测区域越大。
在其他一些实施例中,所述第二确定模块400具体用于:
在所述障碍物检测区域中,确定所述无人机的可通行区域,其中,所述可通行区域为不存在障碍物的区域;
根据所述可通行区域,确定所述无人机的候选飞行方向;
根据代价函数计算所述候选飞行方向的代价函数值;
将所述代价函数值最小的候选飞行方向确定为所述无人机的最优飞行方向。
在其他一些实施例中,所述第二确定模块400具体用于:
以所述无人机为中心,预设角度为间隔,对所述障碍物检测区域进行划分,以将所述障碍物检测区域划分为多个区域;
采样障碍物的坐标;
确定所述坐标未落入的区域为所述可通行区域。
在其他一些实施例中,所述第二确定模块400具体用于:
采样所述障碍物检测区域中被所述障碍物占据的栅格的中心点坐标和/或被所述障碍物占据的栅格的角点坐标。
在其他一些实施例中,所述代价函数为:
f=k 1×g(direc goal,direc cur)+k 2×g(direc pre,direc cur)-k 3×sum
其中,g(direc goal,direc cur)表示所述候选飞行方向中的其中一个候选飞行方向与所述目标的方向的一致性,g(direc pre,direc cur)表示所述候选飞行方向与前 一次决策的最优飞行方向的一致性,sum表示所述可通行区域的数量,k 1、k 2、k 3为权重系数。
在其他一些实施例中,所述第二确定模块400具体用于:
确定所述障碍物检测区域中与所述无人机距离最小的障碍物作为目标障碍物;
将所述目标障碍物与所述无人机的距离确定为所述最小距离。
在其他一些实施例中,所述最优飞行速度包括最优前向速度和最优侧向速度;则,
所述第二确定模块400具体用于:
根据所述最小距离,计算所述无人机的最大前向速度;
根据所述最大前向速度和所述预期前向速度,确定所述最优前向速度;
根据所述最优前向速度和所述最优飞行方向,确定所述最优侧向速度。
在其他一些实施例中,所述第二确定模块400具体用于:
比较所述最大前向速度和所述预期前向速度;
若所述最大前向速度大于所述预期前向速度,则确定所述预期前向速度为所述最优前向速度;
若所述最大前向速度不大于所述预期前向速度,则确定所述最大前向速度为所述最优前向速度。
在其他一些实施例中,所述最优飞行方向对应最优飞行角度;则,
所述第二确定模块400具体用于:
根据所述最优飞行角度的正切值与所述最优前向速度的乘积确定所述最优侧向速度。
在其他一些实施例中,所述获取模块300具体用于:
通过所述无人机的深度传感器获取所述无人机前方环境的深度图。
在其他一些实施例中,在所述根据所述深度图,确定以所述无人机为中心的栅格地图之前,所述获取模块300还用于:
判断所述深度传感器是否存在俯仰角;
若是,则对所述深度图进行深度补偿。
在其他一些实施例中,所述深度传感器为深度相机;则,
所述获取模块300具体用于:
计算所述深度补偿的像素行数,所述深度补偿的像素行数为:
row_see=tanθ 2×f,其中,θ 2为所述深度相机的俯仰角,f为所述深度相机的焦距;
根据所述深度补偿的像素行数确定所述无人机的像平面在所述深度图上的行索引,所述无人机的像平面在所述深度图上的行索引row_horizon为:
row_horizon=row_half+row_see,其中,row_half为所述深度图行数的一半。
当然,在其他一些可替代实施例中,上述第一确定模块200、获取模块300、 第二确定模块400和控制模块500可以为飞控系统中的飞控芯片。
由于装置实施例和方法实施例是基于同一构思,在内容不互相冲突的前提下,装置实施例的内容可以引用方法实施例的,在此不再一一赘述。
在本发明实施例中,通过获取无人机前方环境的深度图确定的栅格地图来确定无人机的最优飞行方向,使得无人机能够对整个飞行空间进行路径规划,实时应变飞行空间的动态变化,同时,根据所确定的最小距离、预期前向速度以及最优飞行方向,确定无人机在最优飞行方向上的最优飞行速度,使得无人机能够根据实际环境状况规划最优飞行速度,提高目标跟踪过程中自主避障的准确性。
实施例四
请参阅图6,是本发明其中一实施例提供的一种无人机的硬件结构示意图,本发明实施例提供的硬件模块能够集成于上述实施例所述的飞控系统,也能够直接作为飞控系统设置于机身10内,使得无人机100能够执行以上实施例所述的一种基于目标跟踪的无人机避障方法,还能实现以上实施例所述的一种基于目标跟踪的无人机避障装置的各个模块的功能。该无人机100包括:
一个或多个处理器110以及存储器120。其中,图6中以一个处理器110为例。
处理器110和存储器120可以通过总线或者其他方式连接,图6中以通过总线连接为例。
存储器120作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本发明上述实施例中的一种基于目标跟踪的无人机避障方法对应的程序指令以及一种基于目标跟踪的无人机避障装置对应的模块(例如,第一确定模块200、获取模块300、第二确定模块400和控制模块500等)。处理器110通过运行存储在存储器120中的非易失性软件程序、指令以及模块,从而执行一种基于目标跟踪的无人机避障方法的各种功能应用以及数据处理,即实现上述方法实施例中的一种基于目标跟踪的无人机避障方法以及上述装置实施例的各个模块的功能。
存储器120可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据一种基于目标跟踪的无人机避障装置的使用所创建的数据等。
所述存储数据区还存储有预设的数据,包括初始水平距离、预设角度等。
此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器120可选包括相对于处理器110远程设置的存储器,这些远程存储器可以通过网络连接至处理器110。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
所述程序指令以及一个或多个模块存储在所述存储器120中,当被所述一个或者多个处理器110执行时,执行上述任意方法实施例中的一种基于目标跟 踪的无人机避障方法的各个步骤,或者,实现上述任意装置实施例中的一种基于目标跟踪的无人机避障装置的各个模块的功能。
上述产品可执行本发明上述实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本发明上述实施例所提供的方法。
本发明实施例还提供了一种非易失性计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个处理器执行,例如图6中的一个处理器110,可使得计算机执行上述任意方法实施例中的一种基于目标跟踪的无人机避障方法的各个步骤,或者,实现上述任意装置实施例中的一种基于目标跟踪的无人机避障装置的各个模块的功能。
本发明实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非易失性计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被一个或多个处理器执行,例如图6中的一个处理器110,可使得计算机执行上述任意方法实施例中的一种基于目标跟踪的无人机避障方法的各个步骤,或者,实现上述任意装置实施例中的一种基于目标跟踪的无人机避障装置的各个模块的功能。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
通过以上的实施例的描述,本领域普通技术人员可以清楚地了解到各实施例可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程是可以通过计算机程序指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施方法的流程。其中,所述存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(RandomAccessMemory,RAM)等。
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;在本发明的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本发明的不同方面的许多其它变化,为了简明,它们没有在细节中提供;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换; 而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (36)

  1. 一种基于目标跟踪的无人机避障方法,其特征在于,所述方法包括:
    确定无人机的预期前向速度,所述预期前向速度用于使所述无人机与目标保持初始水平距离;
    获取所述无人机前方环境的深度图,并根据所述深度图,确定以所述无人机为中心的栅格地图;
    根据所述栅格地图,确定所述无人机的最优飞行方向以及所述无人机与障碍物的最小距离;
    根据所述最小距离、所述预期前向速度以及所述最优飞行方向,确定所述无人机的最优飞行速度;
    控制所述无人机以所述最优飞行速度沿所述最优飞行方向飞行,以躲避所述无人机前方环境的障碍物。
  2. 根据权利要求1所述的方法,其特征在于,所述确定无人机的预期前向速度,包括:
    获取所述无人机与所述目标的初始水平距离;
    确定所述无人机与所述目标的当前水平距离;
    基于所述初始水平距离,对所述当前水平距离进行PID调节,以确定所述无人机的所述预期前向速度。
  3. 根据权利要求2所述的方法,其特征在于,所述无人机包括云台,所述方法还包括:
    控制所述云台的中心对准所述目标;则,
    所述确定所述无人机与所述目标的当前水平距离,包括:
    获取所述云台的当前对地高度和当前俯仰角;
    根据所述当前对地高度以及所述当前俯仰角确定所述无人机与所述目标的当前水平距离。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:
    确定所述无人机的当前前向速度;则,
    所述根据所述栅格地图,确定所述无人机的最优飞行方向以及所述无人机与障碍物的最小距离,包括:
    根据所述当前前向速度和所述预期前向速度,在所述栅格地图中确定障碍物检测区域;
    在所述障碍物检测区域中,确定所述无人机的最优飞行方向以及所述无人机与障碍物的最小距离。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述当前前向速度和所述预期前向速度,在所述栅格地图中确定障碍物检测区域,包括:
    比较所述当前前向速度和所述预期前向速度;
    若所述当前前向速度小于所述预期前向速度,则根据所述预期前向速度在所述栅格地图中确定所述障碍物检测区域;
    若所述当前前向速度大于所述预期前向速度,则根据所述当前前向速度在所述栅格地图中确地所述障碍物检测区域。
  6. 根据权利要求5所述的方法,其特征在于,
    当根据所述预期前向速度在所述栅格地图中确定障碍物检测区域时,所述预期前向速度越大,所述障碍物检测区域越大;
    当根据所述当前前向速度在所述栅格地图中确定障碍物检测区域时,所述当前前向速度越大,所述障碍物检测区域越大。
  7. 根据权利要求4至6中任一项所述的方法,其特征在于,所述在所述障碍物检测区域中,确定所述无人机的最优飞行方向,包括:
    在所述障碍物检测区域中,确定所述无人机的可通行区域,其中,所述可通行区域为不存在障碍物的区域;
    根据所述可通行区域,确定所述无人机的候选飞行方向;
    根据代价函数计算所述候选飞行方向的代价函数值;
    将所述代价函数值最小的候选飞行方向确定为所述无人机的最优飞行方向。
  8. 根据权利要求7所述的方法,其特征在于,所述在所述障碍物检测区域中,确定所述无人机的可通行区域,包括:
    以所述无人机为中心,预设角度为间隔,对所述障碍物检测区域进行划分,以将所述障碍物检测区域划分为多个区域;
    采样障碍物的坐标;
    确定所述坐标未落入的区域为所述可通行区域。
  9. 根据权利要求8所述的方法,其特征在于,所述采样障碍物的坐标,包括:
    采样所述障碍物检测区域中被所述障碍物占据的栅格的中心点坐标和/或被所述障碍物占据的栅格的角点坐标。
  10. 根据权利要求7至9中任一项所述的方法,其特征在于,所述代价函数为:
    f=k 1×g(direc goal,direc cur)+k 2×g(direc pre,direc cur)-k 3×sum
    其中,g(direc goal,direc cur)表示所述候选飞行方向中的其中一个候选飞行方向与所述目标的方向的一致性,g(direc pre,direc cur)表示所述候选飞行方向与前一次决策的最优飞行方向的一致性,sum表示所述可通行区域的数量,k 1、k 2、k 3为权重系数。
  11. 根据权利要求4至10中任一项所述的方法,其特征在于,所述在所述障碍物检测区域中,确定所述无人机与障碍物的最小距离,包括:
    确定所述障碍物检测区域中与所述无人机距离最小的障碍物作为目标障碍物;
    将所述目标障碍物与所述无人机的距离确定为所述最小距离。
  12. 根据权利要求1至11中任一项所述的方法,其特征在于,所述最优飞行速度包括最优前向速度和最优侧向速度;则,
    所述根据所述最小距离、所述预期前向速度以及所述最优飞行方向,确定所述无人机的最优飞行速度,包括:
    根据所述最小距离,计算所述无人机的最大前向速度;
    根据所述最大前向速度和所述预期前向速度,确定所述最优前向速度;
    根据所述最优前向速度和所述最优飞行方向,确定所述最优侧向速度。
  13. 根据权利要求12所述的方法,其特征在于,所述根据所述最大前向速度和所述预期前向速度,确定所述最优前向速度,包括:
    比较所述最大前向速度和所述预期前向速度;
    若所述最大前向速度大于所述预期前向速度,则确定所述预期前向速度为所述最优前向速度;
    若所述最大前向速度不大于所述预期前向速度,则确定所述最大前向速度为所述最优前向速度。
  14. 根据权利要求12或13所述的方法,其特征在于,所述最优飞行方向对应最优飞行角度;则,
    所述根据所述最优前向速度和所述最优飞行方向,确定所述最优侧向速度,包括:
    根据所述最优飞行角度的正切值与所述最优前向速度的乘积确定所述最优侧向速度。
  15. 根据权利要求1至14中任一项所述的方法,其特征在于,所述获取所述无人机前方环境的深度图,包括:
    通过所述无人机的深度传感器获取所述无人机前方环境的深度图。
  16. 根据权利要求15所述的方法,其特征在于,在所述根据所述深度图,确定以所述无人机为中心的栅格地图之前,所述方法还包括:
    判断所述深度传感器是否存在俯仰角;
    若是,则对所述深度图进行深度补偿。
  17. 根据权利要求16所述的方法,其特征在于,所述深度传感器为深度相机;则,
    若所述深度传感器存在俯仰角,则所述对所述深度图进行深度补偿,包括:
    计算所述深度补偿的像素行数,所述深度补偿的像素行数为:
    row_see=tanθ 2×f,其中,θ 2为所述深度相机的俯仰角,f为所述深度相机的焦距;
    根据所述深度补偿的像素行数确定所述无人机的像平面在所述深度图上的行索引,所述无人机的像平面在所述深度图上的行索引row_horizon为:
    row_horizon=row_half+row_see,其中,row_half为所述深度图行数的一半。
  18. 一种基于目标跟踪的无人机避障装置,其特征在于,所述装置包括:
    第一确定模块,用于确定无人机的预期前向速度,所述预期前向速度用于使所述无人机与目标保持初始水平距离;
    获取模块,用于获取所述无人机前方环境的深度图,并根据所述深度图,确定以所述无人机为中心的栅格地图;
    第二确定模块,用于根据所述栅格地图,确定所述无人机的最优飞行方向以及所述无人机与障碍物的最小距离;以及
    用于根据所述最小距离、所述预期前向速度以及所述最优飞行方向,确定所述无人机的最优飞行速度;
    控制模块,用于控制所述无人机以所述最优飞行速度沿所述最优飞行方向飞行,以躲避所述无人机前方环境的障碍物。
  19. 根据权利要求18所述的装置,其特征在于,所述第一确定模块具体用于:
    获取所述无人机与所述目标的初始水平距离;
    确定所述无人机与所述目标的当前水平距离;
    基于所述初始水平距离,对所述当前水平距离进行PID调节,以确定所述无人机的所述预期前向速度。
  20. 根据权利要求19所述的装置,其特征在于,所述无人机包括云台,所述控制模块还用于:
    控制所述云台的中心对准所述目标;则,
    所述第一确定模块具体用于:
    获取所述云台的当前对地高度和当前俯仰角;
    根据所述当前对地高度以及所述当前俯仰角确定所述无人机与所述目标的当前水平距离。
  21. 根据权利要求18至20中任一项所述的装置,其特征在于,所述第一确定模块还用于:
    确定所述无人机的当前前向速度;则,
    所述第二确定模块具体用于:
    根据所述当前前向速度和所述预期前向速度,在所述栅格地图中确定障碍物检测区域;
    在所述障碍物检测区域中,确定所述无人机的最优飞行方向以及所述无人机与障碍物的最小距离。
  22. 根据权利要求21所述的装置,其特征在于,所述第二确定模块具体用于:
    比较所述当前前向速度和所述预期前向速度;
    若所述当前前向速度小于所述预期前向速度,则根据所述预期前向速度在所述栅格地图中确定所述障碍物检测区域;
    若所述当前前向速度大于所述预期前向速度,则根据所述当前前向速度在所述栅格地图中确地所述障碍物检测区域。
  23. 根据权利要求22所述的装置,其特征在于,
    当根据所述预期前向速度在所述栅格地图中确定障碍物检测区域时,所述预期前向速度越大,所述障碍物检测区域越大;
    当根据所述当前前向速度在所述栅格地图中确定障碍物检测区域时,所述当前前向速度越大,所述障碍物检测区域越大。
  24. 根据权利要求21至23中任一项所述的装置,其特征在于,所述第二确定模块具体用于:
    在所述障碍物检测区域中,确定所述无人机的可通行区域,其中,所述可通行区域为不存在障碍物的区域;
    根据所述可通行区域,确定所述无人机的候选飞行方向;
    根据代价函数计算所述候选飞行方向的代价函数值;
    将所述代价函数值最小的候选飞行方向确定为所述无人机的最优飞行方向。
  25. 根据权利要求24所述的装置,其特征在于,所述第二确定模块具体用于:
    以所述无人机为中心,预设角度为间隔,对所述障碍物检测区域进行划分,以将所述障碍物检测区域划分为多个区域;
    采样障碍物的坐标;
    确定所述坐标未落入的区域为所述可通行区域。
  26. 根据权利要求25所述的装置,其特征在于,所述第二确定模块具体用于:
    采样所述障碍物检测区域中被所述障碍物占据的栅格的中心点坐标和/或被所述障碍物占据的栅格的角点坐标。
  27. 根据权利要求24至26中任一项所述的装置,其特征在于,所述代价函数为:
    f=k 1×g(direc goal,direc cur)+k 2×g(direc pre,direc cur)-k 3×sum
    其中,g(direc goal,direc cur)表示所述候选飞行方向中的其中一个候选飞行方向与所述目标的方向的一致性,g(direc pre,direc cur)表示所述候选飞行方向与前一次决策的最优飞行方向的一致性,sum表示所述可通行区域的数量,k 1、k 2、k 3为权重系数。
  28. 根据权利要求21至27中任一项所述的装置,其特征在于,所述第二确定模块具体用于:
    确定所述障碍物检测区域中与所述无人机距离最小的障碍物作为目标障碍物;
    将所述目标障碍物与所述无人机的距离确定为所述最小距离。
  29. 根据权利要求18至28中任一项所述的装置,其特征在于,所述最优飞行速度包括最优前向速度和最优侧向速度;则,
    所述第二确定模块具体用于:
    根据所述最小距离,计算所述无人机的最大前向速度;
    根据所述最大前向速度和所述预期前向速度,确定所述最优前向速度;
    根据所述最优前向速度和所述最优飞行方向,确定所述最优侧向速度。
  30. 根据权利要求29所述的装置,其特征在于,所述第二确定模块具体用于:
    比较所述最大前向速度和所述预期前向速度;
    若所述最大前向速度大于所述预期前向速度,则确定所述预期前向速度为所述最优前向速度;
    若所述最大前向速度不大于所述预期前向速度,则确定所述最大前向速度为所述最优前向速度。
  31. 根据权利要求29或30所述的装置,其特征在于,所述最优飞行方向对应最优飞行角度;则,
    所述第二确定模块具体用于:
    根据所述最优飞行角度的正切值与所述最优前向速度的乘积确定所述最优侧向速度。
  32. 根据权利要求18至31中任一项所述的装置,其特征在于,所述获取模块具体用于:
    通过所述无人机的深度传感器获取所述无人机前方环境的深度图。
  33. 根据权利要求32所述的装置,其特征在于,在所述根据所述深度图,确定以所述无人机为中心的栅格地图之前,所述获取模块还用于:
    判断所述深度传感器是否存在俯仰角;
    若是,则对所述深度图进行深度补偿。
  34. 根据权利要求33所述的装置,其特征在于,所述深度传感器为深度 相机;则,
    所述获取模块具体用于:
    计算所述深度补偿的像素行数,所述深度补偿的像素行数为:
    row_see=tanθ 2×f,其中,θ 2为所述深度相机的俯仰角,f为所述深度相机的焦距;
    根据所述深度补偿的像素行数确定所述无人机的像平面在所述深度图上的行索引,所述无人机的像平面在所述深度图上的行索引row_horizon为:
    row_horizon=row_half+row_see,其中,row_half为所述深度图行数的一半。
  35. 一种无人机,其特征在于,包括:
    机身;
    机臂,与所述机身相连;
    动力装置,设置于所述机臂;
    云台,与所述机身相连;
    深度相机,与所述机身相连;
    至少一个处理器,设于所述机身内;以及
    与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够用于执行如权利要求1-17中任一项所述的基于目标跟踪的无人机避障方法。
  36. 一种非易失性计算机可读存储介质,其特征在于,所述非易失性计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使无人机执行如权利要求1-17中任一项所述的基于目标跟踪的无人机避障方法。
PCT/CN2020/102878 2019-07-19 2020-07-18 一种基于目标跟踪的无人机避障方法、装置及无人机 WO2021013110A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910655674.8A CN110262568B (zh) 2019-07-19 2019-07-19 一种基于目标跟踪的无人机避障方法、装置及无人机
CN201910655674.8 2019-07-19

Publications (1)

Publication Number Publication Date
WO2021013110A1 true WO2021013110A1 (zh) 2021-01-28

Family

ID=67927214

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/102878 WO2021013110A1 (zh) 2019-07-19 2020-07-18 一种基于目标跟踪的无人机避障方法、装置及无人机

Country Status (2)

Country Link
CN (1) CN110262568B (zh)
WO (1) WO2021013110A1 (zh)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112947570A (zh) * 2021-03-10 2021-06-11 苏州臻迪智能科技有限公司 一种无人机避障的方法、装置和存储介质
CN113110594A (zh) * 2021-05-08 2021-07-13 北京三快在线科技有限公司 控制无人机避障的方法、装置、存储介质及无人机
CN113759985A (zh) * 2021-08-03 2021-12-07 华南理工大学 一种无人机飞行控制方法、系统、装置及存储介质
CN113867341A (zh) * 2021-09-18 2021-12-31 盐城中科高通量计算研究院有限公司 一种高精度循迹和控制的巡逻车路径规划及跟踪算法
CN114123021A (zh) * 2021-11-05 2022-03-01 国网辽宁省电力有限公司铁岭供电公司 一种基于电力线路的山区电力设施飞行巡检监控系统及装置
CN114268964A (zh) * 2022-02-28 2022-04-01 汕头大学 未知室内环境中基于无人机群的基站自主协同部署方法
CN114323051A (zh) * 2022-01-07 2022-04-12 苏州挚途科技有限公司 路口行驶轨迹的规划方法、装置和电子设备
CN115661204A (zh) * 2022-11-01 2023-01-31 中国人民解放军军事科学院国防科技创新研究院 一种无人机集群对运动目标的协同搜寻与跟踪定位方法
CN116820136A (zh) * 2023-08-25 2023-09-29 雄安国创中心科技有限公司 基于rrt算法的无人机路径优化方法及装置

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110262568B (zh) * 2019-07-19 2021-10-22 深圳市道通智能航空技术股份有限公司 一种基于目标跟踪的无人机避障方法、装置及无人机
CN110597293A (zh) * 2019-10-12 2019-12-20 上海复亚智能科技有限公司 一种无人机自主飞行方法、装置、设备及存储介质
CN112068592B (zh) * 2020-08-31 2021-10-26 南京航空航天大学 一种基于可充电无人机实现栅栏覆盖的调度方法
CN112180977A (zh) * 2020-09-30 2021-01-05 苏州臻迪智能科技有限公司 一种轨迹规划方法、装置、存储介质及飞行器
CN112698659A (zh) * 2020-12-29 2021-04-23 北京电子工程总体研究所 一种针对静态场景的编队避障方法
CN112731939A (zh) * 2020-12-29 2021-04-30 北京电子工程总体研究所 针对动态目标的编队避障方法
CN112666984B (zh) * 2020-12-29 2022-11-22 北京电子工程总体研究所 一种多对一的智能协同追逃博弈方法及系统
CN113050691B (zh) * 2021-03-25 2023-03-24 成都纵横自动化技术股份有限公司 一种无人机避障方法、装置、设备及计算机可读存储介质
CN113310493B (zh) * 2021-05-28 2022-08-05 广东工业大学 一种基于事件触发机制的无人机实时导航方法
CN113612920A (zh) * 2021-06-23 2021-11-05 广西电网有限责任公司电力科学研究院 一种无人机拍摄电力设备图像的方法及其装置
CN114371720B (zh) * 2021-12-29 2023-09-29 国家电投集团贵州金元威宁能源股份有限公司 无人机实现跟踪目标的控制方法和控制装置
WO2023173330A1 (zh) * 2022-03-16 2023-09-21 深圳市大疆创新科技有限公司 无人机的飞行控制方法、装置、无人机以及存储介质
CN115512292B (zh) * 2022-09-07 2024-01-05 湖北国际物流机场有限公司 航空器起落架跟踪观察方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130020428A1 (en) * 2009-12-17 2013-01-24 Gerald Miller Hand launchable unmanned aerial vehicle
CN105910604A (zh) * 2016-05-25 2016-08-31 武汉卓拔科技有限公司 一种基于多传感器的自主避障导航系统
US20170328682A1 (en) * 2016-05-11 2017-11-16 Rivada Research, Llc Method and System for Using Enhanced Location-Based Information to Guide Munitions
CN109634304A (zh) * 2018-12-13 2019-04-16 中国科学院自动化研究所南京人工智能芯片创新研究院 无人机飞行路径规划方法、装置和存储介质
CN109960269A (zh) * 2019-04-04 2019-07-02 武汉大学 一种服务于无人机自主导航的简化环境建模方法
CN110262568A (zh) * 2019-07-19 2019-09-20 深圳市道通智能航空技术有限公司 一种基于目标跟踪的无人机避障方法、装置及无人机

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017045116A1 (en) * 2015-09-15 2017-03-23 SZ DJI Technology Co., Ltd. System and method for supporting smooth target following
CN108701362B (zh) * 2016-02-29 2022-12-27 深圳市大疆创新科技有限公司 目标跟踪期间的障碍避免
CN111562796A (zh) * 2016-09-26 2020-08-21 深圳市大疆创新科技有限公司 控制方法、控制设备和运载系统
CN107703951B (zh) * 2017-07-27 2019-02-01 上海拓攻机器人有限公司 一种基于双目视觉的无人机避障方法及系统
CN107656545A (zh) * 2017-09-12 2018-02-02 武汉大学 一种面向无人机野外搜救的自主避障与导航方法
CN108444482B (zh) * 2018-06-15 2021-10-22 东北大学 一种无人机自主寻路避障方法及系统
CN109358638B (zh) * 2018-09-10 2021-07-27 南京航空航天大学 基于分布式地图的无人机视觉避障方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130020428A1 (en) * 2009-12-17 2013-01-24 Gerald Miller Hand launchable unmanned aerial vehicle
US20170328682A1 (en) * 2016-05-11 2017-11-16 Rivada Research, Llc Method and System for Using Enhanced Location-Based Information to Guide Munitions
CN105910604A (zh) * 2016-05-25 2016-08-31 武汉卓拔科技有限公司 一种基于多传感器的自主避障导航系统
CN109634304A (zh) * 2018-12-13 2019-04-16 中国科学院自动化研究所南京人工智能芯片创新研究院 无人机飞行路径规划方法、装置和存储介质
CN109960269A (zh) * 2019-04-04 2019-07-02 武汉大学 一种服务于无人机自主导航的简化环境建模方法
CN110262568A (zh) * 2019-07-19 2019-09-20 深圳市道通智能航空技术有限公司 一种基于目标跟踪的无人机避障方法、装置及无人机

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112947570A (zh) * 2021-03-10 2021-06-11 苏州臻迪智能科技有限公司 一种无人机避障的方法、装置和存储介质
CN113110594A (zh) * 2021-05-08 2021-07-13 北京三快在线科技有限公司 控制无人机避障的方法、装置、存储介质及无人机
CN113759985A (zh) * 2021-08-03 2021-12-07 华南理工大学 一种无人机飞行控制方法、系统、装置及存储介质
CN113867341A (zh) * 2021-09-18 2021-12-31 盐城中科高通量计算研究院有限公司 一种高精度循迹和控制的巡逻车路径规划及跟踪算法
CN113867341B (zh) * 2021-09-18 2023-12-22 盐城中科高通量计算研究院有限公司 一种高精度循迹和控制的巡逻车路径规划及跟踪方法
CN114123021A (zh) * 2021-11-05 2022-03-01 国网辽宁省电力有限公司铁岭供电公司 一种基于电力线路的山区电力设施飞行巡检监控系统及装置
CN114323051A (zh) * 2022-01-07 2022-04-12 苏州挚途科技有限公司 路口行驶轨迹的规划方法、装置和电子设备
CN114323051B (zh) * 2022-01-07 2024-02-02 苏州挚途科技有限公司 路口行驶轨迹的规划方法、装置和电子设备
CN114268964A (zh) * 2022-02-28 2022-04-01 汕头大学 未知室内环境中基于无人机群的基站自主协同部署方法
CN115661204A (zh) * 2022-11-01 2023-01-31 中国人民解放军军事科学院国防科技创新研究院 一种无人机集群对运动目标的协同搜寻与跟踪定位方法
CN115661204B (zh) * 2022-11-01 2023-11-10 中国人民解放军军事科学院国防科技创新研究院 一种无人机集群对运动目标的协同搜寻与跟踪定位方法
CN116820136A (zh) * 2023-08-25 2023-09-29 雄安国创中心科技有限公司 基于rrt算法的无人机路径优化方法及装置
CN116820136B (zh) * 2023-08-25 2023-12-05 雄安国创中心科技有限公司 基于rrt算法的无人机路径优化方法及装置

Also Published As

Publication number Publication date
CN110262568B (zh) 2021-10-22
CN110262568A (zh) 2019-09-20

Similar Documents

Publication Publication Date Title
WO2021013110A1 (zh) 一种基于目标跟踪的无人机避障方法、装置及无人机
CN112912811B (zh) 一种无人机路径规划方法、装置及无人机
US11914370B2 (en) System and method for providing easy-to-use release and auto-positioning for drone applications
US11242144B2 (en) Aerial vehicle smart landing
CN110494360B (zh) 用于提供自主摄影及摄像的系统和方法
Wenzel et al. Automatic take off, tracking and landing of a miniature UAV on a moving carrier vehicle
WO2020102927A1 (zh) 拍摄方法和无人机
WO2019144271A1 (zh) 无人机的控制方法、设备和无人机
WO2022042184A1 (zh) 一种跟踪目标的位置估计方法、装置及无人飞行器
WO2021052334A1 (zh) 一种无人飞行器的返航方法、装置及无人飞行器
TW201711916A (zh) 無人機及其目標追蹤方法與裝置
US11982758B2 (en) Relay point generation method and apparatus, and unmanned aerial vehicle
US20220198793A1 (en) Target state estimation method and apparatus, and unmanned aerial vehicle
EP3480118B1 (en) Aerial vehicle landing method
WO2019128275A1 (zh) 一种拍摄控制方法、装置及飞行器
WO2020019106A1 (zh) 云台和无人机控制方法、云台及无人机
WO2021259253A1 (zh) 一种轨迹跟踪方法及无人机
WO2020233682A1 (zh) 一种自主环绕拍摄方法、装置以及无人机
CN112327898B (zh) 无人机的井道巡检导航方法、装置和无人机
US20220342419A1 (en) Method and apparatus for auxiliary focusing and unmanned aerial vehicle
WO2022193081A1 (zh) 无人机的控制方法、装置及无人机
WO2020042159A1 (zh) 一种云台的转动控制方法、装置及控制设备、移动平台
WO2020244648A1 (zh) 一种飞行器控制方法、装置及飞行器
US20230095700A1 (en) Vehicle flight control method and apparatus for unmanned aerial vehicle, and unmanned aerial vehicle
WO2019071444A1 (zh) 一种摄像装置的转动控制方法、控制设备以及飞行器

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20843053

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20843053

Country of ref document: EP

Kind code of ref document: A1