Obstacle avoidance method for robot and application thereof
Patent Information
- Application Number
- CN202311370531.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2043-10-20
AI Technical Summary
[0004]本发明的目的是为了解决现有技术中的大多数机器人均是基于全方位的传感器进行避障,而无法在保证不发生碰撞的同时,最大程度上缩短起点和目的地终点之间的运动路径,存在运动能耗高,不利于机器人的长时间可持续运行,以及无法针对动态障碍物进行有效规避的问题,提供一种机器人用障碍规避方法及其应用
[0026] Simultaneously, by setting a set {p1, p2, p3, ... p} of the motion points of the dynamic obstacle within time k when a dynamic obstacle is detected, the system collects such a set. n The system calculates the trajectory and speed of dynamic obstacles based on the set of data, and then combines this with the robot's own speed to set a collision zone. It then determines whether the dynamic obstacle and the robot will enter the collision zone. If it determines that they will enter the collision zone, the robot slows down or stops and waits. If they will not enter the collision zone, the robot continues to move. In practical applications, this can further ensure that the robot has the ability to actively avoid dynamic obstacles, thereby effectively reducing the risk of collision.
Smart Images

Figure CN117590841B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent obstacle avoidance technology, specifically to an obstacle avoidance method for robots and its application. Background Technology
[0002] With the rapid development of artificial intelligence technology, robots are gradually being widely used in daily life. Obstacle avoidance is a key research focus in robot control. Currently, most robots rely on omnidirectional sensors for obstacle avoidance, but they cannot minimize the path between the starting point and the destination while ensuring collision avoidance. This leads to a significant increase in energy consumption, which is detrimental to the robot's long-term sustainable operation. Furthermore, while existing robots have good obstacle avoidance capabilities for static obstacles, they are ineffective at avoiding dynamic obstacles, still posing a significant risk of collision.
[0003] Therefore, there is an urgent need for an obstacle avoidance method for robots and its application to solve the above problems. Summary of the Invention
[0004] The purpose of this invention is to address the problems that most robots in the prior art rely on omnidirectional sensors for obstacle avoidance, which cannot minimize the movement path between the starting point and the destination while ensuring that collisions do not occur. This results in high energy consumption, which is not conducive to the long-term sustainable operation of the robot, and the inability to effectively avoid dynamic obstacles. The invention provides a robot obstacle avoidance method and its application.
[0005] To achieve the above objectives, a first aspect of the present invention provides a robot obstacle avoidance method, the robot obstacle avoidance method comprising:
[0006] S1. Establish a rectangular coordinate system about x and y with the robot as the origin, and draw a line segment u between the robot origin and the destination endpoint;
[0007] S2. The robot moves along the path of line segment u, and collects image information in real time during the movement. Based on the neural network model, it identifies static and dynamic obstacles in the image information. When a static obstacle is identified, the robot continues to move to the non-collision point closest to the static obstacle and marks it as (a1, b1).
[0008] S3. Make the robot start to move around the static obstacle. During the movement, continuously update the line segment n between the robot and the destination. When there is no current static obstacle in the line segment n during the movement, the movement ends and the robot moves towards the destination along the line segment n.
[0009] S4. If a static obstacle is identified again, the robot continues to move to the closest non-collision point to the static obstacle, marks this point as (a2, b2), and repeats step S3 until reaching the destination.
[0010] Preferably, when a dynamic obstacle is identified, a set of movement points {p1, p2, p3,…p n} of the dynamic obstacle within k time is collected, the movement trajectory and movement speed of the dynamic obstacle are calculated according to the set, and then a collision area is set in combination with the robot's own movement speed, and it is determined whether the dynamic obstacle and the robot will enter the collision area. If it is determined that they will enter the collision area, the robot reduces the movement speed or stops to wait; if they will not enter the collision area, the robot continues to move.
[0011] Preferably, the step of determining whether the dynamic obstacle and the robot will enter the collision area specifically comprises:
[0012] when z < r, the robot and the dynamic obstacle will enter the collision area; when z > r, they will not enter the collision area;
[0013] wherein, the collision area is a circular area with the robot as the center and r as the radius, V1 is the movement speed of the dynamic obstacle, V2 is the movement speed of the robot, θ is the angle of the dynamic obstacle relative to the robot with the horizontal reference line, h is the initial distance between the robot and the dynamic obstacle, and z is the distance between the robot and the dynamic obstacle after movement.
[0014] Preferably, in step S2, a camera, a lidar or an ultrasonic sensor is used to collect image information in real time during the movement.
[0015] Preferably, the neural network model comprises an image processing unit based on SLAM algorithm, which is configured to determine the relative positional relationship between the robot and an obstacle.
[0016] Preferably, the neural network model further comprises a path optimization unit configured to optimize the movement path of the robot.
[0017] Preferably, the path optimization unit comprises:
[0018]
[0019] wherein, s is the overall movement distance of the robot, l r is the sum of detour distances of the robot, is any non-detour movement distance of the robot without obstacles.
[0020] Preferably, the neural network model further comprises a movement process optimization unit configured to optimize the movement state of the robot.
[0021] Preferably, the motion process optimization unit includes:
[0022]
[0023] Where g is the endpoint guidance reward, c is the collision reward, osc is the robot's smooth operation reward, safedist is the distance reward between the robot and the obstacle, and r is the reward obtained.
[0024] The second aspect of the present invention provides the application of the aforementioned obstacle avoidance method for robots in an obstacle avoidance system for robots.
[0025] According to the above technical solution, based on the obstacle avoidance method for robots, the robot moves along the path of line segment u, and image information is collected in real time during the movement. A neural network model is used to identify static and dynamic obstacles in the image information. When a static obstacle is identified, the robot continues to move to the nearest non-collision point and begins to circumvent it. During this circumvention, the line segment n between the robot and the destination is continuously updated. When there is no current static obstacle in line segment n during the circumvention, the circumvention ends, and the robot moves along line segment n towards the destination. In practical applications, this method can effectively avoid static obstacles while shortening the distance the robot travels from the starting point to the destination, thereby effectively reducing unnecessary energy consumption and improving the robot's endurance.
[0026] Simultaneously, by setting a set {p1, p2, p3, ... p} of the motion points of the dynamic obstacle within time k when a dynamic obstacle is detected, the system collects such a set. n The system calculates the trajectory and speed of dynamic obstacles based on the set of data, and then combines this with the robot's own speed to set a collision zone. It then determines whether the dynamic obstacle and the robot will enter the collision zone. If it determines that they will enter the collision zone, the robot slows down or stops and waits. If they will not enter the collision zone, the robot continues to move. In practical applications, this can further ensure that the robot has the ability to actively avoid dynamic obstacles, thereby effectively reducing the risk of collision.
[0027] By setting the neural network model to include an image processing unit based on the SLAM algorithm, the relative positional relationship between the robot and obstacles can be determined. In practical applications, this can effectively improve the robot's accuracy in recognizing the distance to obstacles.
[0028] The neural network model also includes a path optimization unit, which optimizes the robot's motion path. In practical applications, this can further effectively shorten the robot's ineffective motion distance and reduce energy consumption.
[0029] The neural network model also includes a motion optimization unit, which optimizes the robot's motion state, effectively improving the stability of the robot's motion and avoiding collisions. Attached Figure Description
[0030] Figure 1 This is a flowchart of a robot's obstacle avoidance method;
[0031] Figure 2 This is a motion path diagram of the robot in Examples 1-3. Detailed Implementation
[0032] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0033] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating relative importance or implying the number of indicated technical features. Therefore, unless otherwise stated, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature; "multiple" means two or more. The term "comprising" and any variations thereof mean a non-exclusive inclusion, the possibility of the presence or addition of one or more other features, units, components, and / or combinations thereof.
[0034] The first aspect of this invention provides an obstacle avoidance method for robots, such as... Figure 1 As shown, the obstacle avoidance methods used by this robot include:
[0035] S1. Establish a rectangular coordinate system about x and y with the robot as the origin, and draw a line segment u between the robot origin and the destination endpoint;
[0036] S2. The robot moves along the path of line segment u, and collects image information in real time during the movement. Based on the neural network model, it identifies static and dynamic obstacles in the image information. When a static obstacle is identified, the robot continues to move to the nearest non-collision point of the static obstacle and marks it as (a1, b1). The non-collision point is the safest point on the line segment that is closest to the obstacle.
[0037] S3. The robot begins to move around the static obstacle. During the movement, the line segment n between the robot and the destination is continuously updated. When there is no current static obstacle in the line segment n during the movement, the movement ends and the robot moves towards the destination along the line segment n. In a specific implementation, the robot always uses the destination as a guide when moving around.
[0038] S4. If a static obstacle is identified again, the robot continues to move to the closest non-collision point from the static obstacle, marks it as (a2, b2), and repeats step S3 until reaching the destination.
[0039] According to the above technical solution, based on the obstacle avoidance method for a robot, in the actual application process, while effectively avoiding static obstacles, the movement distance of the robot moving from the starting point to the destination end point can be shortened, thereby effectively reducing unnecessary movement energy consumption and improving the endurance capacity of the robot.
[0040] In the obstacle avoidance method for a robot according to the present invention, in a preferred case, when a dynamic obstacle is identified, a set of movement points {p1,p2,p3,…p n} of the dynamic obstacle within k time is collected, the movement trajectory and movement speed of the dynamic obstacle are calculated according to the set, a collision area is set by combining the movement speed of the robot itself, and it is determined whether the dynamic obstacle and the robot will enter the collision area. If it is determined that they will enter the collision area, the robot reduces the movement speed or stops and waits; if they will not enter the collision area, the robot continues to move.
[0041] In a further preferred embodiment, said determining whether the dynamic obstacle and the robot will enter the collision area specifically comprises:
[0042] When z < r, the dynamic obstacle and the robot enter the collision area; when z > r, they will not enter the collision area;
[0043] Wherein, the collision area is a circular area with the robot as the center and a radius of r, V1 is the movement speed of the dynamic obstacle, V2 is the movement speed of the robot, θ is the angle of the dynamic obstacle with the robot as the horizontal reference line, h is the initial distance between the robot and the dynamic obstacle, and z is the distance between the robot and the dynamic obstacle after movement.
[0044] In the present invention, by further identifying dynamic obstacles, and based on the set of movement points {p1,p2,p3,…p nThe system calculates the trajectory and speed of dynamic obstacles, and then sets the collision zone based on the robot's speed. In actual operation, this effectively improves the robot's proactive prediction and avoidance capabilities against dynamic obstacles, thus avoiding the passive avoidance of dynamic obstacles by robots in existing technologies that rely on sensors, which still carries a significant collision risk. Furthermore, determining whether the robot and dynamic obstacles enter the collision zone based on the relationship between z and r further enhances the robot's proactive prediction and avoidance capabilities. More preferably, when the neural network model simultaneously identifies multiple dynamic obstacles, it sets collision zones for each obstacle and calibrates these zones according to collision priority, thereby further improving the robot's obstacle avoidance capabilities to meet the needs of applications in complex environments.
[0045] In the obstacle avoidance method for robots described in this invention, preferably, in step S2, a camera, LiDAR, or ultrasonic sensor is used to collect image information in real time during the movement. Since LiDAR and ultrasonic sensors are expensive, this invention uses a relatively inexpensive camera to collect image information in real time without affecting the accuracy of identifying static and dynamic obstacles. Furthermore, the neural network model includes an image processing unit based on the SLAM algorithm to determine the relative positional relationship between the robot and the obstacle. In practical applications, this effectively improves the robot's accuracy in recognizing obstacle distances and accurately calculates the robot's detour distance for each segment based on the coordinate system.
[0046] In the obstacle avoidance method for robots described in this invention, in a preferred embodiment, the neural network model further includes a path optimization unit for optimizing the robot's motion path.
[0047] In a further preferred embodiment, the path optimization unit includes:
[0048]
[0049] Where s is the total movement distance of the robot, l r This is the sum of the robot's travel distances. Let be any unobstructed, non-detour distance the robot can travel.
[0050] In this invention, because For any segment of unobstructed, non-detour movement distance of the robot (with the robot as the origin, dynamic), specifically as follows: Figure 2The point (a, b) represents the endpoint of the first unobstructed, non-detour straight line segment relative to the destination. From this point, the robot begins its detour around the static obstacle. Therefore, optimizing the robot's motion path primarily involves optimizing the detour distance. Specifically, the robot can detour around the same static obstacle multiple times, optimizing each inflection point during the detour process to further shorten the detour distance and reduce energy consumption. Wherein, l r This represents the sum of the robot's travel distances. The specific distance for each travel segment can be obtained based on the distance formula between two points in a coordinate system. In a specific implementation, the destination can also be considered a static obstacle, denoted as (a...). n b n ), to facilitate calculation.
[0051] In the obstacle avoidance method for robots described in this invention, in a preferred embodiment, the neural network model further includes a motion process optimization unit for optimizing the robot's motion state.
[0052] In a further preferred embodiment, the motion process optimization unit includes:
[0053]
[0054] Where g is the endpoint guidance reward, c is the collision reward, osc is the robot's smooth operation reward, safedist is the distance reward between the robot and the obstacle, and r is the reward obtained.
[0055] In this invention, the endpoint guidance reward is specifically defined as follows: when the robot's position is within a threshold range of the destination endpoint, the robot is considered to have reached the destination and receives a corresponding reward. The collision reward is specifically defined as follows: when the distance between the robot and an obstacle decreases to a threshold range, a collision is considered to have occurred, and a negative reward is received; otherwise, a positive reward is received, thus helping the robot avoid collisions. The robot smooth operation reward is specifically defined as follows: when the robot's angular velocity exceeds a certain threshold range, the robot's movement is considered to have deviated, and a negative reward is received; otherwise, a positive reward is received, thus making the robot's movement trajectory smoother. The distance reward between the robot and the obstacle is specifically defined as the reward for the distance between the robot and the obstacle. When the distance between the robot and the obstacle decreases to a certain threshold range during movement, a collision risk is considered to exist, and a negative reward is received; otherwise, a positive reward is received. Thus, in practical applications, this effectively improves the stability and safety of the robot's movement process and avoids collisions.
[0056] A second aspect of this invention provides the application of the aforementioned obstacle avoidance method for robots in a robot obstacle avoidance system. Specifically, for example, the robot obstacle avoidance system can be integrated into a transport robot.
[0057] The present invention will be described in detail below through embodiments, but the scope of protection of the present invention is not limited thereto.
[0058] Example 1
[0059] Will as Figure 1 The obstacle avoidance method for robots shown is applied to a robot obstacle avoidance system and integrated into the robot to enable the robot to move from the origin to the destination. Specifically, the robot obstacle avoidance method includes:
[0060] S1. Establish a rectangular coordinate system about x and y with the robot as the origin, and draw a line segment u between the robot origin and the destination endpoint;
[0061] S2. The robot moves along the path of line segment u, and collects image information in real time during the movement. Based on the neural network model, it identifies static and dynamic obstacles in the image information. When a static obstacle is identified, the robot continues to move to the non-collision point closest to the static obstacle and marks it as (a1, b1).
[0062] S3. Make the robot start to move around the static obstacle. During the movement, continuously update the line segment n between the robot and the destination. When there is no current static obstacle in the line segment n during the movement, the movement ends and the robot moves towards the destination along the line segment n.
[0063] S4. If another static obstacle is detected, the robot continues to move to the non-collision point closest to the static obstacle and marks it as (a2, b2), and repeats step S3 until it reaches the destination.
[0064] In step S2, a camera is used to collect image information in real time during the movement; the neural network model includes an image processing unit based on the SLAM algorithm, which is used to determine the relative positional relationship between the robot and the obstacles;
[0065] When a dynamic obstacle is detected, a set of the moving points {p1, p2, p3, ... p} of the obstacle within time k is collected. n The system calculates the trajectory and speed of the dynamic obstacle based on the set, and then combines this with the robot's own speed to set a collision zone. It then determines whether the dynamic obstacle and the robot will enter the collision zone. If it determines that they will enter the collision zone, the robot slows down or stops and waits. If they will not enter the collision zone, the robot continues to move.
[0066] The determination of whether dynamic obstacles and the robot will enter the collision zone specifically includes:
[0067] When z<r, the robot enters the collision area; when z>r, it does not enter the collision area;
[0068] wherein, the collision area is a circular area with the robot as the center and a radius of r, V1 is the movement speed of the dynamic obstacle, V2 is the movement speed of the robot, θ is the angle of the dynamic obstacle with the robot as the horizontal reference line, h is the initial distance between the robot and the dynamic obstacle, and z is the distance between the robot and the dynamic obstacle after movement.
[0069] In actual application, as Figure 2 shows, the robot first moves to (a, b) and then starts detouring. When there is no intersection between the line segment n between the robot and the destination and the current obstacle, the detouring ends, and the robot moves straight to the destination end point.
[0070] Detection shows that the robot applying the obstacle avoidance method for a robot according to the present invention can effectively avoid static obstacles while shortening the movement distance of the robot moving from the starting point to the destination end point, thereby effectively reducing unnecessary movement energy consumption, improving the endurance capacity of the robot, and realizing active predictive avoidance of dynamic obstacles.
[0071] Example 2
[0072] Implemented with reference to Example 1, the difference is that the neural network model further comprises a path optimization unit for optimizing the movement path of the robot, and the path optimization unit comprises:
[0073]
[0074] wherein, s is the total movement distance of the robot, l r is the sum of detouring distances of the robot, is any barrier-free non-detouring movement distance of the robot.
[0075] Detection shows that the robot applying the obstacle avoidance method for a robot according to the present invention can effectively avoid static obstacles while shortening the movement distance of the robot moving from the starting point to the destination end point, thereby effectively reducing unnecessary movement energy consumption, improving the endurance capacity of the robot, realizing active predictive avoidance of dynamic obstacles; meanwhile, it can further effectively shorten the ineffective movement distance of the robot and reduce energy consumption.
[0076] Example 3
[0077] Implemented with reference to Example 2, the difference is that the neural network model further comprises a movement process optimization unit for optimizing the movement state of the robot; the movement process optimization unit comprises:
[0078]
[0079] Where g is the endpoint guidance reward, c is the collision reward, osc is the robot's smooth operation reward, safedist is the distance reward between the robot and the obstacle, and r is the reward obtained.
[0080] Testing revealed that robots employing the obstacle avoidance method described in this invention can effectively avoid static obstacles while shortening the distance the robot travels from its starting point to its destination. This effectively reduces unnecessary energy consumption, improves the robot's endurance, and enables proactive prediction and avoidance of dynamic obstacles. Furthermore, it can further shorten the robot's ineffective travel distance, reduce energy consumption, improve the stability of the robot's movement, and prevent collisions.
[0081] The obstacle avoidance method for robots provided by this invention involves enabling the robot to move along a path of line segment u, acquiring image information in real time during the movement, and identifying static and dynamic obstacles in the image information based on a neural network model. When a static obstacle is identified, the robot continues to move to the nearest non-collision point and begins to circumvent the static obstacle. During the circumvention process, the line segment n between the robot and the destination is continuously updated. When there is no current static obstacle in line segment n during the circumvention process, the circumvention ends, and the robot resumes movement along line segment n towards the destination. In practical applications, this method can effectively avoid static obstacles while shortening the distance the robot travels from the starting point to the destination, thereby effectively reducing unnecessary energy consumption and improving the robot's endurance.
[0082] The preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings; however, the present invention is not limited thereto. Within the scope of the inventive concept, various simple modifications can be made to the technical solutions of the present invention. To avoid unnecessary repetition, the present invention will not describe the various possible combinations separately. However, these simple modifications and combinations should also be considered as the content disclosed in the present invention and are all within the protection scope of the present invention.
Claims
1. A robot obstacle avoidance method, characterized in that, The robot uses the following obstacle avoidance methods: S1. Establish a rectangular coordinate system about x and y with the robot as the origin, and draw a line segment u between the robot origin and the destination endpoint; S2. The robot moves along the path of line segment u, and collects image information in real time during the movement. Based on the neural network model, it identifies static and dynamic obstacles in the image information. When a static obstacle is identified, the robot continues to move to the non-collision point closest to the static obstacle and marks it as (a1, b1). S3. Make the robot start to move around the static obstacle. During the movement, continuously update the line segment n between the robot and the destination. When there is no current static obstacle in the line segment n during the movement, the movement ends and the robot moves towards the destination along the line segment n. S4. If another static obstacle is detected, the robot continues to move to the non-collision point closest to the static obstacle and marks it as (a2, b2), and repeats step S3 until it reaches the destination; When a dynamic obstacle is detected, a set of the movement points of the dynamic obstacle within time k is collected. The system calculates the trajectory and speed of the dynamic obstacle based on the set, and then combines this with the robot's own speed to set a collision zone. It then determines whether the dynamic obstacle and the robot will enter the collision zone. If it determines that they will enter the collision zone, the robot slows down or stops and waits. If they do not enter the collision zone, the robot continues to move. The determination of whether dynamic obstacles and the robot will enter the collision zone specifically includes: , when z < r, it enters the collision area, and when z > r, it does not enter the collision area; Wherein, the collision area is a circular area with the robot as the center and a radius of r, V1 is the speed of the dynamic obstacle, V2 is the speed of the robot, θ is the angle of the dynamic obstacle with the robot as the horizontal baseline, h is the initial distance between the robot and the dynamic obstacle, and z is the distance between the robot and the dynamic obstacle after the movement.
2. The obstacle avoidance method for robots according to claim 1, characterized in that, In step S2, a camera, lidar, or ultrasonic sensor is used to collect image information in real time during the movement.
3. The obstacle avoidance method for robots according to claim 2, characterized in that, The neural network model includes an image processing unit based on the SLAM algorithm, used to determine the relative positional relationship between the robot and obstacles.
4. The obstacle avoidance method for robots according to claim 1, characterized in that, The neural network model also includes a path optimization unit for optimizing the robot's motion path.
5. The obstacle avoidance method for robots according to claim 1, characterized in that, The neural network model also includes a motion optimization unit, which is used to optimize the robot's motion state.
6. The obstacle avoidance method for robots according to claim 5, characterized in that, The motion process optimization unit includes: Where g is the endpoint guidance reward, c is the collision reward, osc is the robot's smooth operation reward, safedist is the distance reward between the robot and the obstacle, and r is the reward obtained.
7. The application of the robot obstacle avoidance method according to any one of claims 1-6 in a robot obstacle avoidance system.
Citation Information
Patent Citations
Mobile robot path planning method based on deep reinforcement learning
CN114740868A