WO2023240577A1 - 路径规划方法、计算机设备及存储介质 - Google Patents

路径规划方法、计算机设备及存储介质 Download PDF

Info

Publication number
WO2023240577A1
WO2023240577A1 PCT/CN2022/099329 CN2022099329W WO2023240577A1 WO 2023240577 A1 WO2023240577 A1 WO 2023240577A1 CN 2022099329 W CN2022099329 W CN 2022099329W WO 2023240577 A1 WO2023240577 A1 WO 2023240577A1
Authority
WO
WIPO (PCT)
Prior art keywords
path
points
point
initial
target
Prior art date
Application number
PCT/CN2022/099329
Other languages
English (en)
French (fr)
Inventor
王雷
陈熙
Original Assignee
深圳市正浩创新科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市正浩创新科技股份有限公司 filed Critical 深圳市正浩创新科技股份有限公司
Priority to PCT/CN2022/099329 priority Critical patent/WO2023240577A1/zh
Priority to CN202280002337.9A priority patent/CN115280102A/zh
Publication of WO2023240577A1 publication Critical patent/WO2023240577A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/20Instruments for performing navigational calculations

Definitions

  • the present application relates to the technical field of path planning, and in particular to a path planning method, computer equipment and storage medium.
  • sweeping robots are used to clean rooms
  • lawn mower robots are used to mow grass or lawns
  • drones are used to spray or sow crops.
  • autonomous mobile equipment can mow, sweep, spray or spread along the edge of the work area according to the planned edge path.
  • the existing path planning algorithm has the problem of inaccurate planned edge paths, which causes the autonomous mobile device to miss certain areas when operating along the planned edge path, affecting the accuracy of the autonomous mobile device's edge operations in the operating area. .
  • a path planning method a computer device, and a storage medium are provided.
  • embodiments of the present application provide a path planning method, including:
  • An acquisition module configured to acquire an initial path to be executed, where the initial path includes multiple path points;
  • inventions of the present application further provide a computer device.
  • the computer device includes a processor, a memory, a computer program stored on the memory and executable by the processor, and a computer program for implementing the processor. and a data bus for communication between the memory and the computer program, when the computer program is executed by the processor, the path planning method as described above is implemented.
  • FIG. 8 is a schematic structural block diagram of a computer device provided by an embodiment of the present application.
  • the initial path to be executed is the operation path of the mobile device in a certain area to be operated, and the area to be operated is the plot, room, green space or grassland where the mobile device performs operations along the edge.
  • the area to be worked on can be manually selected by the user or based on the positioning information of the mobile device.
  • the area to be worked on can be a closed working area or an unclosed working area.
  • the initial path is a moving path from the mobile device to complete the operation in the area to be worked.
  • the initial path can be generated in real time or in advance. This embodiment does not specifically limit this.
  • the initial path includes multiple path points.
  • Step S102 Obtain location information corresponding to each path point in the initial path.
  • the position information is used to represent the positional relationship of the path point relative to two adjacent path points.
  • the positional relationship may include the angle corresponding to the path point or the distance of the path point relative to the adjacent path point.
  • the angle corresponding to the path point is The angle formed by a path point and the line connecting two adjacent path points. One path point corresponds to an angle.
  • Step S103 Determine the initial path segmentation points from multiple path points based on the position information corresponding to each path point in the initial path.
  • path points a, b, and c constitute line segment ab and line segment bc.
  • the angle ⁇ 2 between line segment ab and line segment bc is taken as the angle of path point b.
  • Path points b, c, and d constitute line segment bc.
  • the path points d, e, f, g, h, i, j, k, l can be obtained in the same way
  • the angles of , m, n, o, p and q are ⁇ 4 , ⁇ 5 , ⁇ 6 , ⁇ 7 , ⁇ 8 , ⁇ 9 , ⁇ 10 , ⁇ 11 , ⁇ 12 , ⁇ 13 , ⁇ 14 , ⁇ 15 , respectively.
  • the angle of path point a is the angle ⁇ 1 between the line segment qa and the line segment ab composed of path points q, a, b.
  • the angle of path point a can be the default value or 0.
  • the position information change amount of each path point relative to the adjacent path point is obtained; when the position information change amount exceeds the preset position change amount, the path corresponding to the position information change amount exceeds the preset position change amount.
  • the point is determined as the initial path segmentation point; or when the location information exceeds the preset location threshold, the path point is determined as the initial path segmentation point.
  • the initial path segmentation point can be accurately determined by the change amount or positional relationship of the position information of the path point relative to the adjacent path points.
  • the change amount of the position information of the path point relative to the adjacent path point includes the change amount of the angle or the change amount of the position coordinate of the path point relative to the adjacent path point.
  • path point a is adjacent to path point q
  • the angle change of path point a relative to path point q is
  • path point a is separated from path point q and path respectively
  • Point b is adjacent
  • the position coordinate change of path point a (x 1 , y 1 ) relative to path point b (x 2 , y 2 ) is (y 2 -y 1 )/(x 2 -x 1 ).
  • the preset position change amount may include a preset angle change amount or a preset position coordinate change amount.
  • the preset angle change amount and the preset position coordinate change amount may be set based on the actual situation. This is not specifically limited in the embodiment of the present application. For example, the preset angle change is 30 degrees or 50 degrees.
  • the angle change amount of each path point relative to the adjacent path point is obtained, and the path point corresponding to the angle change amount exceeding the preset angle change amount is determined as the initial path segmentation point.
  • the angle corresponding to each path point is obtained, and the path point corresponding to the angle exceeding the preset angle threshold is determined as the initial path segmentation point.
  • step S103 includes: sub-steps S1031 to sub-step S1033.
  • Sub-step S1031 obtain the angle corresponding to each path point.
  • each path point on the initial path determine the two adjacent path points of each path point on the initial path; calculate the interval formed by the connection between the path point and the two adjacent path points. angle, and determine the angle formed by the path point and the line connecting two adjacent path points as the angle corresponding to the path point.
  • a path point corresponds to an angle
  • the angle of the path point is the angle formed by the path point and the line connecting two adjacent path points.
  • the angles of path points a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q are ⁇ 1 and ⁇ 2 respectively. , ⁇ 3 , ⁇ 4 , ⁇ 5 , ⁇ 6 , ⁇ 7 , ⁇ 8 , ⁇ 9 , ⁇ 10 , ⁇ 11 , ⁇ 12 , ⁇ 13 , ⁇ 14 , ⁇ 15 , ⁇ 16 , ⁇ 17 .
  • Sub-step S1032 Fit the angles corresponding to each path point to obtain multiple target fitting lines.
  • the angle corresponding to each path point can be linearly fitted to obtain multiple target fitting straight lines, or the angle corresponding to each path point can be curve-fitted to obtain multiple target fitting curves.
  • the target fitting line The change amount of the slope between the last two angles in the corresponding angle queue relative to the slope between the other two adjacent angles is greater than or equal to the slope change threshold.
  • the slope change threshold can be set based on actual conditions, and this embodiment does not specifically limit this. For example, the slope change threshold is 0.3.
  • the method of fitting the angles corresponding to each path point to obtain multiple target fitting lines can be: according to the layout order of the path points on the initial path, fitting the angles ⁇ corresponding to the path points one by one, and obtain The angle queue corresponding to the fitting line [ ⁇ 1 , ⁇ 2 , ..., ⁇ i-1 , ⁇ i ], where N ⁇ i ⁇ 2, N is the number of angles; when ⁇ i and ⁇ i- are detected When the change in the slope between 1 relative to the slope between other two adjacent angles is greater than or equal to the slope change threshold, the angles are queued [ ⁇ 1 , ⁇ 2 , ..., ⁇ i-1 , ⁇ i ] The corresponding fitting line is determined as the target fitting line; the remaining unfitted angles will continue to be fitted according to the layout order of the path points on the initial path, and the angles ⁇ corresponding to the path points will be fitted one by one to obtain the angles corresponding to the fitting line.
  • angle queue [ ⁇ i+1 , ⁇ i+2 , ..., ⁇ i+m-1 , ⁇ i+m ] are used to obtain multiple target fitting lines, where i+m ⁇ N.
  • the angles corresponding to each path point can be quickly fitted, which can improve the accuracy of determining the target fitting line, thereby improving the accuracy of the initial path segmentation points.
  • the layout order of the path points on the initial path can be obtained.
  • the fitting of angles ⁇ 1 and ⁇ 2 can be performed first , get the fitting line L 11 , and the angle queue [ ⁇ 1 , ⁇ 2 ] corresponding to the fitting line L 11. Since the angle queue [ ⁇ 1 , ⁇ 2 ] only has one pair of adjacent angles, that is, it cannot be compared with other adjacent angles.
  • the layout order of the path points on the initial path can be obtained.
  • the angles ⁇ 1 , ⁇ 2 and ⁇ can be first 3 Perform fitting and obtain the angle sequence [ ⁇ 1 , ⁇ 2 , ⁇ 3 ] corresponding to the fitting line L 12.
  • the change in the slope between ⁇ 3 and ⁇ 2 relative to the slope between ⁇ 2 and ⁇ 1 is greater than If the slope changes threshold, the fitting line L 21 is determined as the target fitting line.
  • the generated initial path cannot be close to the actual boundary of the area to be worked on.
  • multiple target fittings are obtained.
  • Line since the change in the slope between angles can represent the degree of consistency of the angles participating in the fitting, the slope between the last two angles in the angle queue corresponding to the target fitting line is relative to the other two adjacent angles The change amount of slope between them is greater than or equal to the slope change threshold.
  • the angle at the end of each target fitting line is obtained.
  • the path point corresponding to the end angle is determined as the initial path segmentation point. In this way, the path points participating in the fitting can be determined.
  • Step S104 Determine the supplementary path segmentation point of the initial path among the multiple path points between any two adjacent initial path segmentation points.
  • the vertical distance from the path point between any two adjacent initial path segment points to the corresponding sub-path is obtained.
  • the sub-path is obtained by connecting any two adjacent initial path segment points; Path points whose distance is greater than or equal to the preset reference threshold are used as supplementary path segmentation points; path points whose vertical distance is less than the preset reference threshold are deleted; supplementary path segmentation points and their adjacent initial path segmentation points are multiple path points between them, perform the steps of obtaining the vertical distance from the path point between any two adjacent initial path segment points to the corresponding sub-path, until there are no other path points on the corresponding sub-path.
  • the preset reference threshold can be set based on actual conditions, which is not specifically limited in this embodiment. For example, the preset reference threshold is 0.1 meters.
  • the two adjacent initial path segmentation points are the initial path segmentation point P 1 and the initial path segmentation point P 2 respectively.
  • the path segment P 1 P 2 is the corresponding sub-path, and the path segment There are path point A, path point B and path point C between P 1 P 2. Determine the vertical distance between path point A, path point B and path point C and the path segment P 1 P 2.
  • path point B and path point C are determined as supplementary path segmentation points, and the path between path point A and path segment P 1 P 2 If the vertical distance between them is less than the preset reference threshold, path point A is deleted, because there are no other path points between supplementary path segmentation point B and initial path segmentation point P 1 , and supplementary path segmentation point B and initial path segmentation point B If there are no other path points between the segment point P 2 , no filtering will be performed. Similarly, there are no other path points between the supplementary path segment point C and the initial path segment point P 1 , as well as the supplementary path segment point. There are no other path points between C and the initial path segmentation point P 2 , so no filtering is performed.
  • the point between the supplementary path segment point B and the initial path segment point P 2 is judged, for example, the distance from point C is judged. If it is greater than the preset reference threshold, it is regarded as a supplementary path segment. Click or delete.
  • Step S105 Use the initial path segmentation points and the supplementary path segmentation points as target path segmentation points, and smooth the target path segmentation points to obtain the target path to be executed.
  • the curvature of each path segment on the target path is obtained, and the path segment is a path segment between any two adjacent target path segment points; according to the curvature of each path segment, the mobile device is configured to Corresponds to the moving speed on the path segment.
  • the moving speed of the self-mobile device on each path segment is configured, so that the self-mobile device can further work along the boundary of the area to be operated when performing operations, thereby improving the operation effect.
  • the curvature of the path segment can be determined by: fitting the path points located between the path segment, that is, two adjacent path segment points, to obtain a path fitting line; determining the path fitting curve.
  • the curvature of the path fitting line is determined as the curvature of the path segment.
  • the corresponding relationship between the pre-stored angle and the angular velocity is obtained; according to the corresponding relationship between the angle and the angular velocity and the angle of each path segmentation point on the target path, configure each point on the target path from the mobile device.
  • Angular velocity at path segmentation points The corresponding relationship between the angle and the angular velocity can be obtained through multiple tests in advance, and is not specifically limited in this embodiment.
  • the path planning method determines the initial path segmentation points from each path point in the initial path based on the position information corresponding to each path point in the initial path to be executed, and determines the segmentation points between any two adjacent initial paths. Determine the supplementary path segmentation points of the initial path among the multiple path points between the segmentation points. While filtering the path points, it can avoid the actual path points on the irregular paths from being missed.
  • the initial path segmentation points and The supplementary path segmentation points are all used as target path segmentation points, and the target path segmentation points are smoothed to obtain the target path to be executed.
  • the target path can be obtained that is more in line with the actual edge of the area to be worked on, which greatly improves the efficiency.
  • the accuracy of path planning enables autonomous mobile equipment to stay close to the edge of the area to be operated when operating according to the target path, thereby reducing missed areas and greatly improving the accuracy of autonomous mobile equipment operating in the operating area.
  • FIG. 7 is a schematic structural block diagram of a path planning device provided by an embodiment of the present application.
  • the acquisition module 210 is configured to acquire an initial path to be executed, where the initial path includes multiple path points;
  • the acquisition module 210 is also configured to acquire position information corresponding to each path point in the initial path; the position information is used to characterize the position relationship of the path point relative to two adjacent path points;
  • the determination module 220 is configured to determine an initial path segmentation point from the multiple path points according to the position information corresponding to each path point in the initial path; the position information is used to characterize the path point relative to The positional relationship between two adjacent path points;
  • the path planning device 200 further includes a speed configuration module, wherein:
  • the acquisition module 210 is further configured to acquire the curvature of each path segment on the target path, where the path segment is a path segment between any two adjacent target path segment points;
  • the speed configuration module is configured to configure the moving speed of the mobile device on the corresponding path segment according to the curvature of each path segment.
  • the determination module 220 is further configured to:
  • the path point is determined as an initial path segmentation point.
  • the angle at the end of each target fitting line is obtained, and the path point corresponding to the end angle is used as the initial path segmentation point.
  • the angles ⁇ corresponding to the path points are fitted one by one to obtain the angle queue corresponding to the fitting line [ ⁇ 1 , ⁇ 2 , ..., ⁇ i-1 , ⁇ i ], where N ⁇ i ⁇ 2, N is the number of angles;
  • the determination module 220 is further configured to:
  • the processor 310 is used to provide computing and control capabilities to support the operation of the entire path planning device.
  • the processor 310 can be a central processing unit (Central Processing Unit, CPU), and the processor 301 can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC ), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general processor may be a microprocessor or the processor may be any conventional processor.
  • FIG. 8 is only a block diagram of a partial structure related to the embodiments of the present application, and does not constitute a limitation on the computer equipment to which the embodiments of the present application are applied.
  • the computer equipment may include more or fewer components than shown in the figures, or some combinations of components, or have a different arrangement of components.
  • the processor is used to run a computer program stored in the memory, and implement any one of the path planning methods provided by the embodiments of the present application when executing the computer program.
  • the processor is configured to run a computer program stored in a memory, and perform the following steps when executing the computer program:
  • an initial path segmentation point is determined from the multiple path points; the position information is used to represent the position of the path point relative to two adjacent path points. Positional relationship;
  • the initial path segmentation points and the supplementary path segmentation points are both used as target path segmentation points, and the target path segmentation points are smoothed to obtain a target path to be executed.
  • the processor smoothes the segment points of the target path to obtain the target path to be executed, it is also used to:
  • the moving speed of the mobile device on the corresponding path segment is configured.
  • the processor when determining an initial path segmentation point from the plurality of path points based on the position information corresponding to each path point in the initial path, the processor is configured to:
  • the path point is determined as an initial path segmentation point.
  • the position information includes an angle; the angle is an angle formed by a line between the path point and two adjacent path points; the processor implements the method according to the initial path.
  • the position information corresponding to each path point in is used to implement: when determining the initial path segmentation point from the multiple path points:
  • the angle at the end of each target fitting line is obtained, and the path point corresponding to the end angle is used as the initial path segmentation point.
  • the processor when fitting the angles corresponding to each of the path points to obtain multiple target fitting lines, the processor is used to implement:
  • the angles ⁇ corresponding to the path points are fitted one by one to obtain the angle queue corresponding to the fitting line [ ⁇ 1 , ⁇ 2 , ..., ⁇ i-1 , ⁇ i ], where N ⁇ i ⁇ 2, N is the number of angles;
  • the angles are queued [ ⁇ 1 , ⁇ 2 ,. .., ⁇ i-1 , ⁇ i ]
  • the corresponding fitting line is determined as the target fitting line;
  • the remaining unfitted angles will continue to be fitted according to the layout order of the path points on the initial path, and the angles ⁇ corresponding to the path points will be fitted one by one to obtain the angle queue [ ⁇ i+1 , corresponding to the fitting line, ⁇ i+2 ,..., ⁇ i+m-1 , ⁇ i+m ] to obtain multiple target fitting lines, where i+m ⁇ N.
  • the path point corresponding to the target angle is used as the initial path segmentation point.
  • the processor when determining the supplementary path segmentation point of the initial path among multiple path points between any two adjacent initial path segmentation points, the processor is configured to:
  • the processor smoothes the segment points of the target path to obtain the target path to be executed, it is used to:
  • Embodiments of the present application also provide a storage medium for computer-readable storage.
  • the storage medium stores one or more programs.
  • the one or more programs can be executed by one or more processors to implement the following: Any path planning method provided in the embodiments of this application.
  • the storage medium may be an internal storage unit of the computer device described in the previous embodiment, such as a hard disk or memory of the computer device.
  • the storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), or a secure digital (Secure Digital, SD) card equipped on the computer device. Flash Card, etc.
  • Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
  • computer storage media includes volatile and nonvolatile media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. removable, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disk (DVD) or other optical disk storage, magnetic cassettes, tapes, disk storage or other magnetic storage devices, or may Any other medium used to store the desired information and that can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .

Landscapes

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

Abstract

一种路径规划方法包括:获取待执行的初始路径;获取初始路径中的各个路径点对应的位置信息;位置信息用于表征路径点相对于相邻两个路径点的位置关系;根据初始路径中的各个路径点对应的位置信息,从多个路径点中确定初始路径分段点;在任意相邻两个初始路径分段点之间的多个路径点中确定初始路径的补充路径分段点;将初始路径分段点和补充路径分段点均作为目标路径分段点,并对目标路径分段点进行平滑处理,得到待执行的目标路径。

Description

路径规划方法、计算机设备及存储介质 技术领域
本申请涉及路径规划的技术领域,尤其涉及一种路径规划方法、计算机设备及存储介质。
背景技术
这里的陈述仅提供与本申请有关的背景信息,而不必然地构成示例性技术。
随着自移动设备的功能以及性能的不断增强,越来越多的领域都逐渐开始采用自移动设备进行工作。例如,利用扫地机器人对房间进行清扫,利用割草机器人对草地或草坪进行修剪、利用无人机对作物进行喷洒或播撒等,这些自移动设备无需人为直接控制和操作,能够极大地提高工作效率。
目前,自移动设备可以按照规划好的沿边路径沿着作业区域的边沿进行割草、扫地、喷洒或播撒等作业。然而,现有的路径规划算法存在规划的沿边路径不准确的问题,使得自移动设备按照规划好的沿边路径进行作业时会遗漏某些区域,影响自移动设备对作业区域进行沿边作业的准确性。
发明内容
根据本申请的各种实施例提供了一种路径规划方法、计算机设备及存储介质。
第一方面,本申请实施例提供一种路径规划方法,包括:
获取待执行的初始路径,所述初始路径包括多个路径点;
获取所述初始路径中的各个路径点对应的位置信息;所述位置信息用于表征所述路径点相对于相邻两个路径点的位置关系;
根据所述初始路径中的各个路径点对应的位置信息,从所述多个路径点中确定初始路径分段点;
在任意相邻两个初始路径分段点之间的多个路径点中确定所述初始路径的补充路径分段点;
将所述初始路径分段点和所述补充路径分段点均作为目标路径分段点,并对所述目标路径分段点进行平滑处理,得到待执行的目标路径。
第二方面,本申请实施例还提供一种路径规划装置,所述路径规划装置包括:
获取模块,被配置为获取待执行的初始路径,所述初始路径包括多个路径点;
获取模块,还被配置为获取所述初始路径中的各个路径点对应的位置信息;所述位置信息用于表征所述路径点相对于相邻两个路径点的位置关系;
确定模块,被配置为根据所述初始路径中的各个路径点对应的位置信息,从所述多个路径点中确定初始路径分段点;
所述确定模块,还被配置为在任意相邻两个初始路径分段点之间的多个路径点中确定所述初始路径的补充路径分段点;
平滑处理模块,被配置为将所述初始路径分段点和所述补充路径分段点均作为目标路径分段点,并对所述目标路径分段点进行平滑处理,得到待执行的目标路径。
第三方面,本申请实施例还提供一种计算机设备,所述计算机设备包括处理器、存储器、存储在所述存储器上并可被所述处理器执行的计算机程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,其中所述计算机程序被所述处理器执行时,实现如上所述的路径规划方法。
第四方面,本申请实施例还提供一种存储介质,用于计算机可读存储,其特征在于,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如上所述的路径规划方法。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其他特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种路径规划方法的流程示意图。
图2为本申请实施例中的初始路径的一示意图。
图3为本申请实施例中的初始路径的另一示意图。
图4为本申请实施例中的初始路径的另一示意图。
图5为图1中的路径规划方法的子步骤流程示意图。
图6为本申请实施例中确定补充路径分段点的一场景示意图。
图7为本申请实施例提供的一种路径规划装置的结构示意框图。
图8为本申请实施例提供的一种计算机设备的结构示意框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部 的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。
应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
目前,自移动设备可以按照规划好的沿边路径沿着作业区域的边界进行割草、扫地、喷洒或播撒等作业。然而,现有的路径规划算法存在规划的沿边路径不准确的问题,使得自移动设备按照规划好的沿边路径进行作业时会遗漏某些区域,影响自移动设备对作业区域进行沿边作业的准确性。
为解决上述问题,本申请实施例提供一种路径规划方法、设备及存储介质。其中,该路径规划方法可应用于服务器、终端设备或自移动设备等计算机设备,该服务器可以是独立的服务器,也可以是由多个服务器组成的服务器集群,也可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。终端设备可以是遥控设备、手机、平板电脑、笔记本电脑、台式电脑、个人数字助理和穿戴式设备等,自移动设备可以是扫地机、割草机、无人机等。
下面结合附图,对本申请的一些实施例作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
请参阅图1,图1为本申请实施例提供的一种路径规划方法的流程示意图。
如图1所示,该路径规划方法包括步骤S101至步骤S105。
步骤S101、获取待执行的初始路径。
其中,待执行的初始路径为自移动设备在某一待作业区域内的作业路径,待作业区域为自移动设备进行沿边作业的地块、房间、绿化地或草地等。待作业区域可以由用户手动选择,也可以基于自移动设备的定位信息选择。待作业区域可以为封闭的作业区域,也可以为不封闭的作业区域。初始路径为自移动设备对待作业区域进行完整作业的移动路径,初始路径可以实时生成,也可以预先生成,本实施例对此不做具体限定,初始路径包括多个路径点。
示例性的,从云端或存储器中获取待执行的初始路径。通过将预先规划的初始路径存在云端和本地存储器,可以在使用时快速地获取到待作业的初始路径。
示例性的,从包含待作业区域的地图中获取待作业区域的边界,并将边界 内缩预设距离,得到自移动设备在待作业区域的边界上的初始路径。其中,包含待作业区域的地图可以为栅格地图,预设距离可以基于实际情况进行设置,比如根据自移动设备在执行单次作业时的覆盖宽度来确定,具体地,可以将预设距离设置为自移动设备单次作业所覆盖宽度的一半。本实施例对此不做具体限定,例如,预设距离为30厘米。如图2所示,待作业区域的边界11内缩预设距离之后,得到自移动设备在待作业区域的边界上的初始路径12。
示例性的,从包含待作业区域的地图中获取待作业区域的边界,在边界周围选择路径起始点和路径结束点,从路径起始点开始,沿着顺时针方向或逆时针方向按照预设采样距离对边界进行路径点采样,直至到达路径结束点,得到多个路径点,并按照每个路径点的位置,依次连接每个路径点,得到自移动设备在待作业区域的边界上的初始路径。其中,预设采样距离可以基于实际情况进行设置,本实施例对此不做具体限定,例如,预设采样距离为50厘米。如图3所示,对待作业区域的边界11进行路径点采样,可以得到多个路径点13,多个路径点13可以组成初始路径。
步骤S102、获取初始路径中的各个路径点对应的位置信息。
其中,位置信息用于表征路径点相对于相邻两个路径点的位置关系,该位置关系可以包括路径点对应的角度或路径点相对于相邻路径点的距离,该路径点对应的角度为路径点与相邻两个路径点之间的连线所形成的夹角,一个路径点对应一个角度。
步骤S103、根据初始路径中的各个路径点对应的位置信息,从多个路径点中确定初始路径分段点。
如图4所示,路径点a、b、c构成线段ab和线段bc,将线段ab与线段bc之间的夹角θ 2作为路径点b的角度,路径点b、c、d构成线段bc和线段cd,将线段bc和线段cd之间的夹角θ 3作为路径点c的角度,按照同样的方式可以获取到路径点d、e、f、g、h、i、j、k、l、m、n、o、p、q的角度分别为θ 4、θ 5、θ 6、θ 7、θ 8、θ 9、θ 10、θ 11、θ 12、θ 13、θ 14、θ 15、θ 16、θ 17,在初始路径为封闭的路径时,路径点a的角度为路径点q、a、b构成的线段qa与线段ab之间的夹角θ 1,在初始路径为开放的路径时,路径点a的角度可以为缺省值或0。
在一实施例中,获取各个路径点相对于相邻路径点的位置信息变化量;在位置信息变化量超过预设位置变化量时,将位置信息变化量超过预设位置变化量所对应的路径点确定为初始路径分段点;或者在位置信息超过预设位置阈值时,将路径点确定为初始路径分段点。通过路径点相对于相邻路径点的位置信息变化量或位置关系,可以准确地确定初始路径分段点。
其中,路径点相对于相邻路径点的位置信息变化量包括路径点相对于相邻路径点的角度变化量或位置坐标变化量。例如,如图4所示,路径点a与路径点q相邻,则路径点a相对于路径点q的角度变化量为|θ 117|,路径点a分别与 路径点q和路径点b相邻,则路径点a(x 1,y 1)相对于路径点b(x 2,y 2)的位置坐标变化量为(y 2-y 1)/(x 2-x 1)。预设位置变化量可以包括预设角度变化量或预设位置坐标变化量,预设角度变化量和预设位置坐标变化量可以基于实际情况进行设置,本申请实施例对此不做具体限定。例如,预设角度变化量为30度或50度。
示例性的,获取各个路径点相对于相邻路径点的角度变化量,并将该角度变化量超过预设角度变化量所对应的路径点确定为初始路径分段点。
在另一实施例中,获取各个路径点相对于相邻路径点的位置坐标变化量,并将该位置坐标变化量超过预设位置坐标变化量所对应的路径点确定为初始路径分段点。
其中,位置信息包括路径点对应的角度,预设位置阈值可以包括预设角度阈值,预设角度阈值可以基于实际情况进行设置,本申请实施例对此不做具体限定。例如,预设距离阈值为50厘米,预设角度范围为25°至135°、20°至130°或者15°至130°等。
示例性的,获取各个路径点对应的角度,并将该角度超过预设角度阈值所对应的路径点确定为初始路径分段点。
在一实施例中,如图5所示,步骤S103包括:子步骤S1031至子步骤S1033。
子步骤S1031,获取每个路径点对应的角度。
示例性的,对于初始路径上的每个路径点,在初始路径上与确定各路径点的相邻两个路径点;计算路径点与相邻两个路径点之间的连线所形成的夹角,并将路径点与相邻两个路径点之间的连线所形成的夹角确定为该路径点对应的角度。
其中,一个路径点对应一个角度,路径点的角度是路径点与相邻两个路径点之间的连线所形成的夹角。如图4所示,路径点a、b、c、d、e、f、g、h、i、j、k、l、m、n、o、p、q的角度分别为θ 1、θ 2、θ 3、θ 4、θ 5、θ 6、θ 7、θ 8、θ 9、θ 10、θ 11、θ 12、θ 13、θ 14、θ 15、θ 16、θ 17
子步骤S1032、对各个路径点对应的角度进行拟合,得到多个目标拟合线。
其中,可以对各个路径点对应的角度进行线性拟合,得到多个目标拟合直线,或者也可以对各个路径点对应的角度进行曲线拟合,得到多个目标拟合曲线,目标拟合线对应的角度队列中的最后两个角度之间的斜率相对于其他相邻两个角度之间的斜率的变化量大于或等于斜率变化阈值。该斜率变化阈值可以基于实际情况进行设置,本实施例对此不做具体限定。例如,斜率变化阈值为0.3。
示例性的,对各个路径点对应的角度进行拟合,得到多个目标拟合线的方式可以为:根据路径点在初始路径的布局顺序,对路径点对应的角度θ逐个执行拟合,得到拟合线对应的角度队列[θ 1,θ 2,...,θ i-1,θ i],其中,N≥i≥2,N 为角度个数;当检测到θ i与θ i-1之间的斜率相对于其他相邻两个角度之间的斜率的变化量大于或等于斜率变化阈值时,将角度队列[θ 1,θ 2,...,θ i-1,θ i]对应的拟合线确定为目标拟合线;将剩余未执行拟合的角度继续按照根据路径点在初始路径的布局顺序,对路径点对应的角度θ逐个执行拟合,得到拟合线对应的角度队列[θ i+1,θ i+2,...,θ i+m-1,θ i+m]的步骤,以得到多个目标拟合线,其中,i+m≤N。通过路径点在初始路径的布局顺序,可以快速地对各个路径点对应的角度进行拟合,可以提高确定目标拟合线的准确性,从而提高了初始路径分段点的准确性。
例如,在i为2时,基于图4所示的初始路径,可以得到路径点在初始路径的布局顺序,基于路径点在初始路径的布局顺序,可以先对角度θ 1和θ 2执行拟合,得到拟合线L 11,拟合线L 11对应的角度队列[θ 1,θ 2],由于角度队列[θ 1,θ 2]仅有一对相邻的角度,即无法进行与其他相邻的两个角的斜率的变化量进行比较,因此继续基于路径点在初始路径的布局顺序,对角度θ 1、θ 2和θ 3执行拟合,得到拟合线L 12,拟合线L 12对应的角度队列为[θ 1,θ 2,θ 3],若θ 2与θ 3之间的斜率变化量相对于θ 1与θ 2之间的斜率变化量大于或等于斜率变化阈值,则将拟合线L 12确定为目标拟合线。
然后将剩余未执行拟合的角度θ 4,θ 5,θ 6,θ 7,θ 8,θ 9,θ 10,θ 11,θ 12,θ 13,θ 14,θ 15,θ 16,θ 17继续按照路径点在初始路径的布局顺序,对路径点对应的角度θ逐个执行拟合,即先对角度θ 4和θ 5执行拟合,得到拟合线L 13对应的角度队列[θ 4,θ 5],由于角度队列[θ 4,θ 5]不存在其他相邻两个角度,则不比较,而是基于路径点在初始路径的布局顺序,对角度θ 4,θ 5和θ 6执行拟合,得到拟合线L 14,拟合线L 14对应的角度队列为[θ 4,θ 5,θ 6],若θ 6与θ 5之间的斜率相对于θ 5与θ 4之间的斜率的变化量大于或等于斜率变化阈值,则将拟合线L 14确定为目标拟合线。按照上述相同的方式继续将剩余未执行拟合的角度,按照路径点在初始路径的布局顺序,对路径点对应的角度θ逐个执行拟合,直到参与拟合的角度中包含θ 17,以结束对角度进行拟合,从而可以得到多个目标拟合线。
类似的,在i为3时,基于图4所示的初始路径,可以得到路径点在初始路径的布局顺序,基于路径点在初始路径的布局顺序,可以先对角度θ 1,θ 2和θ 3执行拟合,得到拟合线L 12对应的角度队列[θ 1,θ 2,θ 3],θ 3与θ 2之间的斜率相对于θ 2与θ 1之间的斜率的变化量大于斜率变化阈值,则将拟合线L 21确定为目标拟合线。然后将剩余未执行拟合的角度θ 4,θ 5,θ 6,θ 7,θ 8,θ 9,θ 10,θ 11,θ 12,θ 13,θ 14,θ 15,θ 16,θ 17继续按照路径点在初始路径的布局顺序,对路径点对应的角度θ逐个执行拟合,即先对角度θ 4,θ 5和θ 6执行拟合,得到拟合线L 21对应的角度队列[θ 4,θ 5,θ 6],若θ 6与θ 5之间的斜率相对于θ 5与θ 4之间的斜率的变化量大于或等于斜率变化阈值,则将拟合线L 21确定为目标拟合线,按照上述相同的方式继续将剩余未执行拟合的角度,按照路径点在初始路径的布局顺序,对路径点 对应的角度θ逐个执行拟合,直到参与拟合的角度中包含θ 17,以结束对角度进行拟合,从而可以得到多个目标拟合线。
子步骤S1033、获取位于各个目标拟合线末端的角度,以末端的角度所对应的路径点作为初始路径分段点。
本实施例中,由于待作业区域的实际边界不规则,这样会导致生成的初始路径无法紧贴待作业区域的实际边界,通过对各个路径点对应的角度进行拟合,得到多个目标拟合线,由于角度之间的斜率的变化量可以表示参与拟合的角度的一致性的程度,目标拟合线对应的角度队列中的最后两个角度之间的斜率相对于其他相邻两个角度之间的斜率的变化量大于或等于斜率变化阈值,获取位于各个目标拟合线的末端的角度,以末端的角度所对应的路径点确定为初始路径分段点,这样可以确定参与拟合的多个角度中存在对一致性影响较大的角度,对一致性影响较大的角度所对应的路径点即为路径分段点,这样可以准确地确定路径分段点,从而能够提高后续过滤路径分段点之间的路径点的准确性,可以减少不规则的沿边路径上的实际沿边路径点被遗漏的问题,使得沿边路径可以紧贴待作业区域的实际边界。
示例性的,获取各个目标拟合线对应的角度队列所在的队尾位置的角度,将队尾位置的角度作为目标角度;将目标角度对应的路径点作为初始路径分段点。例如,目标拟合线包括角度队列[θ 1,θ 2,θ 3]对应的拟合线,由于角度队列[θ 1,θ 2,θ 3]中的角度θ 3位于对应拟合线的末端,则将角度θ 3对应的路径点c确定为初始路径分段点。目标拟合线还包括角度队列[θ 4,θ 5,θ 6]对应的拟合线,由于角度队列[θ 4,θ 5,θ 6]中的角度θ 6位于对应拟合线的末端,则将角度θ 6对应的路径点e确定为初始路径分段点。
步骤S104、在任意相邻两个初始路径分段点之间的多个路径点中确定初始路径的补充路径分段点。
由于初始路径不是绝对连续的,且初始路径是基于栅格地图生成的,初始路径上的相邻路径点之间的距离与栅格地图的分辨率有关,通常栅格地图的分辨率较高,这样使得生成的初始路径上存在很多非必要的路径点,导致初始路径无法贴合待作业区域的实际边界,因此,在确定初始路径分段点之后,在任意相邻两个初始路径分段点之间的多个路径点中,确定初始路径的补充路径分段点,可以消除初始路径上的一些非必要的路径点,也可以减少不规则路径的路径点被遗漏的问题,以提高路径点的精确性。
在一实施例中,获取任意相邻两个初始路径分段点之间的路径点到对应的子路径的垂直距离,子路径由任意相邻两个初始路径分段点连线得到;将垂直距离大于或等于预设的参考阈值的路径点作为补充路径分段点;将垂直距离小于预设的参考阈值的路径点进行删除;对补充路径分段点和与其相邻的初始路径分段点之间的多个路径点,执行获取任意相邻两个初始路径分段点之间的路 径点到对应的子路径的垂直距离的步骤,直至对应子路径上不存在其他路径点。其中,预设的参考阈值可以基于实际情况进行设置,本实施例对此不做具体限定。例如,预设的参考阈值为0.1米。通过将垂直距离小于预设的参考阈值的路径点进行删除,可以消除初始路径上的一些非必要的路径点,而将垂直距离大于或等于预设的参考阈值的路径点作为补充路径分段点,可以减少不规则路径的路径点被遗漏。
例如,如图6所示,相邻两个初始路径分段点分别为初始路径分段点P 1和初始路径分段点P 2,路径段P 1P 2为对应的子路径,且路径段P 1P 2之间有路径点A、路径点B和路径点C,确定路径点A、路径点B和路径点C与路径段P 1P 2之间的垂直距离,由于路径点B和路径点C与路径段P 1P 2之间的垂直距离大于预设的参考阈值,则将路径点B和路径点C确定为补充路径分段点,而路径点A与路径段P 1P 2之间的垂直距离小于预设的参考阈值,则删除路径点A,由于补充路径分段点B与初始路径分段点P 1之间不存在其他路径点,以及补充路径分段点B与初始路径分段点P 2之间也不存在其他路径点,则不进行过滤,类似的,补充路径分段点C与初始路径分段点P 1之间不存在其他路径点,以及补充路径分段点C与初始路径分段点P 2之间也不存在其他路径点,则不进行过滤。
在另一实施例中,遍历路径段P 1P 2之间的路径点A、B以及C,获取到路径点A、B以及C到路径段P 1P 2的垂直距离。在路径点A、B以及C中确定B为距离路径段P 1P 2最远的路径点,若路径点B到路径段P 1P 2的垂直距离小于预设的参考阈值,则可知路径点A、B以及C到路径段P 1P 2的垂直距离小于预设的参考阈值,将删除路径点路径点A、B以及C即可。在若路径点B到路径段P 1P 2的垂直距离大于或等于预设的参考阈值,将B作为补充路径分段点,此时补充路径分段点B与初始路径分段点P 1、P 2形成路径段P 1B和BP 2。此时,遍历补充路径分段点B与初始路径分段点P 1之间的路径点,可以得到路径点A到路径段P 1B的距离,在该距离小于预设的参考阈值时,删除该路径点即可,反之则将A作为新的补充路径分段点,并对各路径分段点之间的路径点再次进行判断,直至P 1B之间不存在其他路径点。同样的,对补充路径分段点B与初始路径分段点P 2之间的点进行判断,比如对C点的距离进行判断,如果大于预设的参考阈值,则将其作为补充路径分段点,否则删除。
步骤S105、将初始路径分段点和补充路径分段点均作为目标路径分段点,并对目标路径分段点进行平滑处理,得到待执行的目标路径。
其中,可以基于预设平滑算法对目标路径分段点进行平滑处理,预设平滑算法可以包括最小二乘法、样条插值法、多项式插值法、佛洛依德算法、贝塞尔曲线算法、B样条曲线算法等,本申请实施例对此不做具体限定。例如,使用B样条曲线算法对目标路径分段点进行平滑处理,得到待执行的目标路径。具体为:从全部目标路径分段点选取一个目标路径点作为待处理路径点,并从全部 目标路径分段点中选择多个控制点,基于选择的多个控制点,生成待处理路径点对应的B样条曲线;对B样条曲线进行线段碰撞检测,碰撞检测的目的是保证自移动设备在所规划的路径行驶时不与障碍物发生碰撞。在B样条曲线未通过线段碰撞检测时,调整B样条曲线的控制点,以更新B样条曲线,直至B样条曲线通过线段碰撞检测,待处理路径点以及选择的多个控制点之间的路径段替换为通过线段碰撞检测的B样条曲线;遍历剩下的目标路径分段点,重复上述过程,以完成目标路径分段点的平滑处理,得到待执行的目标路径。
在一实施例中,获取目标路径上的每个路径段的曲率,路径段为任意相邻两个目标路径分段点之间的路径段;根据每个路径段的曲率,配置自移动设备在对应路径段上的移动速度。通过路径段的曲率,配置自移动设备在每个路径段上的移动速度,使得自移动设备在执行作业时可以进一步地沿着待作业区域的边界进行工作,提高作业效果。
示例性的,路径段的曲率的确定方式可以为:对位于路径段,即两个相邻的路径分段点之间的路径点进行拟合,得到路径拟合线;确定该路径拟合曲的曲率,并将该路径拟合线的曲率确定为路径段的曲率。
示例性的,获取预存的曲率与移动速度之间的对应关系,并根据预存的曲率与移动速度之间的对应关系以及每个路径段的曲率,配置自移动设备在每个路径段上的移动速度。其中,曲率与移动速度之间的对应关系可以预先通过多次试验得到,本实施例对此不做具体限定。
在一实施例中,获取目标路径上的每个目标路径分段点的角度;并根据目标路径上的每个目标路径分段点的角度,配置自移动设备在目标路径上的每个目标路径分段点处的角速度。通过在路径分段点处给自移动设备配置对应的角速度,使得自移动设备在执行作业时可以进一步地沿着待作业区域的边界进行工作,进一步地提高作业效果。
示例性的,获取预存的角度与角速度之间的对应关系;根据角度与角速度之间的对应关系以及目标路径上的每个路径分段点的角度,配置自移动设备在目标路径上的每个路径分段点处的角速度。其中,角度与角速度之间的对应关系可以预先通过多次试验得到,本实施例对此不做具体限定。
上述实施例提供的路径规划方法,基于待执行的初始路径中的各个路径点对应的位置信息,从初始路径中的各个路径点内确定初始路径分段点,并在任意相邻两个初始路径分段点之间的多个路径点中确定初始路径的补充路径分段点,在进行路径点过滤的同时,可以避免不规则的路径上的实际路径点被遗漏,将初始路径分段点和补充路径分段点均作为目标路径分段点,并对目标路径分段点进行平滑处理,得到待执行的目标路径,可以得到更加贴合待作业区域的实际边沿的目标路径,极大地提高了路径规划的准确性,使得自移动设备在按照目标路径进行作业时,能够紧贴待作业区域的边沿,从而减少遗漏区域,极 大地提高了自移动设备对作业区域进行作业的准确性。
请参阅图7,图7为本申请实施例提供的一种路径规划装置的结构示意性框图。
如图7所示,路径规划装置200包括:
获取模块210,被配置为获取待执行的初始路径,所述初始路径包括多个路径点;
获取模块210,还被配置为获取所述初始路径中的各个路径点对应的位置信息;所述位置信息用于表征所述路径点相对于相邻两个路径点的位置关系;
确定模块220,被配置为根据所述初始路径中的各个路径点对应的位置信息,从所述多个路径点中确定初始路径分段点;所述位置信息用于表征所述路径点相对于相邻两个路径点的位置关系;
所述确定模块220,还被配置为在任意相邻两个初始路径分段点之间的多个路径点中确定所述初始路径的补充路径分段点;
平滑处理模块230,被配置为将所述初始路径分段点和所述补充路径分段点均作为目标路径分段点,并对所述目标路径分段点进行平滑处理,得到待执行的目标路径。
在一实施例中,所述路径规划装置200还包括速度配置模块,其中:
所述获取模块210,还被配置为获取所述目标路径上的每个路径段的曲率,所述路径段为任意相邻两个所述目标路径分段点之间的路径段;
所述速度配置模块,被配置为根据每个路径段的曲率,配置自移动设备在对应路径段上的移动速度。
在一实施例中,所述确定模块220,还被配置为:
获取各个路径点相对于相邻路径点的位置信息变化量;在所述位置信息变化量超过预设位置变化量时,将所述路径点确定为初始路径分段点;或者
在所述位置信息超过预设位置阈值时,将所述路径点确定为初始路径分段点。
在一实施例中,所述位置信息包括角度;所述角度为所述路径点与相邻两个路径点之间的连线所形成的夹角;所述确定模块220,还被配置为:
获取每个所述路径点对应的角度;
对各个所述路径点对应的角度进行拟合,得到多个目标拟合线;
获取位于各个所述目标拟合线末端的角度,以所述末端的角度所对应的路径点作为初始路径分段点。
在一实施例中,所述确定模块220,还被配置为:
根据所述路径点在初始路径的布局顺序,对所述路径点对应的角度θ逐个执行拟合,得到拟合线对应的角度队列[θ 1,θ 2,...,θ i-1,θ i],其中,N≥i≥2,N为角度个数;
当检测到θ i与θ i-1之间的斜率相对于其他相邻两个角度之间的斜率的变化量大于或等于斜率变化阈值时,将所述角度队列[θ 1,θ 2,...,θ i-1,θ i]对应的拟合线确定为目标拟合线;
将剩余未执行所述拟合的角度继续按照根据所述路径点在初始路径的布局顺序,对所述路径点对应的角度θ逐个执行拟合,得到拟合线对应的角度队列[θ i+1,θ i+2,...,θ i+m-1,θ i+m]的步骤,以得到多个目标拟合线,其中,i+m≤N。
在一实施例中,所述确定模块220,还被配置为:
获取各个所述目标拟合线对应的角度队列所在的队尾位置的角度,将所述队尾位置的角度作为目标角度;
将所述目标角度对应的路径点作为初始路径分段点。
在一实施例中,所述确定模块220,还被配置为:
获取任意相邻两个初始路径分段点之间的路径点到对应的子路径的垂直距离,所述子路径由任意相邻两个初始路径分段点连线得到;
将所述垂直距离大于或等于预设的参考阈值的路径点作为补充路径分段点;
将所述垂直距离小于预设的参考阈值的路径点进行删除;
对所述补充路径分段点和与其相邻的初始路径分段点之间的多个路径点执行获取任意相邻两个初始路径分段点之间的路径点到对应的子路径的垂直距离的步骤,直至对应子路径上不存在其他路径点。
在一实施例中,平滑处理模块230,还被配置为:
基于预设平滑算法对目标路径分段点进行平滑处理,得到待执行的目标路径,其中,所述预设平滑算法包括最小二乘法、样条插值法、多项式插值法、佛洛依德算法、贝塞尔曲线算法、B样条曲线算法中的任意一种。
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的路径规划装置的具体工作过程,可以参考前述路径规划方法实施例中的对应过程,在此不再赘述。
请参阅图8,图8为本申请实施例提供的一种计算机设备的结构示意性框图。
如图8所示,计算机设备300包括处理器310和存储器320,处理器310和存储器320通过总线330连接,该总线比如为I2C(Inter-integrated Circuit)总线。计算机设备300可以包括自移动设备、终端设备或服务器。
具体地,处理器310用于提供计算和控制能力,支撑整个路径规划装置的运行。处理器310可以是中央处理单元(Central Processing Unit,CPU),该处理器301还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
具体地,存储器320可以是Flash芯片、只读存储器(ROM,Read-Only Memory)磁盘、光盘、U盘或移动硬盘等。
本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请实施例方案相关的部分结构的框图,并不构成对本申请实施例方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
其中,所述处理器用于运行存储在存储器中的计算机程序,并在执行所述计算机程序时实现本申请实施例提供的任意一种所述的路径规划方法。
在一实施例中,所述处理器用于运行存储在存储器中的计算机程序,并在执行所述计算机程序时实现以下步骤:
获取待执行的初始路径,所述初始路径包括多个路径点;
根据所述初始路径中的各个路径点对应的位置信息,从所述多个路径点中确定初始路径分段点;所述位置信息用于表征所述路径点相对于相邻两个路径点的位置关系;
在任意相邻两个初始路径分段点之间的多个路径点中确定所述初始路径的补充路径分段点;
将所述初始路径分段点和所述补充路径分段点均作为目标路径分段点,并对所述目标路径分段点进行平滑处理,得到待执行的目标路径。
在一实施例中,所述处理器在实现对所述目标路径分段点进行平滑处理,得到待执行的目标路径之后,还用于实现:
获取所述目标路径上的每个路径段的曲率,所述路径段为任意相邻两个所述目标路径分段点之间的路径段;
根据每个路径段的曲率,配置自移动设备在对应路径段上的移动速度。
在一实施例中,所述处理器在实现根据所述初始路径中的各个路径点对应的位置信息,从所述多个路径点中确定初始路径分段点时,用于实现:
获取各个路径点相对于相邻路径点的位置信息变化量;在所述位置信息变化量超过预设位置变化量时,将所述路径点确定为初始路径分段点;或者
在所述位置信息超过预设位置阈值时,将所述路径点确定为初始路径分段点。
在一实施例中,所述位置信息包括角度;所述角度为所述路径点与相邻两个路径点之间的连线所形成的夹角;所述处理器在实现根据所述初始路径中的各个路径点对应的位置信息,从所述多个路径点中确定初始路径分段点时,用于实现:
获取每个所述路径点对应的角度;
对各个所述路径点对应的角度进行拟合,得到多个目标拟合线;
获取位于各个所述目标拟合线的末端的角度,以所述末端的角度所对应的 路径点作为初始路径分段点。
在一实施例中,所述处理器在实现对各个所述路径点对应的角度进行拟合,得到多个目标拟合线时,用于实现:
根据所述路径点在初始路径的布局顺序,对所述路径点对应的角度θ逐个执行拟合,得到拟合线对应的角度队列[θ 1,θ 2,...,θ i-1,θ i],其中,N≥i≥2,N为角度个数;
当检测到θ i与θ i-1之间的斜率相对于其他相邻两个角度之间的斜率的变化量大于或等于斜率变化阈值时,将所述角度队列[θ 1,θ 2,...,θ i-1,θ i]对应的拟合线确定为目标拟合线;
将剩余未执行拟合的角度继续按照根据所述路径点在初始路径的布局顺序,对所述路径点对应的角度θ逐个执行拟合,得到拟合线对应的角度队列[θ i+1,θ i+2,...,θ i+m-1,θ i+m]的步骤,以得到多个目标拟合线,其中,i+m≤N。
在一实施例中,所述处理器在实现获取位于各个所述目标拟合线末端的角度,以所述末端的角度所对应的路径点作为初始路径分段点时,用于实现:
获取各个所述目标拟合线对应的角度队列所在的队尾位置的角度,将所述队尾位置的角度作为目标角度;
将所述目标角度对应的路径点作为初始路径分段点。
在一实施例中,所述处理器在实现在任意相邻两个初始路径分段点之间的多个路径点中确定所述初始路径的补充路径分段点时,用于实现:
获取任意相邻两个初始路径分段点之间的路径点到对应的子路径的垂直距离,所述子路径由任意相邻两个初始路径分段点连线得到;
将所述垂直距离大于或等于预设的参考阈值的路径点作为补充路径分段点;
将所述垂直距离小于预设的参考阈值的路径点进行删除;
对所述补充路径分段点和与其相邻的初始路径分段点之间的多个路径点进行过滤,直至对应子路径上不存在其他路径点。
在一实施例中,所述处理器在实现对所述目标路径分段点进行平滑处理,得到待执行的目标路径时,用于实现:
基于预设平滑算法对目标路径分段点进行平滑处理,得到待执行的目标路径,其中,所述预设平滑算法包括最小二乘法、样条插值法、多项式插值法、佛洛依德算法、贝塞尔曲线算法、B样条曲线算法中的任意一种。
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的计算机设备的具体工作过程,可以参考前述路径规划方法实施例中的对应过程,在此不再赘述。
本申请实施例还提供一种存储介质,用于计算机可读存储,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如本申请实施例说明书提供的任一项路径规划的方法。
其中,所述存储介质可以是前述实施例所述的计算机设备的内部存储单元,例如所述计算机设备的硬盘或内存。所述存储介质也可以是所述计算机设备的外部存储设备,例如所述计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施例中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。以上所述,仅为本申请的具体实施例,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (10)

  1. 一种路径规划方法,包括:
    获取待执行的初始路径,所述初始路径包括多个路径点;
    获取所述初始路径中的各个路径点对应的位置信息;所述位置信息用于表征所述路径点相对于相邻两个路径点的位置关系;
    根据所述初始路径中的各个路径点对应的位置信息,从所述多个路径点中确定初始路径分段点;
    在任意相邻两个初始路径分段点之间的多个路径点中,确定所述初始路径的补充路径分段点;
    将所述初始路径分段点和所述补充路径分段点均作为目标路径分段点,并对所述目标路径分段点进行平滑处理,得到待执行的目标路径。
  2. 根据权利要求1所述的路径规划方法,其中,在所述对所述目标路径分段点进行平滑处理,得到待执行的目标路径之后,还包括:
    获取所述目标路径上的每个路径段的曲率,所述路径段为任意相邻两个所述目标路径分段点之间的路径段;
    根据每个路径段的曲率,配置自移动设备在对应路径段上的移动速度。
  3. 根据权利要求1所述的路径规划方法,其中,所述根据所述初始路径中的各个路径点对应的位置信息,从所述多个路径点中确定初始路径分段点,包括:
    获取各个路径点相对于相邻路径点的位置信息变化量;在所述位置信息变化量超过预设位置变化量时,将所述路径点确定为初始路径分段点;或者
    在所述位置信息超过预设位置阈值时,将所述路径点确定为初始路径分段点。
  4. 根据权利要求1所述的路径规划方法,其中,所述位置信息包括角度;所述角度为所述路径点与相邻两个路径点之间的连线所形成的夹角;所述根据所述初始路径中的各个路径点对应的位置信息,从所述多个路径点中确定初始路径分段点,包括:
    获取每个所述路径点对应的角度;
    对各个所述路径点对应的角度进行拟合,得到多个目标拟合线;
    获取位于各个所述目标拟合线末端的角度,以所述末端的角度所对应的路径点作为初始路径分段点。
  5. 根据权利要求4所述的路径规划方法,其中,所述对各个所述路径点对应的角度进行拟合,得到多个目标拟合线,包括:
    根据所述路径点在初始路径的布局顺序,对所述路径点对应的角度θ逐个 执行拟合,得到拟合线对应的角度队列[θ 1,θ 2,...,θ i-1,θ i],其中,N≥i≥2,N为角度个数;
    当检测到θ i与θ i-1之间的斜率相对于其他相邻两个角度之间的斜率的变化量大于或等于斜率变化阈值时,将所述角度队列[θ 1,θ 2,...,θ i-1,θ i]对应的拟合线确定为目标拟合线;
    将剩余未执行拟合的角度继续按照根据所述路径点在初始路径的布局顺序,对所述路径点对应的角度θ逐个执行拟合,得到拟合线对应的角度队列[θ i+1,θ i+2,...,θ i+m-1,θ i+m]的步骤,以得到多个目标拟合线,其中,i+m≤N。
  6. 根据权利要求4所述的路径规划方法,其中,所述获取位于各个所述目标拟合线末端的角度,以所述末端的角度所对应的路径点作为初始路径分段点,包括:
    获取各个所述目标拟合线对应的角度队列所在的队尾位置的角度,将所述队尾位置的角度作为目标角度;
    将所述目标角度对应的路径点作为初始路径分段点。
  7. 根据权利要求1-6中任一项所述的路径规划方法,其中,所述在任意相邻两个初始路径分段点之间的多个路径点中,确定所述初始路径的补充路径分段点,包括:
    获取任意相邻两个初始路径分段点之间的路径点到对应的子路径的垂直距离,所述子路径由任意相邻两个初始路径分段点连线得到;
    将所述垂直距离大于或等于预设的参考阈值的路径点作为补充路径分段点;
    将所述垂直距离小于预设的参考阈值的路径点进行删除;
    对所述补充路径分段点和与其相邻的初始路径分段点之间的多个路径点执行获取任意相邻两个初始路径分段点之间的路径点到对应的子路径的垂直距离的步骤,直至对应子路径上不存在其他路径点。
  8. 根据权利要求1所述的路径规划方法,其中,所述对所述目标路径分段点进行平滑处理,得到待执行的目标路径,包括:
    基于预设平滑算法对目标路径分段点进行平滑处理,得到待执行的目标路径,其中,所述预设平滑算法包括最小二乘法、样条插值法、多项式插值法、佛洛依德算法、贝塞尔曲线算法、B样条曲线算法中的任意一种。
  9. 一种计算机设备,所述计算机设备包括处理器、存储器、存储在所述存储器上并可被所述处理器执行的计算机程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,其中所述计算机程序被所述处理器执行时,实现如权利要求1至8中任一项所述的路径规划方法。
  10. 一种存储介质,用于计算机可读存储,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求1至8中任一项所述的路径规划方法。
PCT/CN2022/099329 2022-06-17 2022-06-17 路径规划方法、计算机设备及存储介质 WO2023240577A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2022/099329 WO2023240577A1 (zh) 2022-06-17 2022-06-17 路径规划方法、计算机设备及存储介质
CN202280002337.9A CN115280102A (zh) 2022-06-17 2022-06-17 路径规划方法、计算机设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/099329 WO2023240577A1 (zh) 2022-06-17 2022-06-17 路径规划方法、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023240577A1 true WO2023240577A1 (zh) 2023-12-21

Family

ID=83757856

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/099329 WO2023240577A1 (zh) 2022-06-17 2022-06-17 路径规划方法、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN115280102A (zh)
WO (1) WO2023240577A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158384A (zh) * 2020-04-08 2020-05-15 炬星科技(深圳)有限公司 机器人建图方法、设备及存储介质
CN113847924A (zh) * 2021-09-06 2021-12-28 西安交通大学 一种基于参数曲线优化的导航路径规划方法、系统
CN113961004A (zh) * 2021-09-27 2022-01-21 武汉理工大学 海盗区域船舶航线规划方法、系统、电子设备及存储介质

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158384A (zh) * 2020-04-08 2020-05-15 炬星科技(深圳)有限公司 机器人建图方法、设备及存储介质
CN113847924A (zh) * 2021-09-06 2021-12-28 西安交通大学 一种基于参数曲线优化的导航路径规划方法、系统
CN113961004A (zh) * 2021-09-27 2022-01-21 武汉理工大学 海盗区域船舶航线规划方法、系统、电子设备及存储介质

Also Published As

Publication number Publication date
CN115280102A (zh) 2022-11-01

Similar Documents

Publication Publication Date Title
US10866104B2 (en) Route-deviation recognition method, terminal, and storage medium
CN111536964B (zh) 机器人定位方法及装置、存储介质
TW202032437A (zh) 物體位姿估計方法及裝置、電腦可讀儲存介質
WO2022121018A1 (zh) 机器人及其建图方法和装置
CN109579849A (zh) 机器人定位方法、装置和机器人及计算机存储介质
EP3139196A1 (en) System and method for positioning, mapping and data management by using crowdsourcing
CN110561423A (zh) 位姿变换的方法、机器人及存储介质
CN106643721B (zh) 一种环境拓扑地图的构建方法
CN111813101A (zh) 机器人路径规划方法、装置、终端设备及存储介质
CN109782806B (zh) 一种无人机室内路径跟踪方法及装置
WO2023160698A1 (zh) 动态全覆盖路径规划方法及装置、清洁设备、存储介质
CN111836185A (zh) 一种基站位置坐标的确定方法、装置、设备及存储介质
CN114063858A (zh) 图像处理方法、装置、电子设备及存储介质
WO2023240577A1 (zh) 路径规划方法、计算机设备及存储介质
WO2022036981A1 (zh) 机器人及其地图构建方法和装置
WO2021134687A1 (zh) 航点规划方法、控制终端、定位装置、系统及存储介质
CN111338381A (zh) 一种无人机作业控制方法、装置、遥控器及存储介质
CN116429121A (zh) 基于多传感器的定位方法、装置、自移动设备及存储介质
WO2022252482A1 (zh) 机器人及其环境地图构建方法和装置
CN115290066A (zh) 一种误差校正方法、装置及移动设备
CN114723917A (zh) 激光里程计的位姿优化方法、装置、介质及设备
CN112797983A (zh) 路径规划方法、装置、无人设备及存储介质
CN114443679A (zh) 一种地图数据更新方法、装置、设备以及存储介质
CN113724384A (zh) 机器人拓扑地图生成系统、方法、计算机设备及存储介质
CN112767237B (zh) 基于点云数据的环形位姿控制方法、装置及超声设备

Legal Events

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

Ref document number: 22946266

Country of ref document: EP

Kind code of ref document: A1