A path optimization method and system for robot obstacle avoidance in complex environments

Through the combination of the global path planner and the cost map algorithm, the robot path points are optimized to ensure a safe distance, which solves the problem in the existing technology that the path planning distance is too close to obstacles or cannot pass through narrow gaps, and achieves a safer and more versatile path. planning.

CN117631670BActive Publication Date: 2024-10-11SHANNXI MINGTAI ELECTRONICS SCI & TECH DEV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311635042.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-01
Publication Date
2024-10-11
Estimated Expiration
2043-12-01

AI Technical Summary

Technical Problem

The existing robot global path planning algorithm does not consider the width of the robot itself, resulting in problems such as the planned path being too close to obstacles or being unable to pass through narrow gaps, especially in complex environments, which increases the risk of collision.

Method used

A path optimization method for robot obstacle avoidance in complex environments is proposed. Through the global path planner, global path optimization algorithm and cost map algorithm, obstacles are classified and path points are optimized according to safe distances to generate the optimal global path, which is suitable for a variety of applications. Mainstream global path planning algorithm.

Benefits of technology

It effectively solves the problem of the path being too close to obstacles or being unable to pass through narrow gaps, improving the feasibility and safety of the path, and the method is simple and highly versatile.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117631670B_ABST
    Figure CN117631670B_ABST
Patent Text Reader

Abstract

The present invention discloses a path optimization method for robot obstacle avoidance in a complex environment, which includes optimizing the global path using a global path optimization algorithm to obtain an optimal global path, publishing the optimal global path to a local path planner, obtaining a local path plan, and finally publishing the path. The present invention can effectively improve the problems that the path obtained by the traditional global path planning algorithm is close to the obstacle or cannot pass through a narrow gap, and is suitable for a variety of global path planning algorithms such as the Digkstra algorithm, the A* algorithm, and the RRT algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of robot path planning, and more specifically, relates to a path optimization method and system for robot obstacle avoidance in a complex environment. Background Art

[0002] Currently commonly used robot global path planning algorithms, such as the traditional Digkstra algorithm, A* algorithm, and RRT algorithm, all perform calculations based on the robot's center coordinates, without considering the robot's own width. In addition, most global path planning algorithms prioritize the shortest path, which causes the planned path to be close to obstacles, and sometimes may cause scratches or even collisions. In addition, in certain complex environments such as narrow gaps, the distance between obstacles is small. When traditional algorithms are used for path planning, there will be a situation where the distance between obstacles in the planned path is smaller than the robot's own width, causing the unmanned vehicle to be unable to pass, increasing the probability of the unmanned vehicle colliding with obstacles.

[0003] With the development of robot path planning technology, many optimization algorithms have been proposed. For example, Chinese invention patent CN116576844A discloses a mobile robot path planning method and system considering narrow channels, including a map construction module, an initial path solution module and a path optimization module; map construction module: modeling and describing the environment in which the robot is located, including narrow channels; initial path solution module: the improved RRT algorithm integrates the detection mechanism of narrow channels, starting from a given starting point, by searching the configuration space, generating new nodes, and continuously expanding the tree structure constructed by randomly sampled configuration points, to find a collision-free path from the initial position to the target position; path optimization module: based on the RRT algorithm integrating the narrow channel detection mechanism, the path node search method is improved, the initial path is optimized, the parent node is found and an asymptotically optimal optimization path is found. However, this optimization algorithm is mainly implemented based on the RRT algorithm, which is not applicable to robots using other algorithms such as the Digkstra algorithm and the A* algorithm, and this optimization method requires changing the underlying algorithm in the robot's global path planner, and its portability is not high. Summary of the invention

[0004] In order to solve the above problems, the present invention proposes a path optimization method and system for robot obstacle avoidance in a complex environment to optimize the global path of the robot.

[0005] The technical solution adopted by the present invention to solve the technical problem is: a path optimization method and system for robot obstacle avoidance in a complex environment, the path optimization method comprising the following steps:

[0006] Step 1: After the target point is released, the global path planner calculates the global path. The set of coordinate points on the global path is {(x1,y1),(x2,y2),(x3,y3)...,(x n ,y n )};

[0007] Step 2: Classify the obstacle coordinates and store them in buffer A and buffer B respectively. The classification method is as follows: Starting from n=1, calculate the coordinates of two adjacent path points on the global path obtained in step 1 (x n ,y n ) and (x n+1 ,y n+1 ) is y=kx+b, where k is the slope of the line and b is the vertical intercept of the line. Calculate the two lines perpendicular to the path and passing through the two path points. Take the coordinates of all obstacle points between the two lines as {(x o1 ,y o1 ),(x o2 ,y o2 ),(x o3 ,y o3 )...,(x on ,y on )}; The distance difference parameter mun value from the obstacle point to the path:

[0008]

[0009] The obstacle coordinates (x on ,y on ) into buffer A, the obstacle coordinates (x on ,y on ) into buffer B;

[0010] Step 3: If both buffers A and B are not empty, it means that the waypoint is between two obstacles. The waypoint is fed back to the cost map algorithm, marked as impassable, and step 4 is executed; if one of buffers A and B is not empty, step 5 is executed;

[0011] Step 4: Repeat steps 1 to 3. The number of repetitions is the length of the path rounded up, where the length unit is meters. If both buffers A and B are not empty within the specified number of times, the target point is unreachable.

[0012] Step 5: If one of the A and B buffers is not empty, then the coordinates (x n ,y n ) and (x n+1 ,y n+1) Calculate the x-axis movement component Δx and the y-axis movement component Δy. The calculation process is as follows:

[0013] Calculate the angle rad between the global path obtained in step 1 and the X-axis:

[0014]

[0015] Calculate the coordinates of the obstacle points in the A and B buffers {(x o1 ,y o1 ),(x o2 ,y o2 ),(x o3 ,y o3 )...,(x on ,y on )} and the coordinate point (x n ,y n ) distance:

[0016]

[0017] Take d n The minimum value is d min =min(d n );

[0018] The distance the global path needs to move is distance = d safe -d min , where d safe The safe distance between the obstacle and the vehicle body is set;

[0019] The X-axis movement component is: Δx = |distance×sin(rad);

[0020] The Y-axis movement component is: Δy = |distance × cos (rad);

[0021] Step 6: If the A buffer is not empty and the B buffer is empty, the optimized path point coordinates are as follows:

[0022] Optimized X-axis coordinate

[0023] Optimized Y-axis coordinate y new =y n -Δy;

[0024] Step 7: If the A buffer is empty and the B buffer is not empty, the optimized path point coordinates are as follows:

[0025] Optimized X-axis coordinate

[0026] Optimized Y-axis coordinate y new =yn +Δy;

[0027] Step 8: Repeat steps 2 to 7 until all coordinate points {(x1,y1),(x2,y2),(x3,y3)...,(x n ,y n )}, thus obtaining the optimal global path;

[0028] Step 9: If there is an optimal global path, publish the optimal global path to the local path planner to obtain the local path.

[0029] A path optimization method and system for robot obstacle avoidance in a complex environment, the system comprising a global path planner, a global path optimization algorithm, a local path planner and a cost map algorithm;

[0030] The global path planner is used to generate a shortest path from a given starting point to a given destination;

[0031] The global path optimization algorithm is used to optimize the path generated by the global path planner according to the set safety distance to obtain the optimal global path;

[0032] The local path planner generates a local path based on the optimal global path obtained by the global path optimization algorithm;

[0033] The cost map algorithm generates a map data constrained global path planner based on robot sensor data, map information, optimal global path, and local path.

[0034] The beneficial effects are reflected in the following aspects:

[0035] 1. It can solve the problems that the path obtained by the traditional global path planning algorithm is close to obstacles or cannot pass through narrow gaps;

[0036] 2. The implementation method is simpler and is not limited to a certain global path algorithm. It is applicable to most of the current mainstream global path planning algorithms and has strong portability and versatility. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a path optimization method and system flow chart of a robot obstacle avoidance in a complex environment according to the present invention. DETAILED DESCRIPTION

[0038] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0039] like Figure 1 As shown, a path optimization method and system for robot obstacle avoidance in a complex environment of the present invention comprises the following steps:

[0040] Step 1: After the target point is released, the global path planner calculates the global path. The set of coordinate points on the global path is {(x1, y1), (x2, y2), (x3, y3)..., (xn, yn)};

[0041] Step 2: Classify the obstacle coordinates and store them in buffer A and buffer B respectively. The classification method is as follows: Starting from n=1, calculate the coordinates of two adjacent path points on the global path obtained in step 1 (x n ,y n ) and (x n+1 ,y n+1 ) is y=kx+b, where k is the slope of the line and b is the vertical intercept of the line. Calculate the two lines perpendicular to the path and passing through the two path points. Take the coordinates of all obstacle points between the two lines as {(x o1 ,y o1 ),(x o2 ,y o2 ),(x o3 ,y o3) ...,(x on ,y on )}; The distance difference parameter mun value from the obstacle point to the path:

[0042]

[0043] The obstacle coordinates (x on ,y on ) into buffer A, the obstacle coordinates (x on ,y on ) into buffer B;

[0044] Step 3: If both buffers A and B are not empty, it means that the waypoint is between two obstacles. The waypoint is fed back to the cost map algorithm, marked as impassable, and step 4 is executed; if one of buffers A and B is not empty, step 5 is executed;

[0045] Step 4: Repeat steps 1 to 3. The number of repetitions is the length of the path rounded up, where the length unit is meters. If both buffers A and B are not empty within the specified number of times, the target point is unreachable.

[0046] Step 5: If one of the A and B buffers is not empty, then the coordinates (x n ,y n ) and (x n+1 ,y n+1 ) Calculate the x-axis movement component Δx and the y-axis movement component Δy. The calculation process is as follows:

[0047] Calculate the angle rad between the global path obtained in step 1 and the X-axis:

[0048]

[0049] Calculate the coordinates of the obstacle points in the A and B buffers {(x o1 ,y o1 ),(x o2 ,y o2 ),(x o3 ,y o3 )...,(x on ,y on )} and the coordinate point (x n ,y n ) distance:

[0050]

[0051] Take the minimum value of dn as dmin=min(dn);

[0052] The distance that the global path needs to move is distance = dsafe - dmin, where dsafe is the set safe distance between the obstacle and the vehicle body;

[0053] The X-axis movement component is: Δx = |distance×sin(rad);

[0054] The Y-axis movement component is: Δy = |distance × cos (rad);

[0055] Step 6: If the A buffer is not empty and the B buffer is empty, the optimized path point coordinates are as follows:

[0056] Optimized X-axis coordinate

[0057] Optimized Y-axis coordinate y new =y n -Δy;

[0058] Step 7: If the A buffer is empty and the B buffer is not empty, the optimized path point coordinates are as follows:

[0059] Optimized X-axis coordinate

[0060] Optimized Y-axis coordinate y new =y n +Δy;

[0061] Step 8: Repeat steps 2 to 7 until all coordinate points {(x1,y1),(x2,y2),(x3,y3)...,(x n ,y n )}, thus obtaining the optimal global path;

[0062] Step 9: If there is an optimal global path, publish the optimal global path to the local path planner to obtain the local path.

[0063] A path optimization method and system for robot obstacle avoidance in complex environments is implemented by a path optimization system for robot obstacle avoidance in complex environments. The system consists of a global path planner, a global path optimization algorithm, a local path planner and a cost map algorithm.

[0064] The global path planner is used to generate a shortest path from a given starting point to a given destination;

[0065] The global path optimization algorithm is used to optimize the path generated by the global path planner according to the set safety distance to obtain the optimal global path;

[0066] The local path planner generates a local path based on the optimal global path obtained by the global path optimization algorithm;

[0067] The cost map algorithm generates a map data constrained global path planner based on robot sensor data, map information, optimal global path, and local path.

[0068] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.

Claims

1. A path optimization method for robot obstacle avoidance in a complex environment, characterized in that: The following steps are involved: Step 1: After the target point is released, the global path planner calculates the global path. The set of coordinate points on the global path is {(x1,y1),(x2,y2),(x3,y3)...,(x n ,y n )}; Step 2: Classify the obstacle coordinates and store them in buffer A and buffer B respectively. The classification method is as follows: Starting from n=1, calculate the coordinates of two adjacent path points on the global path obtained in step 1 (x n ,y n ) and (x n+1 ,y n+1 ) is y=kx+b, where k is the slope of the line and b is the vertical intercept of the line. Calculate the two lines perpendicular to the path and passing through the two path points. Take the coordinates of all obstacle points between the two lines as {(x o1 ,y o1 ),(x o2 ,y o2 ),(x o3 ,y o3 )...,(x on ,y on )}; The distance difference parameter mun value from the obstacle point to the path: The obstacle coordinates (x on ,y on ) into buffer A, the obstacle coordinates (x on ,y on ) into buffer B; Step 3: If both buffers A and B are not empty, it means that the waypoint is between two obstacles. The waypoint is fed back to the cost map algorithm, marked as impassable, and step 4 is executed; if one of buffers A and B is not empty, step 5 is executed; Step 4: Repeat steps 1 to 3. The number of repetitions is the length of the path rounded up, where the length unit is meters. If both buffers A and B are not empty within the specified number of times, the target point is unreachable. Step 5: If one of the A and B buffers is not empty, then the coordinates (x n ,y n ) and (x n+1 ,y n+1 ) Calculate the x-axis movement component Δx and the y-axis movement component Δy. The calculation process is as follows: Calculate the angle rad between the global path obtained in step 1 and the X-axis: Calculate the coordinates of the obstacle points in the A and B buffers {(x o1 ,y o1 ),(x o2 ,y o2 ),(x o3 ,y o3 )...,(x on ,y on )} and the coordinate point (x n ,y n ) distance: Take d n The minimum value is d min =min(d n ); The distance the global path needs to move is distance = d safe -d min , where d safe The safe distance between the obstacle and the vehicle body is set; The X-axis movement component is: Δx = |distance×sin(rad)|; The Y-axis movement component is: Δy = |distance×cos(rad)|; Step 6: If the A buffer is not empty and the B buffer is empty, the optimized path point coordinates are as follows: Optimized X-axis coordinate Optimized Y-axis coordinate y new =y n -Δy; Step 7: If the A buffer is empty and the B buffer is not empty, the optimized path point coordinates are as follows: Optimized X-axis coordinate Optimized Y-axis coordinate y new =y n +Δy; Step 8: Repeat steps 2 to 7 until all coordinate points {(x1,y1),(x2,y2),(x3,y3)...,(x n ,y n )}, thus obtaining the optimal global path; Step 9: If there is an optimal global path, publish the optimal global path to the local path planner to obtain the local path.