A robot path planning and obstacle avoidance method and system
By using neuromorphic hardware and spiking neural networks in robot path planning, combined with global and local planning spiking neural networks, the problems of slow path planning speed and insufficient real-time avoidance of obstacles in the existing technology are solved, and more efficient path planning is achieved. and obstacle avoidance performance.
Patent Information
- Application Number
- CN202311734580.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-18
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2043-12-18
AI Technical Summary
Existing robot path planning and obstacle avoidance algorithms have problems such as slow planning speed, non-optimal results, insufficient real-time obstacle avoidance and adaptability to complex environments, and low computational efficiency.
Using neuromorphic hardware and spiking neural network, a 2D grid occupancy map is established by obtaining global map occupancy information, a global planning spiking neural network is established, and a local planning spiking deep neural network is trained with a reinforcement learning algorithm to achieve parallel computing and local avoidance. fault control.
It improves the speed and optimality of global path planning, enhances the real-time performance of obstacle avoidance and adaptability to complex environments, and reduces the total calculation amount and total energy consumption.
Smart Images

Figure CN117806315B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of robot navigation, and in particular relates to a robot path planning and obstacle avoidance method and system. Background Art
[0002] In recent years, with the rapid development of science and technology, mobile robots have become a comprehensive system with multiple functions. In order for mobile robots to complete tasks, path planning and dynamic obstacle avoidance are one of the essential key technologies. According to the degree of understanding of environmental information, mobile robot path planning can be divided into global path planning based on global map information and local path planning based on local map information. At present, in order to achieve the best comprehensive effect, the global and local path planning algorithms are usually integrated to achieve global path planning and local obstacle avoidance.
[0003] However, there are still some shortcomings in global path planning and local path planning. The global path planning algorithms mainly include graph search algorithms, random sampling algorithms, intelligent bionic algorithms, etc., but graph search algorithms have shortcomings such as reduced search efficiency in high-dimensional space or complex environment; random sampling algorithms have shortcomings such as large consumption of computing resources, poor real-time system operation, and non-optimal results; intelligent bionic algorithms have shortcomings such as slow algorithm convergence speed, long path planning time, and easy to fall into local optimality. Traditional local path planning algorithms include artificial potential field method and dynamic window method, but the artificial potential field method also has problems such as local extreme points, easy swing in narrow channels, and unreachable targets near obstacles. The dynamic window method has shortcomings such as high dependence on global parameters, lack of foresight, easy failure in unknown environments, and general real-time obstacle avoidance. In addition, the current algorithms are all implemented using von Neumann architecture computers based on serial computing, and the efficiency of serial computing is generally low. Summary of the invention
[0004] The present invention provides a robot path planning and obstacle avoidance method and system to solve the problems of slow planning speed, non-optimal results, insufficient obstacle avoidance real-time and complex environment adaptability, and low computational efficiency in the above-mentioned global and local path planning fusion scheme.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] A first aspect of the present invention provides a robot path planning and obstacle avoidance method, comprising:
[0007] Acquire global map placeholder information and establish a 2D grid placeholder map based on the global map placeholder information; establish a global planning pulse neural network of corresponding size according to the size and resolution of the 2D grid placeholder map, and deploy the global planning pulse neural network on neuromorphic hardware; complete parameter configuration according to the local planning pulse deep neural network trained by the reinforcement learning algorithm, and deploy the trained local planning pulse deep neural network on the neuromorphic hardware;
[0008] Collect the global target position and incremental map information to update the global planning pulse deep neural network; determine the starting pulse neuron and target pulse neuron in the global planning pulse neural network according to the robot's starting position and the global target position, obtain the pulse emission time gradient map from the pulse neuron wavefront that diffuses outward in parallel from the starting pulse neuron, and query the global optimal path from the starting pulse neuron to the target pulse neuron;
[0009] Acquire local target position information according to the global optimal path, receive environmental information and robot status information collected by the robot and process and convert them into pulse data;
[0010] The pulse data information is input into the local planning pulse deep neural network to output control instructions, and the robot executes the control instructions until it reaches the global target position.
[0011] Preferably, the method of obtaining the global map placeholder information and establishing a 2D grid placeholder map according to the global map placeholder information; and establishing a global planning spiking neural network of corresponding size according to the size and resolution of the 2D grid placeholder map comprises:
[0012] Obstacles or boundaries are expanded according to the global map occupancy information to establish a 2D grid occupancy map; each grid of the 2D grid occupancy map is mapped one by one to a spiking neuron of a global planning spiking neural network, and the global planning spiking neural network adopts a LIF model. The relationship between the membrane potential V and the sum of the synaptic currents I in the global planning spiking neural network is as follows:
[0013]
[0014] Among them, τ m =C m R m is the membrane time constant; C m is the membrane capacitance; R m is the membrane resistance; V rest is the resting potential; I is the sum of the synaptic currents generated by the discharge behavior of each presynaptic neuron;
[0015] When the membrane potential V is greater than or equal to the threshold potential V th , the neuron fires a pulse and simultaneously resets the membrane potential V to the reset potential V reset, and during the absolute refractory period t ref remains unchanged within the range; when the membrane potential V is less than the threshold potential V th When the membrane potential is constant, τ m Decays until the resting potential V rest ;
[0016] A spiking neuron connection is created between two adjacent spiking neurons to form a global planning spiking neuron network; all spiking neuron connections corresponding to the spiking neurons of each obstacle-occupied grid are configured to be fully disabled, and the state of the obstacle-occupied grid is marked as occupied.
[0017] Preferably, the method for creating a spiking neuron connection between two adjacent spiking neurons to form a global planning spiking neuron network comprises:
[0018] Each spiking neuron is bidirectionally connected to its surrounding spiking neurons using an eight-connection method to create a spiking neuron connection, and the spiking neuron connection weight is set to L to form a global planning spiking neuron network.
[0019] Preferably, the method for completing parameter configuration according to the local planning pulse deep neural network trained using the reinforcement learning algorithm includes:
[0020] The locally planned pulse deep neural network is composed of 4 fully connected layers, and the neuron model in the locally planned pulse deep neural network adopts a LIF model based on a postsynaptic current with a fixed threshold and a decaying exponential; the numbers of neurons in the 4 fully connected layers are N1, N2, N3 and N2 respectively;
[0021] The local planning pulse deep neural network module voltage update formula is as follows:
[0022] c j (t) = d c ·c j (t-1)+∑ j w ji s i (t)
[0023] v j (t) = d v ·v j (t-1)·(1-s j (t-1))+c i (t)
[0024]
[0025] Among them, t is the current time, c j is the current of the jth neuron in the current fully connected layer, d c is the current attenuation coefficient, wji is the synaptic weight from the i-th neuron in the previous fully connected layer to the j-th neuron in the current fully connected layer, s i is the pulse train output by the i-th neuron in the previous fully connected layer, v j is the membrane voltage of the jth neuron in the current fully connected layer, d v is the voltage attenuation coefficient, V th is the pulse emission threshold;
[0026] The local planning pulse deep neural network is trained in a simulation environment using a reinforcement learning algorithm to obtain the network connection weights w ji .
[0027] Preferably, the method of collecting the global target position and incremental map information to update the global planning pulse deep neural network includes:
[0028] Collect the global target position. If the global target position is a new target position and is within the free grid of the 2D grid placeholder map, the spiking neuron corresponding to the free grid where the global target position is located is established as the new target spiking neuron; the free grid of the 2D grid placeholder map is a grid in the 2D grid placeholder map that is not occupied by obstacles; otherwise, terminate the robot path planning program;
[0029] Determine whether there is actively input static incremental map information and whether there is dynamic incremental map information in the current environment;
[0030] If there is actively input static incremental map information, the static incremental map information includes occupied grid addition and occupied grid removal; updating the occupied grid and free grid states in the 2D grid placeholders and the connection configuration of the corresponding position pulse neurons according to the static incremental map information;
[0031] If the ratio of the number of grids with environmental changes within the local visible environment of the robot to the total number of grids is greater than the judgment threshold α, it is judged that there is dynamic incremental map information; the dynamic incremental map information includes the addition of occupied grids and the removal of occupied grids, and the status of occupied grids and free grids in the 2D grid placeholders and the connection configuration of the pulse neurons at the corresponding positions are updated according to the dynamic incremental map information.
[0032] Preferably, the method of obtaining a pulse firing time gradient map from a pulse neuron wavefront that spreads outward in parallel from an initial pulse neuron comprises:
[0033] A single pulse stimulus was applied to the starting spike neuron;
[0034] The pulse fired by the initiating spiking neuron activates the surrounding connected spiking neurons, thus forming a pulse wavefront that spreads outward in parallel;
[0035] The pulse wavefront propagates between the spiking neurons that are reachable by the directed connections from the starting spiking neuron. After all the spiking neurons that are reachable by the directed connections from the starting spiking neuron are activated, the propagation of the pulse wavefront stops.
[0036] The neuron ID and pulse firing time of all spiking neurons that fired pulses during the pulse wavefront diffusion process were recorded and a pulse firing time gradient map was generated.
[0037] Preferably, the method for querying the global optimal path from the starting spiking neuron to the target spiking neuron includes:
[0038] Determine whether the robot's starting position is within the free grid; if the robot's starting position is within the free grid, the pulse neuron corresponding to the robot's starting position is the starting pulse neuron; otherwise, determine whether there is a free pulse neuron within the expansion width of the robot's starting position. If so, add the robot's starting position coordinates to the path list, and search for the earliest neuron that emits a pulse as the starting pulse neuron. If there is no free pulse neuron within the expansion width of the robot's starting position, it is considered an illegal starting position and the robot path planning program is terminated.
[0039] Start the path query from the starting spiking neuron. If there is a unique spiking neuron that fires the earliest among all the spiking neurons connected to the current spiking neuron, the earliest fired spiking neuron will be used as the starting point of the next query. If the number of earliest fired spiking neurons among all the spiking neurons connected to the current spiking neuron is greater than 1, the one with a shorter path will be selected first. If the number of earliest fired spiking neurons with the shortest path is also greater than 1, one will be randomly selected from them as the starting point of the next query.
[0040] The grid center coordinates corresponding to the spiking neuron at each step in the query process are recorded and added to the path list until the target spiking neuron is found. The final path list is the optimal path from the starting position to the global target position.
[0041] Preferably, the method of acquiring local target position information according to the global optimal path, receiving environmental information and robot state information collected by the robot and converting them into pulse data includes:
[0042] Traverse each pulse neuron on the optimal path from the starting position to the global target position, according to the farthest target distance D in the local environment local Divide the optimal path into multiple local paths and obtain local target location information; if the Euclidean distance between the starting position and the global target position is less than the farthest target distance D in the local environment local , then the global target position is taken as the local target position information;
[0043] Receive the environmental information and robot status information collected by the robot, and calculate the comprehensive reference information s together with the local target position information t ,s t = {G dis , G dir , v t ,ω t , S}, where G dis and G dir Represents the relative position and angle of the robot to the local target position, v t and ω t represents the angular velocity and linear velocity of the robot, and S represents the distance observation information of the robot's laser radar;
[0044] Poisson coding is used to encode the comprehensive reference information s t Encoding is performed to generate pulse data in a given time window.
[0045] Preferably, the method of inputting pulse data information into a local planning pulse deep neural network to output a control instruction, and the robot executing the control instruction until reaching the global target position includes:
[0046] Input the pulse data information into the local planning pulse deep neural network, and execute the local planning pulse deep neural network inference process, and count the number of pulses Action[0] and Action[1] emitted by the two pulse neurons in the output layer of the local planning pulse deep neural network;
[0047] The control instruction a for controlling the robot motion is calculated based on the pulse number Action[0] and Action[1] data. t =(v Linear , v Angular ), the calculation formula is:
[0048] v Left =Action[0]*(v max -v min )+v min
[0049] v Right =Action[1]*(v max -v min )+v min
[0050] v Linear =(v Left +v Right ) / 2
[0051] v Angular =(v Left +v Right ) / diff
[0052] Among them, v Linear is the robot linear speed control instruction, v Angular is the robot angular velocity control instruction, v max is the maximum forward speed of the robot, v min is the maximum backward speed of the robot, and diff is the distance between the two wheels of the robot;
[0053] The robot controls the cycle T control Continue to execute control instructions a t After that, it repeatedly receives the environmental information and robot status information collected by the robot and processes them into pulse data; the pulse data information is input into the local planning pulse deep neural network to output control instructions, and the robot executes the control instructions until it reaches the global target position.
[0054] In a second aspect, the present invention provides a robot path planning and obstacle avoidance system, comprising:
[0055] A global planning network configuration module is used to obtain the global map placeholder information and establish a 2D grid placeholder map based on the global map placeholder information; a global planning pulse neural network of corresponding size is established according to the size and resolution of the 2D grid placeholder map;
[0056] A global planning spiking neural network deployment module, used to deploy the global planning spiking neural network onto neuromorphic hardware;
[0057] A local planning network configuration module is used to complete parameter configuration based on the local planning spiking deep neural network trained using a reinforcement learning algorithm;
[0058] A local planning spiking deep neural network deployment module, which is used to deploy the trained local planning spiking deep neural network onto neuromorphic hardware;
[0059] Incremental map maintenance module, used to collect global target location and incremental map information;
[0060] A global planning pulse neural network update module is used to update the global planning pulse deep neural network according to the global target position and incremental map information;
[0061] A global planning network pulse wavefront trigger module is used to determine the starting pulse neuron and the target pulse neuron in the global planning pulse neural network according to the robot's starting position and the global target position, and trigger the starting pulse neuron to form a stimulation signal;
[0062] The pulse wavefront diffusion module of the global planning network diffuses the pulse neuron wavefront in parallel from the starting pulse neuron to obtain the pulse emission time gradient map;
[0063] A global optimal path query module is used to query the global optimal path from the starting spike neuron to the target spike neuron;
[0064] The local planning information acquisition and encoding module is used to receive the environmental information and robot status information collected by the robot and process and convert them into pulse data; the local planning network inference module is used to receive the pulse data and input it into the local planning pulse deep neural network that has been deployed; and execute the pulse neural network inference process, and finally output the pulse inference data to send to the data analysis and control instruction generation module;
[0065] The data parsing and control instruction generation module is used to input the pulse data information into the local planning pulse deep neural network to output the control instruction, and control the robot to execute the control instruction until it reaches the global target position. In a third aspect, the present invention provides an electronic device, including a storage medium and a processor; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the method described in the first aspect.
[0066] Compared with the prior art, the present invention has the following beneficial effects:
[0067] The present invention obtains global map placeholder information and establishes a 2D grid placeholder map based on the global map placeholder information; establishes a global planning pulse neural network of corresponding size according to the size and resolution of the 2D grid placeholder map and deploys it on neuromorphic hardware; utilizes the parallel computing characteristics of neuromorphic hardware and pulse neural networks, and can achieve rapidity and optimality of global path planning.
[0068] The present invention obtains local target position information according to the global optimal path, receives environmental information and robot state information collected by the robot, and processes and converts them into pulse data; inputs the pulse data information into the local planning pulse deep neural network to output control instructions, and the robot executes the control instructions until it reaches the global target position; performs local obstacle avoidance control based on neuromorphic hardware and a pulse deep neural network trained using a reinforcement learning method, with better real-time obstacle avoidance and stronger adaptability to complex environments.
[0069] The present invention utilizes the sparse computing and event-driven characteristics of neuromorphic hardware and spiking neural networks, greatly reducing the total computing workload and total energy consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 A flow chart of the robot path planning and obstacle avoidance method provided by the present invention;
[0071] Figure 2 A schematic diagram of the connection mode between the global planning pulse neurons provided by the present invention;
[0072] Figure 3A schematic diagram of a local planning pulse deep neural network provided by the present invention;
[0073] Figure 4 A schematic diagram of the global optimal path query result provided by the present invention;
[0074] Figure 5 A schematic diagram of a robot path planning and obstacle avoidance device provided by the present invention;
[0075] Figure 6 A block diagram of the robot path planning and obstacle avoidance system provided by the present invention;
[0076] Figure 7 An interactive relationship diagram of the robot path planning and obstacle avoidance system provided by the present invention;
[0077] Figure 8 This is a diagram of the robot path planning and obstacle avoidance effect provided by the present invention. DETAILED DESCRIPTION
[0078] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0079] Example 1
[0080] like Figures 1 to 4 As shown, a robot path planning and obstacle avoidance method includes:
[0081] Step S1: obtaining global map placeholder information and establishing a 2D grid placeholder map based on the global map placeholder information; the 2D grid placeholder map is provided with free grids and occupied grids; the free grids of the 2D grid placeholder map are grids in the 2D grid placeholder map that are not occupied by obstacles, and the occupied grids of the 2D grid placeholder map are grids in the 2D grid placeholder map that are occupied by obstacles; establishing a global planning spike neural network of corresponding size according to the size and resolution of the 2D grid placeholder map and deploying it on neuromorphic hardware; then, configuring the connection between the spike neuron at the corresponding position of the occupied grid and the adjacent spike neuron to be fully disabled; the specific process includes:
[0082] According to the global map occupancy information, obstacles or boundaries are expanded to establish a 2D grid occupancy map; each grid of the 2D grid occupancy map is mapped one by one to a spiking neuron of the global planning spiking neural network. The global planning spiking neural network adopts the LIF (Leaky integrate-and-fire) model. The relationship between the membrane potential V and the sum of the synaptic current I in the global planning spiking neural network is as follows:
[0083]
[0084] Among them, τ m =C m R m is the membrane time constant; C m is the membrane capacitance; R m is the membrane resistance; V rest is the resting potential; I is the sum of the synaptic currents generated by the discharge behavior of each presynaptic neuron;
[0085] When the membrane potential V is greater than or equal to the threshold potential V th , the neuron fires a pulse and simultaneously resets the membrane potential V to the reset potential V reset , and during the absolute refractory period t ref remains unchanged within the range; when the membrane potential V is less than the threshold potential V th When the membrane potential is constant, τ m Decays until the resting potential V rest ; The parameter absolute refractory period t ref It is more critical that in order to ensure the unidirectionality of the subsequent diffusion process, it needs to be set to be greater than 2×timestep, where timestep is the single calculation step of the neuromorphic hardware. In this embodiment, timestep = 1ms, t ref =3ms, τ m =20ms, R m =20Mohm, C m =1.0nF, V rest =-70.0mV, V th =51.0mV, V reset =-65.0mV.
[0086] Each pulse neuron is bidirectionally connected with the surrounding pulse neurons using an eight-connection method to create a pulse neuron connection (that is, for each grid pulse neuron, if there is a grid pulse neuron in its eight directions, a neuron connection is created with it), and the pulse neuron connection weight is set to L (large enough that a single pulse stimulation can stimulate the adjacent pulse neurons to continue to emit pulses). In this embodiment, L=24, forming a globally planned pulse neuron network.
[0087] Note that every two connected neurons are actually bidirectionally connected. Figure 2 shown.
[0088] The neuromorphic hardware is a neuromorphic chip used to simulate a spiking neural network and an expandable system composed of the chips. The key components of a neuromorphic chip include: multiple neural computing cores, a pulse routing and communication system, and a configuration management unit. The neuromorphic computing core is used to simulate a certain number of dendrites, cell bodies, axons, etc. of a spiking neuron model to realize the calculation of the spiking neuron model; the pulse routing and communication system is used to realize the transmission of pulses between chip cores and chips and to realize the interaction with the external input and output of the system; the configuration management unit is used to realize the configuration of the spiking neural network on the chip and the management of the running data. In order to realize large-scale spiking neural networks, neuromorphic chips generally support the construction of an expandable system through the interconnection between chips.
[0089] All spiking neuron connections corresponding to spiking neurons of each obstacle-occupied grid are configured to be fully disabled, and the state of the obstacle-occupied grid is marked as occupied.
[0090] Step S2: Complete parameter configuration and deploy on neuromorphic hardware based on the local planning spiking deep neural network trained using the reinforcement learning algorithm; the specific process includes:
[0091] The locally planned pulse deep neural network consists of 4 fully connected layers, and the neuron model in the locally planned pulse deep neural network adopts the LIF model based on postsynaptic current with a fixed threshold and a decaying exponential; the number of neurons in the 4 fully connected layers are N1, N2, N3 and N2 respectively; in the embodiment of this implementation, N1=24, N2=200, N3=150.
[0092] The local planning pulse deep neural network module voltage update formula is as follows:
[0093] c j (t) = d c ·c j (t-1)+∑ j w ji s i (t)
[0094] v j (t) = d v ·v j (t-1)·(1-s j (t-1))+c i (t)
[0095]
[0096] Among them, t is the current time, c j is the current of the jth neuron in the current fully connected layer, d c is the current attenuation coefficient, w jiis the synaptic weight from the i-th neuron in the previous fully connected layer to the j-th neuron in the current fully connected layer, s i is the pulse train output by the i-th neuron in the previous fully connected layer, v j is the membrane voltage of the jth neuron in the current fully connected layer, d v is the voltage attenuation coefficient, V th is the pulse emission threshold; in this embodiment, d c =0.5,d v =0.75, V th =0.5.
[0097] The local planning pulse deep neural network is trained in a simulation environment using a reinforcement learning algorithm to obtain the network connection weights w jr ; The reinforcement learning algorithm used can be selected but not limited to DDPG (deep deterministic policy gradient), TD3 (twin delayed deep deterministic policy gradient); the trained local planning pulse deep neural network is deployed on the neuromorphic hardware; the schematic diagram of the local planning pulse deep neural network is as follows Figure 3 As shown, Figure (a) is a network structure diagram, and Figure (b) is a schematic diagram of a single-layer network update.
[0098] Step S3: Determine whether it is a new global target position. If the global target position is a new target position and is within the free grid, the spiking neuron corresponding to the free grid is established as the new target spiking neuron, and go to step S4; otherwise, go to step S10.
[0099] Step S4: Incremental map maintenance and global planning network update. Collect the global target position and incremental map information to update the global planning pulse deep neural network. The specific process includes:
[0100] Collecting the global target position, if the global target position is a new target position and is within the free grid of the 2D grid occupancy map, the spiking neuron corresponding to the free grid where the global target position is located is established as the new target spiking neuron; otherwise, terminating the robot path planning program;
[0101] Determine whether there is actively input static incremental map information and whether there is dynamic incremental map information in the current environment;
[0102] If there is actively input static incremental map information, the static incremental map information includes occupied grid addition and occupied grid removal; updating the occupied grid and free grid states in the 2D grid placeholders and the connection configuration of the corresponding position pulse neurons according to the static incremental map information;
[0103] If the ratio of the number of grids with environmental changes within the local visible environment of the robot to the total number of grids is greater than the judgment threshold α, in the embodiment, α=30%; it is judged that there is dynamic incremental map information; the dynamic incremental map information includes the increase of occupied grids and the removal of occupied grids, and the status of occupied grids and free grids in the 2D grid placeholders and the connection configuration of the corresponding position pulse neurons are updated according to the dynamic incremental map information.
[0104] Step S5: Determine the starting pulse neuron and the target pulse neuron in the global planning pulse neural network according to the robot starting position and the global target position, and obtain the pulse emission time gradient map from the pulse neuron wavefront that diffuses outward in parallel from the starting pulse neuron as follows:
[0105] A single pulse stimulus was applied to the starting spike neuron;
[0106] The pulse emitted by the initial pulse neuron activates the surrounding connected pulse neurons, thus forming a pulse wavefront that spreads outward in parallel; the unidirectional diffusion of the pulse wavefront is determined by the neuron parameter absolute refractory period t ref ensure;
[0107] The pulse wavefront propagates between the spiking neurons that are reachable by the directed connections from the starting spiking neuron. After all the spiking neurons that are reachable by the directed connections from the starting spiking neuron are activated, the propagation of the pulse wavefront stops.
[0108] The neuron ID and pulse firing time of all spiking neurons that fired pulses during the pulse wavefront diffusion process were recorded and a pulse firing time gradient map was generated.
[0109] Step S6: The specific process of querying the global optimal path from the starting spiking neuron to the target spiking neuron includes:
[0110] Step S61: Determine whether the robot's starting position is within the free grid; if the robot's starting position is within the free grid, the pulse neuron corresponding to the robot's starting position is the starting pulse neuron; otherwise, determine whether there is a free pulse neuron within the expansion width of the robot's starting position. If so, add the robot's starting position coordinates to the path list, and search for the earliest neuron that emits a pulse as the starting pulse neuron. If there is no free pulse neuron within the expansion width of the robot's starting position, it is deemed to be an illegal starting position, and the robot path planning program is terminated; go to step S10.
[0111] Step S62: Path query is performed starting from the starting spiking neuron. If there is a unique spiking neuron that fires the earliest among all the spiking neurons connected to the current spiking neuron, the earliest fired spiking neuron is used as the starting point of the next query. If the number of earliest fired spiking neurons among all the spiking neurons connected to the current spiking neuron is greater than 1, the one with a shorter path is preferentially selected. If the number of earliest fired spiking neurons with the shortest path is also greater than 1, one is randomly selected from them as the starting point of the next query.
[0112] Step S63: Record the grid center coordinates corresponding to the spiking neuron at each step in the query process and add them to the path list list until the target spiking neuron is found. The final path list list is the optimal path from the starting position to the global target position. If the query fails, the control amount is reset and go to step S10.
[0113] Step S7: Local planning information acquisition and encoding. The method of acquiring local target position information according to the global optimal path, receiving environmental information and robot state information collected by the robot and processing and converting them into pulse data includes:
[0114] Step S71, traverse each pulse neuron on the optimal path from the starting position to the global target position, and select the farthest target distance D in the local environment. local Divide the optimal path into multiple local paths and obtain local target location information; if the Euclidean distance between the starting position and the global target position is less than the farthest target distance D in the local environment local , then the global target position is taken as the local target position information; in this embodiment, D local =1.0m.
[0115] Step S72, receiving the environment information and robot state information collected by the robot, and calculating the comprehensive reference information s together with the local target position information t ,s t = {G dis , G dir , v t ,ω t , S}, where G dis and G dir Represents the relative position and angle of the robot to the local target position, v t and ω t represents the angular velocity and linear velocity of the robot, S represents the distance observation information of the robot's lidar; S is a 1×18 one-dimensional data, which is composed of a value taken every 10° in the 180° in front of the robot.
[0116] Step S73: Poisson coding is used to encode the comprehensive reference information s tEncoding is performed to generate pulse data in a given time window.
[0117] The encoding method uses Poisson coding. Poisson coding is a coding method that encodes continuous state variables within a duration, and the number of pulses emitted by the input neuron corresponding to each input variable is Poisson distributed. The implementation formula is as follows:
[0118]
[0119] Where k is the number of excitation pulses, λ is the excitation frequency proportional to the input variable value, and the probability of no pulses being generated within the time window t is e -λt In this embodiment, the time window t=5×timestep=5ms.
[0120] Step 8: Local planning network inference. Input the pulse data information into the local planning pulse deep neural network, and execute the local planning pulse deep neural network inference process to count the number of pulses Action[0] and Action[1] emitted by the two pulse neurons in the output layer of the local planning pulse deep neural network.
[0121] Step S9: Data analysis and control command execution. After the control cycle ends, it is determined whether to update the target, whether to increment the map, and whether the target task is completed. Step S9 specifically includes:
[0122] The control instruction a for controlling the robot motion is calculated based on the pulse number Action[0] and Action[1] data. t =(v Linear , v Angular ), the calculation formula is:
[0123] v Left =Action[0]*(v max -v min )+v min
[0124] v Right =Action[1]*(v max -v min )+v min
[0125] v Linear =(v Left +v Right ) / 2
[0126] v Angular =(v Left +v Right ) / diff
[0127] Among them, vLinear is the robot linear speed control instruction, v Angular is the robot angular velocity control instruction, v max is the maximum forward speed of the robot, v min is the maximum backward speed of the robot, diff is the distance between the two wheels of the robot; in this embodiment, v max =0.26m / s, v min =-0.05m / s, diff=0.15m, T local =10ms.
[0128] Control cycle T control Then determine whether there is a legal new target, if yes, go to step S3, otherwise further determine whether there is an incremental map, if yes, go to step S4, otherwise further determine whether the target task has not been reached, if yes, go to step S6, otherwise control instruction a t =(v Linear ,v Angular ) is set to (0,0) and go to step S10.
[0129] Step S10: Determine whether to actively end the algorithm process. If yes, end the algorithm process, otherwise go to step S3.
[0130] The following additional explanations are needed for the method:
[0131] 1. After a wavefront diffusion for the current map and the current global target position, the optimal path from any starting position to the current global target position can be queried. If the current map and the current global target position remain unchanged, only step S6 is required to complete the global optimal path planning.
[0132] 2. Each time the global target position is updated or the current map is incrementally updated, step S5 needs to be repeated once, and then step S6 is performed to achieve a new global optimal path planning and subsequent local planning.
[0133] Example 2
[0134] like Figures 5 to 8 As shown, this embodiment provides a robot path planning and obstacle avoidance system. The system described in this embodiment can be applied to the method described in Example 1. The system includes: a sensor unit, a human-machine exchange unit, an execution unit central processing unit and a neuromorphic hardware unit. The block diagram of the robot path planning and obstacle avoidance system based on neuromorphic hardware and pulse neural network is shown in FIG. Figure 6 shown.
[0135] The central processing unit can generally be selected from but not limited to edge computing devices, industrial computers, workstations, etc. The main tasks include the following:
[0136] 1. Receive global map information, target location information, etc. input by the human-machine interaction unit, and display the maintained map information, the robot surrounding environment and robot body status information collected by the robot sensor unit on the human-machine interaction device.
[0137] 2. Receive and process data collected from the robot’s sensor unit;
[0138] 3. Cooperate with neuromorphic hardware units to realize the robot path planning and obstacle avoidance method based on neuromorphic hardware and spiking neural network;
[0139] 4. Send motion control instructions to the robot execution unit to realize the motion control of the robot.
[0140] The human-computer interaction unit includes but is not limited to touch screen, mouse, keyboard, etc. It is mainly responsible for providing configuration interface, command input, and system information display.
[0141] The sensor unit generally includes but is not limited to radar, IMU, encoder, etc. The main task is to collect the robot's surrounding environment and robot status information in real time.
[0142] The execution unit generally includes a drive controller, a motor, etc. Its main task is to receive and execute motion control instructions.
[0143] Neuromorphic hardware units are generally composed of neuromorphic chips, circuits, and systems. The task is to receive the configuration of the central processing unit, complete the deployment and update of the corresponding spiking neural network, and implement the robot path planning and obstacle avoidance method based on neuromorphic hardware and spiking neural network.
[0144] The central processing unit includes a global planning network configuration module, an incremental map maintenance module, a global planning network pulse wavefront trigger module, a global optimal path query module, a local planning network configuration module, a local planning information acquisition and encoding module, and a data analysis and control instruction execution module; the neuromorphic hardware unit includes a global planning pulse neural network deployment module, a global planning pulse neural network update module, a global planning network pulse wavefront diffusion module, a local planning pulse deep neural network deployment module, and a local planning pulse deep neural network reasoning module. The central processing unit and the neuromorphic hardware unit constitute a schematic diagram of a robot path planning and obstacle avoidance device as shown in the figure. Figure 5 shown.
[0145] The input of the robot path planning and obstacle avoidance device includes global map information, target position information, environmental information (environmental radar data), and robot state information (position, linear velocity, angular velocity), and the output is the linear velocity and angular velocity control instructions for continuously controlling the robot.
[0146] A global planning network configuration module is used to obtain the global map placeholder information and establish a 2D grid placeholder map based on the global map placeholder information; a global planning pulse neural network of corresponding size is established according to the size and resolution of the 2D grid placeholder map;
[0147] A global planning spiking neural network deployment module, used to deploy the global planning spiking neural network onto neuromorphic hardware;
[0148] A local planning network configuration module is used to complete parameter configuration based on the local planning spiking deep neural network trained using a reinforcement learning algorithm;
[0149] A local planning spiking deep neural network deployment module, which is used to deploy the trained local planning spiking deep neural network onto neuromorphic hardware;
[0150] Incremental map maintenance module, used to collect global target location and incremental map information;
[0151] A global planning pulse neural network update module is used to update the global planning pulse deep neural network according to the global target position and incremental map information;
[0152] A global planning network pulse wavefront trigger module is used to determine the starting pulse neuron and the target pulse neuron in the global planning pulse neural network according to the robot's starting position and the global target position, and trigger the starting pulse neuron to form a stimulation signal;
[0153] The pulse wavefront diffusion module of the global planning network diffuses the pulse neuron wavefront in parallel from the starting pulse neuron to obtain the pulse emission time gradient map;
[0154] A global optimal path query module is used to query the global optimal path from the starting spike neuron to the target spike neuron;
[0155] The local planning information acquisition and encoding module is used to receive the environmental information and robot status information collected by the robot and process and convert them into pulse data;
[0156] The local planning network inference module is used to receive the pulse data and input it into the local planning pulse deep neural network that has been deployed, and execute the pulse neural network inference process, and finally output the pulse inference data to send to the data analysis and control instruction generation module;
[0157] The data analysis and control instruction generation module is used to input the pulse data information into the local planning pulse deep neural network to output control instructions, and control the robot to execute the control instructions until it reaches the global target position.
[0158] This embodiment implements a robot path planning and obstacle avoidance system based on neuromorphic hardware and spiking neural network. The real room environment tested is about 4.5m×6.5m in size. The 2D occupancy map is established using the SLAM function package of ROS. The grid accuracy is 0.05m×0.05m and the total number of pixels is 192*192. The robot radius D is 0.34m and the expansion width is W=0.4m.
[0159] The single computation step of the neuromorphic hardware is timestep = 1ms. The neuron model parameters of the global planning spiking neural network are t ref =3ms, τ m =20ms, R m =20Mohm, C m =1.0nF, V rest =-70.0mV, V th =51.0mV, V reset =-65.0mV, network connection weight L = 24. The neuron parameters of the local planning pulse deep neural network are d c =0.5,d v =0.75, V th =0.5. Network structure parameters N1=24, N2=200, N3=150. The local planning pulse deep neural network connection weights are trained using the TD3 reinforcement learning algorithm. Dynamic incremental map information judgment threshold α=30%. The farthest target distance D in the local environment local = 1.0 m. Poisson coding time window t = 5 × timestep = 5 ms. Robot parameters v max =0.26m / s, v min =-0.05m / s, diff = 0.15m. Control period T control =10ms.
[0160] After the target position is specified, the robot performs path planning and obstacle avoidance based on the robot path planning and obstacle avoidance method based on neuromorphic hardware and spiking neural network. The effect is shown in the figure below. Figure 8 shown.
[0161] Example 3
[0162] This embodiment provides an electronic device, including a storage medium and a processor; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the method described in Embodiment 1.
[0163] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0164] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0165] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0166] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0167] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A robot path planning and obstacle avoidance method, characterized in that: include: Obtain global map placeholder information and create a 2D grid placeholder map based on the global map placeholder information; A global planning spike neural network of corresponding size is established according to the size and resolution of the 2D grid occupancy map, including: Obstacles or boundaries are expanded according to the global map occupancy information to establish a 2D grid occupancy map; each grid of the 2D grid occupancy map is mapped one by one to a spiking neuron of a global planning spiking neural network, and the global planning spiking neural network adopts a LIF model. The relationship between the membrane potential V and the sum of the synaptic currents I in the global planning spiking neural network is as follows: ; in, is the membrane time constant; is the membrane capacitance; is the membrane resistance; is the resting potential; It is the sum of the synaptic currents generated by the firing behavior of each presynaptic neuron; When the membrane potential Greater than or equal to the threshold potential , the neuron fires a pulse and simultaneously resets the membrane potential V to the reset potential , and during the absolute refractory period When the membrane potential Less than the threshold potential When the membrane potential is constant, Decay until the resting potential ; A spiking neuron connection is created between two adjacent spiking neurons to form a global planning spiking neuron network; all spiking neuron connections corresponding to the spiking neurons of each obstacle-occupied grid are configured to be fully disabled, and the state of the obstacle-occupied grid is marked as occupied; The global planning spiking neural network is deployed on neuromorphic hardware; parameter configuration is completed according to the local planning spiking deep neural network trained using the reinforcement learning algorithm, including: The locally planned pulse deep neural network is composed of 4 fully connected layers, and the neuron model in the locally planned pulse deep neural network adopts a LIF model based on a postsynaptic current with a fixed threshold and a decaying exponential; the numbers of neurons in the 4 fully connected layers are N1, N2, N3 and N2 respectively; The local planning pulse deep neural network module voltage update formula is as follows: ; Among them, t is the current time, is the current of the jth neuron in the current fully connected layer, is the current attenuation coefficient, is the synaptic weight from the i-th neuron in the previous fully connected layer to the j-th neuron in the current fully connected layer, is the pulse train output by the i-th neuron in the previous fully connected layer, is the membrane voltage of the jth neuron in the current fully connected layer, is the voltage attenuation coefficient, is the pulse emission threshold; The local planning pulse deep neural network is trained in a simulation environment using a reinforcement learning algorithm to obtain network connection weights ; The trained local planning pulse deep neural network is deployed on the neuromorphic hardware; the global target position and incremental map information are collected to update the global planning pulse deep neural network; the starting pulse neuron and the target pulse neuron in the global planning pulse neural network are determined according to the robot starting position and the global target position, and the pulse emission time gradient map is obtained from the pulse neuron wavefront that diffuses outward in parallel from the starting pulse neuron. The method for querying the global optimal path from the starting pulse neuron to the target pulse neuron includes: Determine whether the robot's starting position is within the free grid; if the robot's starting position is within the free grid, the pulse neuron corresponding to the robot's starting position is the starting pulse neuron; otherwise, determine whether there is a free pulse neuron within the expansion width of the robot's starting position. If so, add the robot's starting position coordinates to the path list, and search for the earliest neuron that emits a pulse as the starting pulse neuron. If there is no free pulse neuron within the expansion width of the robot's starting position, it is considered an illegal starting position and the robot path planning program is terminated. Start the path query from the starting spiking neuron. If there is a unique spiking neuron that fires the earliest among all the spiking neurons connected to the current spiking neuron, the earliest fired spiking neuron will be used as the starting point of the next query. If the number of earliest fired spiking neurons among all the spiking neurons connected to the current spiking neuron is greater than 1, the one with a shorter path will be selected first. If the number of earliest fired spiking neurons with the shortest path is also greater than 1, one will be randomly selected from them as the starting point of the next query. Record the grid center coordinates corresponding to the spiking neuron at each step in the query process and add them to the path list list until the target spiking neuron is found. The final path list list is the optimal path from the starting position to the global target position. Acquire local target position information according to the global optimal path, receive environmental information and robot status information collected by the robot and process and convert them into pulse data; The pulse data information is input into the local planning pulse deep neural network to output control instructions, and the robot executes the control instructions until it reaches the global target position.
2. The robot path planning and obstacle avoidance method according to claim 1, characterized in that: The method for creating a spiking neuron connection between two adjacent spiking neurons to form a global planning spiking neuron network includes: Each spiking neuron is bidirectionally connected to its surrounding spiking neurons using eight connections to create spiking neuron connections, and the spiking neuron connection weight is set to , forming a global planning spike neuron network.
3. The robot path planning and obstacle avoidance method according to claim 1, characterized in that: The method of collecting the global target position and incremental map information to update the global planning pulse deep neural network includes: Collect the global target position. If the global target position is a new target position and is within the free grid of the 2D grid placeholder map, the spiking neuron corresponding to the free grid where the global target position is located is established as the new target spiking neuron; the free grid of the 2D grid placeholder map is a grid in the 2D grid placeholder map that is not occupied by obstacles; otherwise, terminate the robot path planning program; Determine whether there is actively input static incremental map information and whether there is dynamic incremental map information in the current environment; If there is actively input static incremental map information, the static incremental map information includes occupied grid addition and occupied grid removal; updating the occupied grid and free grid states in the 2D grid placeholders and the connection configuration of the corresponding position pulse neurons according to the static incremental map information; If the ratio of the number of grids with environmental changes in the robot's local visible environment to the total number of grids is greater than the judgment threshold , it is determined that there is dynamic incremental map information; the dynamic incremental map information includes the addition and removal of occupied grids, and the status of occupied grids and free grids in the 2D grid occupancy map and the connection configuration of the corresponding position pulse neurons are updated according to the dynamic incremental map information.
4. The robot path planning and obstacle avoidance method according to claim 1, characterized in that: The method of obtaining a spike firing time gradient map from the spiking neuron wavefront that spreads outward in parallel from the initiating spiking neuron includes: A single pulse stimulus was applied to the starting spike neuron; The pulse fired by the initiating spiking neuron activates the surrounding connected spiking neurons, thus forming a pulse wavefront that spreads outward in parallel; The pulse wavefront propagates between the spiking neurons that are reachable by the directed connections from the starting spiking neuron. After all the spiking neurons that are reachable by the directed connections from the starting spiking neuron are activated, the propagation of the pulse wavefront stops. The neuron ID and pulse firing time of all spiking neurons that fired pulses during the pulse wavefront diffusion process were recorded and a pulse firing time gradient map was generated.
5. The robot path planning and obstacle avoidance method according to claim 1, characterized in that: The method of obtaining local target position information according to the global optimal path, receiving environmental information and robot state information collected by the robot and processing and converting them into pulse data includes: Traverse each pulse neuron on the optimal path from the starting position to the global target position, according to the farthest target distance in the local environment Divide the optimal path into multiple local paths and obtain local target location information; if the Euclidean distance between the starting position and the global target position is less than the farthest target distance in the local environment , then the global target position is taken as the local target position information; Receive the environment information and robot status information collected by the robot, and calculate the comprehensive reference information together with the local target position information , ,in and Represents the relative position and angle of the robot to the local target position, and represents the angular velocity and linear velocity of the robot, Represents the distance observation information of the robot's laser radar; Poisson coding is used to encode the comprehensive reference information Encoding is performed to generate pulse data in a given time window.
6. The robot path planning and obstacle avoidance method according to claim 1, characterized in that: The method of inputting pulse data information into a local planning pulse deep neural network to output a control instruction, and having the robot execute the control instruction until reaching the global target position includes: Input the pulse data information into the local planning pulse deep neural network, execute the local planning pulse deep neural network inference process, and count the number of pulses emitted by the two pulse neurons in the output layer of the local planning pulse deep neural network , ; According to the number of pulses , The data is calculated to obtain the control instructions for controlling the robot's movement , the calculation formula is: ; in, is the robot linear speed control instruction, is the robot angular velocity control instruction, is the maximum forward speed of the robot, is the maximum backward speed of the robot, is the distance between the two wheels of the robot; The robot controls the cycle Continuously execute control instructions After that, it repeatedly receives the environmental information and robot status information collected by the robot and processes them into pulse data; the pulse data information is input into the local planning pulse deep neural network to output control instructions, and the robot executes the control instructions until it reaches the global target position.
7. A robot path planning and obstacle avoidance system, characterized in that: include: A global planning network configuration module is used to obtain the global map placeholder information and establish a 2D grid placeholder map based on the global map placeholder information; a global planning pulse neural network of corresponding size is established according to the size and resolution of the 2D grid placeholder map; A global planning spiking neural network deployment module, used to deploy the global planning spiking neural network onto neuromorphic hardware; A local planning network configuration module is used to complete parameter configuration based on the local planning spiking deep neural network trained using a reinforcement learning algorithm; A local planning spiking deep neural network deployment module, which is used to deploy the trained local planning spiking deep neural network onto neuromorphic hardware; Incremental map maintenance module, used to collect global target location and incremental map information; A global planning pulse neural network update module is used to update the global planning pulse deep neural network according to the global target position and incremental map information; A global planning network pulse wavefront trigger module is used to determine the starting pulse neuron and the target pulse neuron in the global planning pulse neural network according to the robot's starting position and the global target position, and trigger the starting pulse neuron to form a stimulation signal; The pulse wavefront diffusion module of the global planning network diffuses the pulse neuron wavefront in parallel from the starting pulse neuron to obtain the pulse emission time gradient map; A global optimal path query module is used to query the global optimal path from the starting spike neuron to the target spike neuron; The local planning information acquisition and encoding module is used to receive the environmental information and robot status information collected by the robot and process and convert them into pulse data; The local planning network inference module is used to receive the pulse data and input it into the local planning pulse deep neural network that has been deployed, and execute the pulse neural network inference process, and finally output the pulse inference data to send to the data analysis and control instruction generation module; The data analysis and control instruction generation module is used to input the pulse data information into the local planning pulse deep neural network to output the control instruction, and control the robot to execute the control instruction until it reaches the global target position; The global planning network configuration module obtains the global map placeholder information and establishes a 2D grid placeholder map according to the global map placeholder information; the method for establishing a global planning pulse neural network of corresponding size according to the size and resolution of the 2D grid placeholder map includes: Obstacles or boundaries are expanded according to the global map occupancy information to establish a 2D grid occupancy map; each grid of the 2D grid occupancy map is mapped one by one to a spiking neuron of a global planning spiking neural network, and the global planning spiking neural network adopts a LIF model. The relationship between the membrane potential V and the sum of the synaptic currents I in the global planning spiking neural network is as follows: ; in, is the membrane time constant; is the membrane capacitance; is the membrane resistance; is the resting potential; It is the sum of the synaptic currents generated by the firing behavior of each presynaptic neuron; When the membrane potential Greater than or equal to the threshold potential , the neuron fires a pulse and simultaneously resets the membrane potential V to the reset potential , and during the absolute refractory period When the membrane potential Less than the threshold potential When the membrane potential is constant, Decay until the resting potential ; A spiking neuron connection is created between two adjacent spiking neurons to form a global planning spiking neuron network; all spiking neuron connections corresponding to the spiking neurons of each obstacle-occupied grid are configured to be fully disabled, and the state of the obstacle-occupied grid is marked as occupied; The local planning network configuration module completes parameter configuration according to the local planning pulse deep neural network trained by the reinforcement learning algorithm, including: The locally planned pulse deep neural network is composed of 4 fully connected layers, and the neuron model in the locally planned pulse deep neural network adopts a LIF model based on a postsynaptic current with a fixed threshold and a decaying exponential; the numbers of neurons in the 4 fully connected layers are N1, N2, N3 and N2 respectively; The local planning pulse deep neural network module voltage update formula is as follows: ; Among them, t is the current time, is the current of the jth neuron in the current fully connected layer, is the current attenuation coefficient, is the synaptic weight from the i-th neuron in the previous fully connected layer to the j-th neuron in the current fully connected layer, is the pulse train output by the i-th neuron in the previous fully connected layer, is the membrane voltage of the jth neuron in the current fully connected layer, is the voltage attenuation coefficient, is the pulse emission threshold; The local planning pulse deep neural network is trained in a simulation environment using a reinforcement learning algorithm to obtain network connection weights ; The method for the global optimal path query module to query the global optimal path from the starting spiking neuron to the target spiking neuron includes: Determine whether the robot's starting position is within the free grid; if the robot's starting position is within the free grid, the pulse neuron corresponding to the robot's starting position is the starting pulse neuron; otherwise, determine whether there is a free pulse neuron within the expansion width of the robot's starting position. If so, add the robot's starting position coordinates to the path list, and search for the earliest neuron that emits a pulse as the starting pulse neuron. If there is no free pulse neuron within the expansion width of the robot's starting position, it is considered an illegal starting position and the robot path planning program is terminated. Start the path query from the starting spiking neuron. If there is a unique spiking neuron that fires the earliest among all the spiking neurons connected to the current spiking neuron, the earliest fired spiking neuron will be used as the starting point of the next query. If the number of earliest fired spiking neurons among all the spiking neurons connected to the current spiking neuron is greater than 1, the one with a shorter path will be selected first. If the number of earliest fired spiking neurons with the shortest path is also greater than 1, one will be randomly selected from them as the starting point of the next query. The grid center coordinates corresponding to the spiking neuron at each step in the query process are recorded and added to the path list until the target spiking neuron is found. The final path list is the optimal path from the starting position to the global target position.
8. An electronic device, comprising a storage medium and a processor; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the method according to any one of claims 1 to 6.
