Path planning method and device, readable storage medium and robot
By acquiring and merging the connecting parts of the robot path, and performing smoothing based on curvature parameters, the problem of multi-frame path point smoothness is solved, and the stability and planning efficiency of robot trajectory tracking are improved.
Patent Information
- Application Number
- CN202410637018.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-08-27
AI Technical Summary
The existing technology is difficult to ensure the smoothness between multi-frame path points, resulting in unstable robot trajectory tracking, high algorithm complexity and low efficiency.
By obtaining the connecting path of the first driving path and its overlapping portion, the smoothing process is performed based on the curvature parameters after merging, and the fourth driving path is generated to ensure smoothness and trajectory stability between multi-frame path points.
It improves the stability and real-time performance of robot trajectory tracking, reduces algorithm complexity and planning efficiency, and enhances the smoothness of the path.
Smart Images

Figure CN118550296A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of mobile robots, and in particular to a path planning method, device, readable storage medium and robot. Background Art
[0002] With the widespread application of mobile robots in multiple fields, mobile robot path planning algorithms that are compatible with industrial scenarios and service scenarios are becoming increasingly important.
[0003] In the related technology, there is an algorithm based on optimized path planning and speed planning for single-frame path points. Although this algorithm reduces processing complexity and improves processing efficiency, it can only ensure the smoothness of single-frame path points and is difficult to ensure the smoothness of multi-frame path points. Summary of the invention
[0004] The present application aims to solve one of the technical problems existing in the prior art or related technology.
[0005] To this end, the first aspect of the present application proposes a path planning method.
[0006] A second aspect of the present application provides a path planning device.
[0007] A third aspect of the present application provides a path planning device.
[0008] A fourth aspect of the present application provides a readable storage medium.
[0009] A fifth aspect of the present application proposes a robot.
[0010] In view of this, according to the first aspect of the present application, a path planning method is proposed, which is applied to a robot. The path planning method includes: when a first driving path is obtained, obtaining a connecting path of the first driving path, the connecting path at least partially overlaps with the first driving path; searching for a second driving path according to the path end point of the connecting path; merging the connecting path with the second driving path to obtain a third driving path; and smoothing the third driving path based on a curvature parameter of the third driving path to obtain a fourth driving path.
[0011] In the technical solution of the present application, when the first driving path is obtained by planning, a connecting path is determined based on the first driving path obtained by planning, and then the target point of the connecting path is used as the search starting point to search for the second driving path. After searching for the second driving path, the second driving path and the connecting path are merged to obtain a third driving path, and the merged third driving path is smoothed based on the curvature parameter. The embodiment of the present application improves the smoothness of the trajectory between multi-frame path points, enables the robot to stably track the trajectory, and reduces the complexity of the algorithm, improves the planning efficiency, and improves the real-time and smoothness of the robot operation.
[0012] In any of the above technical solutions, when the first driving path is obtained, obtaining a connecting path of the first driving path includes: obtaining a first distance value of the connecting path; and based on the first distance value, collecting a first path point in the first driving path to determine the connecting path.
[0013] In this technical solution, in the process of determining the connecting path based on the first driving path, it is necessary to first determine the first distance value of the connecting path. The first distance value is the first distance value of the complete connecting path, and the first distance value is the distance value of the overlapping part in the first driving path and the second driving path.
[0014] In this technical solution, after determining the first distance value, a first path point is searched and selected in the first driving path based on the first distance value. The first path point is a path point in the first driving path, and the first path point constitutes a connecting path.
[0015] It should be noted that when the current driving path is the first driving path of the robot, that is, when the first driving path is planned, the connection point is determined as the current position of the robot, and the connection path is empty. Specifically, since the connection path is the connection path between the first driving path and the second driving path planned subsequently, if the first driving path is not planned, the current position can be directly used as the starting point to plan the second driving path without looking for the connection path. If the robot has already planned the first driving path, the connection point and connection trajectory are calculated based on the trajectory of the first driving path released in the previous frame to ensure that the second driving path released in the next frame can be smoothly connected with the first driving path through the connection path.
[0016] In the technical solution of the present application, in the process of determining the connecting path, it is necessary to determine the first distance value of the connecting path, and then search and determine the connecting path between the first driving path and the second driving path based on the connecting point of the connecting path and the first distance value, so as to ensure the accuracy of the connecting path search and avoid the distance of the planned connecting path being too long or too short.
[0017] In any of the above technical solutions, obtaining the first distance value of the connection path includes:
[0018] Based on the robot traveling along the first driving path and without collision, determining the first distance value according to the second distance value and the preset magnification;
[0019] The second distance value is the path distance of the first driving path.
[0020] In this technical solution, since the first driving path is a driving path planned by the robot in real time, after the first driving path is planned, the robot drives along the first driving path. During the driving process of the robot, it is possible to continuously monitor whether a collision occurs on the first driving path. When the robot does not collide, the first distance value of the connecting path is determined according to the first distance value of the first driving path and a preset magnification.
[0021] Specifically, since the path distance of the connecting path can be set longer when the robot does not collide, the connecting path is searched and determined in the first driving path according to the preset magnification. When determining the first distance value, it is necessary to determine the first distance value of the planned first driving path, that is, the second distance value, and the first distance value of the connecting path can be determined by calculating the second distance value and the preset magnification.
[0022] In the technical solution of the present application, when the robot is traveling on the planned first driving path and no collision occurs, it can be determined that the trajectory of the first driving path is relatively smooth, so a connecting path with a longer distance can be found in the first driving path, and the connecting path can be found based on a preset multiplier, thereby further improving the smoothness between the connecting path and the first planned path.
[0023] In any of the above technical solutions, obtaining the first distance value of the connection path includes:
[0024] Based on the robot traveling along the first driving path and a collision occurs, the preset distance value is determined as the first distance value.
[0025] In this technical solution, during the driving process of the robot, it is possible to continuously monitor whether a collision occurs on the first driving path. When the robot collides, it is inevitable that the found connecting path covers the location where the collision occurs. Therefore, the first distance value of the connecting path is determined as the preset distance value, and the corresponding connecting path is searched in the first driving path based on the preset distance value.
[0026] Specifically, in the case of a collision between the robots, it is necessary to avoid that the found connecting path includes the collision location point where the robot collides, so it is necessary to avoid setting the path distance of the connecting path to be too long as possible, so the connecting path is searched and determined in the first driving path according to the preset distance value. When determining the first distance value, the preset distance value is directly determined as the first distance value of the connecting path.
[0027] In the technical solution of the present application, when the robot is traveling on the planned first driving path and a collision occurs during the driving process, it is necessary to avoid the connecting path covering the collision location point in the first driving path. Therefore, it is necessary to find a connecting path with a shorter distance in the first driving path. At this time, the preset distance value is directly used as the first distance value to search for the connecting path in the first driving path, thereby avoiding the location point where the robot collides in the connecting path, and further improving the smoothness of the connection between the first driving path and the second driving path.
[0028] In any of the above technical solutions, the connecting path is combined with the second driving path to obtain a third driving path, including:
[0029] Determine a first path discrete point in the connecting path and a second path discrete point in the second driving path according to the path segmentation threshold;
[0030] The first path discrete points and the second path discrete points are combined to obtain a third driving path.
[0031] In this technical solution, the path segmentation threshold is a segmentation threshold for segmented path optimization of the connecting path, and the segmentation threshold is a distance threshold of the segmented path segment.
[0032] Specifically, based on the distance value threshold, the found connecting path can be discretely sampled to obtain first path discrete points in the connecting path, and based on the distance value threshold, the planned second driving path can be discretely sampled to obtain second path discrete points in the second driving path.
[0033] In this technical solution, after determining the first path discrete point of the connecting path and the second path discrete point of the second driving path, the path can be merged based on the first path discrete point and the second path discrete point to obtain a third driving path. The third driving path is a discrete path, that is, the third driving path includes a plurality of discrete points, and the plurality of discrete points include the first path discrete point corresponding to the connecting path and the second path discrete point corresponding to the second driving path.
[0034] In the technical solution of the present application, after determining the connecting path in the first driving path and the second driving path, it is necessary to merge the connecting path with the second driving path. During the merging process, the merging is performed based on the path departure point. The third driving path obtained by the merger is a discrete path, which is convenient for subsequent smoothing processing of the third driving path and simplifies the subsequent processing process.
[0035] In any of the above technical solutions, determining the first path discrete point in the connection path includes:
[0036] The connecting path is segmented and discretized and sampled according to the path segmentation threshold to obtain the first path discrete point.
[0037] In this technical solution, the collected connection path can be discretized into segments through the path segmentation threshold. After the connection path is discretized into segments, the path discrete points in the connection path are discretely sampled to obtain the first path discrete points in the connection path.
[0038] Specifically, during the data processing process of the robot, the planned first driving path is optimized in segments according to the preset path segmentation threshold. After the segmented path is completed, the path discrete points in the connecting path are discretely sampled based on the path segmentation threshold to obtain the first path discrete points in the connecting path.
[0039] In the technical solution of the present application, in the process of determining the first path discrete points in the connecting path, the robot samples the connecting path based on the path segmentation threshold, and the obtained first path discrete points facilitate the subsequent merging of the connecting path with the second driving path based on the first path discrete points, which can simplify the processing process of merging the connecting path with the second driving path.
[0040] In any of the above technical solutions, determining the second path discrete points in the second driving path includes:
[0041] Backtracking the path points of the second driving path to determine a third path discrete point in the second driving path;
[0042] generating a fifth driving path according to the discrete points of the third path;
[0043] The fifth driving path is discretized into segments according to the path segmentation threshold value to obtain second path discrete points.
[0044] In this technical solution, in the process of merging the second driving path with the connecting path, it is necessary to perform processing based on the first path discrete points corresponding to the connecting path and the second path discrete points corresponding to the second driving path. It should be noted that the path points in the second driving path obtained based on the connecting path search are dense discrete path points. In order to reduce the amount of data processing in the path merging process, it is necessary to find the corresponding sparse key discrete path points in the dense discrete path points, that is, the third path discrete points in the second driving path. Based on the third path discrete points, the fifth driving path can be generated, and then the fifth driving path is segmented and discretized according to the path segmentation threshold to obtain the second path discrete points of the path search, which further reduces the amount of data required to be processed during the path merging process.
[0045] Specifically, the dense discrete path points in the second driving path are extracted, and the obtained dense discrete path points are used to find sparse key discrete path points in the dense discrete path points through the path point backtracking method, so as to determine the third path discrete points in the second driving path. The searched third path discrete points are connected to form a straight line to obtain a fifth driving path, and the fifth driving path includes all the third path discrete points. The fifth driving path is segmented and discretized according to the path segmentation threshold to obtain the second path discrete points of the second driving path.
[0046] In the technical solution of the present application, by backtracking the dense discrete points in the searched second driving path, sparse and critical third path discrete points are obtained, and the third path discrete points are synthesized to obtain a fifth driving path, and then the fifth driving path is discretized in sections to find the second path discrete points corresponding to the second driving path, so as to ensure that the second path discrete points include the path information of the second driving path, and at the same time, the data processing amount for merging the connecting path and the second driving path can be reduced.
[0047] In any of the above technical solutions, the third driving path includes at least two segmented discrete paths;
[0048] Based on the curvature parameter of the third driving path, the third driving path is smoothed to obtain a fourth driving path, including:
[0049] Obtaining coordinate information and a third distance value of each of the at least two piecewise discrete paths;
[0050] constructing an objective function based on the coordinate information and the third distance value, wherein the objective function is associated with a curvature parameter of the third driving path;
[0051] The third driving path is smoothed according to the objective function to obtain a fourth driving path.
[0052] In this technical solution, the third driving path is a driving path obtained by merging the first path discrete points corresponding to the connecting path and the second path discrete points corresponding to the second driving path, and the multiple segmented discrete paths in the third driving path are all discrete paths formed by splicing the first path discrete points and the third path discrete points. In the process of optimizing the third driving path, it is necessary to optimize each segmented discrete path to obtain a smooth trajectory path to ensure trajectory smoothness between multiple frames.
[0053] In the technical solution of the present application, a quintic polynomial related to the coordinates and distance values of each segmented discrete path is constructed, and an objective function related to the quintic polynomial is constructed. By solving the objective function, the path point with the minimum objective function is calculated, and the optimization of the third driving path is completed, so that the curvature and the curvature change rate of the optimized fourth driving path are minimized, and the smoothness of the fourth driving path is further improved.
[0054] In any of the above technical solutions, the third driving path is smoothed according to the objective function to obtain the fourth driving path, including:
[0055] Get path constraints;
[0056] Smoothing the third driving path according to the objective function and the path constraint to obtain a fourth driving path;
[0057] The path constraint includes at least one of the following: path boundary constraint, path continuity constraint, position and posture constraint, path curvature parameter constraint, and path endpoint constraint.
[0058] In this technical solution, the path constraint includes a path boundary constraint, and the path boundary constraint can constrain the boundary of the fourth driving path after the smoothing process.
[0059] In this technical solution, the path constraint includes a continuity constraint, and the smoothness between the path points of a single frame can be ensured by constructing the continuity constraint.
[0060] In this technical solution, the constraints of position and posture can ensure the smooth connection between multi-frame segmented discrete paths, ensure that the position and posture of the robot's constraint points in the shortest connection segment are the same, and make the robot's position and posture completely overlap at the shortest connection point of two adjacent segmented discrete paths.
[0061] In this technical solution, the curvature parameter constraints include curvature and curvature derivatives, that is, the curvature and curvature change rate constraints. Through the curvature parameter constraints, the curvature and curvature change rate between multi-frame segmented discrete paths can be guaranteed to be smooth.
[0062] In this technical solution, the constraint of the path endpoint can ensure that the target point of the fourth driving path obtained by smoothing matches the target point before smoothing, that is, ensure that the path endpoint of the fourth driving path is on the original path.
[0063] In the technical solution of the present application, in the process of the robot smoothing and optimizing the merged third driving path, the path boundary constraints, path continuity constraints, position and posture constraints, path curvature parameter constraints, and path end point constraints are combined to avoid the problems of the smoothed fourth driving path exceeding the preset boundary, poor continuity, deviation in the robot's posture between two adjacent segmented paths, excessive or small path curvature, and deviation in the path end point.
[0064] In any of the above technical solutions, after smoothing the third driving path based on the curvature parameter of the third driving path to obtain the fourth driving path, the path planning method further includes:
[0065] When the robot travels along the fourth travel path, constructing a first speed curve according to the first cycle;
[0066] determining a speed constraint of the robot according to the fourth driving path;
[0067] Optimizing the first speed curve based on the speed constraint to obtain a second speed curve;
[0068] The robot is controlled according to the second speed curve and travels along the fourth travel path.
[0069] In this technical solution, when the robot travels along the fourth travel path, the travel speed of the robot is periodically planned, that is, a first speed curve is periodically constructed, and the first speed curve is a curve of the travel speed and travel distance of the robot. After the first speed curve is constructed, the first speed curve needs to be smoothed to obtain a smooth second speed curve, and the travel process of the robot on the fourth travel path is controlled based on the second speed curve.
[0070] In the technical solution of the present application, after planning a smooth fourth driving path, the robot can plan a first speed curve for driving based on the fourth driving path, and obtain a smoothed second speed curve by smoothing the first speed curve, so that the robot can control its own driving trajectory in real time based on the fourth driving path and the second speed curve, thereby improving the accuracy of controlling the robot's driving.
[0071] In any of the above technical solutions, when the first driving path is obtained, before obtaining the connecting path of the first driving path, the path planning method further includes:
[0072] According to the second cycle, the current position information of the robot is obtained;
[0073] determining a first driving path based on the current location information;
[0074] The second period is greater than the first period.
[0075] In this technical solution, the robot updates the driving path according to the second cycle. The robot determines the first driving path it is currently traveling on based on its current position information every second cycle, so as to find the corresponding connecting path based on the first driving path, so that the robot can periodically update the driving path. By setting the second cycle of the planned driving path to be greater than the first cycle of updating the driving speed, it is also possible to reduce the speed jump caused by time delay when the robot is traveling on the newly planned fourth driving path.
[0076] In the technical solution of the present application, by periodically acquiring the first driving path and the connecting path of the first driving path, the driving path of the robot can be updated and planned in real time, and the update period of the driving path is greater than the update period of the speed, which can improve the accuracy of the robot's driving trajectory control.
[0077] In any of the above technical solutions, controlling the robot according to the second speed curve and driving along the fourth driving path includes:
[0078] When the robot travels along the fourth travel path, determining target speed information according to the target position information and the second speed curve;
[0079] According to the target speed information and the posture deviation information of the robot, the speed parameter of the robot is adjusted, and the posture deviation information is the deviation information between the current posture of the robot and the set posture;
[0080] The speed parameter includes at least one of the following: driving speed and driving angular velocity.
[0081] In the technical solution of the present application, when the robot travels according to the updated fourth travel path, the target position information of the robot under the fourth travel path is obtained, and the target speed information of the robot can be determined based on the target position information and the second speed curve. During the travel process, the robot can collect its own posture deviation information through the sensor, and adjust the current travel speed parameters of the robot based on the target speed information and the posture deviation information, that is, adjust the travel speed and travel angular velocity of the robot, thereby improving the accuracy of the robot's travel trajectory control and improving the smoothness of the robot's travel path and travel speed.
[0082] According to a second aspect of the present application, a path planning device is provided, which is applied to a robot. The path planning device includes:
[0083] An acquisition module, configured to acquire a connecting path of the first driving path when the first driving path is acquired, wherein the connecting path at least partially overlaps with the first driving path;
[0084] A search module, used for searching a second driving path according to a path end point of the connecting path;
[0085] A merging module, used for merging the connecting path with the second driving path to obtain a third driving path;
[0086] The smoothing module is used to perform smoothing processing on the third driving path based on the curvature parameter of the third driving path to obtain a fourth driving path.
[0087] In this embodiment, the third driving path is a path obtained by combining the second driving path and the connecting path, that is, the third driving path is a complete subsequent path of the first driving path, and the third driving path includes the path points of the connecting path and the path points of the second driving path. In the process of smoothing the third driving path, the curvature parameter of the third driving path is used as a reference for smoothing, ensuring that the curvature parameter of the fourth driving path obtained after smoothing is within the target range. The curvature parameter can reflect the curvature degree of the third driving path and the degree of change of the curvature degree. Therefore, smoothing the third driving path based on the curvature parameter can improve the smoothness of the entire third driving path.
[0088] It should be noted that the curvature parameter is a parameter of the entire third driving path or a part of the third driving path. Therefore, smoothing the third driving path based on the curvature parameter can ensure a high degree of smoothness between multi-frame path points in the obtained fourth driving path, thereby ensuring the smoothness of the trajectory between multi-frame path points and enabling the robot to stably track the trajectory.
[0089] In the embodiment of the present application, when the first driving path is obtained by planning, a connecting path is determined based on the first driving path obtained by planning, and then the target point of the connecting path is used as the search starting point to search for the second driving path. After searching for the second driving path, the second driving path and the connecting path are merged to obtain a third driving path, and the merged third driving path is smoothed based on the curvature parameter. The embodiment of the present application improves the smoothness of the trajectory between multi-frame path points, enables the robot to stably track the trajectory, reduces the complexity of the algorithm, improves the planning efficiency, and improves the real-time and smoothness of the robot operation.
[0090] According to the third aspect of the present application, a path planning device is proposed, wherein the path planning device includes a processor and a memory, wherein a program or instruction is stored in the memory, and when the program or instruction is executed by the processor, the steps of the path planning method in any of the above technical solutions are implemented. Therefore, the path planning device has all the beneficial effects of the path planning method in any of the above technical solutions, which will not be repeated here.
[0091] According to the fourth aspect of the present application, a readable storage medium is proposed, on which a program or instruction is stored. When the program or instruction is executed by a processor, a path planning method as in any of the above-mentioned technical solutions is implemented, thereby having all the beneficial technical effects of the path planning method in any of the above-mentioned technical solutions.
[0092] According to the fifth aspect of the present application, a robot is proposed, comprising: a path planning device as in any of the above technical solutions, and / or a readable storage medium as in any of the above technical solutions, and thus has all the beneficial technical effects of the path planning device as in any of the above technical solutions, and / or the readable storage medium as in any of the above technical solutions, and no further details will be given here.
[0093] Additional aspects and advantages of the present application will become apparent in the following description or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0095] Figure 1 A schematic diagram of a process flow of a path planning method is shown in some embodiments of the present application;
[0096] Figure 2 One of the schematic diagrams of the driving path of the robot provided in some embodiments of the present application is shown;
[0097] Figure 3 A second schematic diagram of a driving path of a robot provided in some embodiments of the present application is shown;
[0098] Figure 4 A schematic block diagram of a trajectory control system provided by some embodiments of the present application is shown;
[0099] Figure 5 One of the schematic block diagrams of a path planning device is shown in some embodiments of the present application;
[0100] Figure 6 A second schematic block diagram of a path planning device provided in some embodiments of the present application is shown. DETAILED DESCRIPTION
[0101] In order to more clearly understand the above-mentioned objectives, features and advantages of the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, in the absence of conflict, the present embodiment and the features in the embodiment can be combined with each other.
[0102] In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present application is not limited to the specific embodiments disclosed below.
[0103] Refer to the following Figures 1 to 6 The present invention describes a path planning method, an apparatus, a readable storage medium, and a robot according to some embodiments of the present application.
[0104] According to one embodiment of the present application, Figure 1 A schematic diagram of a path planning method is shown in some embodiments of the present application. Figure 1 As shown, a path planning method is proposed and applied to the robot. The path planning method includes:
[0105] Step 102, when the first driving path is obtained, obtaining a connecting path of the first driving path, wherein the connecting path at least partially overlaps with the first driving path;
[0106] In this embodiment, the robot can plan the path in real time, the first driving path is the path planned by the robot, the connecting path is the path connecting the first driving path with the second driving path, the connecting path is located between the first driving path and the second driving path, and the second driving path is the subsequent driving path of the first driving path. Among them, since the connecting path is used to connect the first driving path with the second driving path, the connecting path and the first driving path at least partially overlap, thereby improving the smoothness of the connection between the first driving path and the second driving path.
[0107] It should be noted that the robot periodically performs path planning, and each path planning takes the current position as the starting point of the path planning, and the position point after the preset distance is the end point of the path planning. In the planning process, the connecting path is planned first, and then the corresponding second path is searched based on the planned connecting path.
[0108] Exemplarily, the path planning cycle is once every 200 milliseconds, and the distance planned each time is 5 meters.
[0109] Step 104, searching for a second driving route according to the route end point of the connecting route;
[0110] In this embodiment, after determining the end point of the connecting path, the end point of the connecting path is used as the starting point for searching the second driving path to perform a path point search, wherein the end point of the second driving path is a position point determined in advance, so the second driving path can be searched.
[0111] It should be noted that the second driving path is a path obtained based on the connection path search, and when the robot passes through an obstacle, the second driving path is an obstacle avoidance path.
[0112] Exemplarily, during the search for the second driving path, the end point of the connecting path is used as the starting point of the path search, and the improved A-star algorithm (a heuristic search algorithm) is used to search for the second driving path based on the double differential model.
[0113] Step 106, merging the connecting path with the second driving path to obtain a third driving path;
[0114] Step 108: Based on the curvature parameter of the third driving path, the third driving path is smoothed to obtain a fourth driving path.
[0115] In this embodiment, the third driving path is a path obtained by combining the second driving path and the connecting path, that is, the third driving path is a complete subsequent path of the first driving path, and the third driving path includes the path points of the connecting path and the path points of the second driving path. In the process of smoothing the third driving path, the curvature parameter of the third driving path is used as a reference for smoothing, and the curvature parameter of the fourth driving path obtained after smoothing is ensured to be within the target range. The curvature parameter can reflect the curvature degree of the third driving path and the degree of change of the curvature degree. Therefore, smoothing the third driving path based on the curvature parameter can improve the smoothness of the entire third driving path. It should be noted that the curvature parameter is a parameter of the entire third driving path or a part of the third driving path. Therefore, smoothing the third driving path based on the curvature parameter can ensure that the smoothness between the multi-frame path points in the fourth driving path is high, thereby ensuring the smoothness of the trajectory between the multi-frame path points, and enabling the robot to stably track the trajectory.
[0116] Exemplarily, the curvature parameters include, but are not limited to, curvature and curvature change rate.
[0117] In the embodiment of the present application, when the first driving path is obtained by planning, a connecting path is determined based on the first driving path obtained by planning, and then the target point of the connecting path is used as the search starting point to search for the second driving path. After searching for the second driving path, the second driving path and the connecting path are merged to obtain a third driving path, and the merged third driving path is smoothed based on the curvature parameter. The embodiment of the present application improves the smoothness of the trajectory between multi-frame path points, enables the robot to stably track the trajectory, reduces the complexity of the algorithm, improves the planning efficiency, and improves the real-time and smoothness of the robot operation.
[0118] In any of the above embodiments, when the first driving path is obtained, obtaining a connecting path of the first driving path includes:
[0119] Get the first distance value of the connection path;
[0120] Based on the first distance value, a first path point is acquired in the first driving path to determine a connecting path.
[0121] In this embodiment, in the process of determining the connecting path based on the first driving path, it is necessary to first determine the first distance value of the connecting path, the first distance value is the first distance value of the complete connecting path, and the first distance value is the distance value of the overlapping portion in the first driving path and the second driving path.
[0122] In this embodiment, after determining the first distance value, a first path point is searched and selected in the first driving path based on the first distance value. The first path point is a path point in the first driving path, and the first path point constitutes a connecting path.
[0123] Exemplarily, after determining that the first distance value is 0.4 meters, the first distance value is used as the path length of the connecting path, and the connecting point with the second driving path in the first driving path is determined, and the connecting path in the first driving path is determined based on the coordinates of the connecting point and 0.4 meters.
[0124] It should be noted that when the current driving path is the first driving path of the robot, that is, when the first driving path is planned, the connection point is determined as the current position of the robot, and the connection path is empty. Specifically, since the connection path is the connection path between the first driving path and the second driving path planned subsequently, if the first driving path is not planned, the current position can be directly used as the starting point to plan the second driving path without looking for the connection path. If the robot has already planned the first driving path, the connection point and connection trajectory are calculated based on the trajectory of the first driving path released in the previous frame to ensure that the second driving path released in the next frame can be smoothly connected with the first driving path through the connection path.
[0125] In the embodiment of the present application, in the process of determining the connecting path, it is necessary to determine the first distance value of the connecting path, and then search and determine the connecting path between the first driving path and the second driving path based on the connecting point of the connecting path and the first distance value, so as to ensure the accuracy of the connecting path search and avoid the distance of the planned connecting path being too long or too short.
[0126] In any of the above embodiments, obtaining the first distance value of the connection path includes:
[0127] Based on the robot traveling along the first driving path and without collision, determining the first distance value according to the second distance value and the preset magnification;
[0128] The second distance value is the path distance of the first driving path.
[0129] In this embodiment, since the first driving path is a driving path planned by the robot in real time, after the first driving path is planned, the robot drives along the first driving path. During the driving process of the robot, it is possible to continuously monitor whether a collision occurs on the first driving path. When the robot does not collide, the first distance value of the connecting path is determined according to the first distance value of the first driving path and the preset magnification.
[0130] Specifically, since the path distance of the connecting path can be set longer when the robot does not collide, the connecting path is searched and determined in the first driving path according to the preset magnification. When determining the first distance value, it is necessary to determine the first distance value of the planned first driving path, that is, the second distance value, and the first distance value of the connecting path can be determined by calculating the second distance value and the preset magnification.
[0131] Exemplarily, the preset magnification ranges from 0.2 times to 0.5 times, and the second distance value ranges from 5 meters to 10 meters.
[0132] In an embodiment of the present application, when the robot is traveling on the planned first driving path without collision, it can be determined that the trajectory of the first driving path is relatively smooth, so a connecting path with a longer distance can be found in the first driving path, and the connecting path can be found based on a preset magnification, thereby further improving the smoothness between the connecting path and the first planned path.
[0133] In any of the above embodiments, obtaining the first distance value of the connection path includes:
[0134] Based on the robot traveling along the first driving path and a collision occurs, the preset distance value is determined as the first distance value.
[0135] In this embodiment, during the driving process of the robot, it is possible to continuously monitor whether a collision occurs on the first driving path. When the robot collides, it is inevitable that the found connecting path covers the location where the collision occurs. Therefore, the first distance value of the connecting path is determined as the preset distance value, and the corresponding connecting path is searched in the first driving path based on the preset distance value.
[0136] Specifically, in the case of a collision between the robots, it is necessary to avoid that the found connecting path includes the collision location point where the robot collides, so it is necessary to avoid setting the path distance of the connecting path to be too long as possible, so the connecting path is searched and determined in the first driving path according to the preset distance value. When determining the first distance value, the preset distance value is directly determined as the first distance value of the connecting path.
[0137] Exemplarily, the second distance value ranges from 5 meters to 10 meters, and the preset distance value ranges from 0.2 meters to 0.5 meters.
[0138] In an embodiment of the present application, when the robot is traveling on a planned first driving path and a collision occurs during the driving process, it is necessary to avoid the connecting path from covering the collision location in the first driving path. Therefore, it is necessary to find a connecting path with a shorter distance in the first driving path. At this time, the preset distance value is directly used as the first distance value to search for the connecting path in the first driving path, thereby avoiding the connection path including the location where the robot collides, and further improving the smoothness of the connection between the first driving path and the second driving path.
[0139] In any of the above embodiments, merging the connecting path with the second driving path to obtain a third driving path includes:
[0140] Determine a first path discrete point in the connecting path and a second path discrete point in the second driving path according to the path segmentation threshold;
[0141] The first path discrete points and the second path discrete points are combined to obtain a third driving path.
[0142] In this embodiment, the path segmentation threshold is a segmentation threshold for segmented path optimization of the connecting path, and the segmentation threshold is a distance threshold of the segmented path segment.
[0143] Specifically, based on the distance value threshold, the found connecting path can be discretely sampled to obtain first path discrete points in the connecting path, and based on the distance value threshold, the planned second driving path can be discretely sampled to obtain second path discrete points in the second driving path.
[0144] In this embodiment, after determining the first path discrete point of the connecting path and the second path discrete point of the second driving path, the path can be merged based on the first path discrete point and the second path discrete point to obtain a third driving path. The third driving path is a discrete path, that is, the third driving path includes a plurality of discrete points, and the plurality of discrete points include the first path discrete point corresponding to the connecting path and the second path discrete point corresponding to the second driving path.
[0145] In the embodiment of the present application, after determining the connecting path in the first driving path and the second driving path, it is necessary to merge the connecting path with the second driving path. During the merging process, the merging is performed based on the path departure point. The third driving path obtained by the merger is a discrete path, which is convenient for subsequent smoothing processing of the third driving path and simplifies the subsequent processing process.
[0146] In any of the above embodiments, determining a first path discrete point in a connection path includes:
[0147] The connecting path is segmented and discretized and sampled according to the path segmentation threshold to obtain the first path discrete point.
[0148] In this embodiment, the collected connection path can be discretized into segments by using the path segmentation threshold. After the connection path is discretized into segments, the path discrete points in the connection path are discretely sampled to obtain the first path discrete points in the connection path.
[0149] Specifically, during the data processing process of the robot, the planned first driving path is optimized in segments according to the preset path segmentation threshold. After the segmented path is completed, the path discrete points in the connecting path are discretely sampled based on the path segmentation threshold to obtain the first path discrete points in the connecting path.
[0150] In the embodiment of the present application, in the process of determining the first path discrete points in the connecting path, the robot samples the connecting path based on the path segmentation threshold, and the obtained first path discrete points facilitate the subsequent merging of the connecting path with the second driving path based on the first path discrete points, which can simplify the processing process of merging the connecting path with the second driving path.
[0151] In any of the above embodiments, determining the second path discrete points in the second driving path includes:
[0152] Backtracking the path points of the second driving path to determine a third path discrete point in the second driving path;
[0153] generating a fifth driving path according to the discrete points of the third path;
[0154] The fifth driving path is discretized into segments according to the path segmentation threshold value to obtain second path discrete points.
[0155] In this embodiment, in the process of merging the second driving path with the connecting path, it is necessary to perform processing based on the first path discrete points corresponding to the connecting path and the second path discrete points corresponding to the second driving path. It should be noted that the path points in the second driving path obtained based on the connecting path search are dense discrete path points. In order to reduce the amount of data processing in the path merging process, it is necessary to find the corresponding sparse key discrete path points in the dense discrete path points, that is, the third path discrete points in the second driving path. Based on the third path discrete points, the fifth driving path can be generated, and then the fifth driving path is segmented and discretized according to the path segmentation threshold to obtain the second path discrete points of the path search, which further reduces the amount of data required to be processed during the path merging process.
[0156] Specifically, the dense discrete path points in the second driving path are extracted, and the obtained dense discrete path points are used to find sparse key discrete path points in the dense discrete path points through the path point backtracking method, so as to determine the third path discrete points in the second driving path. The searched third path discrete points are connected to form a straight line to obtain a fifth driving path, and the fifth driving path includes all the third path discrete points. The fifth driving path is segmented and discretized according to the path segmentation threshold to obtain the second path discrete points of the second driving path.
[0157] In the embodiment of the present application, the dense discrete points in the searched second driving path are backtracked to obtain sparse and critical third path discrete points, and the third path discrete points are synthesized to obtain a fifth driving path. The fifth driving path is then discretized in sections to find the second path discrete points corresponding to the second driving path, thereby ensuring that the second path discrete points include the path information of the second driving path, and at the same time reducing the amount of data processing for merging the connecting path and the second driving path.
[0158] In any of the above embodiments, the third driving path includes at least two segmented discrete paths;
[0159] Based on the curvature parameter of the third driving path, the third driving path is smoothed to obtain a fourth driving path, including:
[0160] Obtaining coordinate information and a third distance value of each of the at least two piecewise discrete paths;
[0161] constructing an objective function based on the coordinate information and the third distance value, wherein the objective function is associated with a curvature parameter of the third driving path;
[0162] The third driving path is smoothed according to the objective function to obtain a fourth driving path.
[0163] In this embodiment, the third driving path is a driving path obtained by merging the first path discrete points corresponding to the connecting path and the second path discrete points corresponding to the second driving path, and the multiple segmented discrete paths in the third driving path are all discrete paths formed by splicing the first path discrete points and the third path discrete points. In the process of optimizing the third driving path, it is necessary to optimize each segmented discrete path to obtain a smooth trajectory path to ensure trajectory smoothness between multiple frames.
[0164] Specifically, a quintic polynomial (1) is constructed based on the coordinate points and distance values of multiple segmented discrete paths, as follows:
[0165]
[0166] Among them, x, f(s) are the x-axis coordinate values of the piecewise discrete path, y, g(s) are the y-axis coordinate values of the piecewise discrete path, s is the distance value, and a0, a1, a2, a3, a4, a5, b0, b1, b2, b3, b4, and b5 are coefficients.
[0167] Based on the above quintic polynomial (1), the objective function can be constructed. The expression (2) of the objective function is as follows:
[0168]
[0169] Among them, j is the objective function and s is the distance value.
[0170] In this embodiment, the objective function j is minimized based on the above expression (2), that is, the curvature and curvature change rate of the above relationship (1) are minimized. By solving the objective function, the third driving path can be optimized based on the objective function, so that each segmented discrete path is smoothed and the smoothness of the multi-frame path points is improved.
[0171] In the embodiment of the present application, a quintic polynomial is constructed that relates the coordinates of each segmented discrete path to the distance value, and an objective function related to the quintic polynomial is constructed. By solving the objective function, the path point with the minimum objective function is calculated, and the optimization of the third driving path is completed, so that the curvature and the curvature change rate of the optimized fourth driving path are minimized, thereby further improving the smoothness of the fourth driving path.
[0172] In any of the above embodiments, the third driving path is smoothed according to the objective function to obtain the fourth driving path, including:
[0173] Get path constraints;
[0174] Smoothing the third driving path according to the objective function and the path constraint to obtain a fourth driving path;
[0175] The path constraint includes at least one of the following: path boundary constraint, path continuity constraint, position and posture constraint, path curvature parameter constraint, and path endpoint constraint.
[0176] In this embodiment, the path constraint includes a path boundary constraint, and the path boundary constraint can constrain the boundary of the fourth driving path after the smoothing process.
[0177] Exemplarily, according to the distance between the path discrete point in the third driving path and the obstacle, the optimization range of each path discrete point is calculated, and the optimization range is used as the path boundary constraint. The path discrete point includes the first path discrete point corresponding to the connecting path and the second path discrete point of the second driving path.
[0178] In this embodiment, the path constraint includes a continuity constraint, and the smoothness between the path points of a single frame can be ensured by constructing the continuity constraint.
[0179] Exemplarily, the zero-order derivative, the first-order derivative and the second-order derivative of the quintic polynomial of two adjacent segmented discrete paths at the connection point are equal, and the continuity between the two adjacent segmented discrete paths can be guaranteed by this continuity constraint.
[0180] In this embodiment, the constraints of position and posture can ensure smooth connection between multi-frame segmented discrete paths, ensure that the position and posture of the robot's constraint points in the shortest connection segment are the same, and make the robot's position and posture completely overlap at the shortest connection point of two adjacent segmented discrete paths.
[0181] In this embodiment, the curvature parameter constraints include curvature and curvature derivatives, that is, constraints on curvature and curvature change rate. Through the curvature parameter constraints, the smoothness of the curvature and curvature change rate between multi-frame segmented discrete paths can be guaranteed.
[0182] Exemplarily, the constraints of the curvature parameter include a curvature variation range on a connecting path outside the shortest path, and a variation range of a curvature derivative.
[0183] In this embodiment, the constraint of the path endpoint can ensure that the target point of the fourth driving path obtained by smoothing matches the target point before smoothing, that is, ensure that the path endpoint of the fourth driving path is on the original path.
[0184] Figure 2 One of the schematic diagrams of the robot's driving path provided by some embodiments of the present application is shown, such as Figure 2As shown, the robot passes through the first obstacle 202 while traveling on the first driving path 204 , determines the corresponding connecting path 206 , and determines a smoothed fourth driving path 208 based on the connecting path 206 .
[0185] In an embodiment of the present application, in the process of the robot smoothing and optimizing the merged third driving path, the path boundary constraints, path continuity constraints, position and posture constraints, path curvature parameter constraints, and path end point constraints are combined to avoid the problems of the smoothed fourth driving path exceeding the preset boundaries, poor continuity, deviations in the robot's posture between two adjacent segmented paths, excessive or small path curvature, and deviations in the path end point.
[0186] In any of the above embodiments, after smoothing the third driving path based on the curvature parameter of the third driving path to obtain the fourth driving path, the path planning method further includes:
[0187] When the robot travels along the fourth travel path, constructing a first speed curve according to the first cycle;
[0188] determining a speed constraint of the robot according to the fourth driving path;
[0189] Optimizing the first speed curve based on the speed constraint to obtain a second speed curve;
[0190] The robot is controlled according to the second speed curve and travels along the fourth travel path.
[0191] In this embodiment, when the robot travels along the fourth travel path, the travel speed of the robot is periodically planned, that is, a first speed curve is periodically constructed, and the first speed curve is a curve of the travel speed and travel distance of the robot. After the first speed curve is constructed, the first speed curve needs to be smoothed to obtain a smooth second speed curve, and the travel process of the robot on the fourth travel path is controlled based on the second speed curve.
[0192] Exemplarily, the value range of the first cycle is 30 milliseconds to 80 milliseconds. First, the first speed curve is obtained by T-type speed planning, and then the first speed curve is optimized according to the kinematic and dynamic constraints of different positions of the robot on the fourth driving path to obtain a smooth second speed curve. Since the second speed curve is a curve of the relationship between the driving distance and the driving speed, the second speed curve can be associated and merged with the fourth planned path based on the driving distance, so that the robot can track and control its own driving.
[0193] In an embodiment of the present application, after planning a smooth fourth driving path, the robot can plan a first speed curve for driving based on the fourth driving path, and obtain a smoothed second speed curve by smoothing the first speed curve, so that the robot can control its own driving trajectory in real time based on the fourth driving path and the second speed curve, thereby improving the accuracy of controlling the robot's driving.
[0194] In any of the above embodiments, when the first driving path is obtained, before obtaining the connecting path of the first driving path, the path planning method further includes:
[0195] According to the second cycle, the current position information of the robot is obtained;
[0196] determining a first driving path based on the current location information;
[0197] The second period is greater than the first period.
[0198] In this embodiment, the robot updates the driving path according to the second cycle. The robot determines the first driving path it is currently traveling on based on its current position information every second cycle, so as to find the corresponding connecting path based on the first driving path, so that the robot can periodically update the driving path. By setting the second cycle of planning the driving path to be greater than the first cycle of updating the driving speed, it is also possible to reduce the speed jump caused by time delay when the robot is traveling on the newly planned fourth driving path.
[0199] Exemplarily, the value range of the second period is 100 milliseconds to 300 milliseconds.
[0200] Figure 3 FIG. 2 shows a second schematic diagram of a robot driving path provided in some embodiments of the present application, such as Figure 3 As shown, the robot determines the corresponding connecting path 304 while traveling on the first driving path 302, and determines the smoothed fourth driving path 306 based on the connecting path 304. After 200 milliseconds, the robot redefines the corresponding connecting path 304, and determines the smoothed fourth driving path 306 based on the connecting path 304.
[0201] In an embodiment of the present application, by periodically acquiring the first driving path and the connecting path of the first driving path, the driving path of the robot can be updated and planned in real time, and the update period of the driving path is greater than the update period of the speed, which can improve the accuracy of the robot's driving trajectory control.
[0202] In any of the above embodiments, controlling the robot according to the second speed curve to travel along the fourth travel path includes:
[0203] When the robot travels along the fourth travel path, determining target speed information according to the target position information and the second speed curve;
[0204] According to the target speed information and the posture deviation information of the robot, the speed parameter of the robot is adjusted, and the posture deviation information is the deviation information between the current posture of the robot and the set posture;
[0205] The speed parameter includes at least one of the following: driving speed and driving angular velocity.
[0206] In the embodiment of the present application, when the robot travels according to the updated fourth travel path, the target position information of the robot under the fourth travel path is obtained, and the target speed information of the robot can be determined based on the target position information and the second speed curve. The robot can collect its own posture deviation information through the sensor during the travel process, and adjust the current travel speed parameters of the robot based on the target speed information and the posture deviation information, that is, adjust the travel speed and travel angular velocity of the robot, thereby improving the accuracy of the robot's travel trajectory control and improving the smoothness of the robot's travel path and travel speed.
[0207] Figure 4 A schematic block diagram of a trajectory control system provided by some embodiments of the present application is shown. Figure 4 As shown, the trajectory control system 400 includes a path planning module 402. The path planning module 402 obtains current position information every second cycle, calculates the connection point and the connection path, searches for the second driving path, synthesizes the connection path and the second driving path into a third driving path, and optimizes the third driving path based on the curvature parameter to generate a fourth driving path. The path planning module 402 transmits the fourth driving path to the speed planning module 404. The speed planning module 404 intercepts the path curve every first cycle, performs an initial speed update, plans to obtain a second speed curve, controls and tracks the robot's driving based on the second speed curve, and outputs a real-time trajectory.
[0208] According to one embodiment of the present application, Figure 5 One of the schematic block diagrams of a path planning device provided in some embodiments of the present application is shown. Figure 5 As shown, a path planning device 500 is proposed, wherein the path planning device 500 is applied to a robot and includes:
[0209] An acquisition module 502 is used to acquire a connecting path of the first driving path when the first driving path is acquired, where the connecting path at least partially overlaps with the first driving path;
[0210] A search module 504, configured to search for a second driving route according to the route end point of the connecting route;
[0211] A merging module 506, configured to merge the connecting path with the second driving path to obtain a third driving path;
[0212] The smoothing module 508 is configured to perform smoothing processing on the third driving path based on the curvature parameter of the third driving path to obtain a fourth driving path.
[0213] In this embodiment, the third driving path is a path obtained by combining the second driving path and the connecting path, that is, the third driving path is a complete subsequent path of the first driving path, and the third driving path includes the path points of the connecting path and the path points of the second driving path. In the process of smoothing the third driving path, the curvature parameter of the third driving path is used as a reference for smoothing, and the curvature parameter of the fourth driving path obtained after smoothing is ensured to be within the target range. The curvature parameter can reflect the curvature degree of the third driving path and the degree of change of the curvature degree. Therefore, smoothing the third driving path based on the curvature parameter can improve the smoothness of the entire third driving path. It should be noted that the curvature parameter is a parameter of the entire third driving path or a part of the third driving path. Therefore, smoothing the third driving path based on the curvature parameter can ensure that the smoothness between the multi-frame path points in the fourth driving path is high, thereby ensuring the smoothness of the trajectory between the multi-frame path points, and enabling the robot to stably track the trajectory.
[0214] In the embodiment of the present application, when the first driving path is obtained by planning, a connecting path is determined based on the first driving path obtained by planning, and then the target point of the connecting path is used as the search starting point to search for the second driving path. After searching for the second driving path, the second driving path and the connecting path are merged to obtain a third driving path, and the merged third driving path is smoothed based on the curvature parameter. The embodiment of the present application improves the smoothness of the trajectory between multi-frame path points, enables the robot to stably track the trajectory, reduces the complexity of the algorithm, improves the planning efficiency, and improves the real-time and smoothness of the robot operation.
[0215] In any of the above embodiments, the acquisition module 502 is used to acquire a first distance value of the connection path;
[0216] The path planning device 500 further includes:
[0217] The determination module is used to collect a first path point in a first driving path based on a first distance value to determine a connecting path.
[0218] In the embodiment of the present application, in the process of determining the connecting path, it is necessary to determine the first distance value of the connecting path, and then search and determine the connecting path between the first driving path and the second driving path based on the connecting point of the connecting path and the first distance value, so as to ensure the accuracy of the connecting path search and avoid the distance of the planned connecting path being too long or too short.
[0219] In any of the above embodiments, the determination module is used to determine the first distance value according to the second distance value and the preset magnification based on the robot traveling along the first driving path without collision;
[0220] The second distance value is the path distance of the first driving path.
[0221] In an embodiment of the present application, when the robot is traveling on the planned first driving path without collision, it can be determined that the trajectory of the first driving path is relatively smooth, so a connecting path with a longer distance can be found in the first driving path, and the connecting path can be found based on a preset magnification, thereby further improving the smoothness between the connecting path and the first planned path.
[0222] In any of the above embodiments, the determination module is used to determine the preset distance value as the first distance value based on the robot traveling along the first driving path and a collision occurs.
[0223] In an embodiment of the present application, when the robot is traveling on a planned first driving path and a collision occurs during the driving process, it is necessary to avoid the connecting path from covering the collision location in the first driving path. Therefore, it is necessary to find a connecting path with a shorter distance in the first driving path. At this time, the preset distance value is directly used as the first distance value to search for the connecting path in the first driving path, thereby avoiding the connection path including the location where the robot collides, and further improving the smoothness of the connection between the first driving path and the second driving path.
[0224] In any of the above embodiments, the determination module is used to determine the first path discrete point in the connecting path and determine the second path discrete point in the second driving path according to the path segmentation threshold;
[0225] The merging module 506 is used to merge the first path discrete points and the second path discrete points to obtain a third driving path.
[0226] In the embodiment of the present application, after determining the connecting path in the first driving path and the second driving path, it is necessary to merge the connecting path with the second driving path. During the merging process, the merging is performed based on the path departure point. The third driving path obtained by the merger is a discrete path, which is convenient for subsequent smoothing processing of the third driving path and simplifies the subsequent processing process.
[0227] In any of the above embodiments, the path planning device 500 further includes:
[0228] The sampling module is used to perform segmented discretization sampling on the connection path according to the path segmentation threshold to obtain a first path discrete point.
[0229] In the embodiment of the present application, in the process of determining the first path discrete points in the connecting path, the robot samples the connecting path based on the path segmentation threshold, and the obtained first path discrete points facilitate the subsequent merging of the connecting path with the second driving path based on the first path discrete points, which can simplify the processing process of merging the connecting path with the second driving path.
[0230] In any of the above embodiments, the determination module is used to perform path point backtracking on the second driving path to determine a third path discrete point in the second driving path;
[0231] The path planning device 500 further includes:
[0232] A generating module, used for generating a fifth driving path according to discrete points of the third path;
[0233] The discretization module is used to discretize the fifth driving path into segments according to the path segmentation threshold value to obtain discrete points of the second path.
[0234] In the embodiment of the present application, the dense discrete points in the searched second driving path are backtracked to obtain sparse and critical third path discrete points, and the third path discrete points are synthesized to obtain a fifth driving path. The fifth driving path is then discretized in sections to find the second path discrete points corresponding to the second driving path, thereby ensuring that the second path discrete points include the path information of the second driving path, and at the same time reducing the amount of data processing for merging the connecting path and the second driving path.
[0235] In any of the above embodiments, the acquisition module 502 is used to acquire the coordinate information and the third distance value of each of the at least two segmented discrete paths;
[0236] The path planning device 500 comprises:
[0237] A construction module, configured to construct an objective function based on the coordinate information and the third distance value, wherein the objective function is associated with a curvature parameter of the third driving path;
[0238] The smoothing module 508 is used to perform smoothing processing on the third driving path according to the objective function to obtain a fourth driving path.
[0239] In the embodiment of the present application, a quintic polynomial is constructed that relates the coordinates of each segmented discrete path to the distance value, and an objective function related to the quintic polynomial is constructed. By solving the objective function, the path point with the minimum objective function is calculated, and the optimization of the third driving path is completed, so that the curvature and the curvature change rate of the optimized fourth driving path are minimized, thereby further improving the smoothness of the fourth driving path.
[0240] In any of the above embodiments, the acquisition module 502 is used to acquire path constraints;
[0241] A smoothing module 508, configured to perform smoothing processing on the third driving path according to the objective function and the path constraint to obtain a fourth driving path;
[0242] The path constraint includes at least one of the following: path boundary constraint, path continuity constraint, position and posture constraint, path curvature parameter constraint, and path endpoint constraint.
[0243] In an embodiment of the present application, in the process of the robot smoothing and optimizing the merged third driving path, the path boundary constraints, path continuity constraints, position and posture constraints, path curvature parameter constraints, and path end point constraints are combined to avoid the problems of the smoothed fourth driving path exceeding the preset boundaries, poor continuity, deviations in the robot's posture between two adjacent segmented paths, excessive or small path curvature, and deviations in the path end point.
[0244] In any of the above embodiments, the path planning device 500 further includes:
[0245] A construction module, used for constructing a first speed curve according to a first cycle when the robot travels according to a fourth travel path;
[0246] A determination module, used to determine a speed constraint of the robot according to a fourth driving path;
[0247] An optimization module, used for optimizing the first speed curve based on the speed constraint to obtain a second speed curve;
[0248] The control module is used to control the robot according to the second speed curve and travel along the fourth travel path.
[0249] In an embodiment of the present application, after planning a smooth fourth driving path, the robot can plan a first speed curve for driving based on the fourth driving path, and obtain a smoothed second speed curve by smoothing the first speed curve, so that the robot can control its own driving trajectory in real time based on the fourth driving path and the second speed curve, thereby improving the accuracy of controlling the robot's driving.
[0250] In any of the above embodiments, the acquisition module 502 is used to acquire the current position information of the robot according to the second cycle;
[0251] A determination module, configured to determine a first driving path based on current location information;
[0252] The second period is greater than the first period.
[0253] In an embodiment of the present application, by periodically acquiring the first driving path and the connecting path of the first driving path, the driving path of the robot can be updated and planned in real time, and the update period of the driving path is greater than the update period of the speed, which can improve the accuracy of the robot's driving trajectory control.
[0254] In any of the above embodiments, the determination module is used to determine the target speed information according to the target position information and the second speed curve when the robot travels according to the fourth travel path;
[0255] The path planning device 500 further includes:
[0256] An adjustment module is used to adjust the speed parameters of the robot according to the target speed information and the posture deviation information of the robot, where the posture deviation information is the deviation information between the current posture of the robot and the set posture;
[0257] The speed parameter includes at least one of the following: driving speed and driving angular velocity.
[0258] In the embodiment of the present application, when the robot travels according to the updated fourth travel path, the target position information of the robot under the fourth travel path is obtained, and the target speed information of the robot can be determined based on the target position information and the second speed curve. The robot can collect its own posture deviation information through the sensor during the travel process, and adjust the current travel speed parameters of the robot based on the target speed information and the posture deviation information, that is, adjust the travel speed and travel angular velocity of the robot, thereby improving the accuracy of the robot's travel trajectory control and improving the smoothness of the robot's travel path and travel speed.
[0259] According to one embodiment of the present application, Figure 6 FIG. 2 shows a schematic block diagram of a path planning device provided in some embodiments of the present application. Figure 6 As shown, the path planning device 600 includes a processor 602 and a memory 604. The memory 604 stores a program or instruction. When the program or instruction is executed by the processor 602, the steps of the path planning method in any of the above embodiments are implemented. Therefore, the path planning device 600 has all the beneficial effects of the path planning method in any of the above embodiments, which will not be repeated here.
[0260] According to one embodiment of the present application, optionally, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, a path planning method as in any of the above embodiments is implemented, thereby having all the beneficial technical effects of the path planning method in any of the above embodiments.
[0261] The readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0262] A computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer readable storage medium may be an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above devices, but is not limited thereto. A non-exhaustive list of more specific examples of computer readable storage media includes: portable computer floppy disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory card, floppy disk, encoding mechanical device (such as a punch card or a groove with a raised structure with instructions recorded) and any suitable combination of the above devices. The computer readable storage medium used herein should not be understood as a transmission signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium, or an electrical signal transmitted through a wire, etc.
[0263] According to one embodiment of the present application, optionally, a robot is provided, comprising: a path planning device as in any of the above embodiments, and / or a readable storage medium as in any of the above embodiments, and thus having all the beneficial technical effects of the path planning device as in any of the above embodiments, and / or the readable storage medium as in any of the above embodiments, which will not be elaborated herein.
[0264] It should be clarified that in the claims, specification and drawings of the present application, the term "multiple" refers to two or more than two. Unless otherwise clearly defined, the orientation or position relationship indicated by the terms "upper" and "lower" is based on the orientation or position relationship shown in the drawings, which is only for the purpose of more conveniently describing the present application and making the description process easier, rather than indicating or implying that the device or element referred to must have the specific orientation described, be constructed and operated in a specific orientation, so these descriptions cannot be understood as limitations on the present application; the terms "connect", "install", "fix" and the like should be understood in a broad sense. For example, "connection" can be a fixed connection between multiple objects, or a detachable connection between multiple objects, or an integral connection; it can be a direct connection between multiple objects, or an indirect connection between multiple objects through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood based on the specific circumstances of the above data.
[0265] In the claims, specification and drawings of the present application, the description of the terms "one embodiment", "some embodiments", "specific embodiments" and the like means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the claims, specification and drawings of the present application, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0266] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A path planning method, characterized in that: Applied to a robot, the path planning method includes: When the first driving path is acquired, acquiring a connecting path of the first driving path, wherein the connecting path at least partially overlaps with the first driving path; searching for a second driving route according to the route end point of the connecting route; Merging the connecting path with the second driving path to obtain a third driving path; Based on the curvature parameter of the third driving path, the third driving path is smoothed to obtain a fourth driving path.
2. The path planning method according to claim 1, characterized in that: The step of acquiring a connecting path of the first driving path after the first driving path is acquired includes: Acquire a first distance value of the connection path; Based on the first distance value, a first path point is acquired in the first driving path to determine the connecting path.
3. The path planning method according to claim 2, characterized in that: The obtaining of the first distance value of the connection path includes: Based on the robot traveling along the first driving path without collision, determining the first distance value according to the second distance value and a preset magnification; The second distance value is the path distance of the first driving path.
4. The path planning method according to claim 2, characterized in that: The obtaining of the first distance value of the connection path includes: Based on the situation that the robot travels along the first travel path and a collision occurs, a preset distance value is determined as the first distance value.
5. The path planning method according to any one of claims 1 to 4, characterized in that: The step of merging the connecting path with the second driving path to obtain a third driving path includes: Determining a first path discrete point in the connecting path and a second path discrete point in the second driving path according to a path segmentation threshold; The first path discrete points and the second path discrete points are combined to obtain the third driving path.
6. The path planning method according to claim 5, characterized in that: The determining of the first path discrete point in the connection path comprises: The connection path is discretized into segments according to the path segmentation threshold to obtain first path discrete points.
7. The path planning method according to claim 5, characterized in that: The determining of a second path discrete point in the second driving path includes: Performing path point backtracking on the second driving path to determine a third path discrete point in the second driving path; generating a fifth driving path according to the discrete points of the third path; The fifth driving path is discretized into segments according to the path segmentation threshold to obtain discrete points of the second path.
8. The path planning method according to any one of claims 1 to 4, characterized in that: The third driving path includes at least two segmented discrete paths; The step of smoothing the third driving path based on the curvature parameter of the third driving path to obtain a fourth driving path includes: Acquire coordinate information and a third distance value of each of the at least two piecewise discrete paths; constructing an objective function based on the coordinate information and the third distance value, wherein the objective function is associated with a curvature parameter of the third driving path; The third driving path is smoothed according to the objective function to obtain the fourth driving path.
9. The path planning method according to claim 8, characterized in that: The step of smoothing the third driving path according to the objective function to obtain the fourth driving path includes: Get path constraints; Smoothing the third driving path according to the objective function and the path constraint to obtain the fourth driving path; The path constraint includes at least one of the following: path boundary constraint, path continuity constraint, position and posture constraint, path curvature parameter constraint, and path endpoint constraint.
10. The path planning method according to any one of claims 1 to 4, characterized in that: After the third driving path is smoothed based on the curvature parameter of the third driving path to obtain the fourth driving path, the path planning method further includes: When the robot travels along the fourth travel path, constructing a first speed curve according to a first cycle; determining a speed constraint of the robot according to the fourth driving path; Optimizing the first speed curve based on the speed constraint to obtain a second speed curve; The robot is controlled according to the second speed curve to travel along the fourth travel path.
11. The path planning method according to claim 10, characterized in that: In the case where the first driving path is obtained, before obtaining a connecting path of the first driving path, the path planning method further includes: According to the second cycle, obtaining the current position information of the robot; determining the first driving path based on the current location information; The second period is greater than the first period.
12. The path planning method according to claim 10, characterized in that: The step of controlling the robot according to the second speed curve to travel along the fourth travel path includes: When the robot travels along the fourth travel path, determining target speed information according to target position information and the second speed curve; Adjusting the speed parameter of the robot according to the target speed information and the posture deviation information of the robot, wherein the posture deviation information is the deviation information between the current posture of the robot and the set posture; The speed parameter includes at least one of the following: driving speed and driving angular velocity.
13. A path planning device, characterized in that: Applied to a robot, the path planning device comprises: an acquisition module, configured to acquire, when a first driving path is acquired, a connecting path of the first driving path, wherein the connecting path at least partially overlaps with the first driving path; A search module, configured to search for a second driving path according to the path end point of the connecting path; a merging module, configured to merge the connecting path with the second driving path to obtain a third driving path; The smoothing module is used to perform smoothing processing on the third driving path based on the curvature parameter of the third driving path to obtain a fourth driving path.
14. A path planning device, characterized in that: include: processor; A memory, wherein a program or instruction is stored in the memory, and the processor implements the steps of the path planning method as described in any one of claims 1 to 12 when executing the program or instruction in the memory.
15. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by the processor, the steps of the path planning method according to any one of claims 1 to 12 are implemented.
16. A robot, characterized in that: include: The path planning device as claimed in claim 13 or 14; and / or The readable storage medium as claimed in claim 15.
