Automatic obstacle avoiding and detouring method for mobile robot
Through the combination of lidar and A* algorithm, intelligent robot trolleys can plan paths in real time and calculate virtual radius to avoid obstacles, solving the problem of poor obstacle avoidance effects in complex environments and improving driving efficiency and obstacle avoidance accuracy.
Patent Information
- Application Number
- CN202411971693.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-30
AI Technical Summary
In complex operating environments, when an intelligent robot car encounters obstacles, its obstacle avoidance effect is poor and the optimal path cannot be planned, resulting in low driving efficiency.
The surrounding environment information is obtained through the lidar device, a grid map is formed, and the path point set is planned using the A* algorithm and interpolation method. Based on the virtual center point and safety point of the obstacle, calculate the virtual radius and re-plan the path points to achieve obstacle avoidance.
Real-time planning of the path is realized, the safety of obstacle avoidance and measurement accuracy is improved, and the mobile robot can avoid obstacles more reliably and improve driving efficiency.
Smart Images

Figure CN119759033A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of obstacle avoidance, and in particular relates to a method for automatically avoiding and circumventing obstacles for a mobile robot. Background Art
[0002] As human society continues to develop towards intelligence, intelligent robots are increasingly being used in all walks of life. Logistics companies are also beginning to turn their attention to warehouse automation and intelligence. Research on robot path algorithms in warehouse systems has practical significance for improving traditional logistics operation modes, improving logistics operation efficiency, and reducing the error rate of manual operations.
[0003] For an intelligent robot, obstacles may appear during its moving path. If obstacle avoidance and path planning determine the driving efficiency of the intelligent robot, how to solve the common problems in this field, such as unsatisfactory obstacle avoidance and failure to plan the optimal path when the operating environment of the robot car is relatively complex, is an issue that technical personnel in this field urgently need to solve.
[0004] In order to solve the above problems, a patent document with Chinese patent application number 202110482260.7 and publication date 2021.07.23 discloses an intelligent logistics path planning method and system, which includes: collecting environmental information and establishing a map based on the collected environmental information; representing the map through a two-dimensional array and rasterizing the map; setting the robot's starting point, end point, speed change rate and the obstacle's starting point, end point, coordinate axis speed change, safety distance and threat distance; performing global path planning based on the A* algorithm combined with the heuristic function to obtain the global optimal path; according to the global optimal path, the robot performs dynamic obstacle judgment during movement, and if a dynamic obstacle is encountered, the path is replanned, and if no dynamic obstacle is encountered, the path planning is completed; the system includes: a map establishment module, a map preprocessing module, a map initialization module, a global path planning module and a local dynamic obstacle avoidance module. This patent can complete the path planning from the starting point to the end point, and can automatically avoid dynamic obstacles during movement.
[0005] This method only uses the A* algorithm combined with a heuristic function to perform global path planning. When encountering an obstacle, it only rescans the QR code of the current location to determine the current location and replan the path. It cannot dynamically predict obstacles before encountering them, which can effectively save avoidance time and ensure effective obstacle avoidance. However, it cannot guarantee that the best avoidance path can be given when encountering obstacles. Summary of the invention
[0006] The purpose of the present invention is to provide a method for automatic obstacle avoidance and detour of a mobile robot. The method is based on whether the contour coordinates of the mobile robot on the planned path overlap with the virtual coordinates of the obstacle. If they overlap, a virtual radius is planned based on the virtual center of the obstacle and a safety point, and then a new path point is replanned to achieve avoidance. This method can plan the path in real time, and has higher safety and measurement accuracy.
[0007] To achieve the above object, a method for automatically avoiding obstacles for a mobile robot is provided, comprising the following steps: S1 uses a laser radar device to obtain information about the surrounding environment and form a grid map. It uses the A* algorithm and interpolation method to plan a set of path points within Q meters of the mobile robot's forward route and calculate the corresponding navigation angle.
[0008] S2 uses the laser radar device to determine whether there are obstacles on the forward route, calculates the outline coordinates of the obstacle, and then calculates the outline of the mobile robot and uses the nth path point as the center point of the mobile robot to determine the outline coordinates when the mobile robot reaches the nth path point; and determines whether the obstacle coincides with the path of the mobile robot to avoid the obstacle. S3 calculates the virtual center point of the obstacle according to the obstacle coordinate information scanned by the laser radar; the virtual center point of the obstacle is the average value of the obstacle coordinates obtained by scanning; S4 divides the obstacle scanning coordinates into left and right sides according to the forward route, and calculates the coordinates of the points on the left and right sides that are farthest from the virtual center of the obstacle (x z ,y z ), and select the coordinates of the point closest to the mobile robot (x x ,y x ) as the safe obstacle avoidance point, and then calculate the virtual radius of the obstacle according to the virtual center point of the obstacle through formula (1);
[0009] L is the length of the mobile robot, and ΔL is the reserved safety distance; S5 replans the safe points and generates the path according to the virtual center point and virtual radius of the obstacle; updates the virtual radius of the obstacle in real time, and replans the points if it becomes larger.
[0010] The above method obtains the original laser point cloud data through a multi-line laser radar device, initializes the grid map, uses the A* algorithm and the interpolation method to calculate the set of path points within n meters of the forward route, and calculates the corresponding navigation angle. The contour coordinates of the mobile robot at different points are inferred by the navigation angle, and then the laser radar device is used to determine whether there are obstacles in the forward route. If there are obstacles, the coordinates of the obstacle contour points are obtained by the supplementary method, and it is determined whether the obstacle coincides with the forward path of the mobile robot. If they coincide, the coordinates of the virtual center point are determined according to the contour point coordinates, and then the distance from the virtual center point is determined. The coordinates of the nearest and farthest points are obtained, and then the obstacle avoidance area path is determined based on the virtual center as the center of the circle, with the distance between the nearest point and the farthest point, half the length of the mobile robot and the sum of the reserved distance as the radius, so that the mobile robot can bypass according to the obstacle avoidance area path. In this way, the interpolation method can be used to predict in advance whether the obstacle overlaps with the mobile robot, and then the obstacle avoidance path is determined. The obstacle avoidance path passes through half the length of the mobile robot, the distance between the nearest and farthest points and the sum of the reserved distances, thereby ensuring that obstacles can be avoided more reliably and the accuracy of obstacle avoidance is ensured.
[0011] Further, step S3 includes:
[0012] (x k ,y k ) is the virtual center point of the obstacle; (x i ,y i ) is the obstacle coordinate information, i is the i-th position point on the obstacle, and m is the total number of points in the horizontal and vertical directions of the obstacle scan.
[0013] The above settings can obtain the coordinate information of the virtual center point of the obstacle through the obstacle coordinate information.
[0014] Furthermore, step S1 includes: the A* algorithm plans and connects each path point; the evaluation function of the A* algorithm is: f(n)=g(n)+h(n); n is the current path point, f(n) is the evaluation function from the starting point via the path point n to the target point; g(n) represents the actual cost from the starting point to the path point n; h(n) is an estimated value, representing the estimated cost from the path point n to the target point.
[0015] The above settings use the estimated value and actual cost value in the A* algorithm to determine the evaluation function, thereby evaluating whether the path meets the requirements, and if it does not meet the requirements, it is determined that the path is uneven, and then interpolation operations are performed through interpolation.
[0016] Furthermore, the interpolation method deletes the uneven path and reinserts new path points, inserting the path point coordinates (xn, yn), and the insertion point coordinate calculation formula is: xn=(x1+x2) / 2; yn=(y1+y2) / 2; (x1, y1) is the nearest path point to the left of the current insertion path point, and (x2, y2) is the nearest path point to the right of the current insertion point.
[0017] The above setting obtains new coordinates by taking the middle position of two coordinates, so that coordinates that cannot be directly obtained by laser radar scanning can be obtained by supplementary interpolation, thereby ensuring the reliability of the obtained path points.
[0018] Furthermore, through the formula Calculate the navigation angles of different points on the route. The route navigation angle for the nth path planning point.
[0019] The above settings prepare for the subsequent calculation of the navigation angle of the mobile robot by calculating the navigation angle of each path planning point.
[0020] Furthermore, the four corner coordinates of the mobile robot calculated according to the navigation angle are:
[0021] L is the length of the mobile robot, and W is the width of the mobile robot.
[0022] The above settings calculate the four-corner coordinates of the mobile robot through the navigation angle, which can more accurately determine whether the outline of the mobile robot overlaps or collides with an obstacle at a path point. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is the workflow of the present invention.
[0024] Figure 2 To plan the path point map.
[0025] Figure 3 Calculate the contour map for the mobile robot's forward points.
[0026] Figure 4 To calculate obstacle simulation center points and plan safety point maps.
[0027] Figure 5 It is an obstacle avoidance roadmap based on safe obstacle avoidance point planning. DETAILED DESCRIPTION
[0028] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0029] like Figure 1-5As shown, a method for automatically avoiding obstacles for a mobile robot is used for avoiding obstacles and planning paths for the mobile robot. A laser radar device is provided on the mobile robot. The steps include: The S1 laser radar device obtains information about the surrounding environment and forms point cloud data. It then determines the contours of the surrounding environment through the point cloud data and initializes the grid map. It uses the A* algorithm and interpolation method to calculate the set of path points within Q meters of the forward route and calculate the corresponding navigation angle.
[0030] The A* algorithm plans and connects each path node; the evaluation function of the A* algorithm is: f(n)=g(n)+h(n); n is the current path point, f(n) is the evaluation function from the starting point to the target point via the path point n; g(n) represents the actual cost from the starting point to the path point n; h(n) is an estimated value, representing the estimated cost from the path point n to the target point; The interpolation method deletes the uneven path and reinserts a new path point, the insertion point coordinates (xn, yn), and the insertion point coordinate calculation formula is: xn=(x1+x2) / 2; yn=(y1+y2) / 2; (x1, y1) is the nearest path point to the left of the current insertion path point, and (x2, y2) is the nearest path point to the right of the current insertion point.
[0031] By formula Calculate the navigation angles of different points on the route. is the route navigation angle of the nth waypoint.
[0032] S2 determines whether there are obstacles in the forward route through the laser radar device, calculates the outline coordinates of the obstacle, and then calculates the outline of the mobile robot when it reaches point n; the four corner coordinates of the outline of the mobile robot calculated according to the navigation angle are respectively:
[0033] L is the length of the mobile robot, and W is the width of the mobile robot.
[0034] The overall contour is calculated in the grid map using the interpolation method, and the coordinates of the moving robot and the obstacle are used to determine whether the robot overlaps or collides with the obstacle contour.
[0035] S3 uses the obstacle coordinate information (x i ,y i ), i is the i-th position point on the obstacle, m is the total number of points in the horizontal and vertical directions of the obstacle scan, and the following formula is used
[0036] Calculate the virtual center point of the obstacle; S4 divides the obstacle scanning coordinates into left and right sides according to the forward route, and calculates the coordinates of the points on the left and right sides that are farthest from the virtual center of the obstacle (x z ,y z ), and select the coordinates of the point closest to the mobile robot (x x ,y x ) as the safe obstacle avoidance point, and then calculate the virtual radius of the obstacle according to the virtual center point of the obstacle through formula (1); Safe distance; S5 replans the safe points and generates the path according to the virtual center point and virtual radius of the obstacle; updates the virtual radius of the obstacle in real time, and replans the points if it becomes larger.
[0037] like Figure 2-5 As shown, the mobile robot 1 moves on a forward path 2, and there is an obstacle 3 in front of it. The virtual center point position 30 of the obstacle, as well as the nearest point 32 and the farthest point 33 on the left and right sides of the forward path 2 are determined, and then the safety planning point 31 is determined based on it.
[0038] The working principle of the present invention is as follows: the original laser point cloud data is obtained by the laser radar device, the grid map is initialized, the path point set within n meters of the forward route is calculated by using the A* algorithm and the interpolation method, and the corresponding navigation angle is calculated. The contour coordinates of the mobile robot at different points are inferred by the navigation angle, and then the laser radar device is used to determine whether there are obstacles in the forward route. If there are obstacles, the coordinates of the obstacle contour points are obtained by the supplementary method, and it is determined whether the obstacle coincides with the forward path of the mobile robot. If they coincide, the coordinates of the virtual center point are determined according to the contour point coordinates, and then the distance from the virtual center is determined. The coordinates of the nearest and farthest points of the point are calculated, and then the obstacle avoidance area path is determined based on the virtual center as the center of the circle, with the distance between the nearest point and the farthest point, half the length of the mobile robot and the sum of the reserved distance as the radius, so that the mobile robot can bypass according to the obstacle avoidance area path. In this way, the interpolation method can be used to predict in advance whether the obstacle overlaps with the mobile robot, and then the obstacle avoidance path is determined. The obstacle avoidance path passes through half the length of the mobile robot, the distance between the nearest and farthest points and the sum of the reserved distances, thereby ensuring that obstacles can be avoided more reliably and the accuracy of obstacle avoidance is ensured.
Claims
1. A method for automatically avoiding obstacles for a mobile robot, characterized in that: The following steps are involved: S1 uses the laser radar device to obtain the surrounding environment information and form a grid map, uses the A* algorithm and interpolation method to plan the path point set within m meters of the mobile robot's forward route, and calculates the corresponding navigation angle; S2 uses the laser radar device to determine whether there are obstacles on the forward route, calculates the outline coordinates of the obstacle, and then calculates the outline of the mobile robot and uses the nth path point as the center point of the mobile robot to determine the outline coordinates when the mobile robot reaches the nth path point; and determines whether the obstacle coincides with the path of the mobile robot to avoid the obstacle. S3 calculates the virtual center point of the obstacle according to the obstacle coordinate information scanned by the laser radar; the virtual center point of the obstacle is the average value of the obstacle coordinates obtained by scanning; S4 divides the obstacle scanning coordinates into left and right sides according to the forward route, and calculates the coordinates of the points on the left and right sides that are farthest from the virtual center of the obstacle (x z ,y z ), and select the coordinates of the point closest to the mobile robot (x x ,y x ) as the safe obstacle avoidance point, and then calculate the virtual radius of the obstacle according to the virtual center point of the obstacle through formula (1); L is the length of the mobile robot, and ΔL is the reserved safety distance; S5 replans the safe points and generates the path according to the virtual center point and virtual radius of the obstacle; updates the virtual radius of the obstacle in real time, and replans the points if it becomes larger.
2. The method for automatically avoiding obstacles by a mobile robot according to claim 1, characterized in that: Step S3 includes: (x k ,y k ) is the virtual center point of the obstacle; (x i ,y i ) is the obstacle coordinate information, i is the i-th position point on the obstacle, and m is the total number of points in the horizontal and vertical directions of the obstacle scan.
3. The method for automatically avoiding obstacles by a mobile robot according to claim 1, characterized in that: Step S1 includes: the A* algorithm plans and connects various path points; the evaluation function of the A* algorithm is: f(n)=g(n)+h(n); n is the current path point, f(n) is the evaluation function from the starting point via the path point n to the target point; g(n) represents the actual cost from the starting point to the path point n; h(n) is an estimated value, representing the estimated cost from the path point n to the target point.
4. The method for automatically avoiding obstacles by a mobile robot according to claim 1, characterized in that: By formula Calculate the navigation angles of different points on the route. The route navigation angle for the nth path planning point.
5. The method for automatically avoiding obstacles by a mobile robot according to claim 1, characterized in that: The four corner coordinates of the mobile robot contour calculated according to the navigation angle are: L is the length of the mobile robot, and W is the width of the mobile robot.
Citation Information
Patent Citations
2D route planning method for UUV to round rectangular obstacles geometrically
CN106020213A
Autonomous obstacle avoidance method based on laser radar perception and AGV (Automatic Guided Vehicle)
CN118331262A
Cleaning robot control method and device, cleaning robot and storage medium
CN118592839A
Cleaning robot control method, cleaning robot and storage medium
CN118592840A
Mobile robot
JP2006107475A