Path planning method and device and electronic equipment
By performing dynamic obstacle collision detection and compensating for steering and accumulated angle errors in the Centaur robot's path planning, the angle error problem of the Centaur robot in steering and linear motion is solved, and the accuracy and computational efficiency of path planning are improved.
Patent Information
- Application Number
- CN202510904400.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-10-03
AI Technical Summary
The Centaur robot has a steering angle error after turning, and a cumulative angle error when switching to linear motion. The existing navigation algorithm does not compensate for the angle error, and only considers dynamic obstacle detection between two turning points during path planning, resulting in low computational efficiency.
In path planning, the robot performs dynamic obstacle collision detection when moving from a turning point to a preset distance, ignoring the steering angle error and the cumulative angle error. Dynamic obstacle detection is performed by compensating for the steering angle error and the cumulative angle error at the current position, and a preset expansion distance is set between detection points A and B for collision detection to avoid replanning from the previous turning point.
The accuracy and computational efficiency of path planning are improved, the reading of global path points is reduced, and the computational burden is reduced.
Smart Images

Figure CN120742892A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of robot path planning, and in particular relates to a path planning method, device and electronic equipment. Background Art
[0002] With the rapid development of artificial intelligence, more and more robots are replacing original human labor.
[0003] As a biomimetic robot, quadruped robots possess unique locomotion, excellent stability, and omnidirectional mobility, allowing them to adapt to rugged terrain, narrow and complex paths, and stairways. This makes quadruped robots widely applicable and suitable for performing many simple but repetitive tasks. However, traditional quadruped robots often need to consider multiple complex motion modes when planning their paths, often performing steering and forward movement simultaneously, placing a significant strain on the motors in their limbs. Wheeled robots rely on rolling wheels for linear motion, so their navigation planning typically focuses on path smoothness and efficiency to achieve high-speed movement on flat surfaces. Centaurs combine the advantages of both quadrupeds and wheeled robots, enabling them to use wheels for propulsion on level surfaces and limbs for climbing.
[0004] However, the Centaur robot will experience steering angle errors after turning, and after switching to linear motion and moving forward, there will be accumulated angle errors. Current navigation algorithms do not compensate for this angle error. Furthermore, during existing path planning, the Centaur robot only considers dynamic obstacle collision detection between two turning points. If a dynamic obstacle is detected between two turning points, global path planning must be restarted from the previous turning point. This requires reading a large number of global path points, resulting in low computational efficiency. Summary of the Invention
[0005] In order to solve the above problems, embodiments of the present invention provide a path planning method, device, and electronic device.
[0006] In a first aspect, an embodiment of the present invention provides a path planning method, including:
[0007] Step 401: Obtain M global path points corresponding to the Nth global path planning, wherein the M global path points include M-1 turning points and an end point, where M is an integer greater than or equal to 2, and N is an integer greater than or equal to 1.
[0008] Step 402: If the robot rotates by a first angle at a first turning point, dynamic obstacle collision detection is performed while the robot moves from the first turning point to a second turning point or an end point that is a first preset distance from the first turning point, where the first angle is the difference between the heading angle of the robot before the robot rotates at the first turning point and a first path direction, where the first path direction is the path direction of a line connecting the first turning point and the second turning point where the robot is located.
[0009] Step 403: If the detection result shows that there is no dynamic obstacle, the position of the robot after moving forward the first preset distance is determined as the first position;
[0010] Step 404: If the robot rotates by a second angle at the first position, dynamic obstacle collision detection is performed while the robot moves from the first position to a third turning point or the end point at a second preset distance from the first position, where the second angle is the angular difference between the heading angle of the robot before the rotation at the first position and a second path direction, where the second path direction is the path direction of a line connecting the first position of the robot and the third turning point.
[0011] Step 405: If the detection result shows that there is no dynamic obstacle, the position of the robot after moving forward the second preset distance is determined as the second position;
[0012] Step 406: Repeat the aforementioned steps 404 and 405 for the third turning point, ..., and the M-1 turning point. If, during the repetitive process, it is determined that the detection result is that there is a dynamic obstacle, the repetitive process stops, and the N+1th global path planning is performed again with the current position of the robot as the starting point, and the process jumps to step 401. If, during the repetitive process, it is determined that the detection results are all that there are no dynamic obstacles, the repetitive process stops after the robot reaches the end point.
[0013] In one possible implementation, if the robot rotates a first angle at a first turning point, then performing dynamic obstacle collision detection while the robot moves from the first turning point to a second turning point or an end point that is a first preset distance from the first turning point includes:
[0014] If the robot rotates by a first angle at a first turning point, determining a current detection point A at which the robot is located and a detection point B at a preset expansion distance from the current detection point A during a process in which the robot moves from the first turning point to a second turning point or an end point at a first preset distance from the first turning point;
[0015] Dynamic obstacle collision detection is performed between the current detection point A and the detection point B.
[0016] In a possible implementation, obtaining M global path points corresponding to the Nth global path planning includes:
[0017] Based on the Nth global path planning map, M global path points corresponding to the Nth global path planning are obtained.
[0018] In a possible implementation, a two-dimensional coordinate system is built on the N-th global path planning map;
[0019] The performing dynamic obstacle collision detection between the current detection point A and the detection point B includes:
[0020] Step 501, rasterizing the Nth global path planning map to obtain a rasterized map;
[0021] Step 502: Determine whether the current detection point A and the detection point B form a straight line AB;
[0022] Step 503, determining the intersection points of the straight line AB and each vertical grid line of the rasterized map;
[0023] Step 504, determining a first integer grid point within a preset grid distance from the first intersection point;
[0024] Step 505: If the current detection point A is reachable from the first integer grid point, determine that there is no dynamic obstacle between the current detection point A and the first intersection point;
[0025] Step 506: Determine an extension direction of the next detection point relative to the first integer grid point, where the extension direction is the horizontal axis direction, the vertical axis direction, or an oblique direction of the two-dimensional coordinate system.
[0026] Step 507: Determine whether the first integer grid point is reachable to the next detection point in the extension direction, where the next detection point in the extension direction is a second integer grid point, and the second integer grid point is within a preset grid distance from the second intersection point.
[0027] Step 508: If reachable, determine that there is no dynamic obstacle between the first integer grid point and the second integer grid point;
[0028] Step 509: repeat steps 506, 507 and 508. If the node is unreachable, the repetitive process stops.
[0029] In one possible implementation, if the robot rotates by a first angle at a first turning point, then, while the robot moves from the first turning point to a second turning point or an end point that is a first preset distance from the first turning point, after performing dynamic obstacle collision detection, the method further includes:
[0030] If the detection result shows that there is a dynamic obstacle, the next global path planning is determined to be repeated.
[0031] In one possible implementation, if the robot rotates by a second angle at the first position, then, during the process of the robot moving from the first position to a third turning point or the end point at a second preset distance from the first position, after performing dynamic obstacle collision detection, the method further includes:
[0032] If the detection result shows that there is a dynamic obstacle, the next global path planning is determined to be repeated.
[0033] In a possible implementation, after determining whether the first integer grid point is reachable from the next detection point in the extension direction, the method further includes:
[0034] If it is unreachable, it is determined that there is a dynamic obstacle between the first integer grid point and the second integer grid point, and the next global path planning is performed again.
[0035] In one possible implementation, the robot is a centaur robot.
[0036] In a second aspect, an embodiment of the present invention provides a path planning device, comprising:
[0037] A global path point acquisition module is used to obtain M global path points corresponding to the Nth global path planning, where the M global path points include M-1 turning points and an end point, where M is an integer greater than or equal to 2, and N is an integer greater than or equal to 1.
[0038] The first dynamic obstacle collision detection module is used to perform dynamic obstacle collision detection when the robot rotates a first angle at a first turning point, and then moves from the first turning point to a second turning point or an end point at a first preset distance from the first turning point. The first angle is the angle difference between the heading angle of the robot before the robot rotates at the first turning point and the first path direction, and the first path direction is the path direction of the line connecting the first turning point and the second turning point where the robot is located.
[0039] The first position determining module is configured to determine, if the detection result shows that there is no dynamic obstacle, the position of the robot after it advances the first preset distance as the first position.
[0040] The second dynamic obstacle collision detection module is used to perform dynamic obstacle collision detection when the robot moves from the first position to a third turning point or the end point at a second preset distance from the first position if the robot rotates by a second angle at the first position, wherein the second angle is the angle difference between the heading angle of the robot before the rotation at the first position and the second path direction, and the second path direction is the path direction of the line connecting the first position of the robot and the third turning point.
[0041] The second position determination module is configured to determine the position of the robot after it moves forward the second preset distance as the second position if the detection result shows that there is no dynamic obstacle.
[0042] The processing module is used to repeat the functions of the second dynamic obstacle collision detection module and the second position determination module for the third turning point, ..., and the M-1 turning point. If, during the repeated process, the detection result is determined to be the presence of a dynamic obstacle, the repeated process is stopped, and the N+1th global path planning is performed again with the current position of the robot as the starting point, and the process jumps to the global path point acquisition module. If, during the repeated process, the detection results are determined to be the absence of dynamic obstacles, the repeated process is stopped after the robot reaches the end point.
[0043] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0044] A memory and a processor, wherein the processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method described in the first aspect and each step in various possible implementations.
[0045] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect and each step in various possible implementations.
[0046] In a fifth aspect, an embodiment of the present invention provides a computer program product comprising instructions, which, when run on a computer, enables the computer to execute the various steps in the method and various possible implementations described in the first aspect.
[0047] The beneficial effect of the technical solution provided by the embodiment of the present invention is that: when the robot moves from the first turning point to the second turning point or the end point at a first preset distance from the first turning point, the steering angle error of the robot at the first turning point and the cumulative angle error during the forward movement are ignored, and dynamic obstacle collision detection is performed. If the detection result is that there is no dynamic obstacle, the current position of the robot is determined to be the first position after moving forward for the first preset distance. There may be a position deviation between the first position and the expected second turning point or end point. If the robot rotates by a second angle at the first position, dynamic obstacle collision detection is performed when the robot moves from the first position to the third turning point or the end point at a second preset distance from the first position. The second angle is the angular difference between the heading angle of the robot before rotating at the first position and the second path direction, rather than the angular difference between the heading angle of the robot before rotating at the second turning point and the path direction of the line connecting the second turning point and the third turning point, thereby compensating for the steering angle error and the cumulative angle error at the first position. As the robot advances from a first position to a third turning point or an end point that is a second preset distance from a second turning point, the robot's steering angle error at the first position and the accumulated angle error during the advance are ignored, and dynamic obstacle collision detection is performed. If the detection result indicates that there is no dynamic obstacle, the robot's position after advancing the second preset distance is determined to be the second position. This step is repeated for subsequent turning points until the robot reaches the end point. If the detection result indicates that there is a dynamic obstacle, the next global path planning is repeated. This embodiment of the present invention implements dynamic obstacle collision detection for the robot during path planning, improving the accuracy of path planning by compensating for the steering angle error and accumulated angle error at the first position. If the robot rotates by a first angle at the first turning point, the robot's current detection point A and detection point B, which are located at a preset expansion distance from the current detection point A, are determined as the robot advances from the first turning point to a second turning point or an end point that is a first preset distance from the first turning point. Dynamic obstacle collision detection is then performed between the current detection point A and detection point B. By setting a preset expansion distance, the present invention realizes that when there is a dynamic obstacle between the current detection point A and the detection point B, global path planning only needs to start from the current detection point A, and there is no need to start global path planning from the previous turning point of the current detection point A (i.e., the first turning point). This reduces the number of global path points read and improves calculation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A system architecture applicable to the embodiments of the present invention;
[0049] Figure 2 A schematic diagram of global path points provided by an embodiment of the present invention;
[0050] Figure 3A schematic diagram of calculating the required turning angle provided by an embodiment of the present invention;
[0051] Figure 4 A schematic diagram of a flow chart of a path planning method provided by an embodiment of the present invention;
[0052] Figure 5 A schematic diagram of a process of performing dynamic obstacle collision detection between current detection point A and detection point B provided by an embodiment of the present invention;
[0053] Figure 6 A schematic diagram of applying the Bresenham collision detection algorithm between the current detection point A and the detection point B provided in an embodiment of the present invention;
[0054] Figure 7 A schematic block diagram of a path planning device provided in an embodiment of the present invention;
[0055] Figure 8 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0057] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "an", "the" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.
[0058] It should be understood that the term "and / or" as used herein is merely a description of the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0059] The word "if," as used herein, may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if monitoring (stated condition or event)" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.
[0060] After turning, the Centaur robot will experience a steering angle error. After switching to linear motion and moving forward, a cumulative angle error will remain. Current navigation algorithms do not compensate for this angle error. Furthermore, during existing path planning, the Centaur robot only considers dynamic obstacle collision detection between two turning points. If a dynamic obstacle is detected between two turning points, global path planning must be restarted from the previous turning point. This requires reading a large number of global path points, resulting in low computational efficiency.
[0061] In view of this, the embodiment of the present invention provides a new idea. In order to facilitate the understanding of the present application, the system architecture applicable to the embodiment of the present invention is first described. Figure 1 FIG. 1 shows an exemplary system architecture to which embodiments of the present invention may be applied. Figure 1 As shown, the system receives inputs including sensor data (LiDAR / IMU) and a provided map (i.e., original map) (static environment) and generates a global map. Based on the positioning information and destination input from the SLAM module, the navigation module's global planner uses the Theta* algorithm to perform global planning, generate a global path, and output global path points.
[0062] like Figure 2 As shown, the black rectangle is the obstacle, the blue line is the path, and the blue points s1, s2.....s i .....,s n is the global path point, where s1 is the starting point (i.e., the starting point), s n is the target point (i.e. the end point), the middle point s2 is also called the turning point s2, and the middle point s i Also called turning point i During the local planning process, the navigation module's local planner uses a dynamic obstacle avoidance algorithm based on the global pathpoints to avoid dynamic obstacles. It then outputs a local trajectory and converts it into linear velocity and angular velocity commands. These linear velocity and angular velocity commands are then fed into the Centaur's underlying controller to control its motion.
[0063] It should be noted that Figure 2 Each global path point in the s only uses the position coordinates in the x and y directions, that is, s i The coordinates of are (x(i), y(i)), si The coordinates of point s are (x(i+1), y(i+1)). Due to the movement characteristics of the Centaur robot (only turning and sliding forward, each section of the road is turned first and then sliding forward with wheels), we can calculate the point s i The forward direction (i.e. point s i and point s i +1) is: yaw(i)=arctan2((x(i+1)-x(i)), (y(i+1)-y(i))).
[0064] like Figure 3 As shown, similarly, we can take the robot needs to start from point s i To point s i +1, where yaw0(i) is the robot's heading angle (initial direction) and d is the straight-line distance between the two points. Assuming the robot is turning at a constant speed of 0.1 rad / s, the required turning angle is: θ = yaw(i) - yaw0(i). At the beginning, yaw0(i) is the robot's current orientation yaw'. In the middle of the path, yaw0(i) = yaw(i-1). Calculate the robot's turning time t = θ / 0.1. After the robot successfully turns, use the Cartesian interpolation algorithm to calculate the robot's forward speed.
[0065] Considering that the robot may have a steering angle error when turning. However, if the steering is always given priority, the robot is likely to keep spinning in place and oscillate. Therefore, the steering angle error is temporarily ignored at the end of the turn, and the robot moves forward directly. After the walk is completed, the current position P (x', y') and the current heading angle yaw' are read, and the current position P is used instead of s i +1(x(i+1), y(i+1)), calculate the current position P to point s i +2 if there are dynamic obstacles between them.
[0066] Taking into account the possible collisions caused by steering angle errors and the need to re-plan the global path if there are dynamic obstacles. Collision detection is required simultaneously during linear motion. Assume that the preset expansion distance of the robot is dn, that is, if an obstacle is detected within the preset expansion distance dn in front of the robot, it will stop. Then reread the new global path. That is to say, when the robot moves forward, read the current position P(x', y') and the current direction angle yaw', and take the point Q(x", y") at the preset expansion distance dn in front of the robot: x" = x' + dn*cos(yaw'), y" = y' + dn*sin(yaw'). Perform collision detection at points P and Q. If an obstacle is detected, reread the global path.
[0067] It should be noted that the embodiment of the present invention provides a flow chart of a path planning method. Figure 4 As shown, the following steps may be included:
[0068] Step 401: Obtain M global path points corresponding to the Nth global path planning, where the M global path points include M-1 turning points and an end point, where M is an integer greater than or equal to 2, and N is an integer greater than or equal to 1.
[0069] Step 402: If the robot rotates by a first angle at the first turning point, dynamic obstacle collision detection is performed while the robot moves from the first turning point to a second turning point or an end point that is a first preset distance from the first turning point. The first angle is the difference between the heading angle of the robot before the robot rotates at the first turning point and a first path direction. The first path direction is the path direction of the line connecting the first turning point and the second turning point where the robot is located.
[0070] Step 403: If the detection result shows that there is no dynamic obstacle, the position of the robot after it advances a first preset distance is determined as the first position;
[0071] Step 404: If the robot rotates by a second angle at the first position, dynamic obstacle collision detection is performed while the robot moves from the first position to a third turning point or an end point at a second predetermined distance from the first position. The second angle is the difference between the heading angle of the robot before the robot rotates at the first position and a second path direction. The second path direction is the path direction of a line connecting the first position of the robot and the third turning point.
[0072] Step 405: If the detection result shows that there is no dynamic obstacle, the position of the robot after it advances a second preset distance is determined as the second position;
[0073] Step 406: Repeat steps 404 and 405 for the third turning point, ..., and the M-1 turning point. If, during the repetition process, it is determined that the detection result is that there is a dynamic obstacle, the repetition process stops, and the N+1th global path planning is performed again with the current position of the robot as the starting point, and the process jumps to step 401. If, during the repetition process, it is determined that the detection results are all that there are no dynamic obstacles, the repetition process stops after the robot reaches the end point.
[0074] The following describes in detail each step of the above process and the effects that can be produced, in conjunction with embodiments of the present invention. It should be noted that the "first" and "second" definitions used in the embodiments of the present invention do not restrict size, order, or quantity, but are merely used to distinguish between them. For example, "first preset distance" and "second preset distance" are used to distinguish between two different preset distances.
[0075] First, in combination with an embodiment of the present invention, the above-mentioned step 401, namely, "obtaining M global path points corresponding to the Nth global path planning, the M global path points including M-1 turning points and end points, M is an integer greater than or equal to 2, and N is an integer greater than or equal to 1" is described in detail.
[0076] In an embodiment of the present invention, the Theta* algorithm is first used to plan an efficient and feasible global path from the starting point to the end point. Since the Theta* algorithm traverses the points at both ends of the curve to detect obstacles, if there is no obstacle in the middle of the curve, the curve is replaced by a straight line between the two points. Therefore, the path output by the Theta* algorithm will straighten all paths. Compared with the traditional global planning algorithm, this path has fewer turning points and only records each turning point. This is more conducive to separating turning and moving forward in local planning. It should be noted that after each global path planning, a number of global path points corresponding to the global path planning will be generated. Global path points include turning points and end points. Turning points include starting points. For example, after the Nth global path planning, M global path points corresponding to the Nth global path planning will be generated. The M global path points include M-1 turning points and end points, where M is an integer greater than or equal to 2 and N is an integer greater than or equal to 1.
[0077] In an embodiment of the present invention, M global path points corresponding to the Nth global path planning are obtained. As a possible implementation, the M global path points corresponding to the Nth global path planning are obtained based on the Nth global path planning map. It should be noted that a two-dimensional coordinate system is established on the Nth global path planning map.
[0078] The following describes in detail step 402 in conjunction with an embodiment of the present invention, namely, "if the robot rotates a first angle at the first turning point, dynamic obstacle collision detection is performed during the process of the robot moving from the first turning point to the second turning point or the end point at a first preset distance from the first turning point, the first angle being the angle difference between the heading angle of the robot before the rotation at the first turning point and the first path direction, and the first path direction being the path direction of the line connecting the first turning point and the second turning point where the robot is located."
[0079] In an embodiment of the present invention, the path direction of the line connecting the first turning point and the second turning point of the robot is referred to as the first path direction. The angular difference between the heading angle of the robot before the robot rotates at the first turning point and the first path direction is referred to as the first angle. Exemplarily, the robot is a Centaur robot.
[0080] In an embodiment of the present invention, if the robot rotates by a first angle at a first turning point, dynamic obstacle collision detection is performed while the robot is moving from the first turning point to a second turning point or an end point that is a first preset distance from the first turning point. It should be noted that steering angle errors may exist during the process of the robot rotating by the first angle at the first turning point, and cumulative angle errors may exist during the process of the robot moving from the first turning point to the second turning point or an end point that is a first preset distance from the first turning point. Therefore, error compensation is required. See step 404 for details on error compensation.
[0081] In an embodiment of the present invention, as a possible implementation, the aforementioned dynamic obstacle collision detection may be performed as follows: if the robot rotates by a first angle at a first turning point, then as the robot moves from the first turning point to a second turning point or an end point that is a first preset distance from the first turning point, the robot's current detection point A and a detection point B that is a preset expansion distance from the current detection point A are determined. Dynamic obstacle collision detection is performed between the current detection point A and the detection point B. For example, in this embodiment of the present invention, the collision detection algorithm employs the Bresenham collision detection algorithm.
[0082] In an embodiment of the present invention, as a possible implementation method, the process of performing dynamic obstacle collision detection between the current detection point A and the detection point B can be specifically as follows: Figure 5 Shown, including:
[0083] Step 501: rasterize the Nth global path planning map to obtain a rasterized map.
[0084] In an embodiment of the present invention, the N-th global path planning map is rasterized to obtain a rasterized map.
[0085] Step 502: Determine whether the current detection point A and the detection point B form a straight line AB.
[0086] In the embodiment of the present invention, it is determined that the current detection point A and the detection point B form a straight line AB.
[0087] Step 503: Determine the intersection points of the straight line AB and each vertical grid line of the rasterized map.
[0088] In the embodiment of the present invention, the intersection points of the straight line AB and each vertical grid line of the gridded map are determined.
[0089] Step 504: Determine a first integer grid point within a preset grid distance from the first intersection point.
[0090] In an embodiment of the present invention, a first integer grid point within a preset grid distance from the first intersection point is determined.
[0091] It can be understood that, in the embodiment of the present invention, the integer grid point closest to the first intersection point is determined as the first integer grid point.
[0092] Step 505: If the current detection point A is reachable from the first integer grid point, it is determined that there is no dynamic obstacle between the current detection point A and the first intersection point.
[0093] In this embodiment of the present invention, whether there is a dynamic obstacle between the current detection point A and the first intersection is determined by determining whether the current detection point A is reachable from the first integer grid point. If the current detection point A is reachable from the first integer grid point, then it is determined that there is no dynamic obstacle between the current detection point A and the first intersection.
[0094] For example, the goal of the Bresenham collision detection algorithm is to detect that there is no obstacle between the current detection point A and the detection point B. Figure 6 As shown in , the map is rasterized. To determine whether a point is reachable, we only need to obtain whether the nearest integer grid point on the line to the point is reachable. Figure 6 To determine whether the third intersection point C is reachable, we only need to determine whether the yellow integer grid point C' is reachable.
[0095] Step 506 : Determine an extension direction of the next detection point relative to the first integer grid point. The extension direction is the horizontal axis direction, the vertical axis direction, or the oblique direction of the two-dimensional coordinate system.
[0096] In an embodiment of the present invention, an extension direction of the next detection point relative to the first integer grid point is determined. The extension direction is the direction of the abscissa axis, the direction of the ordinate axis, or an oblique direction of the two-dimensional coordinate system. The oblique direction is a direction parallel to the direction from point A to point B, and the next detection point is located in the oblique direction.
[0097] For example, after determining C', the discriminant formula needs to be used to determine whether the next detection point is D1, D2 or E, that is, to expand in the x direction, y direction or oblique direction. The specific process is as follows:
[0098] For the general straight line equation y=kx0+m, we can use an equation to express it, that is: f(x,y)=0;
[0099] Let function F(x,y)=f(x,y);
[0100] The following inferences can be drawn:
[0101] When F(x0,y0)=0, it means that the point (x0,y0) is on the straight line.
[0102] When F(x,y) = e, |e| represents the distance from the point (x,y) to the point on the line. If e>0, it means it is above the line, and if e<0, it means it is above the line. It is best to choose a point with a smaller |e| as possible.
[0103] like Figure 6 As shown, assuming that the starting point of the drawn straight line is A(x s ,y s ), the end point is B(x e ,y e ), and x s ,y s , x e ,y e are all integers. C(x0, y0) is a point on the straight line, C'(x i ,y i ) is the current judgment point, D1(x i ,y i +1), D2(x i +1,y i ), E(x i +1,y i +1), which is the point where C' extends in the y direction, x direction and oblique direction.
[0104] Then the equation of the straight line is: (x e -x s )(yy s )-(xx s )(y e -y s )=0,
[0105] k=(y e -y s ) / (x e -x s )
[0106] Let dx = x e -x s >0,dy=y e -y s , let the implicit function of the line be F(x, y), then:
[0107] F(x, y) = dx(yy s )-(xx s )dy
[0108] According to the above inference, the error e between the point (x, y) and the line is calculated as follows:
[0109] e xy =F(x, y) = dx(yy s )-(xx s)dy
[0110] It can be deduced that:
[0111] F(x+1,y+1)=F(x,y)+dx-dy
[0112] F(x+1,y)=F(x,y)-dy=F(x+1,y+1)-dx
[0113] F(x,y+1)=F(x,y)+dx=F(x+1,y+1)+dy
[0114] Assuming that the slope k>0, according to the calculation formulas of the above three error values we can obtain: F(x, y+1)>=F(x+1, y+1)>=F(x+1, y).
[0115] If |F(x+1, y+1)|<=|F(x+1, y)|, it means that it needs to be expanded in the y direction, and the y coordinate is +1. If |F(x+1, y+1)|<=|F(x, y+1)|, it means that it needs to be expanded in the x direction, and the x coordinate is +1.
[0116] Then there is the judgment formula:
[0117] |F(x+1, y+1)|-|F(x+1, y)|<=0, y coordinate +1
[0118] |F(x+1, y+1)|-|F(x, y+1)|<=0, x coordinate +1
[0119] Because F(x, y+1)>=0, F(x+1, y)<=0, F(x, y+1)>=F(x+1, y+1)>=F(x+1, y), removing the absolute value of the above formula yields:
[0120] F(x+1, y+1)+F(x+1, y)<=0, y coordinate +1
[0121] F(x+1, y+1)+F(x, y+1)>=0, x coordinate +1
[0122] When k<0, we may as well assume that x e >x s (Because the starting point and end point can be interchanged) At this time, the equation of the line dy<0 is transformed as follows:
[0123] (yy s )dx-(-1)(xx s )dy=0
[0124] So: F(x, y) = (x s )dy-(yy s )dx
[0125] The three error values are now:
[0126] F(x+1,y-1)=F(x,y)+dx+dy
[0127] F(x+1,y)=F(x,y)+dy=F(x+1,y+1)-dx
[0128] F(x,y-1)=F(x,y)+dx=F(x+1,y-1)-dy
[0129] We can get: F(x, y-1)>=F(x+1, y-1)>=F(x+1, y)
[0130] The discriminant at this time is:
[0131] F(x+1,y-1)+F(x+1,y)<=0, y coordinate-1
[0132] F(x+1, y-1)+F(x, y-1)>=0, x coordinate +1
[0133] In summary, no matter whether k is positive or negative, as long as x s <x e ,but:
[0134] F(x+1, y+θ')+F(x+1, y)<=0, then y coordinate +θ'
[0135] F(x+1, y+θ')+F(x, y+θ')>=0, then x coordinate +1
[0136] When k>=0, θ'=1, and when k<0, θ'=-1.
[0137] If we change k to the sign of dx and dy, then:
[0138] F(x+sx, y+sy)+F(x+sx, y)<=0, then y coordinate +sy
[0139] F(x+sx, y+sy)+F(x, y+sy)>=0, then x coordinate +sx
[0140] Among them: when dx>=0, sx=1, when dx<0, sx=-1; when dy>=0, sy=1, when dy<0, sy=-1.
[0141] Step 507: Determine whether the first integer grid point is reachable to the next detection point in the extension direction, the next detection point in the extension direction of the first integer grid point is a second integer grid point, and the second integer grid point is within a preset grid distance from the second intersection point.
[0142] In the embodiment of the present invention, an integer grid point within a preset grid distance from the second intersection point is referred to as a second integer grid point. The second integer grid point is the next detection point in the extension direction of the first integer grid point.
[0143] In an embodiment of the present invention, it is determined whether a first integer grid point is reachable from a second integer grid point.
[0144] Step 508: If it is reachable, determine that there is no dynamic obstacle between the first integer grid point and the second integer grid point.
[0145] In this embodiment of the present invention, if the first integer grid point is reachable from the second integer grid point, then it is determined that there are no dynamic obstacles between the first integer grid point and the second integer grid point. In other words, there are no dynamic obstacles between the first intersection point and the second intersection point. If the first integer grid point is unreachable from the second integer grid point, then it is determined that there are dynamic obstacles between the first integer grid point and the second integer grid point (in other words, there are dynamic obstacles between the first intersection point and the second intersection point), and the next global path planning is performed again.
[0146] Step 509: repeat steps 506, 507 and 508. If the node is unreachable, the repetitive process stops.
[0147] In the embodiment of the present invention, step 506, step 507 and step 508 are repeated. If unreachable occurs, the repetitive process stops.
[0148] The above step 403, i.e., "if the detection result shows that there is no dynamic obstacle, determining the position of the robot after it advances a first preset distance as the first position" will be described in detail below in conjunction with an embodiment of the present invention.
[0149] In this embodiment of the present invention, if the detection result indicates that there are no dynamic obstacles, the position of the robot after advancing the first predetermined distance is determined to be the first position. It should be noted that this first position may deviate from the expected second turning point or end point. The error compensation mentioned in step 402 is performed using this position deviation, as detailed in step 404.
[0150] In the embodiment of the present invention, if the detection result shows that there is a dynamic obstacle, it is determined to re-perform the next global path planning.
[0151] The following describes in detail step 404 in conjunction with an embodiment of the present invention, namely, "if the robot rotates a second angle at a first position, dynamic obstacle collision detection is performed during the process of the robot moving from the first position to a third turning point or an end point at a second preset distance from the first position, the second angle being the angle difference between the heading angle of the robot before the robot rotates at the first position and the second path direction, and the second path direction being the path direction of a line connecting the first position of the robot and the third turning point."
[0152] In an embodiment of the present invention, if the robot rotates by a second angle from a first position, dynamic obstacle collision detection is performed while the robot is moving from the first position to a third turning point or an end point located a second predetermined distance from the first position. The second angle is the difference between the robot's heading angle before the rotation at the first position and the second path direction. The second path direction is the path direction of a line connecting the robot's first position and the third turning point.
[0153] It should be noted that the second angle is the angular difference between the heading angle of the robot before it rotates at the first position and the second path direction, rather than the angular difference between the heading angle of the robot before it rotates at the second turning point and the path direction of the line connecting the second turning point and the third turning point, so as to compensate for the steering angle error and cumulative angle error mentioned in step 402 at the first position.
[0154] The above step 405, i.e., "if the detection result shows that there is no dynamic obstacle, determining the position of the robot after it advances a second preset distance as the second position" will be described in detail below in conjunction with an embodiment of the present invention.
[0155] In an embodiment of the present invention, if the detection result is that there are no dynamic obstacles (i.e., there are no dynamic obstacles in the process of the robot moving from the first position to the third turning point or end point at the second preset distance from the first position), the position of the robot after moving the second preset distance is determined to be the second position.
[0156] It should be noted that if the detection result shows that there is a dynamic obstacle, it is determined to re-perform the next global path planning.
[0157] The following describes in detail step 406 in conjunction with an embodiment of the present invention, namely, "repeat steps 404 and 405 for the third turning point, ..., and the M-1 turning point. If, during the repetition process, it is determined that the detection result is that there is a dynamic obstacle, the repetition process stops, and the N+1th global path planning is performed again with the current position of the robot as the starting point, and the process jumps to step 401. If, during the repetition process, it is determined that the detection results are all that there are no dynamic obstacles, the repetition process stops after the robot reaches the end point."
[0158] In an embodiment of the present invention, the aforementioned steps 404 and 405 are repeated for the third turning point, ..., and the M-1 turning point. If, during the repetitive process, it is determined that the detection result is that there is a dynamic obstacle, the repetitive process stops, and the N+1th global path planning is performed again with the current position of the robot as the starting point, and the process jumps to step 401. If, during the repetitive process, it is determined that the detection results are all that there are no dynamic obstacles, the repetitive process stops after the robot reaches the end point.
[0159] For example, if the robot rotates by a third angle at the second position, a dynamic obstacle collision detection is performed while the robot moves from the second position to the fourth turning point or end point at a third preset distance from the second position. If the detection result indicates that there is a dynamic obstacle, the N+1th global path planning is performed again with the current position of the robot (i.e., the second position) as the starting point, and the process jumps to step 401. If the detection result indicates that there is no dynamic obstacle, step 405 is performed. The third angle is the angular difference between the heading angle of the robot before the robot rotates at the second position and the third path direction. The third path direction is the path direction of the line connecting the second position of the robot and the fourth turning point. Similar to the compensation of the steering angle error and the cumulative angle error mentioned in step 402 at the first position mentioned in step 404, the third angle is the angle difference between the heading angle of the robot before it rotates at the second position and the third path direction, rather than the angle difference between the heading angle of the robot before it rotates at the third turning point and the path direction of the line connecting the third turning point and the fourth turning point, so as to compensate for the steering angle error in the process of the robot rotating the third angle at the second position and the cumulative angle error in the process of the robot moving from the second position to the fourth turning point or the end point at a third preset distance from the second position.
[0160] The beneficial effect of the technical solution provided by the embodiment of the present invention is that: when the robot moves from the first turning point to the second turning point or the end point at a first preset distance from the first turning point, the steering angle error of the robot at the first turning point and the cumulative angle error during the forward movement are ignored, and dynamic obstacle collision detection is performed. If the detection result is that there is no dynamic obstacle, the current position of the robot is determined to be the first position after moving forward for the first preset distance. There may be a position deviation between the first position and the expected second turning point or end point. If the robot rotates by a second angle at the first position, dynamic obstacle collision detection is performed when the robot moves from the first position to the third turning point or the end point at a second preset distance from the first position. The second angle is the angular difference between the heading angle of the robot before rotating at the first position and the second path direction, rather than the angular difference between the heading angle of the robot before rotating at the second turning point and the path direction of the line connecting the second turning point and the third turning point, thereby compensating for the steering angle error and the cumulative angle error at the first position. As the robot advances from a first position to a third turning point or an end point that is a second preset distance from a second turning point, the robot's steering angle error at the first position and the accumulated angle error during the advance are ignored, and dynamic obstacle collision detection is performed. If the detection result indicates that there is no dynamic obstacle, the robot's position after advancing the second preset distance is determined to be the second position. This step is repeated for subsequent turning points until the robot reaches the end point. If the detection result indicates that there is a dynamic obstacle, the next global path planning is repeated. This embodiment of the present invention implements dynamic obstacle collision detection for the robot during path planning, improving the accuracy of path planning by compensating for the steering angle error and accumulated angle error at the first position. If the robot rotates by a first angle at the first turning point, the robot's current detection point A and detection point B, which are located at a preset expansion distance from the current detection point A, are determined as the robot advances from the first turning point to a second turning point or an end point that is a first preset distance from the first turning point. Dynamic obstacle collision detection is then performed between the current detection point A and detection point B. By setting a preset expansion distance, the present invention realizes that when there are dynamic obstacles, global path planning only needs to start from the current detection point, without having to start from the previous turning point of the current detection point, thereby reducing the number of global path points read and improving calculation efficiency.
[0161] According to another embodiment, a path planning device is provided. Figure 7 FIG. 1 shows a schematic block diagram of the path planning device according to an embodiment. Figure 7As shown, the apparatus 700 may include: a global path point acquisition module 701, a first dynamic obstacle collision detection module 702, a first position determination module 703, a second dynamic obstacle collision detection module 704, a second position determination module 705, and a processing module 706. The main functions of each component module are as follows:
[0162] The global path point acquisition module 701 is used to obtain M global path points corresponding to the Nth global path planning, where the M global path points include M-1 turning points and an end point, where M is an integer greater than or equal to 2, and N is an integer greater than or equal to 1.
[0163] The first dynamic obstacle collision detection module 702 is used to perform dynamic obstacle collision detection when the robot rotates a first angle at a first turning point, and then moves from the first turning point to a second turning point or an end point at a first preset distance from the first turning point. The first angle is the angle difference between the heading angle of the robot before the robot rotates at the first turning point and the first path direction, and the first path direction is the path direction of the line connecting the first turning point and the second turning point where the robot is located.
[0164] The first position determining module 703 is configured to determine the position of the robot after it advances the first preset distance as the first position if the detection result shows that there is no dynamic obstacle.
[0165] The second dynamic obstacle collision detection module 704 is used to perform dynamic obstacle collision detection when the robot rotates a second angle at the first position, and then moves from the first position to the third turning point or the end point at a second preset distance from the first position. The second angle is the angle difference between the heading angle of the robot before the rotation at the first position and the second path direction, and the second path direction is the path direction of the line connecting the first position of the robot and the third turning point.
[0166] The second position determining module 705 is configured to determine the position of the robot after it advances the second preset distance as the second position if the detection result shows that there is no dynamic obstacle.
[0167] Processing module 706 is used to repeat the functions of the second dynamic obstacle collision detection module and the second position determination module for the third turning point, ..., and the M-1th turning point. If, during the repeated process, the detection result is determined to be the presence of a dynamic obstacle, the repeated process is stopped, and the N+1th global path planning is performed again with the current position of the robot as the starting point, and the process jumps to the global path point acquisition module. If, during the repeated process, the detection results are determined to be the absence of dynamic obstacles, the repeated process is stopped after the robot reaches the end point.
[0168] In one possible implementation, the first dynamic obstacle collision detection module 702 is specifically configured to, if the robot rotates a first angle at a first turning point, determine a current detection point A of the robot and a detection point B at a preset expansion distance from the current detection point A while the robot moves from the first turning point to a second turning point or an end point at a first preset distance from the first turning point;
[0169] Dynamic obstacle collision detection is performed between the current detection point A and the detection point B.
[0170] In a possible implementation, the global path point acquisition module 701 is specifically configured to acquire M global path points corresponding to the Nth global path planning based on the Nth global path planning map.
[0171] In a possible implementation, a two-dimensional coordinate system is built on the N-th global path planning map;
[0172] The first dynamic obstacle collision detection module 702 is further specifically used to rasterize the Nth global path planning map to obtain a rasterized map; determine that the current detection point A and the detection point B form a straight line AB; determine the intersection of the straight line AB with each vertical grid line of the rasterized map; determine the first integer grid point within a preset grid distance from the first intersection; if it is reachable from the current detection point A to the first integer grid point, then determine that there is no dynamic obstacle between the current detection point A and the first intersection; determine the extension direction of the next detection point relative to the first integer grid point, the extension direction being the horizontal axis direction, the vertical axis direction or the oblique direction of the two-dimensional coordinate system; determine the first integer grid point to the next detection point in the extension direction Whether it is reachable, the next detection point in the extension direction is a second integer grid point, and the second integer grid point is within a preset grid distance from the second intersection point; if it is reachable, it is determined that there are no dynamic obstacles between the first integer grid point and the second integer grid point; repeat the following process: determine the extension direction of the next detection point relative to the first integer grid point, the extension direction being the horizontal axis direction, the vertical axis direction, or the oblique direction of the two-dimensional coordinate system; determine whether it is reachable from the first integer grid point to the next detection point in the extension direction, the next detection point in the extension direction being a second integer grid point, and the second integer grid point is within a preset grid distance from the second intersection point; if it is reachable, it is determined that there are no dynamic obstacles between the first integer grid point and the second integer grid point. If it is unreachable, the repetitive process stops.
[0173] In a possible implementation, the apparatus further includes a first global path planning module, which is located after the first dynamic obstacle collision detection module 702 and is configured to determine to re-perform the next global path planning if the detection result indicates that there is a dynamic obstacle.
[0174] In a possible implementation, the apparatus further includes: a second global path planning module, which is located after the second dynamic obstacle collision detection module 704 and is configured to determine to re-perform the next global path planning if the detection result indicates that there is a dynamic obstacle.
[0175] In one possible implementation, the apparatus further includes a third global path planning module configured to determine whether the distance from the first integer grid point to the next detection point in the expansion direction is reachable, and if not reachable, determine that there is a dynamic obstacle between the first integer grid point and the second integer grid point, and perform global path planning again.
[0176] In one possible implementation, the robot is a centaur robot.
[0177] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant parts, refer to the partial description of the method embodiment. The device embodiment described above is only exemplary, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without making any creative efforts.
[0178] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of any one of the methods in the aforementioned method embodiments are implemented.
[0179] And an electronic device comprising:
[0180] one or more processors; and
[0181] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of any one of the method embodiments described above.
[0182] An embodiment of the present invention further provides a computer program product, comprising a computer program, which implements the steps of any one of the methods described in the aforementioned method embodiments when executed by a processor.
[0183] in, Figure 8 The electronic device architecture is shown as an example, and may include a processor 810, a video display adapter 811, a disk drive 812, an input / output interface 813, a network interface 814, and a memory 820. The processor 810, the video display adapter 811, the disk drive 812, the input / output interface 813, the network interface 814, and the memory 820 may be communicatively connected via a communication bus 830.
[0184] The processor 810 may be implemented as a general-purpose CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and may be used to execute relevant programs to implement the technical solutions provided by the embodiments of the present invention.
[0185] The memory 820 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 820 can store an operating system 821 for controlling the operation of the electronic device 800 and a basic input and output system (BIOS) 822 for controlling the low-level operations of the electronic device 800. In addition, a web browser 823, a data storage management system 824, and a path planning device 825, etc. can also be stored. The above-mentioned path planning device 825 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present invention. In short, when the technical solution provided by the embodiment of the present invention is implemented by software or firmware, the relevant program code is stored in the memory 820 and is called and executed by the processor 810.
[0186] The input / output interface 813 is used to connect an input / output module to implement information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Among them, input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.
[0187] The network interface 814 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).
[0188] The bus 830 comprises a pathway for transmitting information between the various components of the device (eg, the processor 810 , the video display adapter 811 , the disk drive 812 , the input / output interface 813 , the network interface 814 , and the memory 820 ).
[0189] It should be noted that although the above device only shows the processor 810, video display adapter 811, disk drive 812, input / output interface 813, network interface 814, memory 820, bus 830, etc., in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may also include only the components necessary to implement the solution of the present application, and does not necessarily include all the components shown in the figure.
[0190] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0191] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the embodiments of the present invention have been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A path planning method, characterized in that: include: Step 401: Obtain M global path points corresponding to the Nth global path planning, wherein the M global path points include M-1 turning points and an end point, where M is an integer greater than or equal to 2, and N is an integer greater than or equal to 1. Step 402: If the robot rotates by a first angle at a first turning point, dynamic obstacle collision detection is performed while the robot moves from the first turning point to a second turning point or an end point that is a first preset distance from the first turning point, where the first angle is the difference between the heading angle of the robot before the robot rotates at the first turning point and a first path direction, where the first path direction is the path direction of a line connecting the first turning point and the second turning point where the robot is located. Step 403: If the detection result shows that there is no dynamic obstacle, the position of the robot after moving forward the first preset distance is determined as the first position; Step 404: If the robot rotates by a second angle at the first position, dynamic obstacle collision detection is performed while the robot moves from the first position to a third turning point or the end point at a second preset distance from the first position, where the second angle is the angular difference between the heading angle of the robot before the rotation at the first position and a second path direction, where the second path direction is the path direction of a line connecting the first position of the robot and the third turning point. Step 405: If the detection result shows that there is no dynamic obstacle, the position of the robot after moving forward the second preset distance is determined as the second position; Step 406: Repeat steps 404 and 405 for the third turning point, ..., and the M-1 turning point. If, during the repetition process, the detection result indicates that there is a dynamic obstacle, the repetition process stops and the N+1th global path planning is performed again starting from the current position of the robot, and the process jumps to step 401. If, during the repetitive process, it is determined that the detection results show that there are no dynamic obstacles, the repetitive process stops after the robot reaches the end point.
2. The method according to claim 1, characterized in that If the robot rotates a first angle at a first turning point, dynamic obstacle collision detection is performed during the process of the robot moving from the first turning point to a second turning point or an end point that is a first preset distance away from the first turning point, including: If the robot rotates by a first angle at a first turning point, determining a current detection point A at which the robot is located and a detection point B at a preset expansion distance from the current detection point A during a process in which the robot moves from the first turning point to a second turning point or an end point at a first preset distance from the first turning point; Dynamic obstacle collision detection is performed between the current detection point A and the detection point B.
3. The method according to claim 2, characterized in that The obtaining of M global path points corresponding to the Nth global path planning includes: Based on the Nth global path planning map, M global path points corresponding to the Nth global path planning are obtained.
4. The method according to claim 3, characterized in that A two-dimensional coordinate system is built on the Nth global path planning map; The performing dynamic obstacle collision detection between the current detection point A and the detection point B includes: Step 501, rasterizing the Nth global path planning map to obtain a rasterized map; Step 502: Determine whether the current detection point A and the detection point B form a straight line AB; Step 503, determining the intersection points of the straight line AB and each vertical grid line of the rasterized map; Step 504, determining a first integer grid point within a preset grid distance from the first intersection point; Step 505: If the current detection point A is reachable from the first integer grid point, determine that there is no dynamic obstacle between the current detection point A and the first intersection point; Step 506: Determine an extension direction of the next detection point relative to the first integer grid point, where the extension direction is the horizontal axis direction, the vertical axis direction, or an oblique direction of the two-dimensional coordinate system. Step 507: Determine whether the first integer grid point is reachable to the next detection point in the extension direction, where the next detection point in the extension direction is a second integer grid point, and the second integer grid point is within a preset grid distance from the second intersection point. Step 508: If reachable, determine that there is no dynamic obstacle between the first integer grid point and the second integer grid point; Step 509: repeat steps 506, 507 and 508. If the node is unreachable, the repetitive process stops.
5. The method according to any one of claims 1 to 4, characterized in that If the robot rotates by a first angle at the first turning point, then after performing dynamic obstacle collision detection during the process of the robot moving from the first turning point to a second turning point or an end point that is a first preset distance from the first turning point, the method further includes: If the detection result shows that there is a dynamic obstacle, the next global path planning is determined to be repeated.
6. The method according to any one of claims 1 to 4, characterized in that If the robot rotates by a second angle at the first position, then during the process of the robot moving from the first position to a third turning point or the end point at a second preset distance from the first position, after performing dynamic obstacle collision detection, the method further includes: If the detection result shows that there is a dynamic obstacle, the next global path planning is determined to be repeated.
7. The method according to claim 4, characterized in that After determining whether the first integer grid point is reachable to the next detection point in the extension direction, the method further includes: If it is unreachable, it is determined that there is a dynamic obstacle between the first integer grid point and the second integer grid point, and the next global path planning is performed again.
8. The method according to any one of claims 1 to 4, characterized in that The robot is a Centaur robot.
9. A path planning device, characterized in that: include: A global path point acquisition module, configured to acquire M global path points corresponding to the Nth global path planning, wherein the M global path points include M-1 turning points and an end point, where M is an integer greater than or equal to 2, and N is an integer greater than or equal to 1; a first dynamic obstacle collision detection module, configured to perform dynamic obstacle collision detection while the robot moves from the first turning point to a second turning point or an end point that is a first preset distance from the first turning point if the robot rotates by a first angle at a first turning point, wherein the first angle is an angular difference between a heading angle of the robot before the robot rotates at the first turning point and a first path direction, wherein the first path direction is a path direction connecting the first turning point and the second turning point where the robot is located; a first position determining module, configured to determine, if the detection result shows that there is no dynamic obstacle, the position of the robot after it advances the first preset distance as the first position; a second dynamic obstacle collision detection module, configured to perform dynamic obstacle collision detection while the robot moves from the first position to a third turning point or the end point at a second preset distance from the first position, if the robot rotates by a second angle at the first position, wherein the second angle is an angular difference between the heading angle of the robot before the rotation at the first position and a second path direction, wherein the second path direction is a path direction connecting the first position of the robot and the third turning point; a second position determination module, configured to determine, if the detection result shows that there is no dynamic obstacle, the position of the robot after it advances the second preset distance as the second position; a processing module configured to repeat the functions of the second dynamic obstacle collision detection module and the second position determination module for the third turning point, ..., and the M-1 turning point; if, during the repeated process, the detection result indicates the presence of a dynamic obstacle, the repeated process is terminated, and global path planning is performed again for the N+1th time starting from the current position of the robot, and the process is then transferred to the global path point acquisition module; If, during the repetitive process, it is determined that the detection results show that there are no dynamic obstacles, the repetitive process stops after the robot reaches the end point.
10. An electronic device, characterized in that: include: A memory and a processor, wherein the processor and the memory communicate with each other via a bus; The memory stores program instructions that can be executed by the processor, and the processor can execute the method according to any one of claims 1 to 8 by calling the program instructions.