A robot motion planning method, device, electronic equipment and program product
By generating and updating sampling points and trajectories within the heuristic region during robot motion planning, the problem of excessively long motion trajectories in existing technologies is solved, thereby improving the robot's motion efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY
- Filing Date
- 2025-03-28
- Publication Date
- 2026-07-24
AI Technical Summary
In existing robot motion planning methods, randomly generated sampling points result in longer motion trajectories, which reduces the robot's motion efficiency.
By determining the robot's initial position, target position, and environmental map information, a first trajectory, multiple second trajectories, and a heuristic region are generated. Sampling points are generated based on the heuristic region, and the first or second trajectory is updated based on the sampling points until the robot moves to the target position.
The robot's motion efficiency is improved by generating and updating trajectories within heuristic regions, thus reducing the length of the motion trajectory.
Smart Images

Figure CN120095820B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of robotics technology, and in particular relates to a motion planning method, device, electronic equipment and program product for a robot. Background Technology
[0002] Current robot motion planning methods typically involve randomly generating sampling points within the entire target area where the robot is located, and then determining a motion trajectory from the initial position to the target position based on these randomly generated sampling points. Since each sampling point is randomly generated, the resulting robot motion trajectory is usually quite long, reducing the robot's motion efficiency. Summary of the Invention
[0003] In view of this, embodiments of this application provide a motion planning method, apparatus, electronic device, and program product for robots to solve the technical problem of low motion efficiency of robots in the prior art.
[0004] In a first aspect, embodiments of this application provide a motion planning method for a robot, including:
[0005] The robot's initial position, target position, and environmental map information are determined; the environmental map information is used to describe the obstacle information in the target area where the robot is located.
[0006] Based on the initial position, the target position, and the environmental map information, a first trajectory, multiple second trajectories, and a heuristic region are generated; wherein, the nodes of the first trajectory include the initial position, the nodes of one of the second trajectories include the target position, and the range of the heuristic region is smaller than the target region;
[0007] Based on the heuristic region, sampling points are generated;
[0008] Based on the sampling points, select to update either the first trajectory or the second trajectory. If the second trajectory is updated, then update the first trajectory using the updated second trajectory.
[0009] Based on the updated first trajectory, guide the robot to move and determine the robot's current position after the movement is completed;
[0010] Based on the current location, the target location, and the environmental map information, the heuristic region is updated, and the process returns to the step of generating sampling points based on the heuristic region and subsequent steps, until the robot moves to the target location.
[0011] Optionally, updating the first trajectory or the second trajectory based on the sampling points includes:
[0012] Determine the target trajectory whose Euclidean distance from the sampling point is less than a preset distance;
[0013] If the target trajectory is the first trajectory, then the first trajectory is updated based on the sampling points;
[0014] If the target trajectory is any of the second trajectories, then the second trajectory is updated based on the sampling points.
[0015] Optionally, updating the first trajectory using the updated second trajectory includes:
[0016] If the updated second trajectory does not meet the conditions for updating the first trajectory, then return to the steps of generating sampling points based on the heuristic region and selecting to update the first or second trajectory based on the sampling points, until the updated first trajectory is obtained.
[0017] Optionally, generating sampling points based on the heuristic region includes:
[0018] Determine the number of generated sampling points corresponding to the heuristic region;
[0019] The sampling deviation rate is determined based on the number of generated sampling points; the sampling deviation rate describes the probability that any sampling point is located within the heuristic region; the sampling deviation rate is negatively correlated with the number of generated sampling points.
[0020] The sampling points are generated based on the sampling deviation rate and the heuristic region.
[0021] Optionally, the heuristic region is generated in the following manner:
[0022] Based on the initial position, the target position, and the environmental map information, the heuristic region is generated, and several path points are generated to guide the robot from its current position to the target position; each path point is located within the heuristic region.
[0023] The step of guiding the robot to move based on the updated first trajectory includes:
[0024] If the updated first trajectory includes any of the path points, then the robot is guided to move to any of the path points according to the updated first trajectory;
[0025] If the updated first trajectory does not include any of the path points, then return to the step of generating sampling points based on the heuristic region and subsequent steps until the updated first trajectory includes any of the path points.
[0026] Optionally, guiding the robot to any of the path points based on the updated first trajectory includes:
[0027] Based on the updated first trajectory, determine the optimal trajectory for guiding the robot to any of the path points;
[0028] Evaluate the dynamic and static risks of each node in the optimal trajectory; wherein the dynamic risk represents the risk posed by dynamic obstacles to the robot's motion, and the static risk represents the risk posed by static obstacles to the robot's motion;
[0029] Based on the dynamic risk and static risk of each node in the optimal trajectory, the robot is guided to move to any of the path points.
[0030] Optionally, updating the heuristic region based on the current location, the target location, and the environmental map information includes:
[0031] Determine the distance between each of the path points and the current position;
[0032] If the distance between any of the path points and the current position is less than a preset distance threshold, then the heuristic region is updated, and each of the path points is updated.
[0033] Secondly, embodiments of this application provide a motion planning device for a robot, comprising:
[0034] An information determination unit is used to determine the robot's initial position, target position, and environmental map information; the environmental map information is used to describe the obstacle information of the target area where the robot is located.
[0035] The first generation unit is configured to generate a first trajectory, multiple second trajectories, and a heuristic region based on the initial position, the target position, and the environmental map information; wherein the nodes of the first trajectory include the initial position, the nodes of one of the second trajectories include the target position, and the range of the heuristic region is smaller than the target region;
[0036] The second generation unit is used to generate sampling points based on the heuristic region;
[0037] An update unit is configured to select to update either the first trajectory or the second trajectory based on the sampling points; if the second trajectory is to be updated, the first trajectory is updated using the updated second trajectory.
[0038] A motion guidance unit is used to guide the robot's movement according to the updated first trajectory and determine the robot's current position after the movement is completed.
[0039] The loop unit is used to update the heuristic region based on the current position, the target position, and the environmental map information, and return to execute the step of generating sampling points based on the heuristic region and subsequent steps until the robot moves to the target position.
[0040] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the motion planning method for a robot as described in any of the first aspects above.
[0041] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the motion planning method for a robot as described in any of the first aspects above.
[0042] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the steps of the robot motion planning method as described in any of the first aspects above.
[0043] The robot motion planning method, apparatus, electronic device, and program product provided in this application have the following beneficial effects:
[0044] In the robot motion planning method provided in this application embodiment, the robot's initial position, target position, and environmental map information are first determined. Then, based on the initial position, target position, and environmental map information, a first trajectory, multiple second trajectories, and a heuristic region are generated. The nodes of the first trajectory include the initial position, and the nodes of one of the second trajectories include the target position. The range of the heuristic region is smaller than the target region. Sampling points are then generated based on the heuristic region. Subsequently, based on the sampling points, either the first or second trajectory is updated. If the second trajectory is updated, the first trajectory is updated using the updated second trajectory. The robot is guided to move based on the updated first trajectory, and its current position after the movement is completed is determined. Finally, based on the current position, target position, and environmental map information, the heuristic region is updated, and the process returns to the steps of generating sampling points based on the heuristic region and subsequent steps, until the robot reaches the target position. In this method, all sampling points are located within the heuristic region, while in existing technologies, sampling points are located within the target region where the robot is located. Because the range of the heuristic region is smaller than the target region where the robot is located, the motion trajectory obtained by the robot motion planning method of this application is usually shorter, improving the robot's motion efficiency. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 A flowchart illustrating the implementation of the motion planning method for a robot provided in this application embodiment;
[0047] Figure 2 A schematic diagram of a heuristic region provided in an embodiment of this application;
[0048] Figure 3 This is a schematic diagram of the structure of a motion planning device for a robot provided in an embodiment of this application;
[0049] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0050] It should be noted that the terminology used in the embodiments of this application is only for explaining specific embodiments of this application and is not intended to limit this application. In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, "at least one" or "one or more" means one, two or more. The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0051] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0052] The robot motion planning method provided in this application can be executed by an electronic device, which may include the robot's control device. For example, the electronic device may include a mobile phone, tablet computer, laptop computer, or desktop computer.
[0053] The robot motion planning method provided in this application embodiment can be applied to various scenarios that require robot motion planning. When it is necessary to improve the motion efficiency of the robot from the initial position to the target position, the various steps of the robot motion planning method provided in this application embodiment can be executed by electronic devices.
[0054] Please see Figure 1 , Figure 1 The flowchart below shows the implementation of the motion planning method for a robot provided in this application embodiment. The motion planning method for the robot may include steps S101 to S106, which are described in detail below:
[0055] In S101, the robot's initial position, target position, and environmental map information are determined.
[0056] In this embodiment of the application, the electronic device can first determine the robot's initial position, target position, and environmental map information.
[0057] The robot's initial position refers to its current location, its target position refers to the location it wants to reach, and the environmental map information describes the obstacle information in the target area. Specifically, the target area can be the area where the robot can move, and the obstacle information in the target area can include static and dynamic obstacle information. For example, static obstacle information refers to information about obstacles that do not move, and dynamic obstacle information refers to information about obstacles that can move.
[0058] In S102, a first trajectory, multiple second trajectories, and a heuristic region are generated based on the initial position, target position, and environmental map information.
[0059] In this embodiment of the application, after determining the initial position, the target position, and the environmental map information, the electronic device can generate a first trajectory, multiple second trajectories, and a heuristic region based on the initial position, the target position, and the environmental map information.
[0060] In this system, the nodes of the first trajectory include the initial position, while the nodes of one second trajectory include the target position. The range of the heuristic region is smaller than that of the target region. In the field of robotics, the first trajectory can be referred to as the "root tree," and the second trajectory can be referred to as the "subtree."
[0061] Both the first and second trajectories can be updated (grown) using sampling points. Specifically, when any sampling point is within a preset range near the first trajectory, it can guide the update (growth) of the first trajectory. Similarly, when any sampling point is within a preset range near the second trajectory, it can guide the update (growth) of the second trajectory. Furthermore, when the second trajectory is within a preset range near the first trajectory, it can also guide the update (growth) of the first trajectory. When the distance between any two second trajectories is less than a preset distance, the two second trajectories will be merged.
[0062] It should be noted that not every sampling point can update the first or second trajectory. This is because some sampling points are neither located within the preset range of the first trajectory nor within the preset range of the second trajectory.
[0063] In this embodiment, the robot moves along a first trajectory, which directly guides the robot's movement. Each time the first trajectory is updated (grown), the robot can move from its current position to the next current position. When the robot's current position changes, the electronic device can update the heuristic region to further improve the robot's movement efficiency. A second trajectory is used to update (grow) the first trajectory to indirectly guide the robot's movement.
[0064] Among them, the heuristic region is a part of the target region. Compared with other regions in the target region, the heuristic region can be considered more promising to improve the efficiency of the robot's movement from the initial position to the target position.
[0065] Please see Figure 2 , Figure 2 This is a schematic diagram of a heuristic region provided for an embodiment of this application. For example... Figure 2 As shown, Figure 2 The entire area in the image can be considered the target area where the robot is located. Figure 2 The shaded areas in the image can serve as heuristic regions. By analyzing... Figure 2 It is understandable that comparing the target region and the heuristic region shows that the robot is more efficient at moving from the initial position to the target position within the heuristic region than it is outside the heuristic region.
[0066] In practical applications, the specific methods for generating the first trajectory, multiple second trajectories, and heuristic regions based on the initial position, target position, and environmental map information can be implemented through preset algorithms, and no specific limitations are made here.
[0067] It should be noted that when generating the first and second trajectories, the electronic device must consider both static and dynamic obstacle information within the target area.
[0068] In S103, sampling points are generated based on the heuristic region.
[0069] In this embodiment of the application, after generating the heuristic region, the electronic device can generate sampling points based on the heuristic region. The electronic device can generate one sampling point each time.
[0070] It should be noted that when the robot's current position changes, the electronic device will update the heuristic region. Therefore, the electronic device needs to generate sampling points based on the latest heuristic region.
[0071] In one possible implementation, the electronic device can generate sampling points based on the heuristic region through steps a to c. Details are as follows:
[0072] In step a, the number of generated sampling points corresponding to the heuristic region is determined.
[0073] In this implementation, the electronic device determines the number of generated sampling points corresponding to the latest heuristic region each time a sampling point is generated.
[0074] For example, if the first three sampling points corresponding to the heuristic region fail to update the first trajectory, that is, if the first three sampling points corresponding to the heuristic region fail to guide the robot's movement, then the number of generated sampling points corresponding to the heuristic region is 3.
[0075] In step b, the sampling deviation rate is determined based on the number of sampling points that have been generated.
[0076] In this implementation, after determining the number of generated sampling points, the electronic device can determine the sampling deviation rate based on the number of generated sampling points.
[0077] The sampling bias rate describes the probability that any sampling point is located within the heuristic region; the sampling bias rate is negatively correlated with the number of generated sampling points.
[0078] For example, when the number of generated sampling points corresponding to the heuristic region is 0, that is, when the electronic device generates the sampling point corresponding to the heuristic region for the first time, the sampling deviation rate is the highest, that is, the probability that the sampling point generated by the electronic device is located in the heuristic region is the highest. When the number of generated sampling points corresponding to the heuristic region is 1, that is, when the electronic device generates the sampling point corresponding to the heuristic region for the second time, the sampling deviation rate is the second highest, that is, the probability that the sampling point generated by the electronic device is located in the heuristic region is the second highest. The more generated sampling points corresponding to the heuristic region, the lower the sampling deviation rate, that is, the lower the probability that the sampling point generated by the electronic device is located in the heuristic region.
[0079] The advantage of a negative correlation between sampling deviation rate and the number of generated sampling points is that when the number of generated sampling points corresponding to the heuristic region is small, sampling should be performed within the heuristic region as much as possible to ensure the efficiency of the robot's movement from the initial position to the target position. When the number of generated sampling points corresponding to the heuristic region increases, in order to ensure that the generated sampling points can eventually update the first trajectory, sampling can be performed outside the heuristic region with a certain probability to ensure the success rate of the robot's movement from the initial position to the target position.
[0080] In practical applications, when the number of generated sampling points corresponding to the heuristic region is 0, the sampling deviation rate can be 100%. As the number of generated sampling points corresponding to the heuristic region increases, the sampling deviation rate can be reduced according to a preset range.
[0081] In step c, sampling points are generated based on the sampling bias rate and the heuristic region.
[0082] In this implementation, after determining the sampling deviation rate, the electronic device can generate sampling points based on the sampling deviation rate and the heuristic region.
[0083] Specifically, the electronic device can randomly sample points within a heuristic region based on the sampling deviation rate. For example, when the sampling deviation rate is 100%, the electronic device can generate sampling points within the heuristic region 100% of the time; when the sampling deviation rate is 90%, the electronic device can generate sampling points within the heuristic region 90% of the time and generate sampling points outside the heuristic region 10% of the time.
[0084] In S104, based on the sampling points, it is selected to update either the first trajectory or the second trajectory. If the second trajectory is updated, the first trajectory is updated using the updated second trajectory.
[0085] In this embodiment, after each new sampling point is generated, the electronic device can choose to update either the first trajectory or the second trajectory based on the sampling point. Specifically, the electronic device can determine a target trajectory whose Euclidean distance to the sampling point is less than a preset distance. If the target trajectory is the first trajectory, the first trajectory is updated based on the sampling point; if the target trajectory is any second trajectory, any second trajectory is updated based on the sampling point. It should be noted that if there is no target trajectory whose Euclidean distance to the sampling point is less than the preset distance, then it is not necessary to update the first and second trajectories.
[0086] If the second trajectory is updated, the first trajectory is then updated using the updated second trajectory. Specifically, after updating the second trajectory, the electronic device needs to determine whether the updated second trajectory meets the conditions for updating the first trajectory. If it is determined that the updated second trajectory meets the conditions for updating the first trajectory, then the first trajectory is updated; if it is determined that the updated second trajectory does not meet the conditions for updating the first trajectory, then the first trajectory is not updated.
[0087] Furthermore, if the updated second trajectory does not meet the conditions for updating the first trajectory, the process returns to the steps of generating sampling points based on the heuristic region and selecting to update either the first or second trajectory based on the sampling points, until the updated first trajectory is obtained.
[0088] In S105, the robot is guided to move based on the updated first trajectory, and its current position after the robot has completed its movement is determined.
[0089] In this embodiment of the application, after obtaining the updated first trajectory, the electronic device can guide the robot to move according to the updated first trajectory and determine the current position of the robot after the movement is completed.
[0090] In one possible implementation, when generating the heuristic region, the electronic device can also generate several waypoints within that heuristic region to guide the robot from its current position to the target position. Based on this, the electronic device can generate the heuristic region as follows: based on the initial position, the target position, and environmental map information, it generates the heuristic region and several waypoints to guide the robot from its current position to the target position; wherein each waypoint is located within the heuristic region.
[0091] Based on this, electronic devices can guide the robot's movement according to the updated first trajectory in the following ways:
[0092] The electronic device can determine whether the updated first trajectory includes any path point. If the updated first trajectory includes any path point, the robot is guided to move to that path point based on the updated first trajectory. If the updated first trajectory does not include any path point, the process returns to the step of generating sampling points based on the heuristic region and subsequent steps, until the updated first trajectory includes any path point.
[0093] Optionally, the electronic device can guide the robot to any path point based on the updated first trajectory in the following ways:
[0094] The electronic device can first determine the optimal trajectory for guiding the robot to any path point based on the updated first trajectory. The optimal trajectory includes multiple nodes on the first trajectory.
[0095] The electronic device can then assess the dynamic and static risks of each node in the optimal trajectory. Dynamic risk represents the risk posed by dynamic obstacles to the robot's motion, while static risk represents the risk posed by static obstacles to the robot's motion.
[0096] Finally, the electronic device can guide the robot to any path point based on the dynamic and static risks of each node in the optimal trajectory. Specifically, the electronic device can assess the dynamic and static risks of each node in the optimal trajectory, and then guide the robot to any path point through nodes where both the dynamic and static risks are less than a preset risk threshold.
[0097] In S106, the heuristic region is updated based on the current position, target position, and environmental map information. Then, the robot returns to execute the steps of generating sampling points based on the heuristic region and subsequent steps until it moves to the target position.
[0098] In this embodiment of the application, after the robot completes its movement, the electronic device can determine whether to update the heuristic region based on the current position, the target position, and the environmental map information.
[0099] Specifically, the electronic device can determine the distance between each current path point and the current location. If the distance between any path point and the current location is less than a preset distance threshold, the heuristic region is updated, and each path point is updated. If no path point is less than the preset distance threshold, the heuristic region is not updated, nor are the path points updated.
[0100] After updating the heuristic region, the electronic device can return to executing the steps of generating sampling points based on the heuristic region and subsequent steps until the robot moves to the target position. The heuristic region in question is the updated heuristic region.
[0101] If the heuristic region is not updated, the electronic device can also return to the steps of generating sampling points based on the heuristic region and subsequent steps until the conditions for updating the heuristic region are met.
[0102] As can be seen from the above, in the robot motion planning method provided in this application embodiment, the robot's initial position, target position, and environmental map information are first determined. Then, based on the initial position, target position, and environmental map information, a first trajectory, multiple second trajectories, and a heuristic region are generated. The nodes of the first trajectory include the initial position, and the nodes of one of the second trajectories include the target position. The range of the heuristic region is smaller than the target region. Sampling points are then generated based on the heuristic region. Subsequently, based on the sampling points, either the first or second trajectory is updated. If the second trajectory is updated, the first trajectory is updated using the updated second trajectory. The robot is guided to move based on the updated first trajectory, and its current position after the movement is completed is determined. Finally, based on the current position, target position, and environmental map information, the heuristic region is updated, and the process returns to the steps of generating sampling points based on the heuristic region and subsequent steps, until the robot moves to the target position. In this method, all sampling points are located within the heuristic region, while in the prior art, sampling points are located within the target region where the robot is located. Because the range of the heuristic region is smaller than the target region where the robot is located, the motion trajectory obtained by the robot motion planning method of this application is usually shorter, improving the robot's motion efficiency.
[0103] Based on the robot motion planning method provided in the above embodiments, this application further provides a robot motion planning apparatus for implementing the above method embodiments. Please refer to [link to relevant documentation]. Figure 3 , Figure 3 This is a schematic diagram of the structure of a motion planning device for a robot provided in an embodiment of this application. Figure 3As shown, the robot's motion planning device 30 may include an information determination unit 31, a first generation unit 32, a second generation unit 33, an update unit 34, a guided motion unit 35, and a loop unit 36. Wherein:
[0104] The information determination unit 31 is used to determine the robot's initial position, target position, and environmental map information; the environmental map information is used to describe the obstacle information of the target area where the robot is located.
[0105] The first generation unit 32 is used to generate a first trajectory, multiple second trajectories, and a heuristic region based on the initial position, the target position, and environmental map information; wherein, the nodes of the first trajectory include the initial position, the nodes of one of the second trajectories include the target position, and the range of the heuristic region is smaller than the target region.
[0106] The second generation unit 33 is used to generate sampling points based on the heuristic region.
[0107] The update unit 34 is used to select to update the first trajectory or the second trajectory based on the sampling points. If the second trajectory is updated, the first trajectory is updated using the updated second trajectory.
[0108] The motion guidance unit 35 is used to guide the robot's movement according to the updated first trajectory and determine the robot's current position after the movement is completed.
[0109] The loop unit 36 is used to update the heuristic region based on the current position, the target position, and the environment map information, and return to execute the steps of generating sampling points based on the heuristic region and subsequent steps until the robot moves to the target position.
[0110] Optionally, update unit 34 is specifically used for:
[0111] Determine the target trajectory whose Euclidean distance from the sampling point is less than a preset distance;
[0112] If the target trajectory is the first trajectory, then the first trajectory is updated based on the sampling points;
[0113] If the target trajectory is any second trajectory, then update any second trajectory based on the sampling points.
[0114] Optionally, update unit 34 is specifically used for:
[0115] If the updated second trajectory does not meet the conditions for updating the first trajectory, then return to the steps of generating sampling points based on the heuristic region and selecting to update either the first or second trajectory based on the sampling points, until the updated first trajectory is obtained.
[0116] Optionally, the second generating unit 33 is specifically used for:
[0117] Determine the number of generated sampling points corresponding to the heuristic region;
[0118] The sampling bias rate is determined based on the number of generated sampling points; the sampling bias rate describes the probability that any sampling point lies within the heuristic region; the sampling bias rate is negatively correlated with the number of generated sampling points;
[0119] Sampling points are generated based on the sampling bias rate and the heuristic region.
[0120] Optionally, the first generating unit 32 is specifically used for:
[0121] Based on the initial position, target position, and environmental map information, a heuristic region is generated, and several path points are generated to guide the robot from the current position to the target position; each path point is located within the heuristic region.
[0122] The guiding motion unit 35 is specifically used for:
[0123] If the updated first trajectory includes any path point, then guide the robot to move to any path point according to the updated first trajectory;
[0124] If the updated first trajectory does not include any path point, return to the step of generating sampling points based on the heuristic region and subsequent steps until the updated first trajectory includes any path point.
[0125] Optionally, the motion guide unit 35 is specifically used for:
[0126] Based on the updated first trajectory, determine the optimal trajectory for guiding the robot to any path point;
[0127] Evaluate the dynamic and static risks of each node in the optimal trajectory; where dynamic risk represents the risk posed by dynamic obstacles to the robot's motion, and static risk represents the risk posed by static obstacles to the robot's motion.
[0128] Based on the dynamic and static risks of each node in the optimal trajectory, guide the robot to any path point.
[0129] Optionally, the loop unit 36 is specifically used for:
[0130] Determine the distance between each waypoint and the current location;
[0131] If the distance between any path point and the current position is less than a preset distance threshold, the heuristic region is updated, and each path point is also updated.
[0132] It should be noted that the information interaction and execution process between the above-mentioned units are based on the same concept as the method embodiments of this application. Their specific functions and technical effects can be referred to the method embodiments section, and will not be repeated here.
[0133] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 4 provided in this embodiment may include: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. For example, a program corresponding to a robot's motion planning method. When the processor 40 executes the computer program 42, it implements the steps described above in the embodiment of the robot's motion planning method, for example... Figure 1 S101 to S106 are shown. Alternatively, when the processor 40 executes the computer program 42, it implements the functions of each module / unit in the embodiment corresponding to the above-described electronic device 4, for example... Figure 3 The functions of units 31 to 36 shown.
[0134] For example, the computer program 42 can be divided into one or more modules / units, one or more of which are stored in the memory 41 and executed by the processor 40 to complete this application. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 42 in the electronic device 4. For example, the computer program 42 can be divided into an information determination unit 31, a first generation unit 32, a second generation unit 33, an update unit 34, a motion guidance unit 35, and a loop unit 36. For the specific functions of each unit, please refer to [link to relevant documentation]. Figure 3 The relevant descriptions in the corresponding embodiments are not repeated here.
[0135] Those skilled in the art will understand that Figure 4 This is merely an example of electronic device 4 and does not constitute a limitation on electronic device 4. It may include more or fewer components than shown, or combine certain components, or use different components.
[0136] The processor 40 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0137] The memory 41 can be an internal storage unit of the electronic device 4, such as a hard disk or RAM. The memory 41 can also be an external storage device of the electronic device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, or flash card. Furthermore, the memory 41 can include both internal and external storage units of the electronic device 4. The memory 41 is used to store computer programs and other programs and data required by the electronic device. The memory 41 can also be used to temporarily store data that has been output or will be output.
[0138] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units is merely an example. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the robot's motion planning device can be divided into different functional units to complete all or part of the functions described above. The functional units in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0139] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the various method embodiments described above.
[0140] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.
[0141] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, refer to the relevant descriptions of other embodiments.
[0142] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0143] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A motion planning method for a robot, characterized in that, include: Determine the robot's initial position, target position, and environmental map information; The environmental map information is used to describe the obstacle information in the target area where the robot is located; Based on the initial position, the target position, and the environmental map information, a first trajectory, multiple second trajectories, and a heuristic region are generated; wherein, the nodes of the first trajectory include the initial position, the nodes of one of the second trajectories include the target position, and the range of the heuristic region is smaller than the target region; Based on the heuristic region, sampling points are generated; Based on the sampling points, select to update either the first trajectory or the second trajectory. If the second trajectory is updated, then the first trajectory is updated using the updated second trajectory. Based on the updated first trajectory, guide the robot to move and determine the robot's current position after the movement is completed; Based on the current location, the target location, and the environmental map information, the heuristic region is updated, and the process returns to the step of generating sampling points based on the heuristic region and subsequent steps, until the robot moves to the target location; The step of generating sampling points based on the heuristic region includes: Determine the number of generated sampling points corresponding to the heuristic region; The sampling deviation rate is determined based on the number of generated sampling points; the sampling deviation rate describes the probability that any sampling point is located within the heuristic region; the sampling deviation rate is negatively correlated with the number of generated sampling points. The sampling points are generated based on the sampling deviation rate and the heuristic region; The heuristic region is generated in the following way: Based on the initial position, the target position, and the environmental map information, the heuristic region is generated, and several path points are generated to guide the robot from its current position to the target position; each path point is located within the heuristic region. The step of guiding the robot to move based on the updated first trajectory includes: If the updated first trajectory includes any of the path points, then the robot is guided to move to any of the path points according to the updated first trajectory; If the updated first trajectory does not include any of the path points, then return to the step of generating sampling points based on the heuristic region and subsequent steps until the updated first trajectory includes any of the path points. The step of updating the heuristic region based on the current location, the target location, and the environmental map information includes: Determine the distance between each of the path points and the current position; If the distance between any of the path points and the current position is less than a preset distance threshold, then the heuristic region is updated, and each of the path points is updated.
2. The method according to claim 1, characterized in that, The step of updating the first trajectory or the second trajectory based on the sampling points includes: Determine the target trajectory whose Euclidean distance from the sampling point is less than a preset distance; If the target trajectory is the first trajectory, then the first trajectory is updated based on the sampling points; If the target trajectory is any of the second trajectories, then the second trajectory is updated based on the sampling points.
3. The method according to claim 1, characterized in that, The step of updating the first trajectory using the updated second trajectory includes: If the updated second trajectory does not meet the conditions for updating the first trajectory, then return to the steps of generating sampling points based on the heuristic region and selecting to update the first or second trajectory based on the sampling points, until the updated first trajectory is obtained.
4. The method according to claim 1, characterized in that, The step of guiding the robot to any of the path points based on the updated first trajectory includes: Based on the updated first trajectory, determine the optimal trajectory for guiding the robot to any of the path points; Evaluate the dynamic and static risks of each node in the optimal trajectory; wherein the dynamic risk represents the risk posed by dynamic obstacles to the robot's motion, and the static risk represents the risk posed by static obstacles to the robot's motion; Based on the dynamic risk and static risk of each node in the optimal trajectory, the robot is guided to move to any of the path points.
5. A motion planning device for a robot, characterized in that, include: The information determination unit is used to determine the robot's initial position, target position, and environmental map information; The environmental map information is used to describe the obstacle information in the target area where the robot is located; The first generation unit is configured to generate a first trajectory, multiple second trajectories, and a heuristic region based on the initial position, the target position, and the environmental map information; wherein the nodes of the first trajectory include the initial position, the nodes of one of the second trajectories include the target position, and the range of the heuristic region is smaller than the target region; The second generation unit is used to generate sampling points based on the heuristic region; An update unit is configured to select to update either the first trajectory or the second trajectory based on the sampling points; if the second trajectory is to be updated, the first trajectory is updated using the updated second trajectory. A motion guidance unit is used to guide the robot's movement according to the updated first trajectory and determine the robot's current position after the movement is completed. The loop unit is used to update the heuristic region based on the current position, the target position, and the environmental map information, and return to execute the step of generating sampling points based on the heuristic region and subsequent steps until the robot moves to the target position; The second generation unit is specifically used for: Determine the number of generated sampling points corresponding to the heuristic region; The sampling deviation rate is determined based on the number of generated sampling points; the sampling deviation rate describes the probability that any sampling point is located within the heuristic region; the sampling deviation rate is negatively correlated with the number of generated sampling points. The sampling points are generated based on the sampling deviation rate and the heuristic region; The first generation unit is specifically used for: Based on the initial position, the target position, and the environmental map information, the heuristic region is generated, and several path points are generated to guide the robot from its current position to the target position; each path point is located within the heuristic region. The guiding motion unit is specifically used for: If the updated first trajectory includes any of the path points, then the robot is guided to move to any of the path points according to the updated first trajectory; If the updated first trajectory does not include any of the path points, then return to the step of generating sampling points based on the heuristic region and subsequent steps until the updated first trajectory includes any of the path points. The loop unit is specifically used for: Determine the distance between each of the path points and the current position; If the distance between any of the path points and the current position is less than a preset distance threshold, then the heuristic region is updated, and each of the path points is updated.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements each step of the motion planning method for the robot as described in any one of claims 1 to 4.
7. A computer program product, characterized in that, When the computer program product is executed by a processor, it implements the steps of the motion planning method for the robot as described in any one of claims 1 to 4.