[go: up one dir, main page]

WO2022127737A1 - Trajectory planning method and apparatus, trajectory planner, unmanned aerial vehicle, and storage medium - Google Patents

Trajectory planning method and apparatus, trajectory planner, unmanned aerial vehicle, and storage medium Download PDF

Info

Publication number
WO2022127737A1
WO2022127737A1 PCT/CN2021/137486 CN2021137486W WO2022127737A1 WO 2022127737 A1 WO2022127737 A1 WO 2022127737A1 CN 2021137486 W CN2021137486 W CN 2021137486W WO 2022127737 A1 WO2022127737 A1 WO 2022127737A1
Authority
WO
WIPO (PCT)
Prior art keywords
trajectory
point
points
preset length
global
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.)
Ceased
Application number
PCT/CN2021/137486
Other languages
French (fr)
Chinese (zh)
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.)
Guangzhou Xaircraft Technology Co Ltd
Original Assignee
Guangzhou Xaircraft 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 Guangzhou Xaircraft Technology Co Ltd filed Critical Guangzhou Xaircraft Technology Co Ltd
Publication of WO2022127737A1 publication Critical patent/WO2022127737A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • 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/10Simultaneous control of position or course in three dimensions
    • G05D1/101Simultaneous control of position or course in three dimensions specially adapted for aircraft
    • 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/02Control of position or course in two dimensions
    • G05D1/0206Control of position or course in two dimensions specially adapted to water vehicles
    • 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/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory

Definitions

  • Embodiments of the present invention relate to the field of UAV path planning, and in particular, to a trajectory planning method, device, trajectory planner, UAV and storage medium.
  • drones In recent years, with the popularity of unmanned technology, drones have gradually been used in various fields. Among them, drones can be applied to various operations such as patrol inspection and spraying of route points. During the operation of the UAV, the path planning needs to be carried out in advance to obtain the path trajectory.
  • Embodiments of the present invention provide a trajectory planning method, a device, a trajectory planner, an unmanned aerial vehicle, and a storage medium, which can accurately avoid obstacles when encountering obstacles, ensure the safety of the unmanned aerial vehicle, and improve operation efficiency.
  • an embodiment of the present invention provides a trajectory planning method, including:
  • an embodiment of the present invention further provides a trajectory planning device, including:
  • the global trajectory point determination module is used to determine the global trajectory point of the operation route
  • the starting point determination module is used for taking the starting point of the global trajectory point as the starting point of the first preset length
  • the local trajectory generation module is used for screening the trajectory points covered by the first preset length in the global trajectory points, determining the local trajectory points based on the screened trajectory points, and generating the local trajectory based on the local trajectory points;
  • the control/return module is used to control the UAV to move the distance of the second preset length based on the local trajectory, take the next trajectory point of the current position of the UAV as the starting point of the first preset length, and return to filter in the global trajectory points
  • the step of the track points covered by the first preset length is until the global track point screening is completed, wherein the first preset length is greater than the second preset length.
  • an embodiment of the present invention provides a trajectory planner, including: the trajectory planning apparatus provided by the embodiment of the present invention.
  • an embodiment of the present invention provides an unmanned aerial vehicle, including the trajectory planner provided by the embodiment of the present invention.
  • an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the trajectory planning method provided by the embodiment of the present invention is provided.
  • an embodiment of the present invention provides an unmanned aerial vehicle, including: a processor; and a memory for storing instructions executable by the processor, where the processor is configured to execute the trajectory planning method provided by the embodiment of the present invention.
  • the starting point of the global trajectory point is used as the starting point of the first preset length, and the trajectory points covered by the first preset length are selected from the global trajectory points, Determine the local trajectory point based on the screened trajectory points, generate a local trajectory, control the UAV to move the second preset length based on the local trajectory, take the next trajectory point of the current position of the UAV as the starting point of the first preset length, and return to The operation of screening the trajectory points covered by the first preset length in the global trajectory points until the global trajectory point selection is completed; wherein, the second preset length is smaller than the first preset length.
  • the local trajectory is generated by the first preset length
  • the UAV is controlled to move the second preset distance based on the local trajectory
  • the local trajectory is regenerated based on the first preset length, so that in the case of encountering obstacles, it can be carried out in time.
  • Obstacle avoidance processing to achieve precise obstacle avoidance and ensure the safety of UAVs.
  • 1a is a flowchart of a trajectory planning method provided by an embodiment of the present invention.
  • Figure 1b is a schematic diagram of a round-trip operation route
  • Figure 1c is a schematic diagram of the operation route in the form of a curve
  • 1d is a schematic diagram of a working route provided by an embodiment of the present invention.
  • Figure 1e is a schematic diagram of the route point speed calculation
  • Figure 1f is a schematic diagram of the global trajectory point
  • 1g is a schematic diagram of screening of local trajectory points in the case where there are no obstacles on the trajectory formed by the trajectory points covered by the first preset length according to an embodiment of the present invention
  • 1h is a schematic diagram of screening of local trajectory points in the case where there are no obstacles on the trajectory formed by the trajectory points covered by the first preset length according to an embodiment of the present invention
  • FIG. 2a is a flowchart of a trajectory planning method provided by another embodiment of the present invention.
  • Fig. 2b shows that there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is greater than the first preset distance used for obstacle avoidance.
  • 3a is a flowchart of a trajectory planning method provided by another embodiment of the present invention.
  • Fig. 3b shows that there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is smaller than the first preset distance used for obstacle avoidance, the local A schematic diagram of the trajectory point screening causing the UAV to fail to return to the original trajectory point;
  • Fig. 3c shows that there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is smaller than the first preset distance for obstacle avoidance, the local Schematic diagram of trajectory point screening;
  • FIG. 4 is a structural block diagram of a trajectory planning device provided by an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a trajectory planner provided by an embodiment of the present invention.
  • FIG. 6 shows a block diagram of an unmanned aerial vehicle for executing a trajectory planning method provided by an exemplary embodiment of the present application.
  • Fig. 1a is a flowchart of a trajectory planning method provided by an embodiment of the present invention.
  • the method can be executed by a trajectory planning device, and the device can be implemented by software and/or hardware.
  • the device can be configured in trajectory planning In the UAV, the trajectory planner can be configured on the UAV.
  • the drone may be a plant protection drone, a surveying and mapping drone, an unmanned vehicle, or an unmanned boat.
  • the method provided by the embodiment of the present invention may be applied to a drone operation scenario.
  • the technical solution provided by the embodiment of the present invention includes:
  • global trajectory planning can be performed first, a global trajectory including all route points can be planned, and the position and speed of the UAV at each moment can be preliminarily determined. Then, local trajectory planning is carried out.
  • the trajectory planner uses the planned global trajectory as the basis, and combines the obstacle information obtained by the sensor to perform small-scale and small-scale trajectory planning.
  • the operation route may be a flight route of an aircraft, or a travel route of a vehicle or a ship.
  • the operation route may be composed of several route points, and the drone needs to pass through these route points during the operation.
  • the route point may include position information and speed information, etc., wherein, the speed of the route point may be understood as the speed of the drone at the route point.
  • the speed of the route point may be understood as the speed of the drone at the route point.
  • the trajectory planner can obtain all the data of the operation route in advance, including the number of route points, the Coordinates, the maximum speed of each route point, etc., the trajectory planner can perform global trajectory planning based on the data of the operation route, obstacle maps, etc.
  • the obstacle map can record geographically inaccessible areas and obstacles for drones.
  • the operation route formed by the route points may be a round-trip operation route as shown in FIG. 1b, and may also be in the form of a curve as shown in FIG. 1c.
  • the form of the work route is not limited to the above-mentioned form, and may be a form of a 3D work route with a high degree of variation.
  • the schematic diagram of the operation route can be referred to Fig. 1d, and the horizontal flight of the drone is taken as an example.
  • the total time T of , in the interval t ⁇ (0, T) the position and speed of the UAV need to be determined at each moment.
  • speed distribution speed distribution at each moment
  • the speed of the UAV when passing through each route point is set to 0 m/s. Therefore, the drone needs to stop at each route point and then depart to the next route point, which affects the efficiency of the operation.
  • the speed of the drone when passing the route point can be restricted from being 0, so that the movement of the drone is more coherent, and the global trajectory point is finally determined.
  • determining the global trajectory points of the operation route includes: determining the maximum speed allowed for each route point based on the constraint conditions of the route points in the operation route, and using the maximum speed as the corresponding The speed of the route point; based on the speed and position of each two adjacent route points, determine the position and speed at any time in the road segment between each two adjacent route points, and sample the location of each road segment to obtain the global trajectory point.
  • determining the maximum allowable speed of each route point based on the constraints of the route points in the operation route includes: determining the maximum speed among the speeds satisfying the following conditions as the maximum speed (the speed of the route points satisfies the following conditions):
  • the speed at each route point is less than or equal to the maximum speed allowed for the job
  • the speed of the first route point and the last route point is 0;
  • the speed of a route point it can decelerate to the next route point with the maximum acceleration allowed by the drone, or accelerate to the next route point with the maximum acceleration allowed by the drone;
  • the forward speed of the waypoint is determined based on the size of the corner.
  • the speed of the route point is constrained by the above constraint conditions, and the maximum value of the speeds satisfying the above constraint conditions is taken as the speed of the route point, which can improve the work efficiency.
  • the forward speed of the route point is determined based on the size of the turning angle, including: determining the forward speed of the route point based on the following formula:
  • vx is the forward speed of the UAV
  • is the size of the turning angle
  • a 0 is the acceleration of the UAV
  • d is the distance from the route point when the UAV decelerates.
  • the angle formed by the front and rear sections is the angle of ⁇ , that is, the size of the rotation angle is ⁇ .
  • the drone flies along the left side of the angle, and the speed can be decomposed into the vertical speed of v x and v y .
  • v y should decrease to zero, while v x remains constant throughout the drone's flight to and away from the vertex.
  • the drone starts to decelerate when it is a distance d from the vertex, and then accelerates after passing the vertex. Since the velocity v y in the y direction at the vertex is 0, then the velocity v x in the x direction is the velocity allowed to pass through the vertex. It should be noted that the trajectory of the whole process is actually a parabola instead of the trajectory shown in Figure 1e, but it can be considered as the trajectory shown in Figure 1e when d is small.
  • vx can be obtained by the following formula:
  • the straight-line trajectory planning can be performed on the road segment between every two adjacent route points by the method of trapezoidal speed distribution or the Double S speed distributor. That is, for the road segment formed by two adjacent route points, through the position and speed of the two route points, the time required to fly the road segment can be calculated, so that the position and speed of the UAV at any time in the road segment can be calculated, The position of the UAV is sampled according to the time interval T s , and the global trajectory point is obtained.
  • the schematic diagram of the global trajectory point can refer to Fig.
  • the global trajectory point includes the position, speed and corresponding time information of each trajectory point.
  • the time interval corresponding to each trajectory point is T s , therefore, the trajectory points with short distances before and after indicate low velocity, and the trajectory points with large distance indicate high velocity.
  • the UAV starts to accelerate from the starting point in the lower left corner. At the beginning, the trajectory points are relatively dense and the speed is small. When it reaches the middle of the first road segment, the trajectory points are relatively sparse and the speed is large; then the UAV decelerates. Reach the top, accelerate again after passing the top, slow down when it reaches the bottom right end point, and finally stop.
  • a global trajectory may be planned based on the position information of the route points in the operation route and the information in the obstacle map, and the position sampling of the global trajectory may be performed to obtain the global trajectory points.
  • the manner of determining the global trajectory point is not limited to the above manner, and may also be other manners.
  • S120 Use the starting point of the global trajectory point as the starting point of the first preset length.
  • a collision-free and smooth local trajectory can be planned by using global trajectory points.
  • the starting point of the global trajectory point may be used as the starting point of the first preset length.
  • the starting point of the global trajectory point may be the first trajectory point at the beginning of the global trajectory point.
  • the first preset length may be set according to actual conditions.
  • S130 Screen the track points covered by the first preset length from the global track points, determine local track points based on the screened track points, and generate a local track based on the local track points.
  • the trajectory points covered by the first preset length may include, in the global trajectory, the trajectory points corresponding to the starting point of the first preset length, and the trajectory points located after the starting point of the first preset length and being the same as the first preset length.
  • the distance between the starting points of a preset length is less than or equal to the trajectory points of the first preset length.
  • the trajectory points covered by the first preset length in the case where there is no obstacle on the trajectory formed by the trajectory points covered by the first preset length, that is, in the case where there is no obstacle within the distance range covered by the first preset length , the trajectory points covered by the first preset length can be used as local trajectory points, and the local trajectory can be generated based on the local trajectory points.
  • the obstacle avoidance trajectory point can be determined based on the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle, and use
  • the obstacle track point replaces the track point in the corresponding global track point, and the unreplaced track point and the obstacle avoidance track point among the track points covered by the first preset length are used as the local track point.
  • the obstacle information includes the size and position information of the obstacle, and the obstacle information can be determined by the sensor data on the UAV.
  • the first preset distance and the second preset distance may be preset, or may also be determined according to the current speed of the drone.
  • a third preset length can be added on the basis of the first preset length to obtain a fourth preset length, and the end point of the fourth preset length is the same as The distance of the obstacle is greater than the first preset distance.
  • the obstacle avoidance trajectory point is determined according to the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle, and the obstacle avoidance trajectory point is used to replace the trajectory point in the corresponding global trajectory point; Unreplaced track points and obstacle avoidance track points in the track points covered by the length are used as local track points, and a local track is generated.
  • the content of this part can refer to the introduction of the following embodiments.
  • S140 Control the drone to move a distance of a second preset length based on the local trajectory.
  • controlling the UAV to move a distance of a second preset length based on the local trajectory includes: determining a control amount of the UAV based on the local trajectory; controlling the UAV along the local trajectory based on the control amount Move a distance of a second preset length.
  • the control amount may include information such as acceleration and flight angle.
  • the independent variable of the local trajectory can be time, the velocity at any time can be determined based on the local trajectory, and the acceleration and flight angle can be calculated based on the velocity at any two adjacent moments.
  • the local trajectory is determined, the control amount is determined based on the local trajectory, and the UAV is controlled to move along the local trajectory based on the control amount. Longer global trajectories are processed each time, reducing data processing.
  • the second preset length is less than the first preset length.
  • the second preset length may be less than half of the first preset length.
  • the first preset length and the first preset length Two preset lengths can be set as needed.
  • S160 Control the drone to continue to move along the local trajectory to the last trajectory point.
  • S170 Take the next trajectory point of the current position of the drone as the starting point of the first preset length, and return to S130.
  • the global track point is screened, and the drone can be controlled to move to the last track point along the last generated local track. If the global trajectory point has not been screened, the next trajectory point of the current position of the drone is used as the starting point of the first preset length, and the process returns to S130.
  • the trajectory points in Figure 1g are global trajectory points, and " ⁇ " represents the position of the UAV.
  • L min_for_execution is the first preset length, that is, the length of the generated local trajectory
  • L replan is the second preset length. Set the length, that is, after flying the distance of the second preset length, the local trajectory will be regenerated.
  • the UAV is at the starting point of the global trajectory point. In order to generate a local trajectory, it is necessary to filter the trajectory in the global trajectory point.
  • the length of the line connecting the selected trajectory points is determined by L min_for_execution . Among them, the larger L min_for_execution is, the more trajectory points are screened.
  • the local trajectory is generated based on the selected trajectory points, and the control quantity is determined based on the local trajectory. After the UAV moves the distance L replan along the local trajectory based on the control quantity, the local planning needs to be re-planned.
  • the screening starts from the next trajectory point in front of the current position of the UAV, and the length of the line connecting the selected trajectory points satisfies the L min_for_execution After the length, the local trajectory and the control amount are generated again. After controlling the UAV to move the distance L replan along the local trajectory based on the control amount, it returns to the next trajectory point in front of the current position of the UAV to start screening until the global trajectory point is screened.
  • the local trajectory points are determined based on the screened trajectory points, and the method for generating the local trajectory can refer to the introduction of the following embodiments.
  • the drone in the process of performing operations according to the operation route, the drone needs to stop and then fly to the next route point when it reaches a route point.
  • frequent braking will affect the operation efficiency.
  • the maximum speed allowed for each route point is determined based on the constraint conditions of the route points in the operation route, and the maximum speed is used as the speed of the corresponding route point;
  • speed matching is performed on the road segments between each two adjacent route points, and the position of each road segment is sampled based on the assigned speed to obtain global trajectory points.
  • Local planning can be carried out at the point, so as to avoid the frequent braking of the drone and improve the operation efficiency.
  • the starting point of the global trajectory point is used as the starting point of the first preset length, and the trajectory points covered by the first preset length are selected from the global trajectory points, Determine the local trajectory point based on the screened trajectory points, generate a local trajectory, control the UAV to move the second preset length based on the local trajectory, take the next trajectory point of the current position of the UAV as the starting point of the first preset length, and return to The operation of screening the trajectory points covered by the first preset length in the global trajectory points until the global trajectory point selection is completed; wherein, the second preset length is smaller than the first preset length.
  • the local trajectory is generated by the first preset length
  • the UAV is controlled to move the second preset distance based on the local trajectory
  • the local trajectory is regenerated based on the first preset length.
  • obstacle handling to achieve precise obstacle avoidance and ensure the safety of UAVs.
  • determining a local trajectory point based on the screened trajectory points includes: if the trajectory points covered by the first preset length form There is an obstacle on the trajectory of , and the distance between the obstacle and the end point of the first preset length is greater than the first preset distance for obstacle avoidance, based on the first preset distance, the second preset distance for obstacle avoidance and The obstacle avoidance trajectory point is determined by the information of the obstacle, and the obstacle avoidance trajectory point is used to replace the trajectory point in the corresponding global trajectory point; the unreplaced trajectory point and the obstacle avoidance trajectory point in the trajectory point covered by the first preset length are used as the local track point.
  • the technical solution provided by the embodiment of the present invention includes:
  • S220 Use the starting point of the global trajectory point as the starting point of the first preset length.
  • S230 Screen the track points covered by the first preset length from the global track points.
  • the first preset distance and the second preset distance may be set as required, or may also be determined based on the current speed of the drone. When the current speed of the drone is larger, the first preset distance and the second preset distance are larger.
  • the distance between the obstacle and the end point of the first preset length is greater than the first preset distance used for obstacle avoidance
  • the distance between the obstacle and the end point of the first preset length is greater than the first preset distance used for obstacle avoidance
  • FIG. 2b there is an obstacle 100 on the trajectory formed by the trajectory points covered by the first preset length L min_for_execution , and the distance between the obstacle 100 and the end point of the first preset length is relatively large (the obstacle 100 is located at the end point of the first preset length).
  • the middle position of L min_for_execution if the drone moves according to the trajectory point covered by the first preset length, it will hit the obstacle 100.
  • the obstacle avoidance trajectory points can be determined based on the first preset distance, the second preset distance and the information of the obstacles.
  • the hollow circle points can be the obstacle avoidance trajectory points
  • the obstacle avoidance trajectory points can be Replace the track points in the corresponding global track points (part of track points in the track points covered by the first preset length).
  • the obstacle avoidance trajectory point is determined based on the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle, and the obstacle avoidance trajectory point is replaced by the obstacle avoidance trajectory point.
  • the trajectory points in the corresponding global trajectory points include: in the global trajectory points, determining the first trajectory point corresponding to the position at the first preset distance behind the obstacle and the position at the second preset distance before the obstacle The corresponding second trajectory point; the obstacle avoidance trajectory point is determined based on the information of the first trajectory point, the information of the second trajectory point and the information of the obstacle; it will be located between the second trajectory point and the first trajectory point in the global trajectory point The trajectory points of are replaced with obstacle avoidance trajectory points.
  • the information of the first track point includes the speed and position of the first track point
  • the information of the second track point includes the position and speed of the second track point.
  • the first trajectory point may be a trajectory point at a position of a first preset distance behind the obstacle, or a subsequent trajectory point at a position of the first preset distance behind the obstacle.
  • the second trajectory point may be a trajectory point at a position at a second preset distance before the obstacle, or may also be a previous trajectory point at a position at a second preset distance before the obstacle.
  • the Hybrid A* algorithm or other related algorithms can be used to determine the obstacle avoidance trajectory point based on the information of the first trajectory point, the information of the second trajectory point and the information of the obstacle (including determining the position and speed of the obstacle avoidance trajectory point) .
  • the generated obstacle avoidance trajectory and the original trajectory are smooth in speed, and the operation efficiency is improved.
  • the first trajectory point may be the trajectory point 10
  • the second trajectory point may be the trajectory point 20
  • the obstacle avoidance trajectory point may be used to separate the trajectory point (which may include the trajectory 10) between the trajectory point 10 and the trajectory point 20. and track point 20) to replace the track point between track point 10 and track point 20.
  • S250 Use unreplaced track points and obstacle avoidance track points in the track points covered by the first preset length as local track points, and generate a local track based on the local track points.
  • the track points after the track point 10 and the track points before the track point 20 are the track points that are not replaced in the track points covered by the first preset length, and the unreplaced track points are Points and obstacle avoidance trajectory points are used as local trajectory points, and a local trajectory is generated based on the local trajectory points, and a control amount can be generated based on the local trajectory, so that the UAV can be controlled to move along the local trajectory based on the control amount.
  • S260 Control the UAV to move a distance of a second preset length based on the local trajectory.
  • S280 Control the UAV to continue to move along the local trajectory to the last trajectory point.
  • S290 Take the next trajectory point of the current position of the drone as the starting point of the first preset length, and return to S230.
  • the UAV moves a distance of the second preset length based on the local trajectory, and uses the next trajectory point of the current position of the UAV as the starting point of the first preset length. If the local trajectory is regenerated, the last generated local trajectory contains the trajectory points that the UAV has not yet reached, and the trajectory points that the UAV has not reached (may include obstacle avoidance trajectory points) become part of the global trajectory points. Return to the operation of screening the global track points covered by the first preset length until the global track points are screened.
  • the trajectory points covered by the first preset length in the global trajectory points if there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the obstacle is connected to the end point of the first preset length distance is greater than the first preset distance for obstacle avoidance, determine the obstacle avoidance trajectory point based on the first preset distance, the second preset distance for obstacle avoidance and the information of the obstacle, and use the obstacle avoidance trajectory point to replace The corresponding trajectory points in the global trajectory points; the unreplaced trajectory points and the obstacle avoidance trajectory points in the trajectory points covered by the first preset length are used as the local trajectory points, so that the obstacles can be processed in time and the obstacles can be avoided accurately.
  • determining a local trajectory point based on the screened trajectory points includes: if the trajectory points covered by the first preset length form There are obstacles on the trajectory of Four preset lengths; wherein, the distance between the end point of the fourth preset length and the obstacle is greater than the first preset distance; the avoidance is determined based on the first preset distance, the second preset distance for obstacle avoidance and the information of the obstacle
  • the obstacle avoidance track point is used to replace the track point in the corresponding global track point; the unreplaced track point and the obstacle avoidance track point in the track point covered by the fourth preset length are used as the local track point.
  • the technical solution provided by the embodiment of the present invention includes:
  • S320 Use the starting point of the global trajectory point as the starting point of the first preset length.
  • S330 Screen the track points covered by the first preset length from the global track points.
  • an obstacle exists on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is smaller than the first preset distance used for obstacle avoidance
  • the distance between the obstacle and the end point of the first preset length is smaller than the first preset distance used for obstacle avoidance
  • the distance between the obstacle 100 and the end point of the first preset length is small (the obstacle 100 is close to The end point of the first preset length)
  • the trajectory point after the obstacle 100 is not enough to support the UAV to return to the original trajectory point, so it is necessary to continue to filter the trajectory points along the global trajectory point.
  • FIG. 3b there is an obstacle 100 on the trajectory formed by the trajectory points covered by the first preset length L min_for_execution , and the distance between the obstacle 100 and the end point of the first preset length is small (the obstacle 100 is close to The end point of the first preset length), the trajectory point after the obstacle 100 is not enough to support the UAV to return to the original trajectory point, so it
  • a third preset length L clear may be added to the first preset length to obtain a fourth preset length.
  • the distance from the end point of the fourth preset length to the obstacle 100 is greater than the first preset distance, so that the UAV can return to the original trajectory point, and can return while accurately avoiding obstacles.
  • the hollow circles represent the obstacle avoidance trajectory points
  • the solid circles represent the trajectory points in the global trajectory points, which may also be referred to as the original trajectory points.
  • the sensor can identify the distant obstacle and avoid the obstacle in advance, it is impossible for the obstacle to appear at a position close to the starting point of the first preset length.
  • S350 Determine an obstacle avoidance trajectory point based on the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle, and replace the trajectory point in the corresponding global trajectory point with the obstacle avoidance trajectory point.
  • the obstacle avoidance trajectory point is determined based on the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle, and the obstacle avoidance trajectory point is replaced by the obstacle avoidance trajectory point.
  • the trajectory points in the corresponding global trajectory points include: in the global trajectory points, determining the first trajectory point corresponding to the position at the first preset distance behind the obstacle and the position at the second preset distance before the obstacle The corresponding second trajectory point; the obstacle avoidance trajectory point is determined based on the information of the first trajectory point, the information of the second trajectory point and the information of the obstacle; it will be located between the second trajectory point and the first trajectory point in the global trajectory point
  • the trajectory points of are replaced with obstacle avoidance trajectory points.
  • S360 Use unreplaced track points and obstacle avoidance track points in the track points covered by the fourth preset length as local track points, and generate a local track based on the local track points.
  • the track points after the track point 30 and the track points before the track point 40 are the track points that are not replaced in the track points covered by the fourth preset length, and the unreplaced track points are Points and obstacle avoidance trajectory points are used as local trajectory points; wherein, for the introduction of generating local trajectories based on local trajectory points, reference may be made to the foregoing embodiments.
  • S370 Control the UAV to move a distance of a second preset length based on the local trajectory.
  • S390 Control the UAV to continue to move along the local trajectory to the last trajectory point.
  • S391 Use the next trajectory point of the current position of the drone as the starting point of the first preset length, and return to S330.
  • a third preset length is added to obtain a fourth preset length, and the unreplaced track points and obstacle avoidance track points in the track points covered by the fourth preset length are used as local track points to generate Local trajectory can avoid incomplete obstacle avoidance trajectory generation, and achieve accurate obstacle avoidance while allowing the UAV to return to the global trajectory.
  • the UAV moves along the global trajectory point under normal circumstances.
  • the obstacle appears on the global trajectory (in fact, it appears on the local trajectory, the two are basically equivalent in most cases)
  • the drone needs to leave the original trajectory to avoid obstacles, and then return to the original trajectory.
  • the UAV needs to be stopped, or the flight controller decelerates the UAV to a certain speed and then the controller controls the UAV to avoid obstacles.
  • two methods in the related art make the UAV move. The process is not stable, and the change of control of the latter can easily cause the movement of the drone to be unstable.
  • the technical solutions provided by the embodiments of the present invention can be executed by a trajectory planner, which avoids frequent exchange of control rights, increases the integration of planning, and ensures the stability of the movement of the UAV.
  • the trajectory planner provided by the present invention can also perform the execution of the 3D operation route.
  • FIG. 4 is a structural block diagram of a trajectory planning apparatus provided by an embodiment of the present invention.
  • the apparatus provided by an embodiment of the present invention includes: a global trajectory point determination module 410, a starting point determination module 420, a local trajectory generation module 430 and Control/return to module 440.
  • the global trajectory point determination module 410 is used to determine the global trajectory point of the operation route
  • the starting point determination module 420 is configured to use the starting point of the global trajectory point as the starting point of the first preset length
  • the local trajectory generation module 430 is used for screening the trajectory points covered by the first preset length in the global trajectory points, determining the local trajectory points based on the screened trajectory points, and generating the local trajectory based on the local trajectory points;
  • the control/return module 440 is used to control the UAV to move the distance of the second preset length based on the local trajectory, take the next trajectory point of the current position of the UAV as the starting point of the first preset length, and return to the global trajectory point The operation of screening the trajectory points covered by the first preset length until the global trajectory point screening is completed, wherein the first preset length is greater than the second preset length.
  • determine local trajectory points based on the filtered trajectory points including:
  • the second preset distance for obstacle avoidance and the information of the obstacle determine the obstacle avoidance trajectory point, and use the obstacle avoidance trajectory point to replace the trajectory point in the corresponding global trajectory point;
  • Unreplaced track points and obstacle avoidance track points in the track points covered by the first preset length are used as local track points.
  • determine local trajectory points based on the filtered trajectory points including:
  • a third preset length is added to obtain a fourth preset length; wherein, the distance between the end point of the fourth preset length and the obstacle is greater than the first preset distance;
  • Unreplaced track points and obstacle avoidance track points in the track points covered by the fourth preset length are used as local track points.
  • the obstacle avoidance trajectory point is determined based on the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle, and the obstacle avoidance trajectory point is used to replace the trajectory point in the corresponding global trajectory point, including: :
  • a first trajectory point corresponding to a position at a first preset distance behind the obstacle and a second trajectory point corresponding to a position at a second preset distance before the obstacle are determined;
  • determine local trajectory points based on the filtered trajectory points including:
  • the selected trajectory points are used as local trajectory points.
  • determine the global trajectory points of the operation route including:
  • the maximum speed among the speeds satisfying the following conditions is determined as the maximum speed:
  • the speed at each route point is less than or equal to the maximum speed allowed for the job
  • the speed of the first route point and the last route point is 0;
  • the speed of a route point it can decelerate to the next route point with the maximum acceleration allowed by the drone, or accelerate to the next route point with the maximum acceleration allowed by the drone;
  • the forward speed of the waypoint is determined based on the size of the corner.
  • the forward speed of the route point is determined based on the size of the corner, including:
  • the forward speed of the route point is determined based on the following formula:
  • vx is the forward speed of the UAV
  • is the size of the turning angle
  • a 0 is the acceleration of the UAV
  • d is the distance from the route point when the UAV decelerates.
  • control the UAV to move a distance of a second preset length based on the local trajectory including:
  • the UAV is controlled to move a distance of a second preset length along the local trajectory based on the control amount.
  • the above apparatus can execute the method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
  • FIG. 5 is a schematic structural diagram of a trajectory planner provided by an embodiment of the present invention.
  • the trajectory planner 50 includes a trajectory planning device 500 provided by an embodiment of the present invention.
  • the trajectory planning device 500 (the trajectory planning device shown in FIG. 4 ) ) to execute the trajectory planning method provided by any of the foregoing embodiments of the present invention.
  • An embodiment of the present invention further provides an unmanned aerial vehicle, including the trajectory planner provided by the embodiment of the present invention, that is, the planner shown in FIG. 5 .
  • FIG. 6 shows a block diagram of an unmanned aerial vehicle 600 for executing a trajectory planning method provided by an exemplary embodiment of the present application.
  • the drone 600 includes a processing component 610, which further includes one or more processors, and a memory resource, represented by memory 620, for storing instructions executable by the processing component 610, such as application programs.
  • An application program stored in memory 620 may include one or more modules, each corresponding to a set of instructions.
  • the processing component 610 is configured to execute instructions to perform the trajectory planning method described above.
  • the drone 600 may also include a power supply assembly configured to perform power management of the drone 600, a wired or wireless network interface configured to connect the drone 600 to a network, and an input output (I/O) interface .
  • the drone 600 can be operated based on an operating system stored in the memory 620, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM or the like.
  • An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements a trajectory planning method provided by any of the foregoing embodiments of the present invention: for example, it can realize : Determine the global trajectory point of the operation route; take the starting point of the global trajectory point as the starting point of the first preset length; filter the trajectory points covered by the first preset length in the global trajectory points, and determine the local trajectory point based on the selected trajectory points , and generate a local trajectory based on the local trajectory points; control the UAV to move the distance of the second preset length based on the local trajectory, take the next trajectory point of the current position of the UAV as the starting point of the first preset length, and return to the global trajectory The operation of screening the trajectory points covered by the first preset length in the points, until the global trajectory point screening is completed, wherein the first preset length is greater than the second preset length.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples (a non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a propagated data signal in baseband or as part of a carrier wave, with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, but also conventional Procedural programming language - such as "C" language or similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through Internet connection).
  • LAN local area network
  • WAN wide area network

Landscapes

  • Engineering & Computer Science (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

A trajectory planning method, a trajectory planning apparatus (500), a trajectory planner (50), an unmanned aerial vehicle (600), and a storage medium. The trajectory planning method comprises: determining global trajectory points of a job route (S110); using a starting point of the global trajectory points as a starting point of a first preset length (S120); screening the global trajectory points for trajectory points covered by the first preset length, determining local trajectory points based on the screened trajectory points, and generating a local trajectory based on the local trajectory points (S130); controlling the unmanned aerial vehicle to move by a second preset length based on the local trajectory (S140); determining whether all the global trajectory points have been screened (S150); if yes, controlling the unmanned aerial vehicle to continue moving along the local trajectory to the last trajectory point (S160); if not, using the next trajectory point of the current position of the unmanned aerial vehicle as a starting point of the first preset length (S170), and returning to the operation of screening the global trajectory points for the trajectory point covered by the first preset length until all global trajectory point are screened, wherein the first preset length is greater than the second preset length. Therefore, the unmanned aerial vehicle can accurately avoid obstacles encountered. The safety of the unmanned aerial vehicle is ensured, and the operation efficiency is improved.

Description

轨迹规划方法、装置、轨迹规划器、无人机及存储介质Trajectory planning method, device, trajectory planner, unmanned aerial vehicle and storage medium 技术领域technical field

本发明实施例涉及无人机路径规划领域,尤其涉及一种轨迹规划方法、装置、轨迹规划器、无人机及存储介质。Embodiments of the present invention relate to the field of UAV path planning, and in particular, to a trajectory planning method, device, trajectory planner, UAV and storage medium.

发明背景Background of the Invention

近年来,随着无人技术的普及,无人机逐渐被应用于各个领域。其中,可以将无人机应用于对路线点进行巡检、喷洒等各种作业。无人机在进行作业的过程中,需要预先进行路径规划,得到路径轨迹。In recent years, with the popularity of unmanned technology, drones have gradually been used in various fields. Among them, drones can be applied to various operations such as patrol inspection and spraying of route points. During the operation of the UAV, the path planning needs to be carried out in advance to obtain the path trajectory.

但是相关技术中,在无人机基于规划的路径轨迹进行实际作业过程中,若遇到障碍物,无人机并不能很好的避障,影响无人机的安全。However, in the related art, during the actual operation of the UAV based on the planned path trajectory, if it encounters an obstacle, the UAV cannot avoid the obstacle well, which affects the safety of the UAV.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种轨迹规划方法、装置、轨迹规划器、无人机及存储介质,在遇到障碍物的情况下,可以精确躲避障碍物,保证无人机安全、提高作业效率。Embodiments of the present invention provide a trajectory planning method, a device, a trajectory planner, an unmanned aerial vehicle, and a storage medium, which can accurately avoid obstacles when encountering obstacles, ensure the safety of the unmanned aerial vehicle, and improve operation efficiency.

第一方面,本发明实施例提供了一种轨迹规划方法,包括:In a first aspect, an embodiment of the present invention provides a trajectory planning method, including:

确定作业路线的全局轨迹点;Determine the global trajectory point of the operation route;

将全局轨迹点的起点作为第一预设长度的起点;Take the starting point of the global trajectory point as the starting point of the first preset length;

在全局轨迹点中筛选第一预设长度所覆盖的轨迹点,基于筛选的轨迹点确定局部轨迹点,并基于局部轨迹点生成局部轨迹;Screening the trajectory points covered by the first preset length in the global trajectory points, determining the local trajectory points based on the screened trajectory points, and generating the local trajectory based on the local trajectory points;

控制无人机基于局部轨迹运动第二预设长度的距离,将无人机当前位置的下一个轨迹点作为第一预设长度的起点,返回在全局轨迹点中筛选第一预设长度所覆盖的轨迹点的步骤,直至全局轨迹点筛选完毕,其中,第一预设长度大于第二预设长度。Control the UAV to move the distance of the second preset length based on the local trajectory, take the next trajectory point of the current position of the UAV as the starting point of the first preset length, and return to filter the global trajectory points covered by the first preset length until the global trajectory point screening is completed, wherein the first preset length is greater than the second preset length.

第二方面,本发明实施例还提供了一种轨迹规划装置,包括:In a second aspect, an embodiment of the present invention further provides a trajectory planning device, including:

全局轨迹点确定模块,用于确定作业路线的全局轨迹点;The global trajectory point determination module is used to determine the global trajectory point of the operation route;

起点确定模块,用于将全局轨迹点的起点作为第一预设长度的起点;The starting point determination module is used for taking the starting point of the global trajectory point as the starting point of the first preset length;

局部轨迹生成模块,用于在全局轨迹点中筛选第一预设长度所覆盖的轨迹点,基于筛选的轨迹点确定局部轨迹点,并基于局部轨迹点生成局部轨迹;The local trajectory generation module is used for screening the trajectory points covered by the first preset length in the global trajectory points, determining the local trajectory points based on the screened trajectory points, and generating the local trajectory based on the local trajectory points;

控制/返回模块,用于控制无人机基于局部轨迹运动第二预设长度的距离,将无人机当前位置的下一个轨迹点作为第一预设长度的起点,返回在全局轨迹点中筛选第一预设长度所覆盖的轨迹点的步骤,直至全局轨迹点筛选完毕,其中,第一预设长度大于第二预设长度。The control/return module is used to control the UAV to move the distance of the second preset length based on the local trajectory, take the next trajectory point of the current position of the UAV as the starting point of the first preset length, and return to filter in the global trajectory points The step of the track points covered by the first preset length is until the global track point screening is completed, wherein the first preset length is greater than the second preset length.

第三方面,本发明实施例提供了一种轨迹规划器,包括:本发明实施例提供的轨迹规划装置。In a third aspect, an embodiment of the present invention provides a trajectory planner, including: the trajectory planning apparatus provided by the embodiment of the present invention.

第四方面,本发明实施例提供了一种无人机,包括本发明实施例提供的轨迹规划器。In a fourth aspect, an embodiment of the present invention provides an unmanned aerial vehicle, including the trajectory planner provided by the embodiment of the present invention.

第五方面,本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时本发明实施例提供的轨迹规划方法。In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the trajectory planning method provided by the embodiment of the present invention is provided.

第六方面,本发明实施例提供了一种无人机,包括:处理器;用于存储处理器可执行指令的存储器,其中,处理器用于执行本发明实施例提供的轨迹规划方法。In a sixth aspect, an embodiment of the present invention provides an unmanned aerial vehicle, including: a processor; and a memory for storing instructions executable by the processor, where the processor is configured to execute the trajectory planning method provided by the embodiment of the present invention.

本发明实施例提供的技术方案,通过确定作业路线的全局轨迹点,将全局轨迹点的起点作为第一预设长度的起点,在全局轨迹点中筛选第一预设长度所覆盖的轨迹点,基于筛选的轨迹点确定局部轨迹点,并生成局部轨迹,控制无人机基于局部轨迹运动第二预设长度,将无人机当前位置的下一个轨迹点作为第一预设长度的起点,返回在全局轨迹点中筛选第一预设长度所覆盖的轨迹点的操作,直至全局轨迹点筛选完毕;其中,第二预设长度小于第一预设长度。即通过第一预设长度生成局部轨迹,控制无人机基于局部轨迹运动第二预设距离,再重新基于第一预设长度生成局部轨迹,这样在遇到障碍物的情况下,可以及时进行避障处理,实现精准避障,保障无人机的安全。In the technical solution provided by the embodiment of the present invention, by determining the global trajectory point of the operation route, the starting point of the global trajectory point is used as the starting point of the first preset length, and the trajectory points covered by the first preset length are selected from the global trajectory points, Determine the local trajectory point based on the screened trajectory points, generate a local trajectory, control the UAV to move the second preset length based on the local trajectory, take the next trajectory point of the current position of the UAV as the starting point of the first preset length, and return to The operation of screening the trajectory points covered by the first preset length in the global trajectory points until the global trajectory point selection is completed; wherein, the second preset length is smaller than the first preset length. That is, the local trajectory is generated by the first preset length, the UAV is controlled to move the second preset distance based on the local trajectory, and then the local trajectory is regenerated based on the first preset length, so that in the case of encountering obstacles, it can be carried out in time. Obstacle avoidance processing to achieve precise obstacle avoidance and ensure the safety of UAVs.

附图简要说明Brief Description of Drawings

图1a是本发明一实施例提供的轨迹规划方法流程图;1a is a flowchart of a trajectory planning method provided by an embodiment of the present invention;

图1b是往返作业路线示意图;Figure 1b is a schematic diagram of a round-trip operation route;

图1c是曲线形式作业路线示意图;Figure 1c is a schematic diagram of the operation route in the form of a curve;

图1d是本发明一实施例提供的作业路线的示意图;1d is a schematic diagram of a working route provided by an embodiment of the present invention;

图1e是路线点速度计算原理图;Figure 1e is a schematic diagram of the route point speed calculation;

图1f是全局轨迹点示意图;Figure 1f is a schematic diagram of the global trajectory point;

图1g是本发明一实施例提供的在第一预设长度覆盖的轨迹点形成的轨迹上不存在障碍物的情况下,局部轨迹点筛选示意图;1g is a schematic diagram of screening of local trajectory points in the case where there are no obstacles on the trajectory formed by the trajectory points covered by the first preset length according to an embodiment of the present invention;

图1h是本发明一实施例提供的在第一预设长度覆盖的轨迹点形成的轨迹上不存在障碍物的情况下,局部轨迹点筛选示意图;1h is a schematic diagram of screening of local trajectory points in the case where there are no obstacles on the trajectory formed by the trajectory points covered by the first preset length according to an embodiment of the present invention;

图2a是本发明另一实施例提供的轨迹规划方法流程图;2a is a flowchart of a trajectory planning method provided by another embodiment of the present invention;

图2b是在第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且障碍物与第一预设长度的终点的距离大于用于避障的第一预设距离的情况下,局部轨迹点筛选示意图;Fig. 2b shows that there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is greater than the first preset distance used for obstacle avoidance. Schematic diagram of track point screening;

图3a是本发明另一实施例提供的轨迹规划方法流程图;3a is a flowchart of a trajectory planning method provided by another embodiment of the present invention;

图3b是在第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且障碍物与第一预设长度的终点的距离小于用于避障的第一预设距离的情况下,局部轨迹点筛选导致无人机无法回归原来的轨迹点的示意图;Fig. 3b shows that there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is smaller than the first preset distance used for obstacle avoidance, the local A schematic diagram of the trajectory point screening causing the UAV to fail to return to the original trajectory point;

图3c是在第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且障碍物与第一预设长度的终点的距离小于用于避障的第一预设距离的情况下,局部轨迹点筛选的示意图;Fig. 3c shows that there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is smaller than the first preset distance for obstacle avoidance, the local Schematic diagram of trajectory point screening;

图4是本发明实施例提供的一种轨迹规划装置结构框图;4 is a structural block diagram of a trajectory planning device provided by an embodiment of the present invention;

图5是本发明实施例提供的一种轨迹规划器的结构示意图。FIG. 5 is a schematic structural diagram of a trajectory planner provided by an embodiment of the present invention.

图6所示为本申请一示例性实施例提供的用于执行轨迹规划方法的无人机的框图。FIG. 6 shows a block diagram of an unmanned aerial vehicle for executing a trajectory planning method provided by an exemplary embodiment of the present application.

实施本发明的方式MODES OF IMPLEMENTING THE INVENTION

下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all structures related to the present invention.

图1a是本发明一实施例提供的轨迹规划方法流程图,所述方法可以由一种轨迹规划装置来执行,所述装置可以由软件和/或硬件来实现,所述装置可以配置在轨迹规划器中,所述轨迹规划器可以配置在无人机上。其中,无人机可以为植保无人机、测绘无人机、无人车或无人船,可选的,本发明实施例提供的方法可以应用于无人机作业的场景中。Fig. 1a is a flowchart of a trajectory planning method provided by an embodiment of the present invention. The method can be executed by a trajectory planning device, and the device can be implemented by software and/or hardware. The device can be configured in trajectory planning In the UAV, the trajectory planner can be configured on the UAV. The drone may be a plant protection drone, a surveying and mapping drone, an unmanned vehicle, or an unmanned boat. Optionally, the method provided by the embodiment of the present invention may be applied to a drone operation scenario.

如图1a所示,本发明实施例提供的技术方案包括:As shown in Figure 1a, the technical solution provided by the embodiment of the present invention includes:

S110:确定作业路线的全局轨迹点。S110: Determine the global trajectory point of the operation route.

在本发明实施例中,可以先进行全局轨迹规划,规划出一条包含所有路线点的全局轨迹,初步确定无人机在每一个时刻的位置和速度。然后再进行局部轨迹规划,在局部轨迹规划过程中,轨迹规划器使用已经规划好的全局轨迹作为基础,再结合传感器获取到的障碍物信息,进行小范围,小时间尺度的轨迹规划。需要说明的是,所述作业路线可以为飞机的飞行航线,也可以为车辆或船的行走路线。In this embodiment of the present invention, global trajectory planning can be performed first, a global trajectory including all route points can be planned, and the position and speed of the UAV at each moment can be preliminarily determined. Then, local trajectory planning is carried out. In the process of local trajectory planning, the trajectory planner uses the planned global trajectory as the basis, and combines the obstacle information obtained by the sensor to perform small-scale and small-scale trajectory planning. It should be noted that the operation route may be a flight route of an aircraft, or a travel route of a vehicle or a ship.

在本发明实施例中,作业路线可以由若干个路线点组成,无人机在作业过程中,需要经过这些路线点。其中,路线点可以包含位置信息以及速度信息等,其中,路线点的速度可以理解为无人机在路线点时的速度。例如,如图1b所示的作业路线中有六个路线点。In the embodiment of the present invention, the operation route may be composed of several route points, and the drone needs to pass through these route points during the operation. Wherein, the route point may include position information and speed information, etc., wherein, the speed of the route point may be understood as the speed of the drone at the route point. For example, there are six route points in the work route shown in Figure 1b.

在本发明实施例中,在无人机起飞前,或者无人机已经起飞但还未开始作业前,轨迹规划器可以预先获取作业路线的所有数据,包括路线点的数量,每个路线点的坐标,每个路线点的最高速度等,轨迹规划器可以基于作业路线的数据、障碍物地图等进行全局轨迹规划。其中,障碍物地图可以记录地理上无人机无法通行的区域和障碍物。其中,路线点形成的作业路线可以是如图1b所示的往返作业路线,还可以如图1c所示的曲线形式。其中,作业路线的形式并不局限于上述的形式,也可以是存在高度变化的3D作业路线的形式。In this embodiment of the present invention, before the drone takes off, or before the drone has taken off but has not started the operation, the trajectory planner can obtain all the data of the operation route in advance, including the number of route points, the Coordinates, the maximum speed of each route point, etc., the trajectory planner can perform global trajectory planning based on the data of the operation route, obstacle maps, etc. Among them, the obstacle map can record geographically inaccessible areas and obstacles for drones. Wherein, the operation route formed by the route points may be a round-trip operation route as shown in FIG. 1b, and may also be in the form of a curve as shown in FIG. 1c. However, the form of the work route is not limited to the above-mentioned form, and may be a form of a 3D work route with a high degree of variation.

为了简化说明,可以假设一条作业路线的路线点数量为3个,作业路线的示意图可以参考图1d,且以无人机水平飞行为例。如图1d所示,在全局轨迹规划过程中,需要进行速度分配,即无人机由路线点1出发(出发时t=0),经过路线点2,最后到达路线点3,需要确定总共花费的总时间T,在t∈(0,T)区间内,需要确定各个时刻无人机的位置和速度。为了进行速度分配(各个时刻的速度分配),需要设定无人机在经过每个路线点时的速度。相关技术中,无人机在基于作业路线飞行时,是把无人机在经过每个路线点时的速度设为0m/s。因此,无 人机在到达每个路线点时均需要停下来,再出发飞往下一个路线点,这样会影响作业效率。In order to simplify the description, it can be assumed that the number of route points of an operation route is 3, the schematic diagram of the operation route can be referred to Fig. 1d, and the horizontal flight of the drone is taken as an example. As shown in Figure 1d, in the process of global trajectory planning, speed allocation needs to be performed, that is, the UAV starts from route point 1 (t=0 at departure), passes through route point 2, and finally arrives at route point 3. It is necessary to determine the total cost The total time T of , in the interval t ∈ (0, T), the position and speed of the UAV need to be determined at each moment. For speed distribution (speed distribution at each moment), it is necessary to set the speed of the drone as it passes each route point. In the related art, when the UAV is flying based on the operation route, the speed of the UAV when passing through each route point is set to 0 m/s. Therefore, the drone needs to stop at each route point and then depart to the next route point, which affects the efficiency of the operation.

本发明实施例中,为了提高作业效率,可以约束无人机经过路线点时的速度不为0,进而使无人机的运动更加连贯,最终确定全局轨迹点。In the embodiment of the present invention, in order to improve the operation efficiency, the speed of the drone when passing the route point can be restricted from being 0, so that the movement of the drone is more coherent, and the global trajectory point is finally determined.

在本发明实施例的一个实施方式中,可选的,确定作业路线的全局轨迹点,包括:基于作业路线中路线点的约束条件确定每个路线点允许的最大速度,并将最大速度作为对应路线点的速度;基于每相邻两个路线点的速度和位置,确定每相邻两个路线点之间的路段内任意时刻的位置和速度,并对每个路段进行位置采样,得到全局轨迹点。In an implementation of the embodiment of the present invention, optionally, determining the global trajectory points of the operation route includes: determining the maximum speed allowed for each route point based on the constraint conditions of the route points in the operation route, and using the maximum speed as the corresponding The speed of the route point; based on the speed and position of each two adjacent route points, determine the position and speed at any time in the road segment between each two adjacent route points, and sample the location of each road segment to obtain the global trajectory point.

其中,可选的,基于作业路线中路线点的约束条件确定每个路线点允许的最大速度,包括:确定满足如下条件的速度中的最大值作为最大速度(路线点的速度满足如下条件):Wherein, optionally, determining the maximum allowable speed of each route point based on the constraints of the route points in the operation route includes: determining the maximum speed among the speeds satisfying the following conditions as the maximum speed (the speed of the route points satisfies the following conditions):

每个路线点的速度小于或者等于作业允许的最大速度;The speed at each route point is less than or equal to the maximum speed allowed for the job;

第一个路线点和最后一个路线点的速度为0;The speed of the first route point and the last route point is 0;

针对一个路线点的速度,满足从前一个路线点的速度开始,以无人机允许的最大加速度全程加速达到,或者以无人机允许的最大加速度全程减速达到;For the speed of a route point, it should start from the speed of the previous route point and reach the full acceleration at the maximum acceleration allowed by the drone, or decelerate at the maximum acceleration allowed by the drone;

针对一个路线点的速度,满足以无人机允许的最大加速度全程减速达到下一个路线点的速度,或者满足以无人机允许的最大加速度全程加速达到下一个路线点的速度;For the speed of a route point, it can decelerate to the next route point with the maximum acceleration allowed by the drone, or accelerate to the next route point with the maximum acceleration allowed by the drone;

路线点的前向速度基于转角大小进行确定。The forward speed of the waypoint is determined based on the size of the corner.

通过上述的约束条件对路线点的速度进行约束,取满足上述约束条件的速度中的最大值为路线点的速度,可以提高作业效率。The speed of the route point is constrained by the above constraint conditions, and the maximum value of the speeds satisfying the above constraint conditions is taken as the speed of the route point, which can improve the work efficiency.

在本发明实施例中,可选的,路线点的前向速度基于转角大小进行确定,包括:基于如下公式确定路线点的前向速度:In the embodiment of the present invention, optionally, the forward speed of the route point is determined based on the size of the turning angle, including: determining the forward speed of the route point based on the following formula:

Figure PCTCN2021137486-appb-000001
Figure PCTCN2021137486-appb-000001

其中,v x为无人机的前向速度,θ为转角大小,a 0为无人机的加速度,d为无人机减速时与路线点的距离。 Among them, vx is the forward speed of the UAV, θ is the size of the turning angle, a 0 is the acceleration of the UAV, and d is the distance from the route point when the UAV decelerates.

具体的,以图1d所示的情况为例,如果向量a和向量b同向,则无人机如同飞经一条直线,无人机不应在路线点2停下,则根据转角大小确定路线点的速度的约束条件不会起到约束作用。如果向量a和向量b反向,需要将路线点2的速度限制为0,因为,此时无人机的速度需要180°转向。在向量a和向量b之间存在夹角的情况下,可以无需考虑三个路线点的位置分布,可以将其形成的夹角摆正,如图1e所示,前后两个路段形成夹角大小为θ的角,即转角大小为θ。此时无人机沿着形成角的左边飞行,速度可以分解为v x和v y两个方向垂直的速度。在无人机到达顶点的时候,v y应该减为零,而v x在无人机飞向顶点以及从顶点远离的整个过程中保持不变。假设无人机在距离顶点距离d的时候开始减速,经过顶点之 后再进行加速。由于在顶点处y方向速度v y为0,那么,x方向的速度v x就是经过该顶点允许的速度。需要说明的是,在整个过程的轨迹实际是一条抛物线而不是图1e所示的轨迹,但是在d较小的情况下可以认为是图1e所示的轨迹。 Specifically, taking the situation shown in Figure 1d as an example, if the vector a and the vector b are in the same direction, the UAV seems to be flying through a straight line, and the UAV should not stop at route point 2, and the route is determined according to the size of the corner. Constraints on the velocity of the point do not act as constraints. If the vector a and the vector b are reversed, the speed of the route point 2 needs to be limited to 0, because the speed of the drone needs to be turned 180° at this time. In the case of an included angle between vector a and vector b, it is not necessary to consider the position distribution of the three route points, and the angle formed by them can be squared, as shown in Figure 1e, the angle formed by the front and rear sections is the angle of θ, that is, the size of the rotation angle is θ. At this time, the drone flies along the left side of the angle, and the speed can be decomposed into the vertical speed of v x and v y . By the time the drone reaches the vertex, v y should decrease to zero, while v x remains constant throughout the drone's flight to and away from the vertex. Suppose the drone starts to decelerate when it is a distance d from the vertex, and then accelerates after passing the vertex. Since the velocity v y in the y direction at the vertex is 0, then the velocity v x in the x direction is the velocity allowed to pass through the vertex. It should be noted that the trajectory of the whole process is actually a parabola instead of the trajectory shown in Figure 1e, but it can be considered as the trajectory shown in Figure 1e when d is small.

其中,假设无人机的加速度为a 0,假设y方向的速度由v y减速至0m/s所需时间为t,t也是x方向无人机飞行一半d x所需时间。v x可由以下式子求得: Among them, it is assumed that the acceleration of the drone is a 0 , and the time required for the speed in the y direction to decelerate from v y to 0m/s is t, and t is also the time required for the drone to fly half d x in the x direction. vx can be obtained by the following formula:

Figure PCTCN2021137486-appb-000002
Figure PCTCN2021137486-appb-000002

Figure PCTCN2021137486-appb-000003
Figure PCTCN2021137486-appb-000003

由以上两个公式可得From the above two formulas, we can get

Figure PCTCN2021137486-appb-000004
Figure PCTCN2021137486-appb-000004

在本发明实施例中,通过上述的方法对每个路线点的速度进行约束后,得到符合上述约束条件的最大速度,并将最大速度作为对应路线点的速度。可以通过梯形速度分配的方法或者Double S速度分配器对每两个相邻的路线点之间的路段进行直线轨迹规划。即针对相邻两个路线点形成的路段,通过该两个路线点的位置和速度,可以计算飞行该路段所需要的时间,从而可以计算无人机在该路段内任意时刻的位置以及速度,并对无人机的位置按照时间间隔T s进行位置采样,得到全局轨迹点。其中,全局轨迹点的示意图可以参考图1f,全局轨迹点包含了各个轨迹点的位置、速度以及对应的时间信息。如图1f所示,每个轨迹点对应的时间间隔都是T s,因此,前后距离近的轨迹点表示速度小,距离大的轨迹点表示速度大。如图1f所示,无人机从左下角的起点开始加速,开始时轨迹点比较密集,速度较小,到达第一个路段中间时,轨迹点比较稀疏,速度较大;随后无人机减速到达顶点,经过顶点后再次加速,将要抵达右下方的终点时减速,最终停下。 In the embodiment of the present invention, after the speed of each route point is constrained by the above method, the maximum speed that meets the above constraint conditions is obtained, and the maximum speed is used as the speed of the corresponding route point. The straight-line trajectory planning can be performed on the road segment between every two adjacent route points by the method of trapezoidal speed distribution or the Double S speed distributor. That is, for the road segment formed by two adjacent route points, through the position and speed of the two route points, the time required to fly the road segment can be calculated, so that the position and speed of the UAV at any time in the road segment can be calculated, The position of the UAV is sampled according to the time interval T s , and the global trajectory point is obtained. The schematic diagram of the global trajectory point can refer to Fig. 1f, the global trajectory point includes the position, speed and corresponding time information of each trajectory point. As shown in Figure 1f, the time interval corresponding to each trajectory point is T s , therefore, the trajectory points with short distances before and after indicate low velocity, and the trajectory points with large distance indicate high velocity. As shown in Figure 1f, the UAV starts to accelerate from the starting point in the lower left corner. At the beginning, the trajectory points are relatively dense and the speed is small. When it reaches the middle of the first road segment, the trajectory points are relatively sparse and the speed is large; then the UAV decelerates. Reach the top, accelerate again after passing the top, slow down when it reaches the bottom right end point, and finally stop.

在本发明实施例的一个实施方式中,可选的,还可以基于作业路线中的路线点的位置信息以及障碍物地图中的信息规划全局轨迹,并对全局轨迹进行位置采样,得到全局轨迹点。需要说明的是,确定全局轨迹点的方式并不局限于上述的方式,还可以是其他方式。In one implementation of the embodiment of the present invention, optionally, a global trajectory may be planned based on the position information of the route points in the operation route and the information in the obstacle map, and the position sampling of the global trajectory may be performed to obtain the global trajectory points. . It should be noted that the manner of determining the global trajectory point is not limited to the above manner, and may also be other manners.

S120:将全局轨迹点的起点作为第一预设长度的起点。S120: Use the starting point of the global trajectory point as the starting point of the first preset length.

在本发明实施例中,可以通过全局轨迹点规划无碰撞且平滑的局部轨迹。In this embodiment of the present invention, a collision-free and smooth local trajectory can be planned by using global trajectory points.

具体的,可以先将全局轨迹点的起点作为第一预设长度的起点。其中,全局轨迹点的起点可以是全局轨迹点的开始的第一个轨迹点。其中,第一预设长度可以根据实际情况进行设定。Specifically, the starting point of the global trajectory point may be used as the starting point of the first preset length. Wherein, the starting point of the global trajectory point may be the first trajectory point at the beginning of the global trajectory point. The first preset length may be set according to actual conditions.

S130:在全局轨迹点中筛选第一预设长度所覆盖的轨迹点,基于筛选的轨迹点确定局部轨迹点,并基于局部轨迹点生成局部轨迹。S130: Screen the track points covered by the first preset length from the global track points, determine local track points based on the screened track points, and generate a local track based on the local track points.

在本发明实施例中,第一预设长度所覆盖的轨迹点可以包含全局轨迹中,与第一预设长度的起点对应的轨迹点、以及位于第一预设长度的起点之后、且与第一预设长度的起点之间的距离小于或等于第一预设长度的轨迹点。In this embodiment of the present invention, the trajectory points covered by the first preset length may include, in the global trajectory, the trajectory points corresponding to the starting point of the first preset length, and the trajectory points located after the starting point of the first preset length and being the same as the first preset length. The distance between the starting points of a preset length is less than or equal to the trajectory points of the first preset length.

在本发明实施例中,在第一预设长度所覆盖的轨迹点形成的轨迹上不存在障碍物的情况下,即在第一预设长度所覆盖的距离范围内不存在障碍物的情况下,可以将第一预设长度所覆盖的轨迹点作为局部轨迹点,并基于局部轨迹点生成局部轨迹。In this embodiment of the present invention, in the case where there is no obstacle on the trajectory formed by the trajectory points covered by the first preset length, that is, in the case where there is no obstacle within the distance range covered by the first preset length , the trajectory points covered by the first preset length can be used as local trajectory points, and the local trajectory can be generated based on the local trajectory points.

在本发明实施例中,在第一预设长度所覆盖的轨迹点形成的轨迹上存在障碍物的情况下,即在第一预设长度所覆盖的距离范围内存在障碍物的情况下,且障碍物与第一预设长度终点的距离大于第一预设距离,可以基于第一预设距离、用于避障的第二预设距离以及障碍物的信息确定避障轨迹点,并采用避障轨迹点替换对应的全局轨迹点中的轨迹点,将第一预设长度覆盖的轨迹点中未替换的轨迹点以及避障轨迹点作为局部轨迹点。其中,障碍物信息包括障碍物的大小以及位置信息,障碍物信息可以通过无人机上的传感器数据进行确定。第一预设距离以及第二预设距离可以预先设置,或者也可以根据无人机的当前速度进行确定。本部分内容详细可以参考下述实施例的介绍。In this embodiment of the present invention, in the case where there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, that is, in the case where there is an obstacle within the distance range covered by the first preset length, and The distance between the obstacle and the end point of the first preset length is greater than the first preset distance, and the obstacle avoidance trajectory point can be determined based on the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle, and use The obstacle track point replaces the track point in the corresponding global track point, and the unreplaced track point and the obstacle avoidance track point among the track points covered by the first preset length are used as the local track point. Among them, the obstacle information includes the size and position information of the obstacle, and the obstacle information can be determined by the sensor data on the UAV. The first preset distance and the second preset distance may be preset, or may also be determined according to the current speed of the drone. For details of the contents of this part, reference may be made to the introduction of the following embodiments.

在本发明实施例中,在第一预设长度所覆盖的轨迹点形成的轨迹上存在障碍物的情况下,即在第一预设长度所覆盖的距离范围内存在障碍物的情况下,且障碍物与第一预设长度终点的距离小于第一预设距离,可以在第一预设长度的基础上增加第三预设长度,得到第四预设长度,第四预设长度的终点与障碍物的距离大于第一预设距离。通过第一预设距离、用于避障的第二预设距离以及障碍物的信息确定避障轨迹点,并采用避障轨迹点替换对应的全局轨迹点中的轨迹点;将第四预设长度覆盖的轨迹点中未替换的轨迹点以及避障轨迹点作为局部轨迹点,并生成局部轨迹。本部分内容可以参考下述实施例的介绍。In this embodiment of the present invention, in the case where there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, that is, in the case where there is an obstacle within the distance range covered by the first preset length, and The distance between the obstacle and the end point of the first preset length is smaller than the first preset distance, and a third preset length can be added on the basis of the first preset length to obtain a fourth preset length, and the end point of the fourth preset length is the same as The distance of the obstacle is greater than the first preset distance. The obstacle avoidance trajectory point is determined according to the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle, and the obstacle avoidance trajectory point is used to replace the trajectory point in the corresponding global trajectory point; Unreplaced track points and obstacle avoidance track points in the track points covered by the length are used as local track points, and a local track is generated. The content of this part can refer to the introduction of the following embodiments.

S140:控制无人机基于局部轨迹运动第二预设长度的距离。S140: Control the drone to move a distance of a second preset length based on the local trajectory.

在本发明实施例的一个实施方式中,控制无人机基于局部轨迹运动第二预设长度的距离,包括:基于局部轨迹确定无人机的控制量;基于控制量控制无人机沿局部轨迹运动第二预设长度的距离。其中,控制量可以包括加速度以及飞行角度等信息。其中,局部轨迹的自变量可以为时间,可以基于局部轨迹确定任意时刻的速度,可以基于任意两个相邻时刻的速度计算加速度以及飞行角度等信息。本发明实施例通过确定局部轨迹,基于局部轨迹确定控制量,并基于控制量控制无人机沿局部轨迹进行运动,通过进行局部规划,可以集中规划无人机正在执行的一小段轨迹,而无需每次均处理较长的全局轨迹,减少数据的处理。In one implementation of the embodiment of the present invention, controlling the UAV to move a distance of a second preset length based on the local trajectory includes: determining a control amount of the UAV based on the local trajectory; controlling the UAV along the local trajectory based on the control amount Move a distance of a second preset length. Wherein, the control amount may include information such as acceleration and flight angle. The independent variable of the local trajectory can be time, the velocity at any time can be determined based on the local trajectory, and the acceleration and flight angle can be calculated based on the velocity at any two adjacent moments. In the embodiment of the present invention, the local trajectory is determined, the control amount is determined based on the local trajectory, and the UAV is controlled to move along the local trajectory based on the control amount. Longer global trajectories are processed each time, reducing data processing.

在本发明实施例中,第二预设长度小于第一预设长度,可选的,第二预设长度可以小于第一预设长度的一半,在其他示例中,第一预设长度和第二预设长度可以根据需要进行设置。In this embodiment of the present invention, the second preset length is less than the first preset length. Optionally, the second preset length may be less than half of the first preset length. In other examples, the first preset length and the first preset length Two preset lengths can be set as needed.

S150:确定全局轨迹点是否筛选完毕。S150: Determine whether the global trajectory points are screened.

若是,执行S160,若否,返回S170。If yes, execute S160, if not, return to S170.

S160:控制无人机沿局部轨迹继续运动至最后一个轨迹点。S160: Control the drone to continue to move along the local trajectory to the last trajectory point.

S170:将无人机当前位置的下一个轨迹点作为第一预设长度的起点,返回S130。S170: Take the next trajectory point of the current position of the drone as the starting point of the first preset length, and return to S130.

在本发明实施例中,若第一预设长度覆盖了全局轨迹点的最后一个轨迹点,则全局轨迹点筛选完毕,可以控制无人机沿最后一次生成的局部轨迹运动至最后一个轨迹点。若全局轨迹点没有筛选完毕,将无人机当前位置的下一个轨迹点作为第一预设长度的起点,返回S130。In this embodiment of the present invention, if the first preset length covers the last track point of the global track point, the global track point is screened, and the drone can be controlled to move to the last track point along the last generated local track. If the global trajectory point has not been screened, the next trajectory point of the current position of the drone is used as the starting point of the first preset length, and the process returns to S130.

其中,以在第一预设长度覆盖的轨迹点形成的轨迹上不存在障碍物的情况下,生成局部轨迹为例参考图示进行介绍。图1g中的轨迹点为全局轨迹点,“×”表征无人机的位置,如图1g所示,L min_for_execution为第一预设长度,即为生成局部轨迹的长度,L replan为第二预设长度,即飞过第二预设长度的距离后才会重新生成局部轨迹,如图1g所示,无人机处于全局轨迹点的起点,为了生成局部轨迹,需要在全局轨迹点中筛选轨迹点,所筛选的轨迹点连线的长度由L min_for_execution决定。其中,L min_for_execution越大,筛选的轨迹点越多。基于筛选的轨迹点生成局部轨迹,基于局部轨迹确定控制量,在无人机基于控制量沿局部轨迹移动L replan的距离后,需要重新进行局部规划。如图1h所示,在无人机基于控制量沿局部轨迹移动L replan的距离后,从无人机当前位置前方的下一个轨迹点开始筛选,筛选的轨迹点连线的长度满足L min_for_execution的长度后,再次生成局部轨迹以及控制量,基于控制量控制无人机沿局部轨迹移动L replan的距离后,返回从无人机当前位置前方的下一个轨迹点开始筛选,直至全局轨迹点筛选完毕。其中,在第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物的情况下,基于筛选的轨迹点确定局部轨迹点,并生成局部轨迹的方法可以参考下述实施例的介绍。 Wherein, in the case where there is no obstacle on the trajectory formed by the trajectory points covered by the first preset length, the generation of the local trajectory is taken as an example for introduction with reference to the drawings. The trajectory points in Figure 1g are global trajectory points, and "×" represents the position of the UAV. As shown in Figure 1g, L min_for_execution is the first preset length, that is, the length of the generated local trajectory, and L replan is the second preset length. Set the length, that is, after flying the distance of the second preset length, the local trajectory will be regenerated. As shown in Figure 1g, the UAV is at the starting point of the global trajectory point. In order to generate a local trajectory, it is necessary to filter the trajectory in the global trajectory point. The length of the line connecting the selected trajectory points is determined by L min_for_execution . Among them, the larger L min_for_execution is, the more trajectory points are screened. The local trajectory is generated based on the selected trajectory points, and the control quantity is determined based on the local trajectory. After the UAV moves the distance L replan along the local trajectory based on the control quantity, the local planning needs to be re-planned. As shown in Figure 1h, after the UAV moves the distance L replan along the local trajectory based on the control amount, the screening starts from the next trajectory point in front of the current position of the UAV, and the length of the line connecting the selected trajectory points satisfies the L min_for_execution After the length, the local trajectory and the control amount are generated again. After controlling the UAV to move the distance L replan along the local trajectory based on the control amount, it returns to the next trajectory point in front of the current position of the UAV to start screening until the global trajectory point is screened. . Wherein, when there are obstacles on the trajectory formed by the trajectory points covered by the first preset length, the local trajectory points are determined based on the screened trajectory points, and the method for generating the local trajectory can refer to the introduction of the following embodiments.

相关技术中,无人机在按照作业路线执行作业的过程中,到达一个路线点需要停下来再飞往下一个路线点,但是在按照诸如由梯田、不规则种植果树等作业场景生成的作业路线执行作业的过程中,频繁的刹停会影响作业效率,本发明实施例通过基于作业路线中路线点的约束条件确定每个路线点允许的最大速度,并将最大速度作为对应路线点的速度;基于每相邻两个路线点的速度和位置,对每相邻两个路线点之间的路段进行速度匹配,并基于分配的速度对每个路段进行位置采样,得到全局轨迹点,通过全局轨迹点进行局部规划,从而可以避免无人机频繁刹停的情况,提高作业效率。In the related art, in the process of performing operations according to the operation route, the drone needs to stop and then fly to the next route point when it reaches a route point. In the process of performing the operation, frequent braking will affect the operation efficiency. In the embodiment of the present invention, the maximum speed allowed for each route point is determined based on the constraint conditions of the route points in the operation route, and the maximum speed is used as the speed of the corresponding route point; Based on the speed and position of each two adjacent route points, speed matching is performed on the road segments between each two adjacent route points, and the position of each road segment is sampled based on the assigned speed to obtain global trajectory points. Local planning can be carried out at the point, so as to avoid the frequent braking of the drone and improve the operation efficiency.

但是相关技术中,在无人机基于规划的路径轨迹进行实际飞行过程中,若遇到障碍物,无人机并不能很好的避障,影响无人机的安全。However, in the related art, during the actual flight of the UAV based on the planned path trajectory, if it encounters an obstacle, the UAV cannot avoid the obstacle well, which affects the safety of the UAV.

本发明实施例提供的技术方案,通过确定作业路线的全局轨迹点,将全局轨迹点的起点作为第一预设长度的起点,在全局轨迹点中筛选第一预设长度所覆盖的轨迹点,基于筛选的轨迹点确定局部轨迹点,并生成局部轨迹,控制无人机基于局部轨迹运动第二预设长度,将无人机当前位置的下一个轨迹点作为第一预设长度的起点,返回在全局轨迹点中筛选第一预设长度所覆盖的轨迹点的操作,直至全局轨迹点筛选完毕;其中,第二预设长度小于第一预设长度。即通过第一预设长度生成局部轨迹,控制无人机基于局部轨迹运动第二预设距 离,再重新基于第一预设长度生成局部轨迹,在遇到障碍物的情况下,可以及时进行避障处理,实现精准避障,保障无人机的安全。In the technical solution provided by the embodiment of the present invention, by determining the global trajectory point of the operation route, the starting point of the global trajectory point is used as the starting point of the first preset length, and the trajectory points covered by the first preset length are selected from the global trajectory points, Determine the local trajectory point based on the screened trajectory points, generate a local trajectory, control the UAV to move the second preset length based on the local trajectory, take the next trajectory point of the current position of the UAV as the starting point of the first preset length, and return to The operation of screening the trajectory points covered by the first preset length in the global trajectory points until the global trajectory point selection is completed; wherein, the second preset length is smaller than the first preset length. That is, the local trajectory is generated by the first preset length, the UAV is controlled to move the second preset distance based on the local trajectory, and then the local trajectory is regenerated based on the first preset length. In the case of encountering obstacles, it can be avoided in time. obstacle handling to achieve precise obstacle avoidance and ensure the safety of UAVs.

图2a是本发明另一实施例提供的轨迹规划方法流程图,在本实施例中,可选的,基于筛选的轨迹点确定局部轨迹点,包括:若第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且障碍物与第一预设长度的终点的距离大于用于避障的第一预设距离,基于第一预设距离、用于避障的第二预设距离以及障碍物的信息确定避障轨迹点,并采用避障轨迹点替换对应的全局轨迹点中的轨迹点;将第一预设长度覆盖的轨迹点中未替换的轨迹点以及避障轨迹点作为局部轨迹点。2a is a flowchart of a trajectory planning method provided by another embodiment of the present invention. In this embodiment, optionally, determining a local trajectory point based on the screened trajectory points includes: if the trajectory points covered by the first preset length form There is an obstacle on the trajectory of , and the distance between the obstacle and the end point of the first preset length is greater than the first preset distance for obstacle avoidance, based on the first preset distance, the second preset distance for obstacle avoidance and The obstacle avoidance trajectory point is determined by the information of the obstacle, and the obstacle avoidance trajectory point is used to replace the trajectory point in the corresponding global trajectory point; the unreplaced trajectory point and the obstacle avoidance trajectory point in the trajectory point covered by the first preset length are used as the local track point.

如图2a所示,本发明实施例提供的技术方案包括:As shown in Figure 2a, the technical solution provided by the embodiment of the present invention includes:

S210:确定作业路线的全局轨迹点。S210: Determine the global track point of the operation route.

S220:将全局轨迹点的起点作为第一预设长度的起点。S220: Use the starting point of the global trajectory point as the starting point of the first preset length.

S230:在全局轨迹点中筛选第一预设长度所覆盖的轨迹点。S230: Screen the track points covered by the first preset length from the global track points.

S240:若第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且障碍物与第一预设长度的终点的距离大于用于避障的第一预设距离,基于第一预设距离、用于避障的第二预设距离以及障碍物的信息确定避障轨迹点,并采用避障轨迹点替换对应的全局轨迹点中的轨迹点。S240: If there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is greater than the first preset distance for obstacle avoidance, based on the first preset The distance, the second preset distance for obstacle avoidance, and the information of the obstacle determine the obstacle avoidance trajectory point, and the obstacle avoidance trajectory point is used to replace the trajectory point in the corresponding global trajectory point.

在本发明实施例中,第一预设距离和第二预设距离可以根据需要进行设置,或者也可以基于无人机的当前速度进行确定。当无人机的当前速度较大时,第一预设距离和第二预设距离较大。In this embodiment of the present invention, the first preset distance and the second preset distance may be set as required, or may also be determined based on the current speed of the drone. When the current speed of the drone is larger, the first preset distance and the second preset distance are larger.

在本发明实施例中,在第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且障碍物与第一预设长度的终点的距离大于用于避障的第一预设距离的情况下,如图2b所示,第一预设长度L min_for_execution覆盖的轨迹点形成的轨迹上存在障碍物100,且障碍物100与第一预设长度的终点的距离较大(障碍物100位于L min_for_execution的中间位置),若无人机按照第一预设长度覆盖的轨迹点进行运动会撞上障碍物100。为了避障,可以基于第一预设距离、第二预设距离以及障碍物的信息确定避障轨迹点,如图2b所示,空心圆点可以是避障轨迹点,可以将避障轨迹点替换对应的全局轨迹点中的轨迹点(第一预设长度所覆盖的轨迹点中的部分轨迹点)。 In this embodiment of the present invention, there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is greater than the first preset distance used for obstacle avoidance In this case, as shown in FIG. 2b, there is an obstacle 100 on the trajectory formed by the trajectory points covered by the first preset length L min_for_execution , and the distance between the obstacle 100 and the end point of the first preset length is relatively large (the obstacle 100 is located at the end point of the first preset length). The middle position of L min_for_execution ), if the drone moves according to the trajectory point covered by the first preset length, it will hit the obstacle 100. In order to avoid obstacles, the obstacle avoidance trajectory points can be determined based on the first preset distance, the second preset distance and the information of the obstacles. As shown in Fig. 2b, the hollow circle points can be the obstacle avoidance trajectory points, and the obstacle avoidance trajectory points can be Replace the track points in the corresponding global track points (part of track points in the track points covered by the first preset length).

在本发明实施例的一个实施方式中,可选的,基于第一预设距离、用于避障的第二预设距离以及障碍物的信息确定避障轨迹点,并采用避障轨迹点替换对应的全局轨迹点中的轨迹点,包括:在全局轨迹点中,确定在障碍物之后第一预设距离处的位置对应的第一轨迹点和在障碍物之前第二预设距离处的位置对应的第二轨迹点;基于第一轨迹点的信息、第二轨迹点的信息以及障碍物的信息确定避障轨迹点;将在全局轨迹点中处于第二轨迹点和第一轨迹点之间的轨迹点替换为避障轨迹点。In one implementation of the embodiment of the present invention, optionally, the obstacle avoidance trajectory point is determined based on the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle, and the obstacle avoidance trajectory point is replaced by the obstacle avoidance trajectory point. The trajectory points in the corresponding global trajectory points include: in the global trajectory points, determining the first trajectory point corresponding to the position at the first preset distance behind the obstacle and the position at the second preset distance before the obstacle The corresponding second trajectory point; the obstacle avoidance trajectory point is determined based on the information of the first trajectory point, the information of the second trajectory point and the information of the obstacle; it will be located between the second trajectory point and the first trajectory point in the global trajectory point The trajectory points of are replaced with obstacle avoidance trajectory points.

其中,第一轨迹点的信息包括第一轨迹点的速度和位置,第二轨迹点的信息包括第二轨迹点的位置和速度。其中,第一轨迹点可以是在障碍物之后的第一预设距离的位置处的轨迹点,或者在障碍物之后的第一预设距离的位置处的后一个轨迹点。第二轨迹点可以是在障碍物之前的第二预设距离的位置处的轨迹点,或者也可以是在障碍物之前的第二预设距离的位置处的前一个轨迹点。其中,可以 采用Hybrid A*算法或者其他相关算法基于第一轨迹点的信息、第二轨迹点的信息以及障碍物的信息确定避障轨迹点(其中,包含确定避障轨迹点的位置以及速度)。在确定避障轨迹点的过程中,通过考虑第一轨迹点和第二轨迹点的速度,生成的避障轨迹和原来的轨迹在速度上是平滑的,提高作业效率。如图2b所示,第一轨迹点可以是轨迹点10,第二轨迹点可以是轨迹点20,可以采用避障轨迹点将轨迹点10和轨迹点20之间的轨迹点(可包含轨迹10和轨迹点20)进行替换,从而将轨迹点10和轨迹点20之间的轨迹点进行删除。The information of the first track point includes the speed and position of the first track point, and the information of the second track point includes the position and speed of the second track point. Wherein, the first trajectory point may be a trajectory point at a position of a first preset distance behind the obstacle, or a subsequent trajectory point at a position of the first preset distance behind the obstacle. The second trajectory point may be a trajectory point at a position at a second preset distance before the obstacle, or may also be a previous trajectory point at a position at a second preset distance before the obstacle. Among them, the Hybrid A* algorithm or other related algorithms can be used to determine the obstacle avoidance trajectory point based on the information of the first trajectory point, the information of the second trajectory point and the information of the obstacle (including determining the position and speed of the obstacle avoidance trajectory point) . In the process of determining the obstacle avoidance trajectory point, by considering the speed of the first trajectory point and the second trajectory point, the generated obstacle avoidance trajectory and the original trajectory are smooth in speed, and the operation efficiency is improved. As shown in FIG. 2b, the first trajectory point may be the trajectory point 10, the second trajectory point may be the trajectory point 20, and the obstacle avoidance trajectory point may be used to separate the trajectory point (which may include the trajectory 10) between the trajectory point 10 and the trajectory point 20. and track point 20) to replace the track point between track point 10 and track point 20.

S250:将第一预设长度覆盖的轨迹点中未替换的轨迹点以及避障轨迹点作为局部轨迹点,并基于局部轨迹点生成局部轨迹。S250: Use unreplaced track points and obstacle avoidance track points in the track points covered by the first preset length as local track points, and generate a local track based on the local track points.

在本发明实施例中,如图2b所示,轨迹点10之后的轨迹点以及轨迹点20之前的轨迹点为第一预设长度覆盖的轨迹点中未替换的轨迹点,将未替换的轨迹点以及避障轨迹点作为局部轨迹点,并基于局部轨迹点生成局部轨迹,可以基于局部轨迹生成控制量,从而控制无人机基于控制量沿局部轨迹进行运动。In this embodiment of the present invention, as shown in FIG. 2b , the track points after the track point 10 and the track points before the track point 20 are the track points that are not replaced in the track points covered by the first preset length, and the unreplaced track points are Points and obstacle avoidance trajectory points are used as local trajectory points, and a local trajectory is generated based on the local trajectory points, and a control amount can be generated based on the local trajectory, so that the UAV can be controlled to move along the local trajectory based on the control amount.

S260:控制无人机基于局部轨迹运动第二预设长度的距离。S260: Control the UAV to move a distance of a second preset length based on the local trajectory.

S270:确定全局轨迹点是否筛选完毕。S270: Determine whether the global trajectory points are screened.

若是,执行S280,若否,返回S290。If yes, execute S280, if not, return to S290.

S280:控制无人机沿局部轨迹继续运动至最后一个轨迹点。S280: Control the UAV to continue to move along the local trajectory to the last trajectory point.

S290:将无人机当前位置的下一个轨迹点作为第一预设长度的起点,返回S230。S290: Take the next trajectory point of the current position of the drone as the starting point of the first preset length, and return to S230.

在本发明实施例中,无人机基于局部轨迹运动第二预设长度的距离,将无人机当前位置的下一个轨迹点作为第一预设长度的起点,需要按照上述局部轨迹生成的方法重新生成局部轨迹,则上次生成的局部轨迹中包含无人机还没有到达的轨迹点,则无人机还没有到达的轨迹点(可能包含避障轨迹点)成为全局轨迹点中的一部分,返回在全局轨迹点中筛选第一预设长度所覆盖的轨迹点的操作,直至全局轨迹点筛选完毕。In the embodiment of the present invention, the UAV moves a distance of the second preset length based on the local trajectory, and uses the next trajectory point of the current position of the UAV as the starting point of the first preset length. If the local trajectory is regenerated, the last generated local trajectory contains the trajectory points that the UAV has not yet reached, and the trajectory points that the UAV has not reached (may include obstacle avoidance trajectory points) become part of the global trajectory points. Return to the operation of screening the global track points covered by the first preset length until the global track points are screened.

由此,通过在全局轨迹点中筛选第一预设长度所覆盖的轨迹点,若第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且障碍物与第一预设长度的终点的距离大于用于避障的第一预设距离,通过基于第一预设距离、用于避障的第二预设距离以及障碍物的信息确定避障轨迹点,并采用避障轨迹点替换对应的全局轨迹点中的轨迹点;将第一预设长度覆盖的轨迹点中未替换的轨迹点以及避障轨迹点作为局部轨迹点,可以及时对障碍物进行处理,精准避障。Therefore, by screening the trajectory points covered by the first preset length in the global trajectory points, if there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the obstacle is connected to the end point of the first preset length distance is greater than the first preset distance for obstacle avoidance, determine the obstacle avoidance trajectory point based on the first preset distance, the second preset distance for obstacle avoidance and the information of the obstacle, and use the obstacle avoidance trajectory point to replace The corresponding trajectory points in the global trajectory points; the unreplaced trajectory points and the obstacle avoidance trajectory points in the trajectory points covered by the first preset length are used as the local trajectory points, so that the obstacles can be processed in time and the obstacles can be avoided accurately.

图3a是本发明另一实施例提供的轨迹规划方法流程图,在本实施例中,可选的,基于筛选的轨迹点确定局部轨迹点,包括:若第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且障碍物与第一预设长度的终点的距离小于用于避障的第一预设距离,在第一预设长度的基础上增加第三预设长度,得到第四预设长度;其中,第四预设长度的终点与障碍物的距离大于第一预设距离;基于第一预设距离、用于避障的第二预设距离以及障碍物的信息确定避障轨迹点,并采用避障轨迹点替换对应的全局轨迹点中的轨迹点;将第四预设长度覆盖的轨迹点中未替换的轨迹点以及避障轨迹点作为局部轨迹点。3a is a flowchart of a trajectory planning method provided by another embodiment of the present invention. In this embodiment, optionally, determining a local trajectory point based on the screened trajectory points includes: if the trajectory points covered by the first preset length form There are obstacles on the trajectory of Four preset lengths; wherein, the distance between the end point of the fourth preset length and the obstacle is greater than the first preset distance; the avoidance is determined based on the first preset distance, the second preset distance for obstacle avoidance and the information of the obstacle The obstacle avoidance track point is used to replace the track point in the corresponding global track point; the unreplaced track point and the obstacle avoidance track point in the track point covered by the fourth preset length are used as the local track point.

如图3a所示,本发明实施例提供的技术方案包括:As shown in Figure 3a, the technical solution provided by the embodiment of the present invention includes:

S310:确定作业路线的全局轨迹点。S310: Determine the global track point of the operation route.

S320:将全局轨迹点的起点作为第一预设长度的起点。S320: Use the starting point of the global trajectory point as the starting point of the first preset length.

S330:在全局轨迹点中筛选第一预设长度所覆盖的轨迹点。S330: Screen the track points covered by the first preset length from the global track points.

S340:若第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且障碍物与第一预设长度的终点的距离小于用于避障的第一预设距离,在第一预设长度的基础上增加第三预设长度,得到第四预设长度;其中,第四预设长度的终点与障碍物的距离大于第一预设距离。S340: If there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is less than the first preset distance for obstacle avoidance, the first preset On the basis of the length, a third preset length is added to obtain a fourth preset length; wherein, the distance between the end point of the fourth preset length and the obstacle is greater than the first preset distance.

在本发明实施例中,在第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且障碍物与第一预设长度的终点的距离小于用于避障的第一预设距离的情况下,如图3b所示,第一预设长度L min_for_execution覆盖的轨迹点形成的轨迹上存在障碍物100,且障碍物100与第一预设长度的终点的距离较小(障碍物100靠近第一预设长度的终点),障碍物100之后的轨迹点不足以支持无人机回归到原来的轨迹点上,所以需要沿着全局轨迹点继续筛选轨迹点。如图3c所示,可以在第一预设长度的基础上增加第三预设长度L clear,得到第四预设长度。其中,第四预设长度的终点到障碍物100的距离大于第一预设距离,从而可以使无人机回归到原来的轨迹点上,在精准避障的同时又可以回归。其中,图3b和图3c中,空心圆点表示避障轨迹点,实心圆点表示全局轨迹点中的轨迹点,也可以称为原始的轨迹点。 In this embodiment of the present invention, an obstacle exists on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is smaller than the first preset distance used for obstacle avoidance In this case, as shown in FIG. 3b, there is an obstacle 100 on the trajectory formed by the trajectory points covered by the first preset length L min_for_execution , and the distance between the obstacle 100 and the end point of the first preset length is small (the obstacle 100 is close to The end point of the first preset length), the trajectory point after the obstacle 100 is not enough to support the UAV to return to the original trajectory point, so it is necessary to continue to filter the trajectory points along the global trajectory point. As shown in FIG. 3c, a third preset length L clear may be added to the first preset length to obtain a fourth preset length. Wherein, the distance from the end point of the fourth preset length to the obstacle 100 is greater than the first preset distance, so that the UAV can return to the original trajectory point, and can return while accurately avoiding obstacles. Among them, in Figures 3b and 3c, the hollow circles represent the obstacle avoidance trajectory points, and the solid circles represent the trajectory points in the global trajectory points, which may also be referred to as the original trajectory points.

需要说明的是,由于传感器可以将较远处的障碍物识别出来,进行提前避障,所以障碍物不可能出现在靠近第一预设长度起点的位置。It should be noted that, since the sensor can identify the distant obstacle and avoid the obstacle in advance, it is impossible for the obstacle to appear at a position close to the starting point of the first preset length.

S350:基于第一预设距离、用于避障的第二预设距离以及障碍物的信息确定避障轨迹点,并采用避障轨迹点替换对应的全局轨迹点中的轨迹点。S350: Determine an obstacle avoidance trajectory point based on the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle, and replace the trajectory point in the corresponding global trajectory point with the obstacle avoidance trajectory point.

在本发明实施例的一个实施方式中,可选的,基于第一预设距离、用于避障的第二预设距离以及障碍物的信息确定避障轨迹点,并采用避障轨迹点替换对应的全局轨迹点中的轨迹点,包括:在全局轨迹点中,确定在障碍物之后第一预设距离处的位置对应的第一轨迹点和在障碍物之前第二预设距离处的位置对应的第二轨迹点;基于第一轨迹点的信息、第二轨迹点的信息以及障碍物的信息确定避障轨迹点;将在全局轨迹点中处于第二轨迹点和第一轨迹点之间的轨迹点替换为避障轨迹点。其中,具体可以参考上述实施例的介绍。In one implementation of the embodiment of the present invention, optionally, the obstacle avoidance trajectory point is determined based on the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle, and the obstacle avoidance trajectory point is replaced by the obstacle avoidance trajectory point. The trajectory points in the corresponding global trajectory points include: in the global trajectory points, determining the first trajectory point corresponding to the position at the first preset distance behind the obstacle and the position at the second preset distance before the obstacle The corresponding second trajectory point; the obstacle avoidance trajectory point is determined based on the information of the first trajectory point, the information of the second trajectory point and the information of the obstacle; it will be located between the second trajectory point and the first trajectory point in the global trajectory point The trajectory points of are replaced with obstacle avoidance trajectory points. For details, reference may be made to the description of the foregoing embodiments.

S360:将第四预设长度覆盖的轨迹点中未替换的轨迹点以及避障轨迹点作为局部轨迹点,并基于局部轨迹点生成局部轨迹。S360: Use unreplaced track points and obstacle avoidance track points in the track points covered by the fourth preset length as local track points, and generate a local track based on the local track points.

在本发明实施例中,如图3c所示,轨迹点30之后的轨迹点和轨迹点40之前的轨迹点为第四预设长度覆盖的轨迹点中未替换的轨迹点,将未替换的轨迹点以及避障轨迹点作为局部轨迹点;其中,基于局部轨迹点生成局部轨迹的介绍可以参考上述实施例。In the embodiment of the present invention, as shown in FIG. 3c , the track points after the track point 30 and the track points before the track point 40 are the track points that are not replaced in the track points covered by the fourth preset length, and the unreplaced track points are Points and obstacle avoidance trajectory points are used as local trajectory points; wherein, for the introduction of generating local trajectories based on local trajectory points, reference may be made to the foregoing embodiments.

S370:控制无人机基于局部轨迹运动第二预设长度的距离。S370: Control the UAV to move a distance of a second preset length based on the local trajectory.

S380:确定全局轨迹点是否筛选完毕。S380: Determine whether the global trajectory points are screened.

若是,执行S390,若否,返回S391。If yes, execute S390, if not, return to S391.

S390:控制无人机沿局部轨迹继续运动至最后一个轨迹点。S390: Control the UAV to continue to move along the local trajectory to the last trajectory point.

S391:将无人机当前位置的下一个轨迹点作为所述第一预设长度的起点,返回S330。S391: Use the next trajectory point of the current position of the drone as the starting point of the first preset length, and return to S330.

由此,在第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且障碍物与第一预设长度的终点的距离小于用于避障的第一预设距离的情况下,通过在第一预设长度的基础上增加第三预设长度,得到第四预设长度,将第四预设长度覆盖的轨迹点中未替换的轨迹点以及避障轨迹点作为局部轨迹点,生成局部轨迹,可以避免避障轨迹生成不完整的情况,并实现精准避障的同时又可以使无人机回归到全局轨迹上。Therefore, when there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is less than the first preset distance used for obstacle avoidance, pass On the basis of the first preset length, a third preset length is added to obtain a fourth preset length, and the unreplaced track points and obstacle avoidance track points in the track points covered by the fourth preset length are used as local track points to generate Local trajectory can avoid incomplete obstacle avoidance trajectory generation, and achieve accurate obstacle avoidance while allowing the UAV to return to the global trajectory.

需要说明的是,无人机在正常情况下沿着全局轨迹点运动,当障碍物出现在全局轨迹上时(其实是出现在局部轨迹上时,在大部分情况下此二者基本等同),无人机需要离开原来的轨迹避开障碍物,然后再回到原来的轨迹上。相关技术中,需要将无人机停下来,或者飞控将无人机减速到某个速度再由控制器控制无人机避障,其中,相关技术中的两种方式使得无人机在运动过程中并不稳定,并且后者控制权发生变化也容易导致无人机的运动并不稳定。本发明实施例提供的技术方案,可以由轨迹规划器执行,避免了控制权的频繁交换,增加了规划的一体性,保证无人机的运动的稳定性。另外,本发明提供的轨迹规划器还可以进行3D作业路线的执行。It should be noted that the UAV moves along the global trajectory point under normal circumstances. When the obstacle appears on the global trajectory (in fact, it appears on the local trajectory, the two are basically equivalent in most cases), The drone needs to leave the original trajectory to avoid obstacles, and then return to the original trajectory. In the related art, the UAV needs to be stopped, or the flight controller decelerates the UAV to a certain speed and then the controller controls the UAV to avoid obstacles. Among them, two methods in the related art make the UAV move. The process is not stable, and the change of control of the latter can easily cause the movement of the drone to be unstable. The technical solutions provided by the embodiments of the present invention can be executed by a trajectory planner, which avoids frequent exchange of control rights, increases the integration of planning, and ensures the stability of the movement of the UAV. In addition, the trajectory planner provided by the present invention can also perform the execution of the 3D operation route.

图4是本发明实施例提供的一种轨迹规划装置结构框图,如图4所示,本发明实施例提供的装置包括:全局轨迹点确定模块410、起点确定模块420、局部轨迹生成模块430和控制/返回模块440。FIG. 4 is a structural block diagram of a trajectory planning apparatus provided by an embodiment of the present invention. As shown in FIG. 4 , the apparatus provided by an embodiment of the present invention includes: a global trajectory point determination module 410, a starting point determination module 420, a local trajectory generation module 430 and Control/return to module 440.

其中,全局轨迹点确定模块410,用于确定作业路线的全局轨迹点;Wherein, the global trajectory point determination module 410 is used to determine the global trajectory point of the operation route;

起点确定模块420,用于将全局轨迹点的起点作为第一预设长度的起点;The starting point determination module 420 is configured to use the starting point of the global trajectory point as the starting point of the first preset length;

局部轨迹生成模块430,用于在全局轨迹点中筛选第一预设长度所覆盖的轨迹点,基于筛选的轨迹点确定局部轨迹点,并基于局部轨迹点生成局部轨迹;The local trajectory generation module 430 is used for screening the trajectory points covered by the first preset length in the global trajectory points, determining the local trajectory points based on the screened trajectory points, and generating the local trajectory based on the local trajectory points;

控制/返回模块440,用于控制无人机基于局部轨迹运动第二预设长度的距离,将无人机当前位置的下一个轨迹点作为第一预设长度的起点,返回在全局轨迹点中筛选第一预设长度所覆盖的轨迹点的操作,直至全局轨迹点筛选完毕,其中,第一预设长度大于第二预设长度。The control/return module 440 is used to control the UAV to move the distance of the second preset length based on the local trajectory, take the next trajectory point of the current position of the UAV as the starting point of the first preset length, and return to the global trajectory point The operation of screening the trajectory points covered by the first preset length until the global trajectory point screening is completed, wherein the first preset length is greater than the second preset length.

可选的,基于筛选的轨迹点确定局部轨迹点,包括:Optionally, determine local trajectory points based on the filtered trajectory points, including:

若第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且障碍物与第一预设长度的终点的距离大于用于避障的第一预设距离,基于第一预设距离、用于避障的第二预设距离以及障碍物的信息确定避障轨迹点,并采用避障轨迹点替换对应的全局轨迹点中的轨迹点;If there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is greater than the first preset distance for obstacle avoidance, based on the first preset distance, The second preset distance for obstacle avoidance and the information of the obstacle determine the obstacle avoidance trajectory point, and use the obstacle avoidance trajectory point to replace the trajectory point in the corresponding global trajectory point;

将第一预设长度覆盖的轨迹点中未替换的轨迹点以及避障轨迹点作为局部轨迹点。Unreplaced track points and obstacle avoidance track points in the track points covered by the first preset length are used as local track points.

可选的,基于筛选的轨迹点确定局部轨迹点,包括:Optionally, determine local trajectory points based on the filtered trajectory points, including:

若第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且障碍物与第一预设长度的终点的距离小于用于避障的第一预设距离,在第一预设长度的基础上增加第三预设长度,得到第四预设长度;其中,第四预设长度的终点与障碍物的距离大于第一预设距离;If there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is less than the first preset distance for obstacle avoidance, the On the basis, a third preset length is added to obtain a fourth preset length; wherein, the distance between the end point of the fourth preset length and the obstacle is greater than the first preset distance;

基于第一预设距离、用于避障的第二预设距离以及障碍物的信息确定避障轨迹点,并采用避障轨迹点替换对应的全局轨迹点中的轨迹点;Determine the obstacle avoidance trajectory point based on the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle, and replace the trajectory point in the corresponding global trajectory point with the obstacle avoidance trajectory point;

将第四预设长度覆盖的轨迹点中未替换的轨迹点以及避障轨迹点作为局部轨迹点。Unreplaced track points and obstacle avoidance track points in the track points covered by the fourth preset length are used as local track points.

可选的,基于第一预设距离、用于避障的第二预设距离以及障碍物的信息确定避障轨迹点,并采用避障轨迹点替换对应的全局轨迹点中的轨迹点,包括:Optionally, the obstacle avoidance trajectory point is determined based on the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle, and the obstacle avoidance trajectory point is used to replace the trajectory point in the corresponding global trajectory point, including: :

在全局轨迹点中,确定在障碍物之后第一预设距离处的位置对应的第一轨迹点和在障碍物之前第二预设距离处的位置对应的第二轨迹点;In the global trajectory point, a first trajectory point corresponding to a position at a first preset distance behind the obstacle and a second trajectory point corresponding to a position at a second preset distance before the obstacle are determined;

基于第一轨迹点的信息、第二轨迹点的信息以及障碍物的信息确定避障轨迹点;Determine the obstacle avoidance trajectory point based on the information of the first trajectory point, the information of the second trajectory point and the information of the obstacle;

将在全局轨迹点中处于第二轨迹点和第一轨迹点之间的轨迹点替换为避障轨迹点。Replace the trajectory points between the second trajectory point and the first trajectory point in the global trajectory points with obstacle avoidance trajectory points.

可选的,基于筛选的轨迹点确定局部轨迹点,包括:Optionally, determine local trajectory points based on the filtered trajectory points, including:

若第一预设长度覆盖的轨迹点形成的轨迹上不存在障碍物,将筛选的轨迹点作为局部轨迹点。If there is no obstacle on the trajectory formed by the trajectory points covered by the first preset length, the selected trajectory points are used as local trajectory points.

可选的,确定作业路线的全局轨迹点,包括:Optionally, determine the global trajectory points of the operation route, including:

基于作业路线中路线点的约束条件确定每个路线点允许的最大速度,并将最大速度作为路线点的速度;Determine the maximum speed allowed for each route point based on the constraints of the route points in the operation route, and use the maximum speed as the speed of the route point;

基于每相邻两个路线点的速度和位置,确定每相邻两个路线点之间的路段内任意时刻的位置和速度,并对每个路段进行位置采样,得到全局轨迹点。Based on the speed and position of every two adjacent route points, determine the position and speed at any moment in the road segment between each two adjacent route points, and sample the location of each road segment to obtain a global trajectory point.

可选的,基于作业路线中路线点的约束条件确定每个路线点允许的最大速度,包括:Optionally, determine the maximum speed allowed for each route point based on the constraints of the route points in the operation route, including:

确定满足如下条件的速度中的最大值作为最大速度:The maximum speed among the speeds satisfying the following conditions is determined as the maximum speed:

每个路线点的速度小于或者等于作业允许的最大速度;The speed at each route point is less than or equal to the maximum speed allowed for the job;

第一个路线点和最后一个路线点的速度为0;The speed of the first route point and the last route point is 0;

针对一个路线点的速度,满足从前一个路线点的速度开始,以无人机允许的最大加速度全程加速达到,或者以无人机允许的最大加速度全程减速达到;For the speed of a route point, it should start from the speed of the previous route point and reach the full acceleration at the maximum acceleration allowed by the drone, or decelerate at the maximum acceleration allowed by the drone;

针对一个路线点的速度,满足以无人机允许的最大加速度全程减速达到下一个路线点的速度,或者满足以无人机允许的最大加速度全程加速达到下一个路线点的速度;For the speed of a route point, it can decelerate to the next route point with the maximum acceleration allowed by the drone, or accelerate to the next route point with the maximum acceleration allowed by the drone;

路线点的前向速度基于转角大小进行确定。The forward speed of the waypoint is determined based on the size of the corner.

可选的,路线点的前向速度基于转角大小进行确定,包括:Optionally, the forward speed of the route point is determined based on the size of the corner, including:

基于如下公式确定路线点的前向速度:The forward speed of the route point is determined based on the following formula:

Figure PCTCN2021137486-appb-000005
Figure PCTCN2021137486-appb-000005

其中,v x为无人机的前向速度,θ为转角大小,a 0为无人机的加速度,d为无人机减速时与路线点的距离。 Among them, vx is the forward speed of the UAV, θ is the size of the turning angle, a 0 is the acceleration of the UAV, and d is the distance from the route point when the UAV decelerates.

可选的,控制无人机基于局部轨迹运动第二预设长度的距离,包括:Optionally, control the UAV to move a distance of a second preset length based on the local trajectory, including:

基于局部轨迹确定无人机的控制量;Determine the control amount of the UAV based on the local trajectory;

基于控制量控制无人机沿局部轨迹运动第二预设长度的距离。The UAV is controlled to move a distance of a second preset length along the local trajectory based on the control amount.

上述装置可执行本发明任意实施例所提供的方法,具备执行方法相应的功能模块和有益效果。The above apparatus can execute the method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.

图5是本发明实施例提供的一种轨迹规划器的结构示意图,轨迹规划器50包括本发明实施例提供的轨迹规划装置500,所述轨迹规划装置500(如图4所示的轨迹规划装置)执行本发明上述任一实施例提供的轨迹规划方法。FIG. 5 is a schematic structural diagram of a trajectory planner provided by an embodiment of the present invention. The trajectory planner 50 includes a trajectory planning device 500 provided by an embodiment of the present invention. The trajectory planning device 500 (the trajectory planning device shown in FIG. 4 ) ) to execute the trajectory planning method provided by any of the foregoing embodiments of the present invention.

本发明实施例还提供了一种无人机,包括本发明实施例提供的轨迹规划器,即图5所示的规划器。An embodiment of the present invention further provides an unmanned aerial vehicle, including the trajectory planner provided by the embodiment of the present invention, that is, the planner shown in FIG. 5 .

图6所示为本申请一示例性实施例提供的用于执行轨迹规划方法的无人机600的框图。FIG. 6 shows a block diagram of an unmanned aerial vehicle 600 for executing a trajectory planning method provided by an exemplary embodiment of the present application.

参照图6,无人机600包括处理组件610,其进一步包括一个或多个处理器,以及由存储器620所代表的存储器资源,用于存储可由处理组件610执行的指令,例如应用程序。存储器620中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件610被配置为执行指令,以执行上述轨迹规划方法。6, the drone 600 includes a processing component 610, which further includes one or more processors, and a memory resource, represented by memory 620, for storing instructions executable by the processing component 610, such as application programs. An application program stored in memory 620 may include one or more modules, each corresponding to a set of instructions. Additionally, the processing component 610 is configured to execute instructions to perform the trajectory planning method described above.

无人机600还可以包括一个电源组件被配置为执行无人机600的电源管理,一个有线或无线网络接口被配置为将无人机600连接到网络,和一个输入输出(I/O)接口。可以基于存储在存储器620的操作系统操作无人机600,例如Windows Server TM,Mac OS X TM,Unix TM,Linux TM,FreeBSD TM或类似。 The drone 600 may also include a power supply assembly configured to perform power management of the drone 600, a wired or wireless network interface configured to connect the drone 600 to a network, and an input output (I/O) interface . The drone 600 can be operated based on an operating system stored in the memory 620, such as Windows Server , Mac OS X , Unix , Linux , FreeBSD or the like.

本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明上述任一实施例所提供的一种轨迹规划方法:例如,可以实现:确定作业路线的全局轨迹点;将全局轨迹点的起点作为第一预设长度的起点;在全局轨迹点中筛选第一预设长度所覆盖的轨迹点,基于筛选的轨迹点确定局部轨迹点,并基于局部轨迹点生成局部轨迹;控制无人机基于局部轨迹运动第二预设长度的距离,将无人机当前位置的下一个轨迹点作为第一预设长度的起点,返回在全局轨迹点中筛选第一预设长度所覆盖的轨迹点的操作,直至全局轨迹点筛选完毕,其中,第一预设长度大于第二预设长度。An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements a trajectory planning method provided by any of the foregoing embodiments of the present invention: for example, it can realize : Determine the global trajectory point of the operation route; take the starting point of the global trajectory point as the starting point of the first preset length; filter the trajectory points covered by the first preset length in the global trajectory points, and determine the local trajectory point based on the selected trajectory points , and generate a local trajectory based on the local trajectory points; control the UAV to move the distance of the second preset length based on the local trajectory, take the next trajectory point of the current position of the UAV as the starting point of the first preset length, and return to the global trajectory The operation of screening the trajectory points covered by the first preset length in the points, until the global trajectory point screening is completed, wherein the first preset length is greater than the second preset length.

可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。Any combination of one or more computer-readable media may be employed. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples (a non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer-readable signal medium may include a propagated data signal in baseband or as part of a carrier wave, with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .

计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、电线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

可以以一种或多种程序设计语言或其组合来编写用于执行本发明操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如”C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, but also conventional Procedural programming language - such as "C" language or similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through Internet connection).

注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention. The scope is determined by the scope of the appended claims.

Claims (14)

一种轨迹规划方法,其特征在于,包括:A trajectory planning method, comprising: 确定作业路线的全局轨迹点;Determine the global trajectory point of the operation route; 将所述全局轨迹点的起点作为第一预设长度的起点;Taking the starting point of the global trajectory point as the starting point of the first preset length; 在所述全局轨迹点中筛选所述第一预设长度所覆盖的轨迹点,基于筛选的轨迹点确定局部轨迹点,并基于所述局部轨迹点生成局部轨迹;Screening the trajectory points covered by the first preset length from the global trajectory points, determining local trajectory points based on the screened trajectory points, and generating a local trajectory based on the local trajectory points; 控制无人机基于所述局部轨迹运动第二预设长度的距离,将所述无人机当前位置的下一个轨迹点作为所述第一预设长度的起点,返回在所述全局轨迹点中筛选所述第一预设长度所覆盖的轨迹点的步骤,直至所述全局轨迹点筛选完毕,其中,所述第一预设长度大于所述第二预设长度。Controlling the UAV to move the distance of the second preset length based on the local trajectory, taking the next trajectory point of the current position of the UAV as the starting point of the first preset length, and returning it to the global trajectory point The step of screening the trajectory points covered by the first preset length until the global trajectory point screening is completed, wherein the first preset length is greater than the second preset length. 根据权利要求1所述的轨迹规划方法,其特征在于,所述基于筛选的轨迹点确定局部轨迹点,包括:The trajectory planning method according to claim 1, wherein the determining of the local trajectory points based on the screened trajectory points comprises: 若所述第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且所述障碍物与所述第一预设长度的终点的距离大于用于避障的第一预设距离,基于所述第一预设距离、用于避障的第二预设距离以及所述障碍物的信息确定避障轨迹点,并采用所述避障轨迹点替换对应的全局轨迹点中的轨迹点;If there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is greater than the first preset distance for obstacle avoidance, based on The first preset distance, the second preset distance for obstacle avoidance, and the information of the obstacle determine an obstacle avoidance trajectory point, and use the obstacle avoidance trajectory point to replace the trajectory point in the corresponding global trajectory point; 将所述第一预设长度覆盖的轨迹点中未替换的轨迹点以及所述避障轨迹点作为所述局部轨迹点。The unreplaced trajectory points and the obstacle avoidance trajectory points among the trajectory points covered by the first preset length are used as the local trajectory points. 根据权利要求1所述的轨迹规划方法,其特征在于,所述基于筛选的轨迹点确定局部轨迹点,包括:The trajectory planning method according to claim 1, wherein the determining of the local trajectory points based on the screened trajectory points comprises: 若所述第一预设长度覆盖的轨迹点形成的轨迹上存在障碍物,且所述障碍物与所述第一预设长度的终点的距离小于用于避障的第一预设距离,在所述第一预设长度的基础上增加第三预设长度,得到第四预设长度;其中,所述第四预设长度的终点与所述障碍物的距离大于所述第一预设距离;If there is an obstacle on the trajectory formed by the trajectory points covered by the first preset length, and the distance between the obstacle and the end point of the first preset length is smaller than the first preset distance for obstacle avoidance, A third preset length is added to the first preset length to obtain a fourth preset length; wherein the distance between the end point of the fourth preset length and the obstacle is greater than the first preset distance ; 基于所述第一预设距离、用于避障的第二预设距离以及所述障碍物的信息确定避障轨迹点,并采用所述避障轨迹点替换对应的全局轨迹点中的轨迹点;An obstacle avoidance trajectory point is determined based on the first preset distance, the second preset distance for obstacle avoidance, and the information of the obstacle, and the obstacle avoidance trajectory point is used to replace the trajectory point in the corresponding global trajectory point ; 将所述第四预设长度覆盖的轨迹点中未替换的轨迹点以及所述避障轨迹点作为所述局部轨迹点。The unreplaced trajectory points and the obstacle avoidance trajectory points among the trajectory points covered by the fourth preset length are used as the local trajectory points. 根据权利要求2或3所述的轨迹规划方法,其特征在于,所述基于所述第一预设距离、用于避障的第二预设距离以及所述障碍物的信息确定避障轨迹点,并采用所述避障轨迹点替换对应的全局轨迹点中的轨迹点,包括:The trajectory planning method according to claim 2 or 3, wherein the obstacle avoidance trajectory point is determined based on the first preset distance, the second preset distance used for obstacle avoidance, and the information of the obstacle , and use the obstacle avoidance trajectory points to replace the trajectory points in the corresponding global trajectory points, including: 在所述全局轨迹点中,确定在所述障碍物之后所述第一预设距离处的位置对应的第一轨迹点和在所述障碍物之前所述第二预设距离处的位置对应的第二轨迹点;In the global trajectory point, a first trajectory point corresponding to a position at the first preset distance after the obstacle and a position corresponding to the second preset distance before the obstacle are determined the second track point; 基于所述第一轨迹点的信息、所述第二轨迹点的信息以及所述障碍物的信息确定所述避障轨迹点;Determine the obstacle avoidance trajectory point based on the information of the first trajectory point, the information of the second trajectory point and the information of the obstacle; 将在所述全局轨迹点中处于所述第二轨迹点和所述第一轨迹点之间的轨迹点替换为所述避障轨迹点。A trajectory point between the second trajectory point and the first trajectory point among the global trajectory points is replaced with the obstacle avoidance trajectory point. 根据权利要求1所述的轨迹规划方法,其特征在于,所述基于筛选的轨迹点确定局部轨迹点,包括:The trajectory planning method according to claim 1, wherein the determining of the local trajectory points based on the screened trajectory points comprises: 若所述第一预设长度所覆盖的轨迹点形成的轨迹上不存在障碍物,将所述筛选的轨迹点作为所述局部轨迹点。If there is no obstacle on the trajectory formed by the trajectory points covered by the first preset length, the selected trajectory points are used as the local trajectory points. 根据权利要求1至5中任一项所述的轨迹规划方法,其特征在于,所述确定作业路线的全局轨迹点,包括:The trajectory planning method according to any one of claims 1 to 5, wherein the determining of the global trajectory points of the operation route comprises: 基于所述作业路线中路线点的约束条件确定每个路线点允许的最大速度,并将所述最大速度作为所述路线点的速度;Determine the maximum speed allowed for each route point based on the constraints of the route points in the operation route, and use the maximum speed as the speed of the route point; 基于每相邻两个路线点的速度和位置,确定每相邻两个路线点之间的路段内任意时刻的位置和速度,并对每个路段进行位置采样,得到所述全局轨迹点。Based on the speed and position of every two adjacent route points, determine the position and speed at any moment in the road segment between each two adjacent route points, and sample the location of each road segment to obtain the global trajectory point. 根据权利要求6所述的轨迹规划方法,其特征在于,所述基于所述作业路线中路线点的约束条件确定每个路线点允许的最大速度,包括:The trajectory planning method according to claim 6, wherein the determining the maximum allowable speed of each route point based on the constraints of the route points in the operation route comprises: 确定满足如下条件的速度中的最大值作为所述最大速度:The maximum value among the speeds satisfying the following conditions is determined as the maximum speed: 每个路线点的速度小于或者等于作业允许的最大速度;The speed at each route point is less than or equal to the maximum speed allowed for the job; 第一个路线点和最后一个路线点的速度为0;The speed of the first route point and the last route point is 0; 针对一个路线点的速度,满足从前一个路线点的速度开始,以所述无人机允许的最大加速度全程加速达到,或者以所述无人机允许的最大加速度全程减速达到;For the speed of a route point, it satisfies that starting from the speed of the previous route point, it is accelerated to the maximum acceleration allowed by the UAV, or decelerated to the maximum allowed acceleration of the UAV; 针对一个路线点的速度,满足以所述无人机允许的最大加速度全程减速达到下一个路线点的速度,或者满足以所述无人机允许的最大加速度全程加速达到下一个路线点的速度;For the speed of one route point, it satisfies the speed of decelerating to the next route point with the maximum acceleration allowed by the drone, or the speed of accelerating to the next route point with the maximum acceleration allowed by the drone; 路线点的前向速度基于转角大小进行确定。The forward speed of the waypoint is determined based on the size of the corner. 根据权利要求7所述的轨迹规划方法,其特征在于,所述路线点的前向速度基于转角大小进行确定,包括:The trajectory planning method according to claim 7, wherein the forward speed of the route point is determined based on the size of the turning angle, comprising: 基于如下公式确定所述路线点的所述前向速度:The forward speed of the route point is determined based on the formula:
Figure PCTCN2021137486-appb-100001
Figure PCTCN2021137486-appb-100001
其中,v x为所述无人机的所述前向速度,θ为所述转角大小,a 0为所述无人机的加速度,d为所述无人机减速时与所述路线点的距离。 Wherein, vx is the forward speed of the UAV, θ is the angle of rotation, a 0 is the acceleration of the UAV, and d is the distance between the UAV and the route point when the UAV decelerates. distance.
根据权利要求1至8中任一项所述的轨迹规划方法,其特征在于,所述控制无人机基于所述局部轨迹运动第二预设长度的距离,包括:The trajectory planning method according to any one of claims 1 to 8, wherein the controlling the UAV to move a distance of a second preset length based on the local trajectory, comprising: 基于所述局部轨迹确定所述无人机的控制量;determining a control amount of the drone based on the local trajectory; 基于所述控制量控制所述无人机沿所述局部轨迹运动所述第二预设长度的距离。The UAV is controlled to move the distance of the second preset length along the local trajectory based on the control amount. 一种轨迹规划装置,其特征在于,包括:A trajectory planning device, comprising: 全局轨迹点确定模块,用于确定作业路线的全局轨迹点;The global trajectory point determination module is used to determine the global trajectory point of the operation route; 起点确定模块,用于将所述全局轨迹点的起点作为第一预设长度的起点;a starting point determination module, configured to use the starting point of the global trajectory point as the starting point of the first preset length; 局部轨迹生成模块,用于在所述全局轨迹点中筛选所述第一预设长度所覆盖的轨迹点,基于筛选的轨迹点确定局部轨迹点,并基于所述局部轨迹点生成局部轨迹;a local trajectory generation module, configured to screen the trajectory points covered by the first preset length in the global trajectory points, determine local trajectory points based on the screened trajectory points, and generate local trajectory based on the local trajectory points; 控制/返回模块,用于控制无人机基于所述局部轨迹运动第二预设长度的距离,将所述无人机当前位置的下一个轨迹点作为所述第一预设长度的起点,返回在所述全局轨迹点中筛选所述第一预设长度所覆盖的轨迹点的步骤,直至所述全局轨迹点筛选完毕,其中,所述第一预设长度大于所述第二预设长度。The control/return module is used to control the UAV to move a distance of a second preset length based on the local trajectory, take the next trajectory point of the current position of the UAV as the starting point of the first preset length, and return The step of screening the trajectory points covered by the first preset length from the global trajectory points until the global trajectory points are screened, wherein the first preset length is greater than the second preset length. 一种轨迹规划器,其特征在于,包括权利要求10所述的轨迹规划装置。A trajectory planner, comprising the trajectory planning device of claim 10 . 一种无人机,其特征在于,包括权利要求11所述的轨迹规划器。An unmanned aerial vehicle, comprising the trajectory planner of claim 11 . 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-9中任一项所述的轨迹规划方法。A computer-readable storage medium on which a computer program is stored, characterized in that, when the program is executed by a processor, the trajectory planning method according to any one of claims 1-9 is implemented. 一种无人机,其特征在于,包括:An unmanned aerial vehicle, characterized in that it includes: 处理器;processor; 用于存储所述处理器可执行指令的存储器,memory for storing said processor-executable instructions, 其中,所述处理器用于执行上述权利要求1-9中任一项所述的轨迹规划方法。Wherein, the processor is configured to execute the trajectory planning method according to any one of the preceding claims 1-9.
PCT/CN2021/137486 2020-12-15 2021-12-13 Trajectory planning method and apparatus, trajectory planner, unmanned aerial vehicle, and storage medium Ceased WO2022127737A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011479732.5 2020-12-15
CN202011479732.5A CN112379697B (en) 2020-12-15 2020-12-15 Track planning method, device, track planner, unmanned aerial vehicle and storage medium

Publications (1)

Publication Number Publication Date
WO2022127737A1 true WO2022127737A1 (en) 2022-06-23

Family

ID=74589751

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/137486 Ceased WO2022127737A1 (en) 2020-12-15 2021-12-13 Trajectory planning method and apparatus, trajectory planner, unmanned aerial vehicle, and storage medium

Country Status (2)

Country Link
CN (1) CN112379697B (en)
WO (1) WO2022127737A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115507856A (en) * 2022-10-28 2022-12-23 九天创新(广东)智能科技有限公司 Path planning method, device and autonomous mobile device based on grid map
CN116107337A (en) * 2022-12-12 2023-05-12 中国消防救援学院 Unmanned aerial vehicle cluster obstacle avoidance method and system, unmanned aerial vehicle, electronic equipment and medium
CN117472081A (en) * 2023-12-25 2024-01-30 西安辰航卓越科技有限公司 Unmanned aerial vehicle obstacle avoidance method based on perception constraint
CN118424256A (en) * 2024-04-18 2024-08-02 北京化工大学 A distributed multi-resolution map fusion mapping and positioning method and device
CN120890468A (en) * 2025-09-30 2025-11-04 天津云圣智能科技有限责任公司 A method, apparatus, electronic device and storage medium for determining the trajectory of an unmanned aerial vehicle (UAV)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112379697B (en) * 2020-12-15 2024-04-12 广州极飞科技股份有限公司 Track planning method, device, track planner, unmanned aerial vehicle and storage medium
CN113759905A (en) * 2021-08-30 2021-12-07 北京盈迪曼德科技有限公司 Robot path planning method and device and robot
CN113942014B (en) * 2021-11-08 2023-08-01 北京华航唯实机器人科技股份有限公司 Track generation method, track generation device, robot device, and storage medium
CN114298404B (en) * 2021-12-27 2023-04-18 广州极飞科技股份有限公司 Road segment and route generation method, device, equipment and computer readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103197675A (en) * 2013-03-13 2013-07-10 北京矿冶研究总院 Autonomous driving and obstacle avoidance motion control and target path planning method for underground carry scraper
CN107883962A (en) * 2017-11-08 2018-04-06 南京航空航天大学 A kind of dynamic Route planner of multi-rotor unmanned aerial vehicle under three-dimensional environment
JP2019021197A (en) * 2017-07-20 2019-02-07 株式会社Ihiエアロスペース Route determination device and route determination method
CN110673634A (en) * 2019-11-12 2020-01-10 合肥工业大学 A power inspection drone path planning method and a transmission line inspection method
CN110687923A (en) * 2019-11-08 2020-01-14 深圳市道通智能航空技术有限公司 Unmanned aerial vehicle long-distance tracking flight method, device, equipment and storage medium
CN111665738A (en) * 2019-03-05 2020-09-15 阿里巴巴集团控股有限公司 In-loop simulation system and information processing method and device thereof
CN111752295A (en) * 2019-08-27 2020-10-09 广州极飞科技有限公司 UAV flight trajectory planning method and related device
CN112025715A (en) * 2020-09-21 2020-12-04 中国矿业大学 A two-layer path planning method for mobile robots with unknown local environment
CN112379697A (en) * 2020-12-15 2021-02-19 广州极飞科技有限公司 Trajectory planning method and device, trajectory planner, unmanned aerial vehicle and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103197675A (en) * 2013-03-13 2013-07-10 北京矿冶研究总院 Autonomous driving and obstacle avoidance motion control and target path planning method for underground carry scraper
JP2019021197A (en) * 2017-07-20 2019-02-07 株式会社Ihiエアロスペース Route determination device and route determination method
CN107883962A (en) * 2017-11-08 2018-04-06 南京航空航天大学 A kind of dynamic Route planner of multi-rotor unmanned aerial vehicle under three-dimensional environment
CN111665738A (en) * 2019-03-05 2020-09-15 阿里巴巴集团控股有限公司 In-loop simulation system and information processing method and device thereof
CN111752295A (en) * 2019-08-27 2020-10-09 广州极飞科技有限公司 UAV flight trajectory planning method and related device
CN110687923A (en) * 2019-11-08 2020-01-14 深圳市道通智能航空技术有限公司 Unmanned aerial vehicle long-distance tracking flight method, device, equipment and storage medium
CN110673634A (en) * 2019-11-12 2020-01-10 合肥工业大学 A power inspection drone path planning method and a transmission line inspection method
CN112025715A (en) * 2020-09-21 2020-12-04 中国矿业大学 A two-layer path planning method for mobile robots with unknown local environment
CN112379697A (en) * 2020-12-15 2021-02-19 广州极飞科技有限公司 Trajectory planning method and device, trajectory planner, unmanned aerial vehicle and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115507856A (en) * 2022-10-28 2022-12-23 九天创新(广东)智能科技有限公司 Path planning method, device and autonomous mobile device based on grid map
CN116107337A (en) * 2022-12-12 2023-05-12 中国消防救援学院 Unmanned aerial vehicle cluster obstacle avoidance method and system, unmanned aerial vehicle, electronic equipment and medium
CN117472081A (en) * 2023-12-25 2024-01-30 西安辰航卓越科技有限公司 Unmanned aerial vehicle obstacle avoidance method based on perception constraint
CN117472081B (en) * 2023-12-25 2024-03-15 西安辰航卓越科技有限公司 Unmanned aerial vehicle obstacle avoidance method based on perception constraint
CN118424256A (en) * 2024-04-18 2024-08-02 北京化工大学 A distributed multi-resolution map fusion mapping and positioning method and device
CN120890468A (en) * 2025-09-30 2025-11-04 天津云圣智能科技有限责任公司 A method, apparatus, electronic device and storage medium for determining the trajectory of an unmanned aerial vehicle (UAV)

Also Published As

Publication number Publication date
CN112379697B (en) 2024-04-12
CN112379697A (en) 2021-02-19

Similar Documents

Publication Publication Date Title
WO2022127737A1 (en) Trajectory planning method and apparatus, trajectory planner, unmanned aerial vehicle, and storage medium
CN109144097B (en) Obstacle or ground recognition and flight control method, device, equipment and medium
WO2021088681A1 (en) Long-distance flight-tracking method and device for unmanned aerial vehicle, apparatus, and storage medium
CN106919181A (en) A kind of unmanned plane barrier-avoiding method
Fang et al. Piecewise-potential-field-based path planning method for fixed-wing UAV formation
WO2018058442A1 (en) Method and device for panning route, flight control system, omnidirectional obstacle avoidance system, and unmanned aerial vehicle
CN110146085B (en) A real-time avoidance replanning method for UAVs based on mapping and rapid exploration of random trees
WO2018086506A1 (en) Operating method and device of plant-protection unmanned aerial vehicle
CN113359796B (en) A UAV exploration method for underground multi-branch caves
WO2024016459A1 (en) Aircraft path planning method, system and device, and storage medium
WO2023097769A1 (en) Unmanned ground vehicle-unmanned aerial vehicle collaborative autonomous tracking and landing method
WO2021037071A1 (en) Flight control method and related apparatus
CN115525063B (en) Trajectory planning method for unmanned helicopters
CN110413007B (en) Control method, system, electronic device and medium for UAV flight path
CN119690100B (en) A method, device, equipment and storage medium for dynamic path planning of unmanned aerial vehicle
US20240239484A1 (en) Fast path planning for dynamic avoidance in partially known environments
CN114527783B (en) Unmanned aerial vehicle control method, device, equipment and computer storage medium
CN117930859A (en) Autonomous patrol flight path planning method and system for distribution network unmanned aerial vehicle
Goel et al. Fast exploration using multirotors: Analysis, planning, and experimentation
CN118584993A (en) Preset route replanning method and system for autonomous obstacle avoidance of aircraft
CN107450586A (en) The method of adjustment and system and UAS in air route
CN112313594B (en) UAV control methods, devices, equipment and storage media
CN111443733A (en) Unmanned aerial vehicle flight control method and device and unmanned aerial vehicle
CN115031738A (en) Unmanned aerial vehicle route planning method, device, equipment and medium
US20230205234A1 (en) Information processing device, information processing system, method, and program

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: 21905666

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: 21905666

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21905666

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16/01/2024)