CN112162566B - Route planning method, electronic device and computer readable storage medium - Google Patents

Route planning method, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN112162566B
CN112162566B CN202010923840.0A CN202010923840A CN112162566B CN 112162566 B CN112162566 B CN 112162566B CN 202010923840 A CN202010923840 A CN 202010923840A CN 112162566 B CN112162566 B CN 112162566B
Authority
CN
China
Prior art keywords
route
area
region
parameters
parameter
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202010923840.0A
Other languages
Chinese (zh)
Other versions
CN112162566A (en
Inventor
严国陶
吕元宙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Makerfire Technology Co ltd
Original Assignee
Shenzhen Makerfire Technology Co ltd
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 Shenzhen Makerfire Technology Co ltd filed Critical Shenzhen Makerfire Technology Co ltd
Priority to CN202010923840.0A priority Critical patent/CN112162566B/en
Publication of CN112162566A publication Critical patent/CN112162566A/en
Application granted granted Critical
Publication of CN112162566B publication Critical patent/CN112162566B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/10Simultaneous control of position or course in three dimensions
    • G05D1/101Simultaneous control of position or course in three dimensions specially adapted for aircraft
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Abstract

The application discloses a route planning method, electronic equipment and a computer readable storage medium. The route planning method comprises the steps of obtaining a reference route in a preset running area, wherein the running area is divided into a plurality of reference areas; obtaining an intersecting region on the reference route according to the plurality of reference regions and the reference route, wherein the intersecting region is a region where the reference region and the reference route intersect; and determining the route type of the reference route according to the plurality of crossing areas, calculating the running parameters of the unmanned aerial vehicle according to the route type to control the unmanned aerial vehicle to run, so that the unmanned aerial vehicle can carry out routing inspection according to the planned route, the problem of route deviation is effectively avoided, and the routing inspection accuracy of the unmanned aerial vehicle is improved.

Description

Route planning method, electronic device and computer readable storage medium
Technical Field
The present disclosure relates to the field of automatic control technologies, and in particular, to a route planning method, an electronic device, and a computer readable storage medium.
Background
In recent years, unmanned aerial vehicle production and application have been vigorously developed at home and abroad, unmanned aerial vehicles are increasingly used in various fields, and particularly unmanned aerial vehicle inspection is achieved. At present, when the unmanned aerial vehicle is patrolled and examined, a front view image is acquired according to a configured camera, and corresponding route identification is carried out on the view image, so that the patrol and examination are carried out, but because the route identification algorithm configured by the unmanned aerial vehicle has defects, the problem that the route of the unmanned aerial vehicle is deviated when the unmanned aerial vehicle is patrolled and examined can be caused, and normal patrol and examination can not be carried out according to a planned route.
Disclosure of Invention
The present application aims to solve at least one of the technical problems existing in the prior art. Therefore, the application provides a route planning method, electronic equipment and a computer readable storage medium, which can enable the unmanned aerial vehicle to carry out inspection according to a planned route, effectively avoid the problem of route deviation and improve the inspection accuracy of the unmanned aerial vehicle.
The application also provides electronic equipment with the route planning method.
The application also proposes a computer readable storage medium having the above route planning method.
The route planning method according to the embodiment of the first aspect of the application comprises the following steps: acquiring a reference route in a preset running area, wherein the running area is divided into a plurality of reference areas; obtaining a plurality of crossing areas on the reference route according to the plurality of reference areas and the reference route; wherein each of the intersecting regions is a region where the reference region and the reference route intersect; determining a route type of the reference route according to the plurality of crossing areas; and calculating a running parameter according to the route type, wherein the running parameter is used for indicating the unmanned aerial vehicle to run.
The route planning method according to the embodiment of the application has at least the following beneficial effects: acquiring a reference route in a preset reference area, wherein the driving area is divided into a plurality of reference areas; obtaining an intersecting region on the reference route according to the plurality of reference regions and the reference route, wherein the intersecting region is a region where the reference region and the reference route intersect; and determining the route type of the reference route according to the plurality of crossing areas, calculating the running parameters of the unmanned aerial vehicle according to the route type to control the unmanned aerial vehicle to run, so that the unmanned aerial vehicle can carry out routing inspection according to the planned route, the problem of route deviation is effectively avoided, and the routing inspection accuracy of the unmanned aerial vehicle is improved.
According to some embodiments of the present application, the route type includes a linear type, and the calculating a driving parameter according to the route type includes: and calculating the running parameters according to the linear type and the number of the crossing areas.
According to some embodiments of the present application, the intersection region includes a first region and a second region, and the calculating a driving parameter according to the linear type and the number of intersection regions includes: and calculating the running parameters according to the positions of the first area and the second area.
According to some embodiments of the present application, the intersection area includes a first area, a second area, and a third area, and the corresponding calculation according to the linear type and the number of intersection areas obtains a running parameter, including: obtaining a first parameter according to the positions of the first area and the second area; obtaining a second parameter according to the positions of the second area and the third area; and calculating according to the first parameter, the second parameter and the parameter weight to obtain the running parameter.
According to some embodiments of the present application, the driving parameters include color parameters, and the calculating the driving parameters according to the corner type includes: acquiring a color type set in the driving area; and determining corresponding color parameters according to the color category set.
According to some embodiments of the present application, the route type includes a corner type, and correspondingly, the calculating according to the route type obtains a driving parameter, including: acquiring the corner type of the reference route; and calculating according to the corner type to obtain a running parameter.
According to some embodiments of the application, the calculating a driving parameter according to the corner type includes: acquiring a plurality of reference line segments in the reference route according to the corner type; calculating a plurality of offset parameters according to a plurality of reference line segments; performing de-duplication treatment according to the plurality of offset parameters and a preset threshold value to obtain a de-duplicated reference line segment; and obtaining the running parameters according to the offset parameters corresponding to the reference line segments after the de-duplication treatment.
According to some embodiments of the present application, the driving parameters include intersection parameters, and correspondingly, the driving parameters are obtained according to offset parameters corresponding to the reference line segment after the deduplication processing, including: acquiring a first line segment and a second line segment in the reference line segments; and calculating the intersection point parameter according to the first line segment and the second line segment.
An electronic device according to an embodiment of the second aspect of the present application, at least one processor, and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions for execution by the at least one processor to cause the at least one processor to implement the route planning method of the first aspect when executing the instructions.
The electronic equipment provided by the embodiment of the application has at least the following beneficial effects: by executing the route planning method mentioned in the first aspect, the unmanned aerial vehicle can carry out inspection according to the planned route, the problem of route deviation is effectively avoided, and the inspection accuracy of the unmanned aerial vehicle is improved.
A computer readable storage medium according to an embodiment of the third aspect of the present application stores computer executable instructions for causing a computer to perform the route planning method according to the first aspect.
A computer-readable storage medium according to the present application has at least the following advantageous effects: by executing the route planning method mentioned in the first aspect, the unmanned aerial vehicle can carry out inspection according to the planned route, the problem of route deviation is effectively avoided, and the inspection accuracy of the unmanned aerial vehicle is improved.
Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
Drawings
Fig. 1 is a first specific application example of the route planning method in the embodiment of the present application;
fig. 2 is a second specific application example of the route planning method according to the embodiment of the present application;
fig. 3 is a specific flow chart of a route planning method according to an embodiment of the present application;
fig. 4 is a third specific application example of the route planning method according to the embodiment of the present application;
fig. 5 is a flowchart of step S400 of the route planning method according to the embodiment of the present application;
fig. 6 is a fourth specific application example of the route planning method according to the embodiment of the present application;
fig. 7 is a fifth specific application example of the route planning method according to the embodiment of the present application;
fig. 8 is a flowchart of step S420 of the route planning method according to the embodiment of the present application;
fig. 9 is a fourth specific application example of the route planning method according to the embodiment of the present application.
Reference numerals:
travel area 100, reference route 110, reference line segment 111, reference area 120.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the description of the present application, it should be understood that, with reference to the description of the orientation, for example, the orientation or positional relationship indicated by up, down, left, right, etc., is based on the orientation or positional relationship shown in the drawings, only for convenience of description of the present application and simplification of the description.
In the description of the present application, the meaning of a number is one or more, the meaning of a plurality is two or more, and greater than, less than, etc. are understood to exclude this number. The description of the first and second is for the purpose of distinguishing between technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present application, unless explicitly defined otherwise, terms such as arrangement, installation, connection, etc. should be construed broadly and the specific meaning of the terms in the present application can be reasonably determined by a person skilled in the art in combination with the specific contents of the technical solution.
It should be noted that the logical order of illustration is depicted in a flowchart, but in some cases the steps shown or described may be performed in a different order in the flowchart. If "a number" is referred to, it means more than one, and if "a plurality" is referred to, it means more than two. The use of any and all examples, or exemplary language (e.g., "such as") provided herein, is intended merely to better illuminate embodiments of the application and does not pose a limitation on the scope of the application unless otherwise claimed.
It is noted that, unless otherwise indicated, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Furthermore, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
In recent years, unmanned aerial vehicle production and application have been vigorously developed at home and abroad, unmanned aerial vehicles are increasingly used in various fields, and particularly unmanned aerial vehicle inspection is achieved. At present, when the unmanned aerial vehicle is patrolled and examined, a front view image is acquired according to a configured camera, and corresponding route identification is carried out on the view image, so that the patrol and examination are carried out, but because the route identification algorithm configured by the unmanned aerial vehicle has defects, the problem that the route of the unmanned aerial vehicle is deviated when the unmanned aerial vehicle is patrolled and examined can be caused, and normal patrol and examination can not be carried out according to a planned route.
Specifically, when the existing unmanned aerial vehicle performs inspection, a front view image, i.e., a driving area, is acquired by a configured camera, the acquired view image is identified by calling openMV embedded image processing, as shown in fig. 1, a preset reference route for driving is filled with black blocks by a find_blobs method in the openMV, and other areas are filled with white. When the reference route turns, that is, when the vehicle needs to turn, the traveling area is divided into a plurality of reference areas, namely, A1 and A3, and at this time, the reference route and the reference area intersect to obtain a plurality of intersection areas, namely, B1 and B3, but the method cannot calculate the linear deflection angle of the reference area.
Alternatively, as shown in fig. 2, when the line segment in the reference line is not a straight line, the angle of deflection of the reference line is estimated to be a straight line, i.e. a broken line in fig. 2, when the angle of deflection is found by the find lines method in the openMV because the angle of view problem is imaged as a curve, i.e. as a black curve in fig. 2, and when such estimation tends to have an estimated deviation, the value of the angle of deflection is not accurate.
It should be noted that, in the find_blobs method, the color type set in the region is identified, the color type set is screened by the preset color threshold value to obtain a screened color type set, the screened color type set is filled with preset colors, for example, in the embodiment of the present application, the identified region, i.e. the reference route, is filled with black blocks, and other filtered regions are filled with white blocks. The find lines method is to use canny operator and Hough transformation to identify straight line of reference route to determine several reference line segments existed in the reference route, and calculate the identified reference line segments to obtain deflection angle of the complete reference route.
Based on the above, the application provides a route planning method, electronic equipment and a computer readable storage medium, which can enable the unmanned aerial vehicle to carry out inspection according to a planned route, effectively avoid the problem of route deviation and improve the inspection accuracy of the unmanned aerial vehicle.
It should be noted that, the unmanned aerial vehicle mentioned in the embodiment of the present application is configured with a camera for capturing images, and the orientation of the camera may be set according to the requirements to obtain the driving image in front of the unmanned aerial vehicle.
On the other hand, the openMV embedded image processing mentioned in the embodiment of the present application is an open-source, low-cost and powerful machine vision module, and the machine vision algorithms that are carried include color block finding, face detection, eye tracking, edge detection, logo tracking, and the like. The method can be used for realizing illegal intrusion detection, defective product screening of products, tracking of fixed markers and the like, and specific contents are not repeated.
In a first aspect, the present application provides a route planning method, which can enable an unmanned aerial vehicle to carry out inspection according to a planned route, effectively avoid the problem of occurrence of route deviation, and improve the inspection accuracy of the unmanned aerial vehicle.
In some embodiments, referring to fig. 3, a flow diagram of a route planning method in an embodiment of the present application is shown. The method specifically comprises the following steps:
s100, acquiring a reference route in a preset running area, wherein the running area is divided into a plurality of reference areas;
s200, obtaining a plurality of crossing areas on a reference route according to the plurality of reference areas and the reference route;
s300, determining a route type of a reference route according to a plurality of crossing areas;
s400, calculating a running parameter according to the route type, wherein the running parameter is used for indicating the unmanned aerial vehicle to run.
In step S100, the unmanned aerial vehicle acquires a front view image through a configured camera, and performs image processing on the acquired view image through openMV image processing to generate a driving area 100 as shown in fig. 4, where a reference route 110 exists in the driving area 100, the reference route 110 is a route set for inspection of the unmanned aerial vehicle according to actual requirements, and the unmanned aerial vehicle can perform corresponding inspection on the reference route 110. It should be noted that, according to actual requirements, the driving area 100 may be divided into a plurality of reference areas 120, that is, A1, A2, A3, A4, and A5 in fig. 4, and a complete driving area 100 is formed by these five reference areas 120.
In step S200, a plurality of intersecting regions are obtained on the reference route 110 according to the plurality of reference regions 120 and the reference route 110, wherein the intersecting regions are regions formed by intersecting the reference region 120 with the reference route 110. As shown in fig. 4, when the reference area 120 intersects the reference route 110, a corresponding intersection area occurs, for example, in the reference area 120, an area where A1 intersects the reference route 110 is B1, an area where A2 intersects the reference route 110 is B2, an area where A3 intersects the reference route 110 is B3, an area where A4 intersects the reference route 110 is B4, and an area where A5 intersects the reference route 110 is B5.
In some embodiments, after the intersection area obtained by intersecting the reference route 110 with the reference area 120 is obtained, the width of each intersection area is obtained, and according to the obtained width, the width of the minimum value is set to be the system width of the reference route 110, specifically, the width of the intersection area is obtained through a w method in openMV embedded image processing, and the width of the minimum value is set to be the system width of the reference route 110, so as to be used for calculating the eccentric distance in the subsequent driving parameters, wherein the w method can obtain the width of the intersection area through an algorithm and return corresponding numerical values.
In step S300, the route type of the reference route 110 is determined according to the plurality of intersection areas, specifically, according to whether the intersection areas exist or not, the route type of the reference route 110 may be determined, and the determination of the specific route type may refer to the following table 1, wherein 0 indicates that the corresponding intersection area does not exist, and 1 indicates that the corresponding intersection area exists:
TABLE 1
It should be noted that, according to the actual requirement, whether the area B2 exists may not be considered, and by judging whether other corresponding intersection areas exist, the route type of the reference route 110 may be determined, for example, the intersection area shown in fig. 3, where the area B1, the area B3, the area B4, and the area B5 all exist, and according to the table, the route type of the reference route 110 may be determined to be a ten-type corner. Step S400 is performed according to the route type.
In some embodiments, the specific types of the plurality of reference routes 110 may be determined according to the above table, and different route types may be divided according to the specific types, wherein the route types may be divided into a linear type and a corner type. When the route type is a linear type, in step S400, a travel parameter is calculated according to the route type, wherein the travel parameter is used for indicating the unmanned aerial vehicle to perform corresponding travel, and the travel parameter includes a yaw angle, an eccentric distance, and the like. Specifically, referring to fig. 5, step S410 is performed to calculate a driving parameter according to the linear type and the number of crossing regions.
In some embodiments, the route type of the reference route 110 may be determined according to the number of intersecting regions formed by the reference route 110 intersecting the reference region 120, and when the route type is a linear type and the intersecting region formed by the reference route 110 intersecting the reference region 120 includes a first region and a second region, the driving parameter is calculated according to the linear type and the number of intersecting regions, specifically, according to the positions of the first region and the second region.
In a possible application example, as shown in fig. 6, an intersection area formed by intersecting the reference route 110 with the reference area 120 includes a first area and a second area, that is, an area B1 and an area B2, where the number of intersection areas is 2, and if the route type of the reference route 110 can be determined to be a linear type according to the number of intersection areas, central coordinate positions of the area B1 and the area B2 are obtained, where the central coordinate position of the area B1 is (x 1, y 1), the central coordinate position of the area B2 is (x 2, y 2), and driving parameters, that is, a deflection angle b1b2_theta and an eccentric distance b1b2_rho, of the reference route 110 formed by the area B1 and the area B2 are calculated by using formula 1, respectively.
Wherein, formula 1 in the above application example is:
deflection angle theta = deflection (atan 2 (y 2-y1, x2-x 1)) -90;
eccentric distance rho= (x1+x2)/2-w/2.
Wherein theta and rho are names of common functions of openMV, and return angles of straight lines and eccentric distances of the straight lines through Hough transformation; atan2 is used for calculating the deflection angle between two points and is a standard interface of a calculation function; the degree is used for converting the radian value into an angle value; w is the width that determines the system width, i.e., the minimum value of the intersection region in the above-described embodiment; x1, x2, y1, y2 are the abscissa of the first region, the abscissa of the second region, the ordinate of the first region and the ordinate of the second region, respectively.
In some embodiments, the route type of the reference route 110 may be determined according to the number of intersecting regions formed by intersecting the reference route 110 with the reference region 120, and when the route type is a linear type and the intersecting region formed by intersecting the reference route 110 with the reference region 120 includes a first region, a second region and a third region, then a first parameter is calculated according to the positions of the first region and the second region, a second parameter is calculated according to the positions of the second region and the third region, and a driving parameter is calculated according to the calculated first parameter, the second parameter and a preset parameter weight. The first parameter and the second parameter are running parameters obtained by calculating adjacent areas, and the parameter weight is the value ratio of the first parameter and the second parameter determined according to actual requirements.
In a possible application example, as shown in fig. 7, an intersection area formed by intersecting the reference route 110 with the reference area 120 includes a first area, a second area, and a third area, that is, an area B1, an area B2, and an area B3, where the number of intersection areas is 3, and if the route type of the reference route 110 can be determined to be a linear type according to the number of intersection areas, the central coordinate positions of the areas B1, B2, and B3 are obtained, the first parameter of the reference route 110 formed by the areas B1 and B2, that is, the deflection angle b1b2_theta and the eccentric distance b1b2_rho, and the second parameter of the reference route 110 formed by the areas B2 and B3, that is, the deflection angle b2b3_theta and the eccentric distance b2b3_rho, are calculated by using the formula 2, and the driving parameters of the reference route 110 are obtained by combining preset parameter weights.
Wherein equation 2 in the above application example is:
LA_theta = weight_theta×B1B2_theta + (1 -weight_theta)×B2B3_theta
LA_rho = weight_rho×B1B2_rho + (1-weight_rho)×B2B3_rho
wherein la_theta is the deflection angle of the reference route 110LA, la_rho is the eccentric distance of the reference route 110LA, weight is a parameter weight, the parameter weight of the deflection angle and the eccentric distance is set according to actual requirements, and the selected range is any value from 0 to 1, for example, when weight_theta takes 0.4, the parameter weight corresponding to the first parameter of the area B1 and the first parameter of the area B2 is 0.4, the parameter weight corresponding to the second parameter of the area B2 and the second parameter of the area B3 is 0.6, and the specific parameter weight can be obtained according to the actual debugging result.
In some embodiments, the driving parameters further include color parameters, the obtaining of the corresponding color parameters includes obtaining all color type sets in the driving area 100, screening according to the obtained color type sets and a preset color threshold value, obtaining screened color type sets, namely corresponding color parameters, and indicating the unmanned aerial vehicle to perform corresponding driving according to the color parameters. For example, there are multiple color types in the driving area 100, where the multiple color types form a color type set, including red, yellow, black, and the like, and screening is performed according to the obtained color type set and a preset color threshold, for example, the preset color threshold is red, the color parameter remaining after screening is red, the remaining driving area 100 is an area corresponding to the red, and other areas are filled with white. When the unmanned aerial vehicle detects that the color parameter is red, corresponding running, such as acceleration passing, slow passing, stopping running and the like, is carried out according to the color parameter, and a specific running mode is set according to actual requirements.
In some embodiments, when the route type is the corner type, in step S400, the travel parameter is calculated according to the route type, specifically, referring to fig. 5, step S420 is performed to obtain the corner type of the reference route, and the travel parameter is calculated according to the corner type.
In step S420, the corner type of the reference route is obtained by the find_lines method of the openMV, whether the specific type is a T-type corner, an L-type corner, a ten-type corner, or the like is determined, and calculation is performed according to the obtained corner type to obtain the corresponding driving parameter.
In some embodiments, referring to fig. 8, step S420 specifically further includes the steps of:
s421, acquiring a plurality of reference line segments in a reference route according to the corner type;
s422, calculating a plurality of offset parameters according to the plurality of reference line segments;
s423, performing de-duplication treatment according to the plurality of offset parameters and a preset threshold value to obtain a reference line segment after de-duplication treatment;
s424, obtaining the driving parameters according to the offset parameters corresponding to the reference line segments after the de-duplication processing.
In step S421, when the route type of the reference route 110 is determined to be the corner type according to the number of intersection areas, a plurality of reference line segments in the reference route 110 are acquired. Specifically, the existing straight line segment, i.e., the reference line segment, in the current reference route 110 is detected by the find_lines method in openMV embedded image processing.
In a possible application example, when the reference route 110 is a route as shown in fig. 9, the route type of the reference route 110 is a corner type, and a straight line segment existing in the current reference route 110, that is, the reference line segment 111 in fig. 9, is detected by the find_lines method in the openMV embedded image processing. In practical application, since there is a certain error in the black square filled by the find_blobs method and there is a color difference between the black square and the white area, a plurality of reference line segments 111 will appear, and step S422 is performed on the detected reference line segments 111, where the offset parameter is the deflection angle of the reference line segments 111, and indicates the deflection condition of the line segments. For example, as shown in the reference route 110 of fig. 9, two reference line segments 111 are detected on the route in the vertical direction, and two reference line segments 111 are detected on the route in the horizontal direction.
In step S422, the plurality of reference line segments 111 obtained by detection are calculated to obtain a plurality of corresponding offset parameters. Specifically, the calculated offset parameters of each reference line segment 111 and the abscissa or the ordinate of the system may be calculated by the above mentioned formula 1 and formula 2, so as to obtain the offset parameter corresponding to each reference line segment 111, for example, when a certain reference line segment 111 belongs to a line segment in the vertical direction, the offset parameter of the reference line segment 111 is obtained by calculating based on the abscissa.
In step S423, the obtained offset parameter is compared with a preset threshold, and the duplication is removed according to the comparison result, so as to obtain a reference line segment corresponding to the duplication-removed offset parameter. Specifically, there may be a difference in the respective offset parameters between the reference line segments 111, for example, in practical applications, there may be a plurality of transverse reference line segments 111 and a plurality of longitudinal reference line segments 111, where there may be a difference in the respective offset parameters between the transverse reference line segments 111 and the longitudinal reference line segments 111, there may be a difference in the respective offset parameters between the transverse reference line segments 111, and there may be a difference in the respective offset parameters between the longitudinal reference line segments 111.
In a possible implementation example, after the offset parameter is obtained by calculating the reference line segment, the difference value of the offset parameter is compared with a preset threshold value. When the reference line is smaller than the preset threshold, one reference line segment 111 is reserved, and when the reference line segment is larger than the preset threshold, both reference line segments 111 are reserved. For example, when the preset threshold is 20 degrees, and when the difference value of the offset parameters of the two reference line segments is smaller than 20 degrees, it is proved that the two reference line segments belong to the reference line segment in the same direction, and the reference line segment detected first in the two reference line segments 111 is reserved; when the difference of the offset parameters of the two reference line segments is greater than 20 degrees, it is proved that the two reference line segments do not belong to the reference line segment in the same direction, that is, the reference line 110 has a corner, and the two reference line segments are reserved.
In step S424, the set of reference line segments 111 after the duplication removal is traversed, and the reference line segment 111 corresponding to the offset parameter of the minimum value obtained by calculation is selected as the line segment when the unmanned plane travels. And calculating the reference line segment 111 to obtain a running parameter so that the unmanned aerial vehicle runs correspondingly according to the running parameter. The specific calculation method adopts the above mentioned formula 1 and formula 2 to calculate, so as to obtain the running parameters of the reference route 110, namely, the deflection angle and the eccentric distance, and the unmanned aerial vehicle runs correspondingly according to the calculated deflection angle and eccentric distance.
In some embodiments, when the route type is a corner type, the driving parameters further include an intersection parameter, wherein the intersection parameter is a coordinate position of an intersection when the plurality of reference line segments on the reference route 110 intersect, and the specific acquiring includes: and acquiring a first line segment and a second line segment in the reference line segments, and calculating according to the first line segment and the second line segment to obtain the intersection point parameters. It should be noted that, the specific calculation mode is to calculate based on the coordinate positions of the first line segment and the second line segment, so as to obtain the corresponding intersection point parameters.
According to the obtained intersection point parameters, when the unmanned aerial vehicle reaches the coordinate position corresponding to the intersection point parameters, corresponding behaviors such as hovering or steering of the unmanned aerial vehicle at the intersection point parameters can be performed, and the unmanned aerial vehicle can be specifically set according to actual requirements, so that the unmanned aerial vehicle has operability.
In the embodiment of the present application, by acquiring the reference route 110 in the preset driving area 100, the driving area 100 is divided into a plurality of reference areas 120; obtaining an intersecting region on the reference route 110 according to the plurality of reference regions 120 and the reference route 110, wherein the intersecting region is a region where the reference region 120 and the reference route 110 intersect; the route type of the reference route 110 is determined according to the plurality of intersection areas, the running parameters of the unmanned aerial vehicle are calculated according to the route type to control the unmanned aerial vehicle to run, the unmanned aerial vehicle can be enabled to carry out inspection according to the planned route, the problem of route deviation is effectively avoided, and the inspection accuracy of the unmanned aerial vehicle is improved.
In a second aspect, embodiments of the present application further provide an electronic device, including: at least one processor, and a memory communicatively coupled to the at least one processor;
wherein the processor is configured to execute the route planning method according to the embodiment of the first aspect by calling a computer program stored in the memory.
The memory is used as a non-transitory computer readable storage medium for storing a non-transitory software program and a non-transitory computer executable program, such as the route planning method in the embodiments of the first aspect of the present application. The processor implements the route planning method in the embodiments of the first aspect described above by running a non-transitory software program and instructions stored in a memory.
The memory may include a memory program area and a memory data area, wherein the memory program area may store an operating system, at least one application program required for a function; the storage data area may store information for performing the route planning method in the embodiments of the first aspect described above. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The non-transitory software programs and instructions required to implement the route planning method in the embodiments of the first aspect described above are stored in memory and when executed by one or more processors, perform the route planning method in the embodiments of the first aspect described above.
In a third aspect, embodiments of the present application further provide a computer-readable storage medium storing computer-executable instructions for: executing the route planning method in the embodiment of the first aspect;
in some embodiments, the computer-readable storage medium stores computer-executable instructions that are executed by one or more control processors, for example, by one processor in an electronic device of the second aspect embodiment, which may cause the one or more processors to perform the route planning method in the first aspect embodiment.
The above described embodiments of the apparatus are only illustrative, wherein the units described as separate components may or may not be physically separate, i.e. may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
While embodiments of the present application have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the application, the scope of which is defined by the claims and their equivalents.

Claims (8)

1. A route planning method, comprising:
acquiring a reference route in a preset running area, wherein the running area is divided into a plurality of reference areas;
obtaining a plurality of crossing areas on the reference route according to the plurality of reference areas and the reference route; wherein each of the intersecting regions is a region where the reference region and the reference route intersect;
determining a route type of the reference route according to the plurality of crossing areas; wherein the route type includes a corner type;
acquiring a plurality of reference line segments in the reference route according to the corner type;
calculating a plurality of offset parameters according to a plurality of reference line segments;
performing de-duplication treatment according to the plurality of offset parameters and a preset threshold value to obtain a reference line segment after de-duplication treatment;
obtaining a driving parameter according to the offset parameter corresponding to the reference line segment after the de-duplication treatment;
the driving parameters are used for indicating the unmanned aerial vehicle to drive.
2. The route planning method according to claim 1, wherein the route type includes a linear type, and the calculating a travel parameter according to the route type includes:
and calculating the running parameters according to the linear type and the number of the crossing areas.
3. The route planning method according to claim 2, wherein the intersection region includes a first region and a second region, and the calculating the travel parameter according to the linearity type and the number of intersection regions includes:
the running parameter is calculated according to the positions of the first area and the second area, and the method specifically comprises the following steps:
acquiring the central coordinate positions of the first area and the second area;
calculating the running parameters formed by the first area and the second area by adopting a formula 1, wherein the formula 1 is as follows:
deflection angle theta = deflection (atan 2 (y 2-y1, x2-x 1)) -90;
the eccentric distance rho= (x1+x2)/2-w/2,
wherein theta and rho are names of common functions of openMV, and return angles of straight lines and eccentric distances of the straight lines through Hough transformation; atan2 is used for calculating the deflection angle between two points and is a standard interface of a calculation function; the degree is used for converting the radian value into an angle value; w is the width of the system, i.e. the width of the minimum of the intersection area; x1, x2, y1, y2 are the abscissa of the first region, the abscissa of the second region, the ordinate of the first region, and the ordinate of the second region, respectively.
4. The route planning method according to claim 2, wherein the intersection region includes a first region, a second region, and a third region, and the calculating the travel parameter according to the linear type and the number of intersection regions includes:
obtaining a first parameter according to the positions of the first area and the second area, specifically calculating a deflection angle B1B2_theta and an eccentric distance B1B2_rho of the first parameter formed by the first area and the second area by adopting a formula 1; obtaining a second parameter according to the positions of the second area and the third area, specifically calculating a deflection angle B2B3_theta and an eccentric distance B2B3_rho of the second parameter formed by the second area and the third area by adopting a formula 1;
calculating the running parameters according to the first parameters, the second parameters and the parameter weights, specifically, calculating the calculated first parameters and second parameters by adopting a formula 2 in combination with the parameter weights to obtain the running parameters;
the formula 1 is:
deflection angle theta = deflection (atan 2 (y 2-y1, x2-x 1)) -90;
the eccentric distance rho= (x1+x2)/2-w/2,
wherein theta and rho are names of common functions of openMV, and return angles of straight lines and eccentric distances of the straight lines through Hough transformation; atan2 is used for calculating the deflection angle between two points and is a standard interface of a calculation function; the degree is used for converting the radian value into an angle value; w is the width of the system, i.e. the width of the minimum of the intersection area; x1, x2, y1, y2 are the abscissa of the first region, the abscissa of the second region, the ordinate of the first region and the ordinate of the second region, respectively;
the formula 2 is:
LA_theta=weight_theta×B1B2_theta+(1-weight_theta)×B2B3_theta
LA_rho=weight_rho×B1B2_rho+(1-weight_rho)×B2B3_rho
wherein, la_theta is the deflection angle of the reference route LA, la_rho is the eccentric distance of the reference route 110LA, weight is a parameter weight, the parameter weight of the deflection angle and the eccentric distance is set according to the actual requirement, and the value is selected to be any value ranging from 0 to 1.
5. The route planning method according to claim 1, wherein the driving parameters include color parameters, and the calculating driving parameters according to the route type includes:
acquiring a color type set in the driving area;
and determining corresponding color parameters according to the color category set.
6. The route planning method according to claim 1, wherein the running parameters include intersection parameters, and the obtaining the running parameters according to the offset parameters corresponding to the reference line segment after the duplication removal includes:
acquiring a first line segment and a second line segment in the reference line segments;
and calculating the intersection point parameter according to the first line segment and the second line segment.
7. An electronic device, comprising:
at least one processor, and,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions that are executed by the at least one processor to cause the at least one processor to implement the route planning method of any one of claims 1 to 4 when the instructions are executed.
8. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform the route planning method according to any one of claims 1 to 4.
CN202010923840.0A 2020-09-04 2020-09-04 Route planning method, electronic device and computer readable storage medium Active CN112162566B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010923840.0A CN112162566B (en) 2020-09-04 2020-09-04 Route planning method, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010923840.0A CN112162566B (en) 2020-09-04 2020-09-04 Route planning method, electronic device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112162566A CN112162566A (en) 2021-01-01
CN112162566B true CN112162566B (en) 2024-01-16

Family

ID=73858456

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010923840.0A Active CN112162566B (en) 2020-09-04 2020-09-04 Route planning method, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112162566B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105513061A (en) * 2015-12-02 2016-04-20 上海海事大学 Method for automatically searching and rescuing person in distress on sea through employing unmanned plane
CN107690605A (en) * 2016-11-28 2018-02-13 深圳市大疆创新科技有限公司 A kind of course line edit methods, device and control device
CN107924188A (en) * 2016-07-04 2018-04-17 深圳市大疆创新科技有限公司 Flight path planning, control method and the system of a kind of unmanned plane
CN109737967A (en) * 2019-02-28 2019-05-10 中国科学院深圳先进技术研究院 Unmanned plane paths planning method, device, storage medium and computer equipment
CN109871029A (en) * 2019-02-21 2019-06-11 华南农业大学 A kind of plant protection drone flight course planning optimization method based on image processing techniques
CN111060076A (en) * 2019-12-12 2020-04-24 南京航空航天大学 Method for planning routing of unmanned aerial vehicle inspection path and detecting foreign matters in airport flight area
CN111247792A (en) * 2019-04-28 2020-06-05 深圳市大疆创新科技有限公司 Control method of unmanned aerial vehicle, unmanned aerial vehicle and computer readable storage medium
CN111292439A (en) * 2020-01-22 2020-06-16 上海杰狮信息技术有限公司 Unmanned aerial vehicle inspection method and inspection system for urban pipe network
CN111504319A (en) * 2020-04-08 2020-08-07 安徽舒州农业科技有限责任公司 Automatic driving control method and system based on agricultural unmanned aerial vehicle

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11074821B2 (en) * 2016-10-06 2021-07-27 GEOSAT Aerospace & Technology Route planning methods and apparatuses for unmanned aerial vehicles
WO2019168793A1 (en) * 2018-02-28 2019-09-06 Walmart Apollo, Llc System and method for indicating drones flying overhead

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105513061A (en) * 2015-12-02 2016-04-20 上海海事大学 Method for automatically searching and rescuing person in distress on sea through employing unmanned plane
CN107924188A (en) * 2016-07-04 2018-04-17 深圳市大疆创新科技有限公司 Flight path planning, control method and the system of a kind of unmanned plane
CN107690605A (en) * 2016-11-28 2018-02-13 深圳市大疆创新科技有限公司 A kind of course line edit methods, device and control device
CN109871029A (en) * 2019-02-21 2019-06-11 华南农业大学 A kind of plant protection drone flight course planning optimization method based on image processing techniques
CN109737967A (en) * 2019-02-28 2019-05-10 中国科学院深圳先进技术研究院 Unmanned plane paths planning method, device, storage medium and computer equipment
CN111247792A (en) * 2019-04-28 2020-06-05 深圳市大疆创新科技有限公司 Control method of unmanned aerial vehicle, unmanned aerial vehicle and computer readable storage medium
CN111060076A (en) * 2019-12-12 2020-04-24 南京航空航天大学 Method for planning routing of unmanned aerial vehicle inspection path and detecting foreign matters in airport flight area
CN111292439A (en) * 2020-01-22 2020-06-16 上海杰狮信息技术有限公司 Unmanned aerial vehicle inspection method and inspection system for urban pipe network
CN111504319A (en) * 2020-04-08 2020-08-07 安徽舒州农业科技有限责任公司 Automatic driving control method and system based on agricultural unmanned aerial vehicle

Also Published As

Publication number Publication date
CN112162566A (en) 2021-01-01

Similar Documents

Publication Publication Date Title
US10580124B2 (en) Inspection device, control method and control apparatus for the same
US8184859B2 (en) Road marking recognition apparatus and method
US11205284B2 (en) Vehicle-mounted camera pose estimation method, apparatus, and system, and electronic device
CN102442307B (en) Lane line estimating apparatus
WO2020228694A1 (en) Camera pose information detection method and apparatus, and corresponding intelligent driving device
CN103164851A (en) Method and device for detecting road separators
EP3690814B1 (en) Lane recognition device
CN112598922B (en) Parking space detection method, device, equipment and storage medium
Huang et al. Robust lane marking detection under different road conditions
WO2020133488A1 (en) Vehicle detection method and device
CN111160132B (en) Method and device for determining lane where obstacle is located, electronic equipment and storage medium
JP2012048289A (en) Straight line detection device
CN112162566B (en) Route planning method, electronic device and computer readable storage medium
CN111507126A (en) Alarming method and device of driving assistance system and electronic equipment
CN110543612B (en) Card collection positioning method based on monocular vision measurement
CN110728710B (en) Visual mileage calculation method, device and computer readable storage medium
JP2006201817A (en) Method and device for discriminating vehicle body color
CN110515376B (en) Evaluation method, terminal and storage medium for track deduction correction
US20220410942A1 (en) Apparatus and method for determining lane change of surrounding objects
CN114943836A (en) Trailer angle detection method and device and electronic equipment
CN112289040A (en) Method and device for identifying vehicle driving direction and storage medium
CN111372051A (en) Multi-camera linkage blind area detection method and device and electronic equipment
CN111192290A (en) Blocking processing method for pedestrian image detection
JP2020077293A (en) Lane line detection device and lane line detection method
KR20160079511A (en) Device and method for recognizing parking stall

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant