[go: up one dir, main page]

CN116360437A - Intelligent robot path planning method, device, equipment and storage medium - Google Patents

Intelligent robot path planning method, device, equipment and storage medium Download PDF

Info

Publication number
CN116360437A
CN116360437A CN202310309642.9A CN202310309642A CN116360437A CN 116360437 A CN116360437 A CN 116360437A CN 202310309642 A CN202310309642 A CN 202310309642A CN 116360437 A CN116360437 A CN 116360437A
Authority
CN
China
Prior art keywords
population
path
initial
individual
intelligent robot
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.)
Pending
Application number
CN202310309642.9A
Other languages
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.)
Wuhan Polytechnic University
Original Assignee
Wuhan Polytechnic University
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 Wuhan Polytechnic University filed Critical Wuhan Polytechnic University
Priority to CN202310309642.9A priority Critical patent/CN116360437A/en
Publication of CN116360437A publication Critical patent/CN116360437A/en
Pending 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/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
    • G05D1/0214Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory in accordance with safety or protection criteria, e.g. avoiding hazardous areas
    • 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
    • G05D1/0221Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory involving a learning process
    • 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/0276Control of position or course in two dimensions specially adapted to land vehicles using signals provided by a source external to the vehicle
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

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)
  • Manipulator (AREA)

Abstract

The invention belongs to the technical field of intelligent robots, and discloses an intelligent robot path planning method, an intelligent robot path planning device, intelligent robot path planning equipment and a storage medium. According to the invention, the initial position and the target position of the intelligent robot are obtained, the initial position and the target position are searched based on an improved Harriset algorithm in an intelligent path planning model, an initial planning path is generated, the improved Harriset algorithm comprises the steps of replacing random parameters in an original Harriset algorithm to initialize a population to obtain an initial population sequence, adding elite reverse learning strategies to update the population, and determining a global optimal path based on the initial planning path, so that the problems that the random parameters cannot completely traverse all the section spaces for initializing the population, the obtained population is uneven in distribution and the population falls into an early state, so that the population has higher quality and diversity, higher searching speed and convergence precision compared with the prior art, and the path optimizing capability of the intelligent robot is improved.

Description

智能机器人路径规划方法、装置、设备及存储介质Intelligent robot path planning method, device, equipment and storage medium

技术领域technical field

本发明涉及智能机器人技术领域,尤其涉及一种智能机器人路径规划方法、装置、设备及存储介质。The present invention relates to the technical field of intelligent robots, in particular to an intelligent robot path planning method, device, equipment and storage medium.

背景技术Background technique

近年来,快速发展的信息产业与工业技术相互融合,智能机器人在诸多领域得到广泛应用,如物流分配、酒店送餐、仓储管理等场景中已经得到了实际应用。In recent years, with the rapid development of the information industry and industrial technology, intelligent robots have been widely used in many fields, such as logistics distribution, hotel delivery, warehouse management and other scenarios.

在此类问题中,机器人需要在给定的起始点与目标点之间找到一条最短路径,过程中通常还需要避开路面上的不同类型的障碍物,在某些情况中还要考虑到时间成本与运输成本之间的平衡,或者是多目标问题的最优路线问题,它们的结果往往是多样的,因此对路径规划方法的有着不同的选择。传统的路径规划方法如dijsktra算法、A*算法等,存在着效率低、速度慢的缺点,在现实场景中机器人寻找路径时表现欠佳,无法很好的解决智能机器人在静态场景中的路径寻优过程。In this type of problem, the robot needs to find a shortest path between a given starting point and a goal point, usually avoiding different types of obstacles on the road, and in some cases time The balance between cost and transportation cost, or the optimal routing problem for multi-objective problems, their results are often diverse, so there are different choices for path planning methods. Traditional path planning methods such as dijsktra algorithm, A* algorithm, etc., have the disadvantages of low efficiency and slow speed. In real scenes, robots perform poorly when searching for paths, and cannot solve the problem of intelligent robots in static scenes. Excellent process.

上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist in understanding the technical solution of the present invention, and does not mean that the above content is admitted as prior art.

发明内容Contents of the invention

本发明的主要目的在于提供一种智能机器人路径规划方法、装置、设备及存储介质,旨在解决现有技术中智能机器人对显示场景中的额寻找路径表现欠佳的技术问题。The main purpose of the present invention is to provide a path planning method, device, equipment and storage medium for an intelligent robot, aiming at solving the technical problem in the prior art that the intelligent robot performs poorly in finding the path in the display scene.

为实现上述目的,本发明提供了一种智能机器人路径规划方法,所述方法包括以下步骤:To achieve the above object, the present invention provides a method for path planning of an intelligent robot, said method comprising the following steps:

获取智能机器人的初始位置与目标位置;Obtain the initial position and target position of the intelligent robot;

基于智能路径规划模型中改进哈里斯鹰算法对所述初始位置与目标位置进行寻路,生成初始规划路径,所述改进哈里斯鹰算法包括替换原始哈里斯鹰算法中利用随机参数对种群进行初始化,得到初始种群序列,添加精英反向学习策略对所述种群更新;Based on the improved Harris Eagle algorithm in the intelligent path planning model, the initial position and the target position are routed to generate an initial planning path. The improved Harris Eagle algorithm includes replacing the original Harris Eagle algorithm with random parameters to initialize the population. , get the initial population sequence, add the elite reverse learning strategy to update the population;

基于所述初始规划路径确定全局最优路径。A globally optimal path is determined based on the initial planned path.

可选地,所述基于智能路径规划模型中改进哈里斯鹰算法对所述初始位置与目标位置进行寻路,生成初始规划路径,包括:Optionally, the improved Harris Eagle algorithm based on the intelligent path planning model performs pathfinding on the initial position and the target position, and generates an initial planning path, including:

获取现实场景中的障碍物信息,并根据所述障碍物信息建立静态栅格地图;Obtain obstacle information in the real scene, and create a static grid map based on the obstacle information;

在所述静态栅格地图设置预设种群;Setting preset populations in the static grid map;

对所述预设种群进行初始化,得到初始化种群,所述种群中包括至少一个个体;Initializing the preset population to obtain an initialized population, the population includes at least one individual;

在当前迭代次数未达到最大迭代次数时,根据搜索空间的界限得到所述种群中各个体的适应度;When the current number of iterations does not reach the maximum number of iterations, the fitness of each individual in the population is obtained according to the limit of the search space;

更新所述种群中的各个体的逃逸能量,根据所述逃逸能量执行围捕策略,得到所述种群中各个体的位置;updating the escape energy of each individual in the population, executing a round-up strategy according to the escape energy, and obtaining the position of each individual in the population;

根据所述位置生成初始规划路径。An initial planned path is generated based on the position.

可选地,所述改进哈里斯鹰算法包括替换原始哈里斯鹰算法中利用随机参数对种群进行初始化,得到初始种群序列,包括:Optionally, the improved Harris Eagle algorithm includes replacing the original Harris Eagle algorithm with random parameters to initialize the population to obtain an initial population sequence, including:

设置初始种群序列与迭代参数;Set the initial population sequence and iteration parameters;

根据所述迭代参数与目标函数对所述初始种群序列进行迭代,得到子代种群序列,并更新当前迭代次数;Iterating the initial population sequence according to the iteration parameters and the objective function to obtain the offspring population sequence, and updating the current number of iterations;

在所述当前迭代次数等于最大迭代次数时,根据所述子代种群序列生成初始种群序列。When the current number of iterations is equal to the maximum number of iterations, an initial population sequence is generated according to the child population sequence.

可选地,所述根据所述迭代参数与目标函数对所述初始种群序列进行迭代,得到子代种群序列,包括:Optionally, the iterating the initial population sequence according to the iteration parameter and the objective function to obtain the offspring population sequence includes:

根据所述种群中的个体的当前位置得到种群中个体的相对平均位置;obtaining the relative average position of the individual in the population according to the current position of the individual in the population;

根据所述种群中的个体的当前位置,当前的迭代次数,猎物位置以及所述相对平均位置得到所述个体下一次的迭代位置;Obtain the next iteration position of the individual according to the current position of the individual in the population, the current number of iterations, the position of the prey and the relative average position;

根据适应度与所述下一次的迭代位置选择精英个体;Select elite individuals according to the fitness and the next iteration position;

根据所述精英个体与静态栅格地图的界限得到反向种群;Obtain the reverse population according to the boundary between the elite individual and the static grid map;

将所述反向种群与所述初始种群序列迭代后的种群序列得到所述子代种群序列。The population sequence after iterating the reverse population and the initial population sequence is used to obtain the descendant population sequence.

可选地,所述根据搜索空间的界限得到所述种群中各个体的适应度,包括:Optionally, the obtaining the fitness of each individual in the population according to the limit of the search space includes:

根据所述种群中各个体的当前位置与初始位置得到对应的移动距离;obtaining the corresponding moving distance according to the current position and the initial position of each individual in the population;

根据所述移动距离以及所述搜索空间的界限得到所述种群中各个体的适应度。The fitness of each individual in the population is obtained according to the moving distance and the limit of the search space.

可选地,所述更新所述种群中的各个体的逃逸能量,根据所述逃逸能量执行围捕策略,得到所述种群中各个体的位置,并根据所述位置生成初始规划路径,包括:Optionally, the updating the escape energy of each individual in the population, executing a round-up strategy according to the escape energy, obtaining the position of each individual in the population, and generating an initial planning path according to the position includes:

根据所述种群中各个体的当前迭代次数与最大迭代次数得到所述各个体的逃逸能量;Obtain the escape energy of each individual according to the current number of iterations and the maximum number of iterations of each individual in the population;

在所述逃逸能量大于预设俯冲围捕能量时,采用围捕策略,调整所述逃逸能量并得到围捕后的位置;When the escape energy is greater than the preset swooping and encircling energy, adopt a encircling strategy, adjust the escape energy and obtain the encircled position;

在所述逃逸能量小于预设俯冲围捕能量时,采用俯冲围捕策略,调整所述逃逸能量并得到围捕后的位置;When the escape energy is less than the preset swooping and rounding up energy, adopt a swooping and rounding up strategy, adjust the escape energy and obtain the position after rounding up;

根据所述围捕后的位置生成初始规划路径。An initial planned path is generated according to the captured position.

可选地,所述基于所述初始规划路径确定全局最优路径,包括:Optionally, the determining the global optimal path based on the initial planning path includes:

获取所述种群中各个体的当前位置,根据所述当前位置与所述初始位置得到移动距离,将所述当前位置、初始位置与所述移动距离存储至禁忌表;Obtaining the current position of each individual in the population, obtaining the moving distance according to the current position and the initial position, and storing the current position, the initial position and the moving distance in a taboo table;

对所述禁忌表中的移动距离进行比较,在当前路径上不存在障碍物时,将所述移动距离中最短的路径作为全局最优路径。The moving distances in the taboo table are compared, and when there is no obstacle on the current path, the shortest path among the moving distances is taken as the globally optimal path.

此外,为实现上述目的,本发明还提出一种智能机器人路径规划装置,所述智能机器人路径规划装置包括:In addition, in order to achieve the above purpose, the present invention also proposes an intelligent robot path planning device, which includes:

位置获取模块,用于获取智能机器人的初始位置与目标位置;The position obtaining module is used to obtain the initial position and the target position of the intelligent robot;

路径规划模块,用于基于智能路径规划模型中改进哈里斯鹰算法对所述初始位置与目标位置进行寻路,生成初始规划路径,所述改进哈里斯鹰算法包括替换原始哈里斯鹰算法中利用随机参数对种群进行初始化,得到初始种群序列,添加精英反向学习策略对所述种群更新;The path planning module is used to find the initial position and the target position based on the improved Harris Eagle algorithm in the intelligent path planning model, and generate an initial planned path. The improved Harris Eagle algorithm includes replacing the original Harris Eagle algorithm. Random parameters are used to initialize the population to obtain the initial population sequence, and the elite reverse learning strategy is added to update the population;

路径决定模块,用于基于所述初始规划路径确定全局最优路径。A path determination module, configured to determine a globally optimal path based on the initial planned path.

此外,为实现上述目的,本发明还提出一种智能机器人路径规划设备,所述智能机器人路径规划设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的智能机器人路径规划程序,所述智能机器人路径规划程序配置为实现如上文所述的智能机器人路径规划方法的步骤。In addition, in order to achieve the above object, the present invention also proposes a path planning device for an intelligent robot, which includes: a memory, a processor, and an intelligence stored in the memory and operable on the processor. A robot path planning program, the intelligent robot path planning program is configured to implement the steps of the above-mentioned intelligent robot path planning method.

此外,为实现上述目的,本发明还提出一种存储介质,所述存储介质上存储有智能机器人路径规划程序,所述智能机器人路径规划程序被处理器执行时实现如上文所述的智能机器人路径规划方法的步骤。In addition, in order to achieve the above object, the present invention also proposes a storage medium, on which an intelligent robot path planning program is stored, and when the intelligent robot path planning program is executed by a processor, the intelligent robot path as described above is realized. Steps of the planning method.

本发明获取智能机器人的初始位置与目标位置,基于智能路径规划模型中改进哈里斯鹰算法对所述初始位置与目标位置进行寻路,生成初始规划路径,所述改进哈里斯鹰算法包括替换原始哈里斯鹰算法中利用随机参数对种群进行初始化,得到初始种群序列,添加精英反向学习策略对所述种群更新,基于所述初始规划路径确定全局最优路径,能够解决随机参数对种群初始化不能完全遍历所有有节空间,所得种群分布不均匀,以及种群陷入早熟状态,使种群具有较高的质量以及多样性,相对现有技术本发明具备更高的搜索速度以及收敛精度,提高智能机器人的路径寻优能力。The present invention obtains the initial position and the target position of the intelligent robot, searches the initial position and the target position based on the improved Harris Eagle algorithm in the intelligent path planning model, and generates an initial planning path, and the improved Harris Eagle algorithm includes replacing the original In the Harris Eagle algorithm, random parameters are used to initialize the population to obtain the initial population sequence, and the elite reverse learning strategy is added to update the population, and the global optimal path is determined based on the initial planning path, which can solve the problem that random parameters cannot initialize the population. Completely traversing all knotted spaces, resulting in uneven distribution of the population, and the population falls into a premature state, so that the population has higher quality and diversity. Compared with the prior art, the present invention has higher search speed and convergence accuracy, and improves the intelligence of intelligent robots. Path finding ability.

附图说明Description of drawings

图1是本发明实施例方案涉及的硬件运行环境的智能机器人路径规划设备的结构示意图;Fig. 1 is a schematic structural diagram of an intelligent robot path planning device for a hardware operating environment involved in the solution of an embodiment of the present invention;

图2为本发明智能机器人路径规划方法第一实施例的流程示意图;Fig. 2 is a schematic flow chart of the first embodiment of the intelligent robot path planning method of the present invention;

图3为本发明智能机器人路径规划方法第二实施例的流程示意图;Fig. 3 is a schematic flow chart of the second embodiment of the intelligent robot path planning method of the present invention;

图4为本发明智能机器人路径规划方法一实施例的路径寻优流程图;Fig. 4 is a path optimization flow chart of an embodiment of the intelligent robot path planning method of the present invention;

图5为本发明智能机器人路径规划方法一实施例的栅格地图示意图;5 is a schematic diagram of a grid map of an embodiment of an intelligent robot path planning method according to the present invention;

图6为本发明智能机器人路径规划方法一实施例的种群初始化的对照图;Fig. 6 is a control diagram of population initialization of an embodiment of the intelligent robot path planning method of the present invention;

图7为本发明智能机器人路径规划装置第一实施例的结构框图。Fig. 7 is a structural block diagram of the first embodiment of the intelligent robot path planning device of the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.

具体实施方式Detailed ways

应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

参照图1,图1为本发明实施例方案涉及的硬件运行环境的智能机器人路径规划设备结构示意图。Referring to FIG. 1 , FIG. 1 is a schematic structural diagram of an intelligent robot path planning device in a hardware operating environment involved in an embodiment of the present invention.

如图1所示,该智能机器人路径规划设备可以包括:处理器1001,例如中央处理器(Central Processing Unit,CPU),通信总线1002、用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如无线保真(Wireless-Fidelity,Wi-Fi)接口)。存储器1005可以是高速的随机存取存储器(RandomAccess Memory,RAM)存储器,也可以是稳定的非易失性存储器(Non-Volatile Memory,NVM),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1 , the intelligent robot path planning device may include: a processor 1001 , such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002 , a user interface 1003 , a network interface 1004 , and a memory 1005 . Wherein, the communication bus 1002 is used to realize connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001 .

本领域技术人员可以理解,图1中示出的结构并不构成对智能机器人路径规划设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure shown in Figure 1 does not constitute a limitation to the intelligent robot path planning device, and may include more or less components than shown in the illustration, or combine certain components, or arrange different components .

如图1所示,作为一种存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及智能机器人路径规划程序。As shown in FIG. 1 , the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and an intelligent robot path planning program.

在图1所示的智能机器人路径规划设备中,网络接口1004主要用于与网络服务器进行数据通信;用户接口1003主要用于与用户进行数据交互;本发明智能机器人路径规划设备中的处理器1001、存储器1005可以设置在智能机器人路径规划设备中,所述智能机器人路径规划设备通过处理器1001调用存储器1005中存储的智能机器人路径规划程序,并执行本发明实施例提供的智能机器人路径规划方法。In the intelligent robot path planning device shown in Figure 1, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 in the intelligent robot path planning device of the present invention . The memory 1005 can be set in the intelligent robot path planning device. The intelligent robot path planning device invokes the intelligent robot path planning program stored in the memory 1005 through the processor 1001, and executes the intelligent robot path planning method provided by the embodiment of the present invention.

本发明实施例提供了一种智能机器人路径规划方法,参照图2,图2为本发明一种智能机器人路径规划方法第一实施例的流程示意图。An embodiment of the present invention provides a path planning method for an intelligent robot. Referring to FIG. 2 , FIG. 2 is a schematic flowchart of a first embodiment of a path planning method for an intelligent robot according to the present invention.

本实施例中,所述智能机器人路径规划方法包括以下步骤:In this embodiment, the intelligent robot path planning method includes the following steps:

步骤S10:获取智能机器人的初始位置与目标位置。Step S10: Obtain the initial position and target position of the intelligent robot.

需要说明的是,本实施例的执行主体是智能机器人路径规划设备,其中,该智能机器人路径规划设备具有数据处理,数据通信及程序运行等功能,所述智能机器人路径规划设备可以为集成控制器,控制计算机等设备,当然还可以为其他具备相似功能的设备,本实施例对此不做限制。It should be noted that the execution subject of this embodiment is an intelligent robot path planning device, wherein the intelligent robot path planning device has functions such as data processing, data communication and program operation, and the intelligent robot path planning device can be an integrated controller , to control devices such as computers, of course, may also be other devices with similar functions, which is not limited in this embodiment.

可以理解的是,所述初始位置指的是在本次路径规划中,智能机器人的起点,即所述智能机器人将从所述初始位置开始移动,所述目标位置,指的是所述智能机器人需要到达的位置。It can be understood that the initial position refers to the starting point of the intelligent robot in this path planning, that is, the intelligent robot will start to move from the initial position, and the target position refers to the starting point of the intelligent robot. The location to be reached.

在具体实现中,所述智能机器人在获取初始位置与目标位置时,可以通过所述智能机器人与外部通讯装置,获取到所述智能机器人的初始位置与所述目标位置,所述智能机器人还可以具备自主定位的能力,能够确定出所述智能机器人当前所处在的位置以及目标位置,在路径规划的实际处理过程中,可能存在多种形式,一般来说,一个智能机器人的起始位置只有一个,从该点出发,执行相应的工作任务,所述智能机器人的功能根据实际情况确定本实施例对此不做限制,本实施例以搬运货物为例进行说明,智能机器人从起始位置出发,寻找货物,并将货物运输至指定位置,在这个过程中,可能需要前往中间结点完成货物装载或卸载货物的动作,因此,中间结点的数量不固定,因此在实际场景中,通常至少包括以下几种情况:一个起始点,一个目标点;一个起始点,一个中间点,一个目标点;一个起始点,多个中间点,一个目标点;一个起始点,多个中间点,多个目标点,因此,所述目标位置的数量至少为一个,当所述智能机器人遍历完所有的目标点后即完成配送任务。In a specific implementation, when the intelligent robot obtains the initial position and the target position, it can obtain the initial position and the target position of the intelligent robot through the intelligent robot and an external communication device, and the intelligent robot can also With the ability of autonomous positioning, it can determine the current position and target position of the intelligent robot. In the actual process of path planning, there may be many forms. Generally speaking, the starting position of an intelligent robot is only One, starting from this point, perform corresponding work tasks, the function of the intelligent robot is determined according to the actual situation. This embodiment does not limit this. This embodiment takes the example of carrying goods for illustration, and the intelligent robot starts from the starting position , looking for goods, and transporting the goods to the designated location. In this process, it may be necessary to go to the intermediate node to complete the action of loading or unloading the goods. Therefore, the number of intermediate nodes is not fixed, so in actual scenarios, usually at least Including the following situations: one starting point, one target point; one starting point, one intermediate point, one target point; one starting point, multiple intermediate points, one target point; one starting point, multiple intermediate points, multiple target point, therefore, the number of the target position is at least one, and the delivery task is completed when the intelligent robot has traversed all the target points.

步骤S20:基于智能路径规划模型中改进哈里斯鹰算法对所述初始位置与目标位置进行寻路,生成初始规划路径,所述改进哈里斯鹰算法包括替换原始哈里斯鹰算法中利用随机参数对种群进行初始化,得到初始种群序列,添加精英反向学习策略对所述种群更新。Step S20: Based on the improved Harris Eagle algorithm in the intelligent path planning model, pathfinding is performed on the initial position and the target position, and an initial planning path is generated. The improved Harris Eagle algorithm includes replacing the original Harris Eagle algorithm with a pair of random parameters The population is initialized to obtain the initial population sequence, and the elite reverse learning strategy is added to update the population.

需要说明的是,所述初始路径指的是根据所述初始位置与所述目标位置所生成的路径,对于相同的初始位置与所述目标位置,可以生成多个初始路径,并且所述多个初始路径互不相同。It should be noted that the initial path refers to a path generated according to the initial position and the target position. For the same initial position and the target position, multiple initial paths may be generated, and the multiple The initial paths are different from each other.

在具体实现中,所述智能路径规划模型包括三个阶段,分别为探索阶段,探索向开发过度阶段,开发阶段。首先在探索阶段时,能够在空间内随机分布初始化种群,并监视周围环境,等待猎物出现。并可以采用两种不同的策略检测猎物,分别为:In a specific implementation, the intelligent path planning model includes three stages, namely, an exploration stage, a transition stage from exploration to development, and a development stage. First of all, in the exploration stage, the population can be randomly distributed in the space to initialize the population, and monitor the surrounding environment, waiting for the appearance of prey. And two different strategies can be used to detect prey, namely:

Figure BDA0004147993020000061
Figure BDA0004147993020000061

其中,t为当前迭代次数,为当前鹰的位置,表示下一次的迭代位置,为猎物(野兔)的位置,ri∈(0,1),(i=1,2,3,4),q∈(0,1),UB、LB分别为变量上限和下限,Xrand(t)表示从当前种群中被随机选择的一个个体。Among them, t is the current iteration number, which is the current position of the eagle, indicating the next iteration position, which is the position of the prey (hare), r i ∈ (0,1), (i=1,2,3,4), q∈(0,1), UB and LB are the upper and lower limits of variables respectively, and Xrand(t) represents an individual randomly selected from the current population.

在第二阶段中,哈里斯鹰在抓捕猎物的同时,猎物会逃跑并消耗能量,其能量损失模型为:In the second stage, while the Harris hawk is catching the prey, the prey will run away and consume energy. The energy loss model is:

Figure BDA0004147993020000071
Figure BDA0004147993020000071

其中,t为当前迭代次数,T为最大迭代次数,E0为猎物初始能量,E0的每次迭代都在(-1,1)的范围内随机变化,当E0∈(0→-1)时,猎物正在被鹰群标记并、追踪;当E0∈(0→1)时,猎物处于安全状态并恢复能量。猎物的逃逸能量是动态变化的,但总体呈不断减小的趋势,直至体力减小为0或被鹰抓住。当|E|>1时,算法处于探索阶段;当|E|<1时,算法处于开发阶段。Among them, t is the current number of iterations, T is the maximum number of iterations, E 0 is the initial energy of the prey, each iteration of E 0 changes randomly within the range of (-1,1), when E 0 ∈ (0→-1 ), the prey is being marked and tracked by the hawks; when E 0 ∈ (0→1), the prey is in a safe state and recovering energy. The escape energy of the prey changes dynamically, but generally shows a decreasing trend until the physical strength decreases to 0 or is caught by the eagle. When |E|>1, the algorithm is in the exploration stage; when |E|<1, the algorithm is in the development stage.

在第三阶段中,哈里斯鹰会包围和攻击前一阶段已经追踪到的猎物。根据猎物剩余逃逸能量预判猎物逃跑方向,从不同方向或角度向猎物发起俯冲突袭。算法用四种攻击策略模拟了追捕猎物的过程。用r表示猎物逃脱的机会,r≥0.5表示猎物成功逃脱的情况,r<0.5表示猎物未逃脱被鹰抓住的情况。根据猎物能量和逃跑机会采取不同策略追捕正在逃跑的猎物。包括软包围、硬包围、软包围快速俯冲和硬包围快速俯冲。In the third phase, the Harris hawk will surround and attack prey that has been tracked in the previous phase. Predict the escape direction of the prey according to the remaining escape energy of the prey, and launch a dive attack on the prey from different directions or angles. The algorithm simulates the process of hunting prey with four attack strategies. r is used to represent the chance of the prey escaping, r ≥ 0.5 represents the case where the prey escapes successfully, and r < 0.5 represents the case that the prey does not escape and is caught by the eagle. Depending on the energy of the prey and the opportunity to escape, it adopts different strategies to hunt down the fleeing prey. Including soft surround, hard surround, soft surround fast dive and hard surround fast dive.

步骤S30:基于所述初始规划路径确定全局最优路径。Step S30: Determine the global optimal path based on the initial planned path.

需要说明的是,所述初始规划路径包括点位信息与路径长度,所述全局最优路径为所述初始规划路径中的一条路径,为所述初始规划路径中移动距离最短的一条路径。It should be noted that the initial planning path includes point information and path length, and the global optimal path is one of the initial planning paths, and is a path with the shortest moving distance among the initial planning paths.

在具体实现中,所述初始路径被存储于禁忌表中,所述禁忌表用于记录地图信息和路径信息,所述地图信息包括起始点位置、目标点位置、中间点位置、障碍物位置以及各点位状态等,路径信息包括经过点位顺序、最短路径长度等,通过更新信息来记录机器人配送过程中所经过的路径,在确定全局最优路径时,需要遍历所述禁忌表中各初始规划路径的路径长度,将路径长度最小的初始规划路径作为全局最优路径。In a specific implementation, the initial path is stored in a taboo table, and the taboo table is used to record map information and path information, and the map information includes a starting point position, a target point position, an intermediate point position, an obstacle position, and The status of each point, etc., the path information includes the passing point order, the shortest path length, etc., and the path passed by the robot during the delivery process is recorded by updating the information. When determining the global optimal path, it is necessary to traverse each initial path in the taboo table. The path length of the planning path, and the initial planning path with the smallest path length is taken as the global optimal path.

进一步地,所述基于所述初始规划路径确定全局最优路径,包括:Further, the determining the global optimal path based on the initial planning path includes:

获取所述种群中各个体的当前位置,根据所述当前位置与所述初始位置得到移动距离,将所述当前位置、初始位置与所述移动距离存储至禁忌表;Obtaining the current position of each individual in the population, obtaining the moving distance according to the current position and the initial position, and storing the current position, the initial position and the moving distance in a taboo table;

对所述禁忌表中的移动距离进行比较,在当前路径上不存在障碍物时,将所述移动距离中最短的路径作为全局最优路径。The moving distances in the taboo table are compared, and when there is no obstacle on the current path, the shortest path among the moving distances is taken as the globally optimal path.

在具体实现中,由于在地图中每一个空白小方格作为可通行的节点,禁忌表中存放着可通行节点和障碍物节点的位置坐标,算法在执行过程中每遍历过一个节点则会在禁忌表中记录当前节点坐标,每两个节点之间会验证可连通性以判断节点之间是否存在障碍物,当存在障碍物节点时,则会重新寻找下一个可通行节点。在路径寻优的过程中,从起始点出发,依次记录经过的节点,并按照顺序编号,逐步记录新节点坐标,直至找到目标点的通路,此时可以将此条路径的长度作为编号代表这一路径,在所有的路径都优化好之后,通过比较路径长度可以确定最短路径。In the specific implementation, since each blank small square in the map is used as a passable node, and the taboo table stores the position coordinates of passable nodes and obstacle nodes, every time the algorithm traverses a node during execution, it will be in The coordinates of the current node are recorded in the taboo table, and the connectivity between every two nodes is verified to determine whether there is an obstacle between the nodes. When there is an obstacle node, the next passable node will be searched again. In the process of path optimization, start from the starting point, record the passing nodes in sequence, and number them in sequence, and gradually record the coordinates of new nodes until the path to the target point is found. At this time, the length of this path can be used as the number to represent the path. After all the paths are optimized, the shortest path can be determined by comparing the path lengths.

本实施例通过获取智能机器人的初始位置与目标位置,基于智能路径规划模型中改进哈里斯鹰算法对所述初始位置与目标位置进行寻路,生成初始规划路径,所述改进哈里斯鹰算法包括替换原始哈里斯鹰算法中利用随机参数对种群进行初始化,得到初始种群序列,添加精英反向学习策略对所述种群更新,基于所述初始规划路径确定全局最优路径,能够解决随机参数对种群初始化不能完全遍历所有有节空间,所得种群分布不均匀,以及种群陷入早熟状态,使种群具有较高的质量以及多样性,相对现有技术本发明具备更高的搜索速度以及收敛精度,提高智能机器人的路径寻优能力。In this embodiment, by obtaining the initial position and the target position of the intelligent robot, based on the improved Harris Eagle algorithm in the intelligent path planning model, the initial position and the target position are searched to generate an initial planning path, and the improved Harris Eagle algorithm includes Replace the original Harris Eagle algorithm with random parameters to initialize the population, obtain the initial population sequence, add the elite reverse learning strategy to update the population, and determine the global optimal path based on the initial planning path, which can solve the problem of random parameters on the population The initialization cannot completely traverse all knotted spaces, resulting in uneven distribution of the population, and the population falls into a premature state, so that the population has higher quality and diversity. Compared with the prior art, the present invention has higher search speed and convergence accuracy, and improves intelligence. The robot's path-finding ability.

参考图3,图3为本发明一种智能机器人路径规划方法第二实施例的流程示意图。Referring to FIG. 3 , FIG. 3 is a schematic flowchart of a second embodiment of a path planning method for an intelligent robot according to the present invention.

基于上述第一实施例,本实施例智能机器人路径规划方法在所述步骤S20,包括:Based on the above-mentioned first embodiment, the intelligent robot path planning method in this embodiment, in the step S20, includes:

步骤S201:获取现实场景中的障碍物信息,并根据所述障碍物信息建立静态栅格地图。Step S201: Obtain obstacle information in a real scene, and create a static grid map based on the obstacle information.

需要说明的是,以货运机器人在物流配送的场景为例,机器人需要将指定位置的货物运送到目标点位或区域。现实场景中的地形通常为不规则多边形区域,因此需要获取到现实场景中地形的边界以及障碍物信息,通过对所述障碍物信息进行描述,可以得到所述障碍物在现实场景中的分布情况,进而能够确定出静态栅格地图。It should be noted that, taking the scenario of a freight robot in logistics distribution as an example, the robot needs to deliver the goods at the specified location to the target point or area. The terrain in the real scene is usually an irregular polygonal area, so it is necessary to obtain the boundary and obstacle information of the terrain in the real scene. By describing the obstacle information, the distribution of the obstacles in the real scene can be obtained , and then the static grid map can be determined.

可以理解的是,所述静态栅格地图,将三维空间的地形图简化为二维平面图,利用相同大小的网格划分二维环境,地图更加直观,对环境的适应能力更强。绘制栅格地图作为现实场景中的环境模型,绘制10×10、20×20、40×40格子三种规格的栅格地图,单位长度相同,分别表示简单、中等、复杂的程度地图。在地图中随机分布一些黑色格子表示障碍物,该区域不允许通行,在指定的一个起始点和一个目标点之间确保至少有一条可通行的路径。It can be understood that the static grid map simplifies the topographic map in three-dimensional space into a two-dimensional plane map, and uses grids of the same size to divide the two-dimensional environment. The map is more intuitive and adaptable to the environment. Draw a grid map as the environment model in the real scene, draw a grid map with three specifications of 10×10, 20×20, and 40×40 grids, with the same unit length, representing simple, medium and complex maps respectively. Randomly distribute some black grids on the map to indicate obstacles, and the area is not allowed to pass through. Ensure that there is at least one passable path between a specified starting point and a target point.

在具体实现中,参照图4,图4为路径寻优流程图。智能机器人路径规划设备能够对现实场景进行区域划分,将所述现实场景划分为若干规则的小正方形的方格,建立一个在二维坐标系下的栅格地图,构建出一个模拟地图环境,在一个n×n个小方格组成的静态地图中,可以分别用白色代表可以同行的区域,黑色代表障碍物,对于静态栅格地图而言,划分的越细致,所得到的结果则越精确。In a specific implementation, refer to FIG. 4 , which is a flow chart of path optimization. The intelligent robot path planning equipment can divide the real scene into regions, divide the real scene into several regular small square grids, establish a grid map in the two-dimensional coordinate system, and construct a simulated map environment. In a static map composed of n×n small squares, white can be used to represent areas that can travel, and black can represent obstacles. For static grid maps, the more detailed the division, the more accurate the results obtained.

在建立静态栅格地图的过程中,首选需要明确划分精度,本实施例以20×20单位大小的栅格地图为例进行说明,参照图5,图5为栅格地图示意图。在栅格地图中,用数字0和数字1代表无障碍区域和存在障碍区域,并以白色和黑色区分,并在所述栅格地图上建立二维坐标系,此时路径规划问题转化为在地图上找到一条从起始点到目标点的路径。首先,将所述栅格地图编号转换为实际坐标,转换规则如下:In the process of establishing a static grid map, it is first necessary to clarify the division accuracy. This embodiment uses a grid map with a unit size of 20×20 as an example for illustration. Refer to FIG. 5 , which is a schematic diagram of a grid map. In the grid map, the number 0 and the number 1 are used to represent the barrier-free area and the obstacle area, and are distinguished by white and black, and a two-dimensional coordinate system is established on the grid map. At this time, the path planning problem is transformed into Find a path on the map from the starting point to the goal point. First, convert the grid map numbers into actual coordinates, and the conversion rules are as follows:

x=int(N/Gsize)+1x=int(N/G size )+1

y=N%Gsize+1y=N%G size +1

其中,Gsize为每行的栅格数目,int表示取整,N为地图中栅格总数。Among them, G size is the number of grids in each row, int means rounding, and N is the total number of grids in the map.

以(x,y)代表一个单元格的坐标位置,根据以上转换得到的位置坐标进行标记,非障碍物记为0,障碍物记为1,矩阵模型为:Use (x, y) to represent the coordinate position of a cell, and mark it according to the position coordinates obtained by the above conversion. Non-obstacles are marked as 0, obstacles are marked as 1, and the matrix model is:

Figure BDA0004147993020000091
Figure BDA0004147993020000091

此外,经过栅格的路径必须是连续的,根据判别公式:In addition, the path through the grid must be continuous, according to the discriminant formula:

d=max{abs(xi-xi-1),abs(yj-yj-1)}d=max{abs(x i -x i-1 ),abs(y j -y j-1 )}

若d的值为1,则路径连续,否则不连续。If the value of d is 1, the path is continuous, otherwise it is discontinuous.

步骤S202:在所述静态栅格地图设置预设种群。Step S202: Set a preset population in the static grid map.

需要说明的是,所述预设种群,指的是设置需要布置的哈里斯鹰的具体数量,使所述哈里斯鹰处于初始位置。It should be noted that the preset population refers to setting a specific number of Harris hawks that need to be arranged so that the Harris hawks are at an initial position.

步骤S203:对所述预设种群进行初始化,得到初始化种群,所述种群中包括至少一个个体。Step S203: Initialize the preset population to obtain an initialized population, and the population includes at least one individual.

需要说明的是,所述初始化种群指的是预设种群映射到静态栅格地图对应的空间内,使所述种群能够均匀的分布在整个空间中。It should be noted that the initialized population refers to that the preset population is mapped into the space corresponding to the static grid map, so that the population can be evenly distributed in the entire space.

进一步的,所述步骤S203还包括以下步骤:Further, the step S203 also includes the following steps:

设置初始种群序列与迭代参数;Set the initial population sequence and iteration parameters;

根据所述迭代参数与目标函数对所述初始种群序列进行迭代,得到子代种群序列,并更新当前迭代次数;Iterating the initial population sequence according to the iteration parameters and the objective function to obtain the offspring population sequence, and updating the current number of iterations;

在所述当前迭代次数等于最大迭代次数时,根据所述子代种群序列生成初始种群序列。When the current number of iterations is equal to the maximum number of iterations, an initial population sequence is generated according to the child population sequence.

需要说明的是,所述初始种群序列指的是在进行种群迭代之前的哈里斯鹰的原始种群,所述迭代参数值的是用来限定所述种群进行迭代的限制性条件。It should be noted that the initial population sequence refers to the original population of Harris Eagles before population iteration, and the value of the iteration parameter is a restrictive condition for limiting the population to perform iteration.

在具体实现中,参照图6,图6为种群初始化的对照图,在进行种群初始化时,采用Tent混沌映射来取代原始哈里斯鹰的随机参数初始化方式,在原始算法中,随机参数的初始化方式不能完全遍历所有有解空间,是的初始种群分布不均匀,难以保证种群质量,而Tent混沌映射是一种典型的混沌映射方法,混沌映射相较于随机分布,具有良好的随机性,并且可以有规律地遍历整个搜索空间,用该方法代替原始算法中的随机参数,保证搜索空间中生成的初始解更具有多样性,可以保证初代哈里斯鹰种群中个体的随机性,提升初始种群分布的均匀性与多样性,并有效地提高初始解的质量和算法的寻优速度。Tent混沌映射的一般表达式为:In the specific implementation, refer to Figure 6. Figure 6 is a comparison diagram of population initialization. When performing population initialization, the Tent chaotic map is used to replace the random parameter initialization method of the original Harris Eagle. In the original algorithm, the random parameter initialization method Can not completely traverse all the solution space, the initial population distribution is not uniform, it is difficult to guarantee the quality of the population, and Tent chaotic mapping is a typical chaotic mapping method, compared with random distribution, chaotic mapping has good randomness, and can Traverse the entire search space regularly, and use this method to replace the random parameters in the original algorithm to ensure that the initial solutions generated in the search space are more diverse. Uniformity and diversity, and effectively improve the quality of the initial solution and the optimization speed of the algorithm. The general expression of Tent chaotic map is:

Figure BDA0004147993020000101
Figure BDA0004147993020000101

其中,t为当前迭代次数,x(t)为当前个体位置,x(t+1)为下一代个体位置,a取0到1之间的数。Among them, t is the current iteration number, x(t) is the current individual position, x(t+1) is the next generation individual position, and a takes a number between 0 and 1.

在进行Tent混沌映射的过程中,首先确定所述迭代参数a,a为0到1之间的数,优选为0.5,对于迭代参数可根据实际情况进行合理设置,本实施例对此不作限制,在确定了迭代参数后,根据目标函数在(0,1)内设置初值序列并避免落在{0.2,0.4,0.6,0.8}内,X(1)=x0,i=j=1;而目标参数时根据问题需求相应构建的,在本实施例所举例的单目标的路径规划问题中,一般以路径长度最小为优化目标,针对划分的网格,在构建模型时,将每个小方格视为一个节点,两两节点之间都有一个确定的距离,要计算所有可通行路径的距离,并选取最短的那一条路径作为目标。在仅考虑是否可通行区域及通过距离最短的模型中,若一对节点中存在一个黑色方格,则这一对节点不能形成通路,此类情况不在目标之中。因此,针对路径寻优的目标函数为:In the process of performing Tent chaotic mapping, first determine the iteration parameter a, a is a number between 0 and 1, preferably 0.5, and the iteration parameter can be reasonably set according to the actual situation, which is not limited in this embodiment. After determining the iteration parameters, set the initial value sequence within (0,1) according to the objective function and avoid falling within {0.2,0.4,0.6,0.8}, X(1)=x 0 , i=j=1; The target parameters are constructed according to the needs of the problem. In the single-objective path planning problem exemplified in this embodiment, the optimization goal is generally to minimize the path length. For the divided grid, when constructing the model, each small A grid is regarded as a node, and there is a definite distance between any two nodes. It is necessary to calculate the distance of all passable paths, and select the shortest path as the target. In the model that only considers the passable area and the shortest passing distance, if there is a black square in a pair of nodes, the pair of nodes cannot form a path, and such cases are not included in the goal. Therefore, the objective function for path optimization is:

Figure BDA0004147993020000111
Figure BDA0004147993020000111

其中,li·j为第i个节点到第j个节点之间的距离,ωj为第i个节点的权重,取0或1,0代表黑色方格即不可通行区域,1代表白色方格即可通行区域。根据上述步骤设置初值x0的序列,并生成x(i)序列,更新节点i=i+1,在x(i)序列生成之后,需要对x(i)序列进行判断,若x(i)序列落在{0,0.25,0.5,0.75},或x(i)=x(i-k),k=(0,1,2,3,4)则x(i)=y(j+1)=z(j)+c为迭代初值,c为随机数,j=j+1,否则重新设置初值序列,直至迭代次数达到最大时停止,生成初始化序列。Among them, l i j is the distance between the i-th node and the j-th node, ω j is the weight of the i-th node, which is 0 or 1, 0 means the black square is the impassable area, and 1 means the white square The grid can pass through the area. Set the sequence of initial value x 0 according to the above steps, and generate x(i) sequence, update node i=i+1, after the x(i) sequence is generated, it is necessary to judge the x(i) sequence, if x(i ) sequence falls in {0,0.25,0.5,0.75}, or x(i)=x(ik), k=(0,1,2,3,4) then x(i)=y(j+1) =z(j)+c is the initial value of iteration, c is a random number, j=j+1, otherwise reset the initial value sequence, stop until the number of iterations reaches the maximum, and generate an initialization sequence.

在根据目标函数进行迭代时,还可以对所述目标函数进行优化,可以根据自适应调节因子,其中调整自适应因子的模型为:When iterating according to the objective function, the objective function can also be optimized, and the adaptive adjustment factor can be used, wherein the model for adjusting the adaptive factor is:

Figure BDA0004147993020000112
Figure BDA0004147993020000112

X'rabbit=ω·Xrabbit X' rabbit = ω·X rabbit

其中,a、b为正整数,t为当前迭代次数,T为最大迭代次数,Xrabbit和X'rabbit分别表示初始猎物位置和调节后猎物位置。Among them, a and b are positive integers, t is the current iteration number, T is the maximum iteration number, X rabbit and X' rabbit represent the initial prey position and adjusted prey position respectively.

引入权重因子后,算法会根据当前种群的分布情况调节权重大小。在权重因子的调节下,算法迭代初期进行全局搜索时,惯性权重较大,搜索范围大,速度较快,避免了在迭代初期就陷入小范围搜索中;算法进入后期进行局部搜索时,惯性权重较小,收敛精度高,寻优能力强。加入自适应权重因子的好处在于,仅需要一个参数就可以调节算法的两个部分,具有较强的自适应性。After introducing the weight factor, the algorithm will adjust the weight according to the distribution of the current population. Under the adjustment of the weight factor, when the algorithm performs a global search in the initial stage of iteration, the inertia weight is larger, the search range is larger, and the speed is faster, which avoids falling into a small-scale search in the early stage of iteration; when the algorithm enters the later stage of local search, the inertia weight Smaller, with high convergence precision and strong optimization ability. The advantage of adding an adaptive weight factor is that only one parameter is needed to adjust the two parts of the algorithm, which has strong adaptability.

进一步地,所述步骤根据所述迭代参数与目标函数对所述初始种群序列进行迭代,得到子代种群序列,包括:Further, the step iterates the initial population sequence according to the iteration parameter and the objective function to obtain the offspring population sequence, including:

根据所述种群中的个体的当前位置得到种群中个体的相对平均位置;obtaining the relative average position of the individual in the population according to the current position of the individual in the population;

根据所述种群中的个体的当前位置,当前的迭代次数,猎物位置以及所述相对平均位置得到所述个体下一次的迭代位置;Obtain the next iteration position of the individual according to the current position of the individual in the population, the current number of iterations, the position of the prey and the relative average position;

根据适应度与所述下一次的迭代位置选择精英个体;Select elite individuals according to the fitness and the next iteration position;

根据所述精英个体与静态栅格地图的界限得到反向种群;Obtain the reverse population according to the boundary between the elite individual and the static grid map;

将所述反向种群与所述初始种群序列迭代后的种群序列得到所述子代种群序列。The population sequence after iterating the reverse population and the initial population sequence is used to obtain the descendant population sequence.

需要说明的是,所述子代种群序列为所述初始种群序列进行迭代后的结果,能够反映出寻路过程,所述精英个体指的是原则上距离最优解最近的个体。It should be noted that the offspring population sequence is the iterative result of the initial population sequence, which can reflect the pathfinding process, and the elite individual refers to the individual closest to the optimal solution in principle.

可以理解的是,为了防止算法过早进入早熟状态,因此引入反向学习策略,用来增加种群质量与种群多样性,一般来说种群中的精英个体往往比一般个体含有较多的有效信息,而精英反向学习策略则是从反向种群中选出精英个体,从而进行迭代,产生有效解。It is understandable that in order to prevent the algorithm from entering the premature state prematurely, a reverse learning strategy is introduced to increase the quality and diversity of the population. Generally speaking, elite individuals in the population often contain more effective information than ordinary individuals. The elite reverse learning strategy is to select elite individuals from the reverse population, so as to iterate and produce effective solutions.

在具体实现中,首先根据反向学习策略计算评估当前解的反向解,假设在d维搜索空间内,当前种群可行解为X=(x1,x2,...,xd),xj∈[aj,bj],反向解为

Figure BDA0004147993020000121
其中
Figure BDA0004147993020000122
ω为分布在[0,1]区间内的一般化系数。在标准算法中,哈里斯鹰种群是随机选取一个个体进行迭代更新的,具有较大的不确定性,难以保证后代质量,迭代效率较低。引入精英个体机制,通过选出初代种群中的精英个体,根据精英个体的位置引导种群中其他个体更新。精英个体的迭代模型为:In the specific implementation, first calculate and evaluate the reverse solution of the current solution according to the reverse learning strategy, assuming that in the d-dimensional search space, the feasible solution of the current population is X=(x 1 ,x 2 ,...,x d ), x j ∈[a j ,b j ], the reverse solution is
Figure BDA0004147993020000121
in
Figure BDA0004147993020000122
ω is a generalization coefficient distributed in the [0,1] interval. In the standard algorithm, the Harris eagle population randomly selects an individual for iterative update, which has great uncertainty, it is difficult to guarantee the quality of offspring, and the iteration efficiency is low. Introduce the elite individual mechanism, select the elite individual in the first generation population, and guide other individuals in the population to update according to the position of the elite individual. The iterative model of elite individuals is:

Xbest(t+1)=lb+(ub-Xbest(t))X best (t+1)=lb+(ub-X best (t))

其中,Xbest(t)为当前种群中的精英对象,在第t次迭代时,种群中适应度最高的个体作为精英对象,精英对象原则上距离最优解位置最近,种群在下一次迭代时,会更加倾向于向精英对象所在方向调整,使迭代更具有目的性,避免了随机性所导致的收敛速度较慢的问题。由于精英对象在迭代中作为领导者身份,因此它的位置很大程度上影响着种群的搜索效率。为提高精英对象的质量,对其进行一次反向学习操作,通过生成反向种群,将所述反向种群添加至所述子代种群序列中扩大种群的多样性,进一步提升搜索效率。反向对象的模型为:Among them, X best (t) is the elite object in the current population. At the t-th iteration, the individual with the highest fitness in the population is the elite object. In principle, the elite object is the closest to the optimal solution position. In the next iteration of the population, It will be more inclined to adjust to the direction of the elite object, making the iteration more purposeful and avoiding the problem of slow convergence caused by randomness. Since the elite object acts as the leader in the iteration, its position greatly affects the search efficiency of the population. In order to improve the quality of the elite object, a reverse learning operation is performed on it, and the reverse population is generated, and the reverse population is added to the descendant population sequence to expand the diversity of the population and further improve the search efficiency. The model of the reverse object is:

Figure BDA0004147993020000131
Figure BDA0004147993020000131

Figure BDA0004147993020000132
表示反向种群中的一个个体,ub、lb分别表示搜索范围的上下限。将反向种群与初始种群组成新的精英种群,进行迭代更新,并寻找适应度最高的个体作为精英对象,进行下一次迭代,在迭代过程中,可以采用移动平均法计算平均位置,得到的结果更为准确,公式如下:
Figure BDA0004147993020000132
Represents an individual in the reverse population, ub and lb represent the upper and lower limits of the search range, respectively. The reverse population and the initial population form a new elite population, iteratively update, and find the individual with the highest fitness as the elite object, and perform the next iteration. During the iteration process, the moving average method can be used to calculate the average position, and the obtained result is More precisely, the formula is as follows:

Figure BDA0004147993020000133
Figure BDA0004147993020000133

其中,Xm(t)为当前种群的平均位置,Xm(t+1)为下一代种群平均位置,T为总迭代次数。Among them, X m (t) is the average position of the current population, X m (t+1) is the average position of the next generation population, and T is the total number of iterations.

步骤S204:在当前迭代次数未达到最大迭代次数时,根据搜索空间的界限得到所述种群中各个体的适应度。Step S204: When the current number of iterations does not reach the maximum number of iterations, obtain the fitness of each individual in the population according to the limit of the search space.

需要说明的是,所述适应度能够用来描述个体距离最优解位置的远近,所述搜索空间指的是所述空间区域。It should be noted that the fitness can be used to describe how far an individual is from the optimal solution position, and the search space refers to the space area.

在具体实现中,在计算某个个体的适应度时,需要先确定出该个体所在的位置,同时,需要对所述个体是否越界进行判断,在计算个体的适应度时,可以根据以下公式来计算适应度:In the specific implementation, when calculating the fitness of an individual, it is necessary to determine the location of the individual first, and at the same time, it is necessary to judge whether the individual is out of bounds. When calculating the fitness of an individual, it can be calculated according to the following formula Calculate fitness:

f(x)=x·|FU+FL|+ub·FU+lb·FLf(x)=x·|FU+FL|+ub·FU+lb·FL

其中,f(x)用于评估当前哈里斯鹰对当前环境的适应度,x为当前个体位置,ub、lb分别表示搜索空间的上限和下限,FU、FL用以检查个体是否越界,越界取1,没有越界取0,其中所述f(x)的函数值越小表示当前个体在当前位置的适应度越高。Among them, f(x) is used to evaluate the fitness of the current Harris Eagle to the current environment, x is the current individual position, ub and lb represent the upper limit and lower limit of the search space respectively, FU and FL are used to check whether the individual is out of bounds, and out of bounds is taken as 1, 0 if there is no crossing, wherein the smaller the function value of f(x), the higher the fitness of the current individual at the current location.

步骤S205:更新所述种群中的各个体的逃逸能量,根据所述逃逸能量执行围捕策略,得到所述种群中各个体的位置。Step S205: Update the escape energy of each individual in the population, execute a round-up strategy according to the escape energy, and obtain the position of each individual in the population.

在具体实现中,更新猎物的逃逸能量和跳跃强度来判断下一阶段的运动方式,r为逃脱概率,取值为0~1之间的随机数,E表示逃逸能量,当r>0.5且E>0.5时,采取软包围围捕方式;当r<0.5且E>0.5时,采取硬包围方式;当r>0.5且E<0.5时,采用硬包围快速俯冲围捕方式;当E<0.5且r<0.5时,采用软包围快速俯冲围捕方式。引入惯性权重参数ω,用来平衡算法的全局搜索与局部开发,当进行全局搜索时,ω会增大,提升搜索速度;当进行局部开发时,ω会减小,提高搜索精度。In the specific implementation, the escape energy and jumping strength of the prey are updated to judge the movement mode of the next stage, r is the escape probability, and the value is a random number between 0 and 1, and E represents the escape energy. When r>0.5 and E When >0.5, the soft encirclement method is adopted; when r<0.5 and E>0.5, the hard encirclement method is adopted; when r>0.5 and E<0.5, the hard encirclement and rapid dive encirclement method is adopted; At 0.5, the soft encirclement and fast swooping round-up method is adopted. The inertia weight parameter ω is introduced to balance the global search and local development of the algorithm. When performing global search, ω will increase to improve the search speed; when performing local development, ω will decrease to improve search accuracy.

Figure BDA0004147993020000141
Figure BDA0004147993020000141

X'rabbit=ω·Xrabbit X' rabbit = ω·X rabbit

其中,a、b为正整数,Xrabbit表示猎物位置。调整之后为:Among them, a and b are positive integers, and X rabbit represents the position of the prey. After adjustment is:

X(t+1)=ΔX(t)-E·|J·ω·Xrabbit(t)-X(t)|X(t+1)=ΔX(t)-E·|J·ω·X rabbit (t)-X(t)|

不同的围捕方式会产生下一代优化之后的个体,即所求路径的解,而围捕方式的确定根据逃逸概率r与逃逸能量E共同确定。Different round-up methods will produce the next generation of optimized individuals, that is, the solution of the path sought, and the round-up method is determined according to the escape probability r and the escape energy E.

当r≥0.5&|E|≥0.5时为软包围围捕方式,猎物有足够的能量逃脱,它会随机地向某个方向跳跃,哈里斯鹰群会采取软包围策略围住猎物以消耗其体力,数学模型为:When r≥0.5&|E|≥0.5, it is the soft encirclement rounding method, the prey has enough energy to escape, it will jump in a certain direction randomly, and the Harris eagle group will adopt a soft encirclement strategy to encircle the prey to consume its physical strength , the mathematical model is:

X(t+1)=ΔX(t)-E·|J·Xrabbit(t)-X(t)|X(t+1)=ΔX(t)-E·|J·X rabbit (t)-X(t)|

ΔX(t)=Xrabbit(t)-X(t)ΔX(t)=X rabbit (t)-X(t)

J=2(1-r5)J=2(1-r 5 )

其中,ΔX(t)为迭代t次前后猎物位置的变化量,r5∈(0,1),J表示猎物在整个逃逸过程中的跳跃强度,模拟了猎物逃跑时的行为特征。Among them, ΔX(t) is the change of the prey position before and after t iterations, r 5 ∈ (0, 1), J represents the jumping intensity of the prey in the whole escape process, simulating the behavior characteristics of the prey when escaping.

当r≥0.5&|E|<0.5时为硬包围围捕方式,猎物的逃逸能量较低,但仍有逃脱追捕的机会,哈里斯鹰只能突袭猎物尝试抓捕,模型如下:When r≥0.5&|E|<0.5, it is a hard encirclement round-up method. The escape energy of the prey is low, but there is still a chance to escape the hunt. The Harris eagle can only raid the prey to try to capture. The model is as follows:

X(t+1)=Xrabbit(t)-E·|ΔX(t)|X(t+1)=X rabbit (t)-E·|ΔX(t)|

当r<0.5&|E|≥0.5时为软包围快速俯冲围捕方式,由于猎物仍有足够的体力逃脱,因此在突袭之前对猎物进行软包围。在模拟猎物跳跃的行为时,猎物可能会制造欺骗动作欺骗鹰群向错误的方向突袭,与此同时鹰也会进行快速多次的俯冲行为,并纠正猎物的方向和调整猎物位置。用以下公式模拟鹰俯冲的行动:When r<0.5&|E|≥0.5, it is a soft encirclement and fast swooping roundup method. Since the prey still has enough physical strength to escape, the prey is soft encircled before the surprise attack. When simulating the jumping behavior of the prey, the prey may create a deceptive action to trick the hawks into the wrong direction. At the same time, the eagle will also perform rapid and multiple swoops, correct the direction of the prey and adjust the position of the prey. Use the following formula to simulate the action of an eagle swooping:

Y1=Xrabbit(t)-E·|J·Xrabbit(t)-X(t)|Y 1 =X rabbit (t)-E·|J·X rabbit (t)-X(t)|

哈里斯鹰会根据本次俯冲行为与之前一次进行比较,当注意到猎物有多次欺骗动作时,会调整下一次的俯冲,向着不规则的快速俯冲,在这里引入了菜维飞行LF的机制表示鹰的不规则飞行,其调整俯冲行动如下:The Harris Eagle will compare this dive behavior with the previous one. When it notices that the prey has multiple deceptions, it will adjust the next dive and dive towards irregular fast dives. Here, the mechanism of Levi's flying LF is introduced. Indicates the irregular flight of the hawk, and its dive action is adjusted as follows:

Z=Y1+S·LF(D)Z=Y 1 +S·LF(D)

Figure BDA0004147993020000151
Figure BDA0004147993020000151

Figure BDA0004147993020000152
Figure BDA0004147993020000152

其中,u,v为(0,1)的随机值,β为常量取1.5。Among them, u and v are random values of (0, 1), and β is a constant value of 1.5.

故哈里斯鹰软围攻俯冲策略可整合为:Therefore, Harris Hawk's soft siege and dive strategy can be integrated as:

Figure BDA0004147993020000153
Figure BDA0004147993020000153

当r<0.5&|E|<0.5时为硬包围快速俯冲围捕方式,猎物逃逸能量不足,在突袭猎物之前采取硬围攻方式对猎物包围。与软围攻俯冲相似,数学模型仍为上式,但这里鹰试图减小与猎物之间的平均距离,以尝试捕捉猎物,需要调整Y的值为:When r<0.5&|E|<0.5, it is hard encirclement and rapid dive encirclement, and the escape energy of the prey is insufficient, and the hard siege method is adopted to encircle the prey before raiding the prey. Similar to the soft siege dive, the mathematical model is still the above formula, but here the eagle tries to reduce the average distance between the prey and the prey in order to try to catch the prey, and the value of Y needs to be adjusted:

Y2=Xrabbit(t)-E·|J·Xrabbit(t)-Xm(t)|Y 2 =X rabbit (t)-E·|J·X rabbit (t)-X m (t)|

Figure BDA0004147993020000154
Figure BDA0004147993020000154

步骤S206:根据所述位置生成初始规划路径。Step S206: Generate an initial planned route according to the location.

在具体实现中,对路径中障碍物的约束:在机器人路径规划问题中,通常指定有一个起始点与一个目标点,机器人需要从指定起始点出发,且路径要避开地图中的障碍物。根据上述描述中对路径节点的标记,路径中不能出现黑色方格的约束,即路径的权重乘积不能为0。In the specific implementation, constraints on obstacles in the path: In robot path planning problems, there is usually a starting point and a target point specified, the robot needs to start from the specified starting point, and the path must avoid obstacles in the map. According to the marking of path nodes in the above description, the restriction of black squares cannot appear in the path, that is, the weight product of the path cannot be 0.

Figure BDA0004147993020000155
Figure BDA0004147993020000155

路径连续性约束:最终所求经过栅格的路径必须是连续的,根据以下判别公式进行计算,若结果d=1则为连续,否则不连续。Constraints on path continuity: the final path through the grid must be continuous, calculated according to the following discriminant formula, if the result d=1, it is continuous, otherwise it is discontinuous.

d=max{abs(xi-xi-1),abs(yj-yj-1)}d=max{abs(x i -x i-1 ), abs(y j -y j-1 )}

在所求路径为连续且路径上不存在障碍物时,将所述个体所经过的节点进行记录,并将所走过的距离相加,得到走过的总距离,距离计算方式为:When the requested path is continuous and there are no obstacles on the path, record the nodes passed by the individual, and add up the distance traveled to obtain the total distance traveled. The distance calculation method is:

Figure BDA0004147993020000161
Figure BDA0004147993020000161

其中,d(x)用于计算初始点到当前节点之间走过的总距离,xi和yi分别表示当前节点在栅格中的横坐标和纵坐标,xi+1和yi+1分别表示下一节点在栅格中的横坐标和纵坐标。Among them, d(x) is used to calculate the total distance traveled between the initial point and the current node, x i and y i respectively represent the abscissa and ordinate of the current node in the grid, x i+1 and y i+ 1 represents the abscissa and ordinate of the next node in the grid, respectively.

本实施例通过引入Tent混沌算法对初始种群进行初始化,使种群能够均匀的分布在搜寻空间内,提高种群的质量以及多样性,除此之外还引入精英种群策略,将每一次迭代后的种群中,适应度最高的个体作为精英个体,并根据所述精英个体生成反向种群,并将所述反向种群添加到所述子代种群中,进行下一次迭代,能够防止种群过早进入早熟,影响路径规划质量,另外,通过调节位置参数并引入自适应调节因子,自适应的调节参数权重,使迭代更新的搜索速度和收敛精度得到了提升,进而使得最终的路径规划为最优结果。This embodiment initializes the initial population by introducing the Tent Chaos Algorithm, so that the population can be evenly distributed in the search space, improving the quality and diversity of the population. In addition, the elite population strategy is introduced, and the population after each iteration Among them, the individual with the highest fitness is regarded as the elite individual, and the reverse population is generated according to the elite individual, and the reverse population is added to the offspring population for the next iteration, which can prevent the population from entering premature maturity , affecting the quality of path planning. In addition, by adjusting the position parameters and introducing adaptive adjustment factors, adaptively adjust the parameter weights, so that the search speed and convergence accuracy of iterative updates are improved, and the final path planning is the optimal result.

此外,本发明实施例还提出一种存储介质,所述存储介质上存储有智能机器人路径规划程序,所述智能机器人路径规划程序被处理器执行时实现如上文所述的智能机器人路径规划方法的步骤。In addition, the embodiment of the present invention also proposes a storage medium, on which an intelligent robot path planning program is stored, and when the intelligent robot path planning program is executed by a processor, the above-mentioned intelligent robot path planning method is realized. step.

参照图7,图7为本发明智能机器人路径规划装置第一实施例的结构框图。Referring to FIG. 7, FIG. 7 is a structural block diagram of the first embodiment of the intelligent robot path planning device of the present invention.

如图7所示,本发明实施例提出的智能机器人路径规划装置包括:As shown in Figure 7, the intelligent robot path planning device proposed by the embodiment of the present invention includes:

位置获取模块10,用于获取智能机器人的初始位置与目标位置;The position obtaining module 10 is used to obtain the initial position and the target position of the intelligent robot;

路径规划模块20,用于基于智能路径规划模型中改进哈里斯鹰算法对所述初始位置与目标位置进行寻路,生成初始规划路径,所述改进哈里斯鹰算法包括替换原始哈里斯鹰算法中利用随机参数对种群进行初始化,得到初始种群序列,添加精英反向学习策略对所述种群更新;The path planning module 20 is used to find the initial position and the target position based on the improved Harris Eagle algorithm in the intelligent path planning model, and generate an initial planned path. The improved Harris Eagle algorithm includes replacing the original Harris Eagle algorithm. The population is initialized with random parameters to obtain an initial population sequence, and an elite reverse learning strategy is added to update the population;

路径决定模块30,用于基于所述初始规划路径确定全局最优路径。A path decision module 30, configured to determine a globally optimal path based on the initial planned path.

本实施例通过获取智能机器人的初始位置与目标位置,基于智能路径规划模型中改进哈里斯鹰算法对所述初始位置与目标位置进行寻路,生成初始规划路径,所述改进哈里斯鹰算法包括替换原始哈里斯鹰算法中利用随机参数对种群进行初始化,得到初始种群序列,添加精英反向学习策略对所述种群更新,基于所述初始规划路径确定全局最优路径,能够解决随机参数对种群初始化不能完全遍历所有有节空间,所得种群分布不均匀,以及种群陷入早熟状态,使种群具有较高的质量以及多样性,相对现有技术本发明具备更高的搜索速度以及收敛精度,提高智能机器人的路径寻优能力。In this embodiment, by obtaining the initial position and the target position of the intelligent robot, based on the improved Harris Eagle algorithm in the intelligent path planning model, the initial position and the target position are searched to generate an initial planning path, and the improved Harris Eagle algorithm includes Replace the original Harris Eagle algorithm with random parameters to initialize the population, obtain the initial population sequence, add the elite reverse learning strategy to update the population, and determine the global optimal path based on the initial planning path, which can solve the problem of random parameters on the population The initialization cannot completely traverse all knotted spaces, resulting in uneven distribution of the population, and the population falls into a premature state, so that the population has higher quality and diversity. Compared with the prior art, the present invention has higher search speed and convergence accuracy, and improves intelligence. The robot's path-finding ability.

在一实施例中,所述路径规划模块20,还用于获取现实场景中的障碍物信息,并根据所述障碍物信息建立静态栅格地图;In an embodiment, the path planning module 20 is further configured to obtain obstacle information in a real scene, and establish a static grid map according to the obstacle information;

在所述静态栅格地图设置预设种群;Setting preset populations in the static grid map;

对所述预设种群进行初始化,得到初始化种群,所述种群中包括至少一个个体;Initializing the preset population to obtain an initialized population, the population includes at least one individual;

在当前迭代次数未达到最大迭代次数时,根据搜索空间的界限得到所述种群中各个体的适应度;When the current number of iterations does not reach the maximum number of iterations, the fitness of each individual in the population is obtained according to the limit of the search space;

更新所述种群中的各个体的逃逸能量,根据所述逃逸能量执行围捕策略,得到所述种群中各个体的位置;updating the escape energy of each individual in the population, executing a round-up strategy according to the escape energy, and obtaining the position of each individual in the population;

根据所述位置生成初始规划路径。An initial planned path is generated based on the position.

在一实施例中,所述路径规划模块20,还用于设置初始种群序列与迭代参数;In one embodiment, the path planning module 20 is also used to set the initial population sequence and iteration parameters;

根据所述迭代参数与目标函数对所述初始种群序列进行迭代,得到子代种群序列,并更新当前迭代次数;Iterating the initial population sequence according to the iteration parameters and the objective function to obtain the offspring population sequence, and updating the current number of iterations;

在所述当前迭代次数等于最大迭代次数时,根据所述子代种群序列生成初始种群序列。When the current number of iterations is equal to the maximum number of iterations, an initial population sequence is generated according to the child population sequence.

在一实施例中,所述路径规划模块20,还用于根据所述种群中的个体的当前位置得到种群中个体的相对平均位置;In one embodiment, the path planning module 20 is further configured to obtain the relative average position of the individuals in the population according to the current positions of the individuals in the population;

根据所述种群中的个体的当前位置,当前的迭代次数,猎物位置以及所述相对平均位置得到所述个体下一次的迭代位置;Obtain the next iteration position of the individual according to the current position of the individual in the population, the current number of iterations, the position of the prey and the relative average position;

根据适应度与所述下一次的迭代位置选择精英个体;Select elite individuals according to the fitness and the next iteration position;

根据所述精英个体与静态栅格地图的界限得到反向种群;Obtain the reverse population according to the boundary between the elite individual and the static grid map;

将所述反向种群与所述初始种群序列迭代后的种群序列得到所述子代种群序列。The population sequence after iterating the reverse population and the initial population sequence is used to obtain the descendant population sequence.

在一实施例中,所述路径规划模块20,还用于根据所述种群中各个体的当前位置与初始位置得到对应的移动距离;In one embodiment, the path planning module 20 is further configured to obtain the corresponding moving distance according to the current position and the initial position of each individual in the population;

根据所述移动距离以及所述搜索空间的界限得到所述种群中各个体的适应度。The fitness of each individual in the population is obtained according to the moving distance and the limit of the search space.

在一实施例中,所述路径规划模块20,还用于根据所述种群中各个体的当前迭代次数与最大迭代次数得到所述各个体的逃逸能量;In an embodiment, the path planning module 20 is further configured to obtain the escape energy of each individual in the population according to the current number of iterations and the maximum number of iterations of each individual in the population;

在所述逃逸能量大于预设俯冲围捕能量时,采用围捕策略,调整所述逃逸能量并得到围捕后的位置;When the escape energy is greater than the preset swooping and encircling energy, adopt a encircling strategy, adjust the escape energy and obtain the encircled position;

在所述逃逸能量小于预设俯冲围捕能量时,采用俯冲围捕策略,调整所述逃逸能量并得到围捕后的位置;When the escape energy is less than the preset swooping and rounding up energy, adopt a swooping and rounding up strategy, adjust the escape energy and obtain the position after rounding up;

根据所述围捕后的位置生成初始规划路径。An initial planned path is generated according to the captured position.

在一实施例中,所述路径决定模块30,还用于获取所述种群中各个体的当前位置,根据所述当前位置与所述初始位置得到移动距离,将所述当前位置、初始位置与所述移动距离存储至禁忌表;In one embodiment, the path determination module 30 is further configured to obtain the current position of each individual in the population, obtain the moving distance according to the current position and the initial position, and combine the current position, initial position and The moving distance is stored in a taboo table;

对所述禁忌表中的移动距离进行比较,在当前路径上不存在障碍物时,将所述移动距离中最短的路径作为全局最优路径。The moving distances in the taboo table are compared, and when there is no obstacle on the current path, the shortest path among the moving distances is taken as the globally optimal path.

应当理解的是,以上仅为举例说明,对本发明的技术方案并不构成任何限定,在具体应用中,本领域的技术人员可以根据需要进行设置,本发明对此不做限制。It should be understood that the above is only an example, and does not constitute any limitation to the technical solution of the present invention. In specific applications, those skilled in the art can make settings according to needs, and the present invention is not limited thereto.

需要说明的是,以上所描述的工作流程仅仅是示意性的,并不对本发明的保护范围构成限定,在实际应用中,本领域的技术人员可以根据实际的需要选择其中的部分或者全部来实现本实施例方案的目的,此处不做限制。It should be noted that the workflow described above is only illustrative and does not limit the protection scope of the present invention. In practical applications, those skilled in the art can select part or all of them to implement according to actual needs. The purpose of the scheme of this embodiment is not limited here.

此外,需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。Furthermore, it should be noted that in this document, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or system comprising a set of elements includes not only those elements, but also other elements not expressly listed, or elements inherent in such a process, method, article, or system. Without further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or system comprising that element.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如只读存储器(Read Only Memory,ROM)/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as a read-only memory (Read Only Memory) , ROM)/RAM, magnetic disk, optical disk), including several instructions to make a terminal device (which can be a mobile phone, computer, server, or network device, etc.) execute the methods described in various embodiments of the present invention.

以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process conversion made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.

Claims (10)

1.一种智能机器人路径规划方法,其特征在于,所述智能路径规划方法包括:1. A path planning method for an intelligent robot, characterized in that, the intelligent path planning method comprises: 获取智能机器人的初始位置与目标位置;Obtain the initial position and target position of the intelligent robot; 基于智能路径规划模型中改进哈里斯鹰算法对所述初始位置与目标位置进行寻路,生成初始规划路径,所述改进哈里斯鹰算法包括替换原始哈里斯鹰算法中利用随机参数对种群进行初始化,得到初始种群序列,添加精英反向学习策略对所述种群更新;Based on the improved Harris Eagle algorithm in the intelligent path planning model, the initial position and the target position are routed to generate an initial planning path. The improved Harris Eagle algorithm includes replacing the original Harris Eagle algorithm with random parameters to initialize the population. , get the initial population sequence, add the elite reverse learning strategy to update the population; 基于所述初始规划路径确定全局最优路径。A globally optimal path is determined based on the initial planned path. 2.如权利要求1所述的方法,其特征在于,所述基于智能路径规划模型中改进哈里斯鹰算法对所述初始位置与目标位置进行寻路,生成初始规划路径,包括:2. The method according to claim 1, wherein the improved Harris Eagle algorithm based on the intelligent path planning model carries out pathfinding to the initial position and the target position, and generates an initial planning path, comprising: 获取现实场景中的障碍物信息,并根据所述障碍物信息建立静态栅格地图;Obtain obstacle information in the real scene, and create a static grid map based on the obstacle information; 在所述静态栅格地图设置预设种群;Setting preset populations in the static grid map; 对所述预设种群进行初始化,得到初始化种群,所述种群中包括至少一个个体;Initializing the preset population to obtain an initialized population, the population includes at least one individual; 在当前迭代次数未达到最大迭代次数时,根据搜索空间的界限得到所述种群中各个体的适应度;When the current number of iterations does not reach the maximum number of iterations, the fitness of each individual in the population is obtained according to the limit of the search space; 更新所述种群中的各个体的逃逸能量,根据所述逃逸能量执行围捕策略,得到所述种群中各个体的位置;updating the escape energy of each individual in the population, executing a round-up strategy according to the escape energy, and obtaining the position of each individual in the population; 根据所述位置生成初始规划路径。An initial planned path is generated based on the position. 3.如权利要求1所述的方法,其特征在于,所述所述改进哈里斯鹰算法包括替换原始哈里斯鹰算法中利用随机参数对种群进行初始化,得到初始种群序列,包括:3. The method according to claim 1, wherein the improved Harris Eagle algorithm comprises replacing the original Harris Eagle algorithm with random parameters to initialize the population to obtain an initial population sequence, comprising: 设置初始种群序列与迭代参数;Set the initial population sequence and iteration parameters; 根据所述迭代参数与目标函数对所述初始种群序列进行迭代,得到子代种群序列,并更新当前迭代次数;Iterating the initial population sequence according to the iteration parameters and the objective function to obtain the offspring population sequence, and updating the current number of iterations; 在所述当前迭代次数等于最大迭代次数时,根据所述子代种群序列生成初始种群序列。When the current number of iterations is equal to the maximum number of iterations, an initial population sequence is generated according to the child population sequence. 4.如权利要求3所述的方法,其特征在于,所述根据所述迭代参数与目标函数对所述初始种群序列进行迭代,得到子代种群序列,包括:4. The method according to claim 3, wherein said initial population sequence is iterated according to said iteration parameter and objective function to obtain a descendant population sequence, comprising: 根据所述种群中的个体的当前位置得到种群中个体的相对平均位置;obtaining the relative average position of the individual in the population according to the current position of the individual in the population; 根据所述种群中的个体的当前位置,当前的迭代次数,猎物位置以及所述相对平均位置得到所述个体下一次的迭代位置;Obtain the next iteration position of the individual according to the current position of the individual in the population, the current number of iterations, the position of the prey and the relative average position; 根据适应度与所述下一次的迭代位置选择精英个体;Select elite individuals according to the fitness and the next iteration position; 根据所述精英个体与静态栅格地图的界限得到反向种群;Obtain the reverse population according to the boundary between the elite individual and the static grid map; 将所述反向种群与所述初始种群序列迭代后的种群序列得到所述子代种群序列。The population sequence after iterating the reverse population and the initial population sequence is used to obtain the descendant population sequence. 5.如权利要求2所述的方法,其特征在于,所述根据搜索空间的界限得到所述种群中各个体的适应度,包括:5. The method according to claim 2, wherein said obtaining the fitness of each individual in the population according to the limit of the search space comprises: 根据所述种群中各个体的当前位置与初始位置得到对应的移动距离;obtaining the corresponding moving distance according to the current position and the initial position of each individual in the population; 根据所述移动距离以及所述搜索空间的界限得到所述种群中各个体的适应度。The fitness of each individual in the population is obtained according to the moving distance and the limit of the search space. 6.如权利要求2所述的方法,其特征在于,所述更新所述种群中的各个体的逃逸能量,根据所述逃逸能量执行围捕策略,得到所述种群中各个体的位置,并根据所述位置生成初始规划路径,包括:6. The method according to claim 2, characterized in that, updating the escape energy of each individual in the population, executing a round-up strategy according to the escape energy, obtaining the position of each individual in the population, and according to The locations generate an initial planned path, including: 根据所述种群中各个体的当前迭代次数与最大迭代次数得到所述各个体的逃逸能量;Obtain the escape energy of each individual according to the current number of iterations and the maximum number of iterations of each individual in the population; 在所述逃逸能量大于预设俯冲围捕能量时,采用围捕策略,调整所述逃逸能量并得到围捕后的位置;When the escape energy is greater than the preset swooping and encircling energy, adopt a encircling strategy, adjust the escape energy and obtain the encircled position; 在所述逃逸能量小于预设俯冲围捕能量时,采用俯冲围捕策略,调整所述逃逸能量并得到围捕后的位置;When the escape energy is less than the preset swooping and rounding up energy, adopt a swooping and rounding up strategy, adjust the escape energy and obtain the position after rounding up; 根据所述围捕后的位置生成初始规划路径。An initial planned path is generated according to the captured position. 7.如权利要求1至6中任一项所述的方法,其特征在于,所述基于所述初始规划路径确定全局最优路径,包括:7. The method according to any one of claims 1 to 6, wherein said determining the global optimal path based on said initial planning path comprises: 获取所述种群中各个体的当前位置,根据所述当前位置与所述初始位置得到移动距离,将所述当前位置、初始位置与所述移动距离存储至禁忌表;Obtaining the current position of each individual in the population, obtaining the moving distance according to the current position and the initial position, and storing the current position, the initial position and the moving distance in a taboo table; 对所述禁忌表中的移动距离进行比较,在当前路径上不存在障碍物时,将所述移动距离中最短的路径作为全局最优路径。The moving distances in the taboo table are compared, and when there is no obstacle on the current path, the shortest path among the moving distances is taken as the globally optimal path. 8.一种智能机器人路径规划装置,其特征在于,所述智能机器人路径规划装置包括:8. A path planning device for an intelligent robot, characterized in that the path planning device for an intelligent robot comprises: 位置获取模块,用于获取智能机器人的初始位置与目标位置;The position obtaining module is used to obtain the initial position and the target position of the intelligent robot; 路径规划模块,用于基于智能路径规划模型中改进哈里斯鹰算法对所述初始位置与目标位置进行寻路,生成初始规划路径,所述改进哈里斯鹰算法包括替换原始哈里斯鹰算法中利用随机参数对种群进行初始化,得到初始种群序列,添加精英反向学习策略对所述种群更新;The path planning module is used to find the initial position and the target position based on the improved Harris Eagle algorithm in the intelligent path planning model, and generate an initial planned path. The improved Harris Eagle algorithm includes replacing the original Harris Eagle algorithm. Random parameters are used to initialize the population to obtain the initial population sequence, and the elite reverse learning strategy is added to update the population; 路径决定模块,用于基于所述初始规划路径确定全局最优路径。A path determination module, configured to determine a globally optimal path based on the initial planned path. 9.一种智能机器人路径规划设备,其特征在于,所述设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的智能机器人路径规划程序,所述智能机器人路径规划程序配置为实现如权利要求1至7中任一项所述的智能机器人路径规划方法的步骤。9. A path planning device for an intelligent robot, characterized in that the device comprises: a memory, a processor, and an intelligent robot path planning program stored on the memory and operable on the processor, the intelligent robot The path planning program is configured to implement the steps of the intelligent robot path planning method according to any one of claims 1 to 7. 10.一种存储介质,其特征在于,所述存储介质上存储有智能机器人路径规划程序,所述智能机器人路径规划程序被处理器执行时实现如权利要求1至7任一项所述的智能机器人路径规划方法的步骤。10. A storage medium, characterized in that an intelligent robot path planning program is stored on the storage medium, and when the intelligent robot path planning program is executed by a processor, the intelligent robot according to any one of claims 1 to 7 is realized. Steps of the robot path planning method.
CN202310309642.9A 2023-03-27 2023-03-27 Intelligent robot path planning method, device, equipment and storage medium Pending CN116360437A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310309642.9A CN116360437A (en) 2023-03-27 2023-03-27 Intelligent robot path planning method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310309642.9A CN116360437A (en) 2023-03-27 2023-03-27 Intelligent robot path planning method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116360437A true CN116360437A (en) 2023-06-30

Family

ID=86917584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310309642.9A Pending CN116360437A (en) 2023-03-27 2023-03-27 Intelligent robot path planning method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116360437A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117419739A (en) * 2023-11-06 2024-01-19 大唐贵州发耳发电有限公司 Path planning optimization method for coal conveying system inspection robot
CN118690513A (en) * 2024-06-26 2024-09-24 岚图汽车科技有限公司 Automobile pipeline path planning method, device, equipment and storage medium
CN119618253A (en) * 2025-02-17 2025-03-14 中科云谷科技有限公司 Path planning method, device, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117419739A (en) * 2023-11-06 2024-01-19 大唐贵州发耳发电有限公司 Path planning optimization method for coal conveying system inspection robot
CN118690513A (en) * 2024-06-26 2024-09-24 岚图汽车科技有限公司 Automobile pipeline path planning method, device, equipment and storage medium
CN119618253A (en) * 2025-02-17 2025-03-14 中科云谷科技有限公司 Path planning method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113110509B (en) Warehousing system multi-robot path planning method based on deep reinforcement learning
CN116360437A (en) Intelligent robot path planning method, device, equipment and storage medium
CN108664022B (en) A robot path planning method and system based on topology map
CN116225066A (en) A UAV Path Optimization Method Based on Chaotic Mapping Pelican Optimization Algorithm
CN115454070B (en) A multi-robot path planning method based on K-Means ant colony algorithm
CN113569523B (en) Automatic PCB wiring method and system based on line sequence simulation
CN115357031A (en) Ship path planning method and system based on improved ant colony algorithm
CN116069045B (en) Radiation environment detection method and system based on mobile robot
WO2020181934A1 (en) Method and device for determining position of target object on the basis of particle swarm algorithm
CN117666574A (en) Transportation robot path planning method and system
CN116578116A (en) Unmanned aerial vehicle three-dimensional path planning method based on improved ant colony algorithm
CN114578845A (en) Unmanned aerial vehicle flight path planning method based on improved ant colony algorithm
CN114547964A (en) Improved HHO (Hilbert-Huang-Quadrature-order) optimization DELM (Del-enhanced dead mass) based debutanizer soft measurement modeling method
CN117804483A (en) Multi-robot path planning method and system based on improved crowd searching algorithm
CN115494840A (en) Monte Carlo factor-based MC-IACO welding robot path planning method
CN117850411B (en) Path planning method for inspection robot based on improved ant lion algorithm
Wang et al. An Efficient Improved Whale Optimization Algorithm for Optimization Tasks.
CN118625763A (en) A multi-strategy fusion swarm intelligence path optimization method and system
CN118938948A (en) A UAV task allocation method based on improved black kite optimization algorithm
CN117395745A (en) A radiation base station monitoring technology based on ant colony computing
CN118131771A (en) An unmanned ship path planning method based on the fusion of improved ant colony algorithm and artificial potential field method
CN118036469A (en) A method, device, medium and product for optimizing search and planning strategies for unmanned systems in dynamic scenarios
CN116841707A (en) Sensor resource scheduling method based on HDABC algorithm
CN116909265A (en) A mobile robot path planning method based on improved ant colony algorithm based on node evaluation mechanism
Lin et al. A recurrent neural fuzzy controller based on self‐organizing improved particle swarm optimization for a magnetic levitation system

Legal Events

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