Path generation method and device, robot and computer readable storage medium

CN116382296BActive Publication Date: 2026-10-23SHENZHEN PUDU TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310502675.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-06
Publication Date
2026-10-23
Estimated Expiration
2043-05-06

AI Technical Summary

Technical Problem

[0003]现有技术中,通过传统的路径搜索算法来生成的路径,不能很好适用机器人的运动学约束

Benefits of technology

[0047]上述路径生成方法、装置、机器人及计算机可读存储介质,通过对所获取的运动控制指令集合中的各个子指令与机器人当前位置节点对应的状态信息进行融合,生成各个对应的扩展节点,再将各个扩展节点与当前位置节点以及与目标位置节点间的距离作为依据,从各个扩展节点中确定出参考扩展节点,从而实现根据机器人的运动学约束,例如不能支持横向侧移、原地掉头、大曲率转弯等运动状态的二轮差速模型等,使得本申请中根据当前位置节点对下一个参考扩展节点进行确定时,是在充分考虑到机器人的运动学约束情况下来对相应的参考扩展节点进行确定的,最后再基于目标位置节点、参考扩展节点以及当前位置节点,来确定出目标路径,能够有效提高所生成的路径的适应性,满足运动学约束。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116382296B_ABST
    Figure CN116382296B_ABST
Patent Text Reader

Abstract

The application relates to a path generation method and device, a robot and a computer readable storage medium. The method comprises the following steps: acquiring a motion control instruction set, a current position node and a target position node of the robot in a grid map, and the motion control instruction set comprises at least two sub-instructions; fusing each sub-instruction with state information corresponding to the current position node to obtain corresponding reference state information, and determining a corresponding extended node from the reference state information, wherein the state information is used for representing the motion state of the robot at the corresponding node; determining a reference extended node from each extended node according to a first distance between each extended node and the current position node and a second distance between each extended node and the target position node; and when the reference extended node is in a preset range corresponding to the target position node, determining a target path according to the target position node, the reference extended node and the current position node. The adaptability of the generated path can be improved by using the method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robotics, and in particular to a path generation method, apparatus, robot, and computer-readable storage medium. Background Technology

[0002] With the development of robotics technology, robots involved in tasks such as cleaning, navigation, mine clearance, lawn mowing, and automated navigation have been widely researched and applied. Among these, effective and accurate robot path generation methods are of great significance for robots to carry out their work efficiently and reliably.

[0003] In existing technologies, paths generated by traditional path search algorithms cannot be well adapted to the kinematic constraints of robots. Summary of the Invention

[0004] Therefore, it is necessary to provide a path generation method, apparatus, robot, and computer-readable storage medium to address the above-mentioned technical problems, which can improve the adaptability of the generated path and satisfy kinematic constraints.

[0005] In a first aspect, this application provides a robot, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that the processor performs the following steps when executing the computer-readable instructions:

[0006] Obtain a set of motion control instructions, as well as the robot's current position node and target position node in the grid map. The set of motion control instructions includes at least two sub-instructions.

[0007] Each sub-instruction is fused with the state information corresponding to the current position node to obtain the corresponding reference state information, and the corresponding extended node is determined by the reference state information. The state information is used to characterize the robot's motion state at the corresponding node.

[0008] Based on the first distance between each extended node and the current location node and the second distance between each extended node and the target location node, a reference extended node is determined from each extended node;

[0009] When the reference extension node is within the preset range corresponding to the target location node, the target path is determined based on the target location node, the reference extension node, and the current location node.

[0010] In one embodiment, the set of motion control commands is obtained, including:

[0011] Acquire the robot's linear acceleration range data and linear acceleration sampling interval;

[0012] Acquire the robot's angular acceleration range data and angular acceleration sampling interval;

[0013] The linear acceleration range data is sampled according to the linear acceleration sampling interval to obtain the linear acceleration set;

[0014] The angular acceleration range data is sampled according to the angular acceleration sampling interval to obtain the angular acceleration set;

[0015] By combining the elements in the linear acceleration set with the elements in the angular acceleration set, we obtain various motion control sub-instructions, and then obtain a set of motion control instructions based on these sub-instructions.

[0016] In one embodiment, the state information includes the robot's position information, heading angle, linear velocity, and angular velocity at the corresponding node in the world coordinate system; the sub-instructions include the robot's linear acceleration, angular acceleration, and control duration at the corresponding node in the world coordinate system.

[0017] Each sub-instruction is fused with the state information corresponding to the current position node to obtain the corresponding reference state information, including:

[0018] The reference linear velocity is obtained by fusing linear velocity, linear acceleration, and control duration.

[0019] The reference angular velocity is obtained by fusing angular velocity, angular acceleration, and control duration.

[0020] The reference heading angle is obtained by fusing the heading angle, angular velocity, control duration, and angular acceleration.

[0021] Reference position information is obtained by fusing position information, linear velocity, control duration, linear acceleration, and reference heading angle.

[0022] Reference state information is obtained based on reference linear velocity, reference angular velocity, reference heading angle, and reference position information.

[0023] In one embodiment, determining the corresponding extended node from the reference state information includes: obtaining the origin position information of the origin in the world coordinate system corresponding to the origin in the raster map;

[0024] Based on the fusion of reference position information, origin position information and map resolution of the raster map in the reference state information, the index information of the extended node corresponding to the reference state information in the raster map is obtained.

[0025] The extended node corresponding to the reference status information is determined based on the index information.

[0026] In one embodiment, determining the corresponding extended node from the reference state information includes: determining the corresponding candidate extended node according to each reference state information;

[0027] Based on the linear velocity and obstacle state information in the reference state information corresponding to each candidate expansion node, expansion nodes are determined from each candidate expansion node. The obstacle state information is used to characterize the existence state of obstacles at the corresponding candidate expansion node.

[0028] In one embodiment, determining a reference extended node from the extended nodes based on a first distance between each extended node and the current location node and a second distance between each extended node and the target location node includes:

[0029] Calculate the first distance between each extended node and the current node;

[0030] Calculate the second distance between each extended node and the target location node;

[0031] The first distance and the second distance of each extended node are merged to obtain the corresponding total distance;

[0032] Based on the total distance of each extended node, a reference extended node is determined from among the extended nodes.

[0033] In one embodiment, the processor performs the following steps when executing computer-readable instructions:

[0034] When the reference extension node is not within the preset range, the reference extension node will be used as the next current position node;

[0035] Return to the steps of fusing each sub-instruction with the state information corresponding to the current position node to obtain the corresponding reference state information, and then determining the corresponding extended node based on the reference state information.

[0036] Secondly, this application provides a path generation method, including:

[0037] Obtain a set of motion control instructions, as well as the robot's current position node and target position node in the grid map. The set of motion control instructions includes at least two sub-instructions.

[0038] Each sub-instruction is fused with the state information corresponding to the current position node to obtain the corresponding reference state information, and the corresponding extended node is determined by the reference state information. The state information is used to characterize the robot's motion state at the corresponding node.

[0039] Based on the first distance between each extended node and the current location node and the second distance between each extended node and the target location node, a reference extended node is determined from each extended node;

[0040] When the reference extension node is within the preset range corresponding to the target location node, the target path is determined based on the target location node, the reference extension node, and the current location node.

[0041] Thirdly, this application provides a path generation apparatus, comprising:

[0042] The acquisition module is used to acquire a set of motion control commands, as well as the robot's current position node and target position node in the grid map. The set of motion control commands includes at least two sub-commands.

[0043] The calculation module is used to fuse each sub-instruction with the state information corresponding to the current position node to obtain the corresponding reference state information, and to determine the corresponding extended node based on the reference state information. The state information is used to characterize the robot's motion state at the corresponding node.

[0044] The determination module is used to determine a reference extended node from each extended node based on the first distance between each extended node and the current position node and the second distance between each extended node and the target position node;

[0045] The generation module is used to determine the target path based on the target location node, the reference extension node, and the current location node when the reference extension node is within a preset range corresponding to the target location node.

[0046] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to perform the steps of the path generation method described above.

[0047] The aforementioned path generation method, apparatus, robot, and computer-readable storage medium fuse the sub-instructions in the acquired motion control instruction set with the state information corresponding to the robot's current position node to generate corresponding extended nodes. Then, based on the distances between each extended node and the current position node, as well as the target position node, reference extended nodes are determined from among the extended nodes. This achieves the determination of the next reference extended node based on the current position node, taking into full account the robot's kinematic constraints, such as the inability to support lateral movement, U-turns, and large-curvature turns in a two-wheel differential model. Finally, based on the target position node, reference extended nodes, and the current position node, the target path is determined, effectively improving the adaptability of the generated path and satisfying kinematic constraints. Attached Figure Description

[0048] Figure 1 This is a diagram illustrating the application environment of the path generation method in one embodiment;

[0049] Figure 2 This is a flowchart illustrating a path generation method in one embodiment;

[0050] Figure 3 This is a flowchart illustrating the process of generating a set of motion control commands in one embodiment;

[0051] Figure 4 This is a flowchart illustrating the process of determining reference state information in one embodiment;

[0052] Figure 5 This is a flowchart illustrating the process of determining the corresponding extended node based on index information in one embodiment;

[0053] Figure 6 This is a schematic diagram of the process of determining an expansion node from candidate expansion nodes in one embodiment;

[0054] Figure 7 This is a flowchart illustrating the process of determining a reference extension node in one embodiment;

[0055] Figure 8 This is a flowchart illustrating a process where a reference extension node is used as the next current position node in one embodiment.

[0056] Figure 9 This is a schematic diagram of the node expansion process in one embodiment;

[0057] Figure 10 This is a flowchart illustrating a robot path search method in one embodiment;

[0058] Figure 11 This is a schematic diagram of the path search process in one embodiment;

[0059] Figure 12 This is a structural block diagram of a path generation device in one embodiment;

[0060] Figure 13 This is a diagram of the internal structure of a robot in one embodiment. Detailed Implementation

[0061] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0062] The path generation method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, robot 102 communicates with the server via a network. A data storage system can store the data that the server needs to process. The data storage system can be integrated onto the server or placed in the cloud or on another network server. Specifically, robot 102 acquires a set of motion control commands, as well as the robot's current position node and target position node in a grid map; it fuses each sub-command with the state information corresponding to the current position node to obtain corresponding reference state information, and determines the corresponding extended node based on the reference state information; it determines a reference extended node from among the extended nodes based on a first distance between each extended node and the current position node and a second distance between each extended node and the target position node; when the reference extended node is within a preset range corresponding to the target position node, the target path is determined based on the target position node, the reference extended node, and the current position node.

[0063] In one embodiment, a robot is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, such as... Figure 2 As shown, when a processor executes computer-readable instructions, it performs the following steps:

[0064] Step S202: Obtain the set of motion control commands, as well as the robot's current position node and target position node in the grid map.

[0065] The motion control command set includes at least two sub-commands.

[0066] Specifically, the robot control equipment uses positioning sensors on the robot to collect environmental data from the surrounding area. By analyzing the collected environmental data, the coordinates of the robot and the target position in the world coordinate system are obtained, as well as the robot's current position node in the grid map and the target position node in the grid map. The robot's coordinates in the world coordinate system and the corresponding current position node in the grid map are mutually corresponding. That is, once the robot's coordinate position in the world coordinate system is determined, the node position information corresponding to that coordinate position in the grid map can be uniquely determined. Optionally, the robot can also determine its own position and the target position in the world coordinate system or the corresponding node position information in the grid map by receiving positioning information sent from a server or other computer equipment.

[0067] Step S204: Each sub-instruction is fused with the state information corresponding to the current position node to obtain the corresponding reference state information, and the corresponding extended node is determined by the reference state information.

[0068] Among them, the state information is used to characterize the robot's motion state at the corresponding node. The robot's motion state can be physical quantities that reflect the robot's motion, such as the robot's linear velocity, angular velocity, linear acceleration, angular acceleration, heading angle, and position information in the world coordinate system or grid map. The dimension of the parameters contained in each sub-instruction corresponds one-to-one with the state information of each node.

[0069] Specifically, the robot fuses the parameters of each dimension in each sub-instruction with the parameters of each dimension in the state information corresponding to the current position node to obtain the reference state parameters corresponding to each dimension. Then, the reference state parameters of each dimension are combined to obtain the corresponding reference state information, and the corresponding extended node is determined by the reference state information.

[0070] Step S206: Determine a reference extended node from among the extended nodes based on the first distance between each extended node and the current location node and the second distance between each extended node and the target location node.

[0071] The first distance and the second distance can be calculated in the same way or in different ways. For example, the first distance and the second distance can both be Euclidean distances, or the first distance can be Euclidean distances and the second distance can be calculated in other ways.

[0072] Specifically, the robot obtains the first distance between each extended node and the current position node, and obtains the second distance between each extended node and the target position node. The first distance and the second distance are then fused to obtain the total distance for each extended node. Based on the total distance, a reference extended node is determined from the extended nodes.

[0073] Step S208: When the reference extension node is within the preset range corresponding to the target location node, determine the target path based on the target location node, the reference extension node, and the current location node.

[0074] Specifically, the robot compares the coordinate position of the reference extended node in the world coordinate system with the preset range corresponding to the target position node. When the reference extended node is within the preset range corresponding to the target position node, the target path is determined based on the target position node, the reference extended node, and the current position node.

[0075] In this embodiment, by fusing the sub-instructions in the acquired motion control instruction set with the state information corresponding to the robot's current position node, corresponding extended nodes are generated. Then, the distances between each extended node and the current position node, as well as the target position node, are used as the basis to determine reference extended nodes from each extended node. This achieves the determination of the next reference extended node based on the current position node in this application, taking into full account the robot's kinematic constraints, such as the two-wheel differential model which cannot support lateral movement, U-turns, and large curvature turns. Finally, the target path is determined based on the target position node, the reference extended nodes, and the current position node, which can effectively improve the adaptability of the generated path.

[0076] In one embodiment, such as Figure 3 As shown, the set of motion control commands is obtained, including:

[0077] Step S302: Obtain the robot's linear acceleration range data and linear acceleration sampling interval.

[0078] Among them, the linear acceleration range data of the robot can be flexibly set by technicians according to the robot's motion characteristics. For example, when the robot's motion characteristics are such that there is a risk of motion loss of control when the acceleration exceeds the maximum limit, the upper limit of the linear acceleration range data is set to be lower than the maximum limit.

[0079] Step S304: Obtain the robot's angular acceleration range data and angular acceleration sampling interval.

[0080] The robot's angular acceleration range data can be flexibly set by technicians according to the robot's motion characteristics. For example, if the robot's motion characteristics are such that when the angular velocity acceleration exceeds the maximum limit, there is a risk of tipping over or other loss of control, then the upper limit of the angular acceleration range data can be set lower than the maximum limit.

[0081] Step S306: Sample the linear acceleration range data according to the linear acceleration sampling interval to obtain the linear acceleration set.

[0082] Step S308: Sample the angular acceleration range data according to the angular acceleration sampling interval to obtain the angular acceleration set.

[0083] Step S310: Combine each element in the linear acceleration set with each element in the angular acceleration set to obtain each motion control sub-instruction, and obtain a motion control instruction set based on each motion control sub-instruction.

[0084] Specifically, in the aforementioned steps, the robot samples linear acceleration and angular acceleration according to the sampling interval to obtain a set of linear acceleration and a set of angular acceleration. Then, each linear acceleration in the set of linear acceleration is combined with each element in the set of angular acceleration to obtain each motion control sub-instruction. The combination method can be arbitrary. For example, when the linear acceleration range is [-0.2, 0.2] and the sampling interval is 0.1, the sampled linear acceleration set is {-0.2, -0.1, 0, 0.1, 0.2}. When the angular acceleration sampling range is [-pi, pi] and the sampling interval is pi / 2, the sampled angular acceleration set is {-pi, -pi / 2, 0, pi / 2, pi}. Therefore, when each element in the set of linear acceleration is arbitrarily combined with each element in the set of angular acceleration, there are a total of 25 combinations, corresponding to 25 motion control sub-instructions. The motion control instruction set is obtained by combining these 25 motion control sub-instructions.

[0085] In this embodiment, by flexibly setting the linear acceleration range, angular acceleration range, and sampling interval according to the robot's motion characteristics, a set of linear acceleration and a set of angular acceleration are obtained through sampling. Then, based on the pairwise combination of each element in the set of linear acceleration and each element in the set of angular acceleration, each motion control sub-instruction is obtained. This makes the set of motion control instructions obtained on this basis effectively applicable to the robot's motion characteristics, improving the applicability and reliability of the set of motion control instructions.

[0086] In one embodiment, such as Figure 4 As shown, each sub-instruction is fused with the state information corresponding to the current position node to obtain the corresponding reference state information, including:

[0087] The status information includes the robot's position, heading angle, linear velocity, and angular velocity at the corresponding node in the world coordinate system; the sub-instructions include the robot's linear acceleration, angular acceleration, and control duration at the corresponding node in the world coordinate system.

[0088] Step S402: Obtain the reference linear velocity by fusing the linear velocity, linear acceleration, and control duration.

[0089] Specifically, the robot fuses linear acceleration and control duration to obtain the linear velocity change, and then fuses the linear velocity change with the linear velocity to obtain a reference linear velocity.

[0090] For example, the robot can calculate the reference linear velocity v according to the following formula 1. i :

[0091] v i = c + vt, Formula 1

[0092] Among them, v c Let a be the linear velocity. v Let t be the linear acceleration and t be the control duration.

[0093] Step S404: Obtain the reference angular velocity by fusing the angular velocity, angular acceleration, and control duration.

[0094] Specifically, the robot fuses angular acceleration and control duration to obtain the change in angular velocity, and then fuses the change in angular velocity with the angular velocity to obtain a reference angular velocity. For example, the robot can calculate the reference angular velocity w according to the following formula 2. i :

[0095] w i =w c +a w t, Formula 2

[0096] Among them, w c Let a be the angular velocity. w ω is angular acceleration, and t is the control duration.

[0097] Step S406: Based on the fusion of heading angle, angular velocity, control duration, and angular acceleration, obtain the reference heading angle.

[0098] Specifically, the robot fuses the angular velocity and control duration to obtain the change in heading angle, fuses the angular acceleration and control duration to obtain the change in angular velocity, and finally fuses the heading angle, angular velocity change, and heading angle change at the current position node to obtain the reference heading angle.

[0099] For example, the robot can calculate the reference heading angle theta according to the following formula 3. i :

[0100] theta i =theta c +w c t+0.5a w t 2 , formula 3

[0101] Among them, theta c w is the heading angle corresponding to the current position node. c ω is the angular velocity, t is the control duration, and a is the angular velocity. w ω is angular acceleration.

[0102] Step S408: Based on the fusion of position information, linear velocity, control duration, linear acceleration, and reference heading angle, reference position information is obtained.

[0103] Specifically, the robot obtains the change in position information by fusing the linear velocity, control duration, linear acceleration, and reference heading angle corresponding to the current position node, and then obtains reference position information by fusing the position information with the change in position information.

[0104] For example, the robot can calculate the reference position information using the following formulas 4 and 5:

[0105] x i =x c +(v c t+0.5a v t 2 cos(theta) i ), formula 4

[0106] y i =y c +(v c t+0.5a v t 2 sin(theta) i ), formula 5

[0107] Among them, (x i y i (x) is the reference location information. c y c ) represents the location information corresponding to the current location node, v c The linear velocity corresponding to the current position node, t is the control duration, and a is the linear velocity. v For linear acceleration, theta i For reference heading angle.

[0108] Step S410: Based on the reference linear velocity, reference angular velocity, reference heading angle, and reference position information, obtain the reference state information.

[0109] Specifically, the robot combines the reference linear velocity, reference angular velocity, reference heading angle, and reference position information to obtain reference state information.

[0110] In this embodiment, a reference linear velocity is obtained by fusing linear velocity, linear acceleration, and control duration; a reference angular velocity is obtained by fusing angular velocity, angular acceleration, and control duration; a reference heading angle is obtained by fusing heading angle, angular velocity, control duration, and angular acceleration; and reference position information is obtained by fusing position information, linear velocity, control duration, linear acceleration, and reference heading angle. Finally, reference state information is obtained based on the reference linear velocity, reference angular velocity, reference heading angle, and reference position information. This enables the expansion of the state information corresponding to the current position node based on the linear and angular acceleration in the sub-instruction, thereby realizing the process of determining the expanded node based on the reference state information, effectively improving the accuracy of determining the expanded node.

[0111] In one embodiment, such as Figure 5 As shown, the corresponding extended node is determined by the reference state information, including: step 502, obtaining the origin position information of the origin in the world coordinate system corresponding to the origin in the raster map.

[0112] Step 504: Based on the fusion of the reference position information, origin position information and the map resolution of the raster map in the reference state information, the index information of the extended node corresponding to the reference state information in the raster map is obtained.

[0113] Specifically, the robot performs difference calculations on the reference position information and origin position information in the reference state information to obtain the position difference value. Then, based on the ratio of the position difference value to the map resolution of the grid map, it calculates the index information of the extended node corresponding to the reference state information in the grid map.

[0114] For example, the robot can calculate the index information using the following formulas 6 and 7:

[0115]

[0116]

[0117] Where (i,j) represents the index information of the extended node corresponding to the reference state information in the raster map, the round() function is a rounding function, that is, if the remainder is less than 0.5, it is discarded, and if it is greater than 0.5, it is rounded up, and (x,y) represents the reference position information in the reference state information, (x origin ,y origin ) represents the location information of the origin in the world coordinate system corresponding to the origin of the raster map. map This refers to the map resolution.

[0118] Step 506: Determine the extended node corresponding to the reference status information based on the index information.

[0119] Specifically, the robot determines the row and column information of the corresponding extended node in the grid map based on the index information, and then determines the extended node corresponding to the reference state information.

[0120] In this embodiment, by fusing the reference position information, origin position information and map resolution of the grid map in the reference state information, the index information of the extended node corresponding to the reference state information in the grid map is obtained. Then, the corresponding extended node in the grid map is determined by the index information, which effectively realizes the coordinate transformation between the position information of the grid map and the world coordinate system, and can effectively improve the accuracy of the determined extended node.

[0121] In one embodiment, such as Figure 6 As shown, determining the corresponding expansion node based on the reference state information includes: step S602, determining the corresponding candidate expansion node based on each reference state information.

[0122] Specifically, the robot determines the corresponding node in the grid map by using the method of converting position information and index information in the reference state information in the aforementioned steps, and then determines the corresponding candidate expansion node according to each reference state information, wherein each reference state information uniquely corresponds to a node in the grid map.

[0123] Step S604: Based on the linear velocity and obstacle state information in the reference state information corresponding to each candidate expansion node, determine the expansion node from each candidate expansion node.

[0124] Among them, obstacle state information is used to characterize the existence state of obstacles at the corresponding candidate expansion node.

[0125] Specifically, the robot analyzes the reference state information corresponding to each candidate expansion node. This can be done by analyzing the linear velocity in the reference state information, eliminating candidate expansion nodes with negative linear velocities, eliminating candidate expansion nodes with obstacle state information indicating the presence of obstacles, and using the remaining candidate expansion nodes as expansion nodes.

[0126] In this embodiment, by determining the corresponding candidate expansion nodes based on each reference state information, and by determining the expansion nodes from each candidate expansion node based on the linear velocity and obstacle state information in the reference state information corresponding to each candidate expansion node, the screening conditions for expansion nodes can be flexibly set according to the robot's kinematic constraints, effectively eliminating candidate expansion nodes that do not conform to the robot's kinematic constraints, such as those with negative linear velocities or the presence of obstacles, thereby effectively improving the reliability of expansion nodes.

[0127] In one embodiment, such as Figure 7As shown, a reference extended node is determined from each extended node based on the first distance between each extended node and the current position node and the second distance between each extended node and the target position node, including: step S702, calculating the first distance between each extended node and the current position node.

[0128] Specifically, the robot can acquire images of the environment and analyze the acquired images to obtain the first distance between each extended node and the current position node, where the first distance can be the Euclidean distance.

[0129] Step S704: Calculate the second distance between each extended node and the target location node.

[0130] Specifically, the robot can acquire images of the environment and analyze the acquired images to obtain a second distance between each extended node and the target location node, where the second distance can be a Euclidean distance.

[0131] Step S706: Merge the first distance and the second distance of each extended node to obtain the corresponding total distance.

[0132] Specifically, the robot performs a weighted fusion of the first distance and the second distance to obtain the corresponding total distance.

[0133] Step S708: Determine a reference extension node from among the extension nodes based on the total distance of each extension node.

[0134] Specifically, the robot arranges the total distances of each extension node from smallest to largest, and uses the extension node with the smallest total distance as the reference extension node.

[0135] In this embodiment, by calculating the first distance between each extended node and the current location node, and calculating the second distance between each extended node and the target location node, the first distance and the second distance of each extended node are fused to obtain the corresponding total distance. Then, the extended node with the smallest total distance is determined as the reference extended node. This enables the determination of the reference extended node based on the total distance between each extended node and the current location node and the target location node, thereby improving the reliability and practicality of the target path generated based on the reference extended node.

[0136] In one embodiment, such as Figure 8 As shown, when a processor executes computer-readable instructions, it performs the following steps:

[0137] Step S802: When the reference extension node is not within the preset range, the reference extension node is taken as the next current position node.

[0138] Specifically, the robot analyzes the position information in the reference state information corresponding to the reference extension node to determine whether the position of the reference extension node is within the preset range corresponding to the target position node. When the reference extension node is not within the preset range, the reference extension node is used as the next current position node.

[0139] Step S804: Return to the step of fusing each sub-instruction with the state information corresponding to the current position node to obtain the corresponding reference state information, and determining the corresponding extended node based on the reference state information.

[0140] In this embodiment, the stopping condition of the path search algorithm is determined by judging in real time whether the reference extended node is within the preset range corresponding to the target location node. When the reference extended node is not within the preset range, the reference extended node is taken as the next current location node. The algorithm returns to the step of fusing each sub-instruction with the status information corresponding to the current location node to obtain the corresponding reference status information, and determining the corresponding extended node based on the reference status information. This process is repeated to generate each reference extended node corresponding to the target path, thereby achieving the generation of the final target path and improving the reliability of the generated target path.

[0141] This application also provides an application scenario in which the above-described path generation method is applied to a scenario where a robot generates a target path. Specifically, the path generation method is applied in this scenario as follows:

[0142] (1) Description of coordinate system transformation relationships

[0143] The robot constructs a world coordinate system and a grid map for the target scene. Each grid cell in the grid map serves as a corresponding node, and the position information of each node in the grid map is an index. The transformation relationship between the index (i, j) of the corresponding node and the coordinates (x, y) of the node in the world coordinate system is shown in Equations 8 to 11 below:

[0144] x = x origin +iscale map , formula 8

[0145] y = y origin +jscale map , formula 9

[0146] Conversely, the index (i, j) of a node in the map can also be obtained based on its coordinates (x, y):

[0147]

[0148]

[0149] In this system, the robot sets the bottom left corner of the map as the origin, the index of the grid map is (0, 0), and the corresponding coordinates in the world coordinate system are (x, y). origin y origin The map resolution is scale. map .

[0150] (2) Description of the relationship between algorithm-related variables

[0151] In this embodiment, the path search algorithm includes a search graph, edges, and nodes. Nodes are the basic elements of the graph, and each node contains state information (x, y, theta, v, w), where (x, y) is the node's position in the world coordinate system, theta is the robot's heading angle at that node, and v and w are the robot's linear and angular velocities at that node. A schematic diagram of the starting node and expanding nodes is shown below. Figure 9 As shown.

[0152] Additionally, edges represent the connections between nodes. For example, there are edges between the extended nodes N0, N1, and N2 and the starting node Nc, and the relationship is that Nc is the parent node of N0, N1, and N2.

[0153] g represents the expansion cost, which is calculated as the Euclidean distance from the current node to the expanding node. For example, the expansion cost from Nc(1,1) to N0(0,2) is the expansion cost. for:

[0154]

[0155] f represents the total cost, where f = g + h, and h represents the heuristic cost, which is the Euclidean distance from the extended node to the target node (endpoint). For example, the heuristic cost of N0(0, 2) is:

[0156]

[0157] The total cost of N0 is then expressed as:

[0158]

[0159] It is understandable that in this embodiment's path search algorithm, the graph is not constructed all at once. Instead, it initially contains only the starting node, and as nodes expand, they are gradually added to the graph and represented by an `open_list`. The `open_list` is a priority queue storing nodes to be expanded, arranged in ascending order of total generation value F. During node expansion, the node with the lowest total cost is always prioritized for expansion; therefore, the first node in the `open_list` is always used for expansion and updating. The `close_list` is used to store expanded nodes, preventing nodes from being expanded multiple times. The current node determines the expansion node until the target path is generated. The algorithm flow is as follows: Figure 10 As shown.

[0160] (3) Description of node expansion methods

[0161] Define the acceleration control quantity U of the two-wheel differential model. t Let a be the linear acceleration. v angular acceleration a w The control period is t, and the current state is set. c ={x c y c theta c v c w c Then, the acceleration control quantity U t Acting on state c The state of the node obtained later i The state transition formulas 12 to 16 are as follows:

[0162] v i =v c +a v t, Formula 12

[0163] w i =w c +a w t, Formula 13

[0164] theta i =theta c +w c t+0.5a w t 2 , Formula 14

[0165] x i =x c +(v c t+0.5a v t 2 cos(theta) i ), Formula 15

[0166] y i =y c +(v c t+0.5a v t 2 sin(theta) i ), Formula 16

[0167] We determine the range of linear acceleration values ​​that the machine can achieve based on the kinematic model of the actual machine. and angular acceleration range And set the sampling interval Multiple sets of acceleration control quantities U can be obtained. t ={u0,u1,....,u n},in Then, according to the state transition formula, multiple sets of state transition values ​​can be obtained. Then, according to the coordinate transformation formula, the index in the map can be calculated based on (x,y) in the state value and mapped to multiple nodes.

[0168] (4) Node Filtering

[0169] Based on the above steps, candidate expansion nodes corresponding to each state information are determined. Some candidate expansion nodes may exceed the map range, so these are removed. Alternatively, if there are obstacles at the map index, these state values ​​are not used for node expansion, and candidate expansion nodes with obstacles are also removed. Secondly, for some machines with limited perception, turning around in place or making sharp turns is not allowed. Therefore, candidate expansion nodes with negative linear velocities in the calculated state values ​​are removed, and the remaining candidate expansion nodes are used as expansion nodes.

[0170] (5) Determining the target path

[0171] The search is considered successful when the node expands from the starting node to a predetermined range around the target node. Figure 11 As shown, the relationship between nodes can be described by edges during the node expansion process. That is, if the parent node of the current node is known, then after finding the target node, backtracking based on the parent node can find the connection relationship from the target node to the starting node. Then, by backtracking again, the path from the starting node to the target node can be obtained.

[0172] In this embodiment, by fusing the sub-instructions in the acquired acceleration control quantities with the state information corresponding to the current node of the robot, corresponding extended nodes are generated. Then, the total cost between each extended node and the current node and the target node is used as the basis to determine the reference extended node from each extended node. This realizes that, based on the robot's kinematic constraints, such as the two-wheel differential model that cannot support lateral movement, U-turns, and large curvature turns, the determination of the next reference extended node based on the current node in this application is made with full consideration of the robot's kinematic constraints. Finally, the target path is determined based on the target node, the reference extended node, and the current node, which can effectively improve the adaptability of the generated path.

[0173] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0174] In one embodiment, such as Figure 12 As shown, a path generation device is provided. This device can be a software module, a hardware module, or a combination of both, integrated into a robot. Specifically, the device includes: an acquisition module 1202, a calculation module 1204, a determination module 1206, and a generation module 1208, wherein:

[0175] The acquisition module 1202 is used to acquire a set of motion control instructions, as well as the robot's current position node and target position node in the grid map. The set of motion control instructions includes at least two sub-instructions.

[0176] The calculation module 1204 is used to fuse each sub-instruction with the state information corresponding to the current position node to obtain the corresponding reference state information, and to determine the corresponding extended node by the reference state information. The state information is used to characterize the motion state of the robot at the corresponding node.

[0177] The determination module 1206 is used to determine a reference extended node from each extended node based on the first distance between each extended node and the current position node and the second distance between each extended node and the target position node;

[0178] The generation module 1208 is used to determine the target path based on the target location node, the reference extension node, and the current location node when the reference extension node is within a preset range corresponding to the target location node.

[0179] In one embodiment, the acquisition module 1202 is further configured to acquire robot linear acceleration range data and linear acceleration sampling interval; acquire robot angular acceleration range data and angular acceleration sampling interval; sample the linear acceleration range data according to the linear acceleration sampling interval to obtain a linear acceleration set; sample the angular acceleration range data according to the angular acceleration sampling interval to obtain an angular acceleration set; combine each element in the linear acceleration set with each element in the angular acceleration set to obtain each motion control sub-instruction, and obtain a motion control instruction set according to each motion control sub-instruction.

[0180] In one embodiment, the calculation module 1204 is further configured to obtain a reference linear velocity based on the fusion of linear velocity, linear acceleration, and control duration; obtain a reference angular velocity based on the fusion of angular velocity, angular acceleration, and control duration; obtain a reference heading angle based on the fusion of heading angle, angular velocity, control duration, and angular acceleration; obtain reference position information based on the fusion of position information, linear velocity, control duration, linear acceleration, and reference heading angle; and obtain reference state information based on the reference linear velocity, reference angular velocity, reference heading angle, and reference position information, wherein the state information includes the robot's position information, heading angle, linear velocity, and angular velocity at the corresponding node in the world coordinate system; and the sub-instructions include the robot's linear acceleration, angular acceleration, and control duration at the corresponding node in the world coordinate system.

[0181] In one embodiment, the calculation module 1204 is further configured to obtain the origin position information of the origin in the world coordinate system corresponding to the origin in the raster map; based on the fusion of the reference position information, the origin position information and the map resolution of the raster map in the reference state information, obtain the index information of the extended node corresponding to the reference state information in the raster map; and determine the extended node corresponding to the reference state information according to the index information.

[0182] In one embodiment, the calculation module 1204 is further configured to determine the corresponding candidate expansion node according to each reference state information; and to determine the expansion node from each candidate expansion node according to the linear velocity and obstacle state information in the reference state information corresponding to each candidate expansion node, wherein the obstacle state information is used to characterize the existence state of the obstacle at the corresponding candidate expansion node.

[0183] In one embodiment, the determining module 1206 is further configured to calculate a first distance between each extended node and the current location node; calculate a second distance between each extended node and the target location node; fuse the first distance and the second distance of each extended node to obtain the corresponding total distance; and determine a reference extended node from each extended node based on the total distance of each extended node.

[0184] In one embodiment, the generation module 1208 is further configured to, when the reference extended node is not within a preset range, take the reference extended node as the next current position node; return to the step of fusing each sub-instruction with the state information corresponding to the current position node to obtain the corresponding reference state information, and determine the corresponding extended node from the reference state information.

[0185] The aforementioned path generation device fuses the sub-instructions in the acquired motion control instruction set with the state information corresponding to the robot's current position node to generate corresponding extended nodes. Then, based on the distances between each extended node and the current position node, as well as the target position node, a reference extended node is determined from among the extended nodes. This achieves the determination of the next reference extended node based on the current position node, taking into full account the robot's kinematic constraints, such as the inability to support lateral movement, U-turns, or large-curvature turns (e.g., a two-wheel differential model). Finally, based on the target position node, the reference extended node, and the current position node, the target path is determined, effectively improving the adaptability of the generated path.

[0186] Specific limitations regarding the path generation device can be found in the limitations of the path generation method described above, and will not be repeated here. Each module in the aforementioned path generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the robot's processor in hardware form or independent of it, or stored in the robot's memory in software form, so that the processor can call and execute the operations corresponding to each module.

[0187] In one embodiment, a robot is provided, which may be an end-user device, and its internal structure diagram may be as follows: Figure 13As shown, the robot includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface allows for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a path generation method. The robot's display screen can be an LCD screen or an e-ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the robot's shell, or an external keyboard, touchpad, or mouse.

[0188] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the robot to which the present application is applied. A specific robot may include more or fewer parts than shown in the figure, or combine certain parts, or have different part arrangements.

[0189] In one embodiment, a robot is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0190] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0191] In one embodiment, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A robot's processor reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the robot to perform the steps described in the method embodiments above.

[0192] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0193] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0194] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A robot comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that, When the processor executes the computer-readable instructions, it performs the following steps: A set of motion control commands is obtained, along with the robot's current position node and target position node in a grid map. The set of motion control commands includes at least two sub-commands. The robot includes a two-wheel differential robot. The set of motion control commands is determined based on sampling results in the acceleration space corresponding to the motion model of the two-wheel differential robot. Each sub-instruction is fused with the state information corresponding to the current position node to obtain the corresponding reference state information, and the corresponding extended node is determined by the reference state information. The state information is used to characterize the motion state of the robot at the corresponding node; wherein, the linear velocity of the extended node is non-negative. A reference extended node is determined from the extended nodes based on the first distance between each extended node and the current location node and the second distance between each extended node and the target location node; When the reference extension node is within a preset range corresponding to the target location node, the target path is determined based on the target location node, the reference extension node, and the current location node.

2. The robot according to claim 1, characterized in that, The acquisition of the motion control command set includes: Obtain the robot's linear acceleration range data and linear acceleration sampling interval; Obtain the robot's angular acceleration range data and angular acceleration sampling interval; The linear acceleration range data is sampled according to the linear acceleration sampling interval to obtain a linear acceleration set; The angular acceleration range data is sampled according to the angular acceleration sampling interval to obtain an angular acceleration set; Each element in the linear acceleration set is combined with each element in the angular acceleration set to obtain each motion control sub-instruction, and a motion control instruction set is obtained based on each motion control sub-instruction.

3. The robot according to claim 1, characterized in that, The step of fusing each sub-instruction with the state information corresponding to the current position node to obtain the corresponding reference state information includes: The status information includes the robot's position information, heading angle, linear velocity, and angular velocity at the corresponding node in the world coordinate system. The sub-instructions include the linear acceleration, angular acceleration, and control duration of the robot at the corresponding node in the world coordinate system; A reference linear velocity is obtained by fusing the linear velocity, the linear acceleration, and the control duration. The reference angular velocity is obtained by fusing the angular velocity, the angular acceleration, and the control duration. A reference heading angle is obtained by fusing the heading angle, the angular velocity, the control duration, and the angular acceleration. Reference position information is obtained by fusing the position information, the linear velocity, the control duration, the linear acceleration, and the reference heading angle. Reference state information is obtained based on the reference linear velocity, the reference angular velocity, the reference heading angle, and the reference position information.

4. The robot according to claim 1, characterized in that, The step of determining the corresponding extended node from the reference state information includes: Obtain the origin position information of the origin in the world coordinate system corresponding to the origin in the grid map; Based on the fusion of the reference position information in the reference state information, the origin position information, and the map resolution of the grid map, the index information of the extended node corresponding to the reference state information in the grid map is obtained; The extended node corresponding to the reference status information is determined based on the index information.

5. The robot according to claim 1, characterized in that, The step of determining the corresponding extended node from the reference state information includes: Determine the corresponding candidate expansion node based on each reference status information; Based on the linear velocity and obstacle state information in the reference state information corresponding to each candidate expansion node, the expansion node is determined from each candidate expansion node. The obstacle state information is used to characterize the existence state of obstacles at the corresponding candidate expansion node.

6. The robot according to claim 1, characterized in that, The step of determining a reference extended node from the extended nodes based on a first distance between each extended node and the current location node and a second distance between each extended node and the target location node includes: Calculate the first distance between each of the extended nodes and the current position node; Calculate the second distance between each of the extended nodes and the target location node; The first distance and the second distance of each extended node are merged to obtain the corresponding total distance; A reference extension node is determined from the extension nodes based on the total distance of each extension node.

7. The robot according to claim 1, characterized in that, When the processor executes the computer-readable instructions, it performs the following steps: When the reference extension node is not within the preset range, the reference extension node is taken as the next current position node; The process returns to the step of fusing each sub-instruction with the state information corresponding to the current position node to obtain the corresponding reference state information, and determining the corresponding extended node based on the reference state information.

8. A path generation method, characterized in that, The method includes: A set of motion control commands is acquired, along with the robot's current position node and target position node in a grid map. The set of motion control commands includes at least two sub-commands. The robot includes a two-wheel differential robot. The set of motion control commands is determined based on sampling results in the acceleration space corresponding to the motion model of the two-wheel differential robot. Each sub-instruction is fused with the state information corresponding to the current position node to obtain the corresponding reference state information, and the corresponding extended node is determined by the reference state information. The state information is used to characterize the motion state of the robot at the corresponding node; wherein, the linear velocity of the extended node is non-negative. A reference extended node is determined from the extended nodes based on the first distance between each extended node and the current location node and the second distance between each extended node and the target location node; When the reference extension node is within a preset range corresponding to the target location node, the target path is determined based on the target location node, the reference extension node, and the current location node.

9. A path generation device, characterized in that, The device includes: The acquisition module is used to acquire a set of motion control commands, as well as the robot's current position node and target position node in the grid map. The set of motion control commands includes at least two sub-commands. The robot includes a two-wheel differential robot. The set of motion control commands is determined based on the sampling results in the acceleration space corresponding to the motion model of the two-wheel differential robot. The calculation module is used to fuse each sub-instruction with the state information corresponding to the current position node to obtain the corresponding reference state information, and to determine the corresponding extended node based on the reference state information. The state information is used to characterize the motion state of the robot at the corresponding node; wherein the linear velocity of the extended node is non-negative. The determining module is used to determine a reference extended node from the extended nodes based on a first distance between each extended node and the current location node and a second distance between each extended node and the target location node; The generation module is used to determine the target path based on the target location node, the reference extension node, and the current location node when the reference extension node is within a preset range corresponding to the target location node.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the path generation method of claim 8.

Citation Information

Patent Citations

  • Trajectory planning method, trajectory planning device, storage medium and electronic equipment

    CN110836671A

  • Track planning method and computer readable storage medium

    CN115185263A