Devices for robot and obstacle avoidance control methods
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2026-08-14
AI Technical Summary
然而,实际实用过程中,会出现突然存在的障碍物,这些突然出现的障碍物由于没有预设规划路径进行避让,所以,会存在无法提前避让的问题
[0022]Therefore, in this application, when an obstacle appears within a preset range of the next path point, the system determines the path connection of a preset number of path points starting from the current path point in the global path planning graph, and determines the positional relationship between the obstacle and the path connection; based on the positional relationship between the obstacle and the path connection, the system adjusts the coordinate position of the next path point in the global path planning graph; the system updates the global path planning graph based on the adjusted coordinate position of the next path point; and the system controls the robot to move according to the updated global path planning graph. This solves the problems in the prior art where it is impossible to avoid suddenly appearing obstacles or where obstacle avoidance algorithms for suddenly appearing obstacles are complex.
Smart Images

Figure CN116107312B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent devices, and more particularly to a robot and an apparatus for an obstacle avoidance control method. Background Technology
[0002] In existing technologies, robots, for example, move according to pre-planned paths on a global map. However, in practical applications, obstacles may suddenly appear. Since there are no pre-planned paths to avoid these obstacles, there is a problem of not being able to avoid them in advance. In addition, some robots, although capable of obstacle avoidance, have very complex algorithms, making the obstacle avoidance calculation process very complicated and increasing the computational burden. Summary of the Invention
[0003] In view of this, this application provides a robot and an apparatus for obstacle avoidance control, which simplifies the obstacle avoidance calculation process to solve the above-mentioned technical problems.
[0004] The first aspect of this application provides an obstacle avoidance control method applied to a robot, the method comprising the following steps:
[0005] Obtain a global path planning map and determine the position information of the robot in the global path planning map, wherein the position information includes the current path point of the robot in the global path planning map;
[0006] The next path point of the robot in the global path planning graph is determined based on the current path point;
[0007] Determine whether there are obstacles within the preset range of the next path point;
[0008] When an obstacle is identified, a path connection is determined for a preset number of path points starting from the current path point in the global path planning graph, and the positional relationship between the obstacle and the path connection is determined.
[0009] Based on the positional relationship between the obstacle and the path line, adjust the coordinate position of the next path point in the global path planning graph;
[0010] The global path planning graph is updated based on the adjusted coordinates of the next path point; and...
[0011] Control the robot to move according to the updated global path planning map.
[0012] A second aspect of this application provides a robot including a processor and a memory, the memory storing a computer program, the processor running the computer program to perform the obstacle avoidance control method described in the first aspect.
[0013] A third aspect of this application provides an obstacle avoidance control device, comprising:
[0014] The position determination module is used to obtain a global path planning map and determine the position information of the robot in the global path planning map, wherein the position information includes the current path point of the robot in the global path planning map;
[0015] The next path point determination module is used to determine the next path point of the robot in the global path planning graph based on the current path point;
[0016] An obstacle detection module is used to determine whether there are obstacles within a preset range of the next path point;
[0017] The positional relationship determination module is used to determine, when an obstacle is determined, a path connection line of a preset number of path points starting from the current path point in the global path planning map, and to determine the positional relationship between the obstacle and the path connection line;
[0018] The adjustment module is used to adjust the coordinate position of the next path point in the global path planning graph based on the positional relationship between the obstacle and the path line;
[0019] The update module is used to update the global path planning graph based on the adjusted coordinates of the next path point; and,
[0020] The movement control module is used to control the robot to move according to the updated global path planning map.
[0021] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that can be executed by a processor to perform the obstacle avoidance control method described in the first aspect.
[0022] Therefore, in this application, when an obstacle appears within a preset range of the next path point, the system determines the path connection of a preset number of path points starting from the current path point in the global path planning graph, and determines the positional relationship between the obstacle and the path connection; based on the positional relationship between the obstacle and the path connection, the system adjusts the coordinate position of the next path point in the global path planning graph; the system updates the global path planning graph based on the adjusted coordinate position of the next path point; and the system controls the robot to move according to the updated global path planning graph. This solves the problems in the prior art where it is impossible to avoid suddenly appearing obstacles or where obstacle avoidance algorithms for suddenly appearing obstacles are complex. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating an obstacle avoidance control method according to an embodiment of this application.
[0025] Figure 2 This is a schematic diagram of the robot modules in one embodiment of this application.
[0026] Figure 3 This is a schematic diagram showing the position of the obstacle on the left side of the path connecting lines.
[0027] Figure 4 This is a schematic diagram of an obstacle spanning both sides of the next path point in one embodiment of this application.
[0028] Figure 5 This is a schematic diagram of an embodiment of the present application where multiple obstacles are located on either side of the next path point.
[0029] Figure 6 This is a flowchart illustrating an obstacle avoidance control method according to another embodiment of this application.
[0030] Figure 7 This is a flowchart illustrating an obstacle avoidance control method according to another embodiment of this application.
[0031] Figure 8 This is a schematic diagram of the obstacle avoidance control device in one embodiment of this application. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0033] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “an,” “a,” or “the,” as used herein, do not indicate a limitation of quantity, but are merely used to indicate the presence of at least one. Terms such as “comprising” or “including” mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as “connected” or “linked” are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
[0034] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0035] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating an obstacle avoidance control method according to an embodiment of this application. Figure 2 This is a schematic diagram of a robot module according to one embodiment of this application. The obstacle avoidance control method can be applied to the robot 100, which can be any type of robot capable of moving according to a preset planned path, or any other intelligent mechanical device capable of moving according to a preset planned path. The obstacle avoidance control method includes:
[0036] Step 11: Obtain the global path planning map and determine the position information of the robot 100 in the global path planning map. The position information includes the current path point of the robot 100 in the global path planning map.
[0037] Step 12: Determine the next path point of the robot 100 in the global path planning graph based on the current path point;
[0038] Step 13: Determine whether there are obstacles within the preset range of the next path point; if there are no obstacles, proceed to Step 14, otherwise, proceed to Step 15;
[0039] Step 14: Control the robot 100 to continue moving according to the global path planning map;
[0040] Step 15: When it is determined that there are obstacles, determine the path connection of a preset number of path points starting from the current path point in the global path planning map, and determine the positional relationship between the obstacle and the path connection;
[0041] Step 16: Based on the positional relationship between the obstacle and the path connection, adjust the coordinate position of the next path point in the global path planning map;
[0042] Step 17: Update the global path planning map based on the adjusted coordinate position of the next path point;
[0043] Step 18: Control the robot 100 to move according to the updated global path planning map.
[0044] Thus, in this application, when the robot 100 has not moved to the next path point, it anticipates the situation of obstacles within the preset range of the next path point. When there are obstacles, it can提前 adjust the coordinate position of the next path point in the global path planning map, and update the global path planning map based on the adjusted coordinate position of the next path point, avoiding the situation where the robot 100 is blocked and unable to continue moving when it moves to the next path point.
[0045] Among them, the global path planning map is determined based on what tasks the robot 100 performs in what场所. For example, when the robot 100 is a floor cleaning robot, the global path planning map can be a path map planned based on the house type map and the furniture layout of each room. When the robot 100 is a food delivery robot in a restaurant, the robot 100 can be a path map planned based on the table distribution map of the restaurant. It can be understood that the scenarios applied by the robot 100 are very extensive, and it will generate different path maps according to corresponding requirements in different scenarios. The overall path map can be in the shape of a "回" character, a "之" character, a "一" character, etc. to adapt to different application scenarios. Specifically, the global path planning map includes several path points, and a path map will be obtained after connecting the several path points in sequence. Among them, the preset range of the next path point can be a circular range with the next path point as the center and a preset distance as the radius. In one embodiment, the preset distance is at least greater than or equal to the minimum safety distance L between the robot 100 and the obstacle.
[0046] Therefore, when the robot 100 moves to a current path point, it will predict the situation of obstacles within a preset range of the next path point. In this way, the situation of obstacles within a preset range of the next path point of each path point in the global path planning map can be predicted, avoiding the situation where the robot 100 moves to the next path point and there happens to be an obstacle that obstructs its passage.
[0047] It is understood that the obstacle can be an object whose position does not change, such as a toy or tool that has fallen to the ground, or a person or object whose position changes, such as a person walking on the ground or a tool or toy that can move automatically or passively, such as a remote-controlled toy car that suddenly rushes out.
[0048] Please refer to this again. Figure 2The robot 100 includes an obstacle detection sensor 30, which detects obstacles. The obstacle detection sensor 30 can be one or more, or a combination of one or more. In this embodiment, the obstacle detection sensor 30 includes a lidar and a TOF sensor. The lidar can be one or more. The working principle of the lidar is very similar to that of radar. Using laser as a signal source, pulsed laser light emitted by the laser hits an obstacle in front, such as a table leg or a wall, causing scattering. Some of the light waves are reflected back to the lidar receiver. Based on the principle of laser ranging, the distance from the lidar to the target point is calculated. By continuously scanning the target object with pulsed laser light, data on all target points on the target object can be obtained. After image processing using this data, a precise three-dimensional image can be obtained. The TOF sensor can be one or more. The ToF sensor works by measuring the distance between the sensor and the object by the time it takes for its emitted pulsed light to travel through a medium, reach an object, and reflect back to the sensor. The distance is then determined by an image sensor within the ToF sensor, which forms a depth image or 3D image of the measured point. The lidar is used to detect obstacles in the horizontal direction, and the ToF sensor is used to detect obstacles in the vertical direction. The data acquired by the lidar and the ToF sensor are fused to obtain obstacle information in both the horizontal and vertical directions, thus providing obstacle information in three-dimensional space. In some embodiments, the obstacle detection sensor 30 acquires data in the horizontal direction; multiple ToF sensors are used, positioned at different locations on the robot 100, and acquire vertical data at different angles on the robot 100. The robot 100 fuses the horizontal data acquired by the lidar and the vertical data acquired by at least one TOF sensor into a point cloud and performs point cloud filtering. The point cloud refers to a dataset of points in a certain coordinate system. The point cloud filtering process involves preprocessing the filtering to remove noise points, outliers, holes, and compress data according to subsequent processing requirements, thus enabling better registration, feature extraction, surface reconstruction, and visualization. It is understood that in other embodiments, obstacle detection can also be achieved using other distance sensors, which is not limited here.
[0049] In some embodiments, determining the positional relationship between the obstacle and the path line includes at least one of the following:
[0050] The obstacle is located on the same side of the path connecting the two paths; that is, the obstacle is located on the left or right side of the path connecting the two paths.
[0051] The obstacle crosses the path line;
[0052] The obstacles are at least two and are located on both sides of the path.
[0053] Therefore, in this application, the coordinate position of the next path point in the global path planning map can be adjusted according to the different positional relationships between the obstacle and the path connection, and the global path planning map can be updated based on the adjusted coordinate position of the next path point.
[0054] Please refer to Figure 3 , Figure 3 This is a schematic diagram showing the position of obstacle Z to the left of the path line M. Figure 3 In the diagram, the robot 100 is currently at path point O. A segment of the global path planning graph, path line M, includes path point O and path points A, B, C, etc., sequentially preceding the current path point O. It is evident that... Figure 2 The path line M in the diagram represents the sequential connection of path points O, A, B, and C. Obstacle Z is located to the left of path line M. Since the appearance of obstacles is random and uncertain—for example, an obstacle might have appeared at a certain path point in the global path planning diagram before the robot 100 reached it, but by the time the robot 100 moves to that path point, the obstacles around it may have moved—it is only necessary to determine the positional relationships of a preset number of path points starting from the current path point O to adjust the local paths in the global path planning diagram.
[0055] In some embodiments, step 16 specifically includes:
[0056] When it is determined that the obstacle Z is located on the same side of the path line M, the next path point A is translated from the obstacle Z to the side away from the obstacle Z, such that the distance between the robot 100 and the obstacle Z is at least greater than or equal to the minimum safe distance L between the robot 100 and the obstacle Z. In some embodiments, the minimum safe distance L is greater than or equal to 0.3 meters, and the length of the robot 100 is 0.25 × 2 meters, and the width is 0.207 × 2 meters. It is understood that in other embodiments, the minimum safe distance L and the length and width of the robot 100 can be adjusted according to actual needs.
[0057] In some embodiments, translating the next path point A from the obstacle Z towards a side away from the obstacle Z includes:
[0058] Determine the obstacle Z0 that is closest to the next path point A, and determine the distance d between the next path point A and the obstacle Z0. Control the robot 100 to translate a preset distance Ld along the direction from the obstacle Z0 to the next path point A, where L is the minimum safe distance for the robot 100 to pass through the obstacle Z normally.
[0059] In a specific embodiment, when an obstacle Z appears on the left side of the path line M during the forward movement of the robot 100, the next path point A is shifted to the right, away from obstacle Z, by a predetermined distance Ld, such that the distance between the robot 100 and the obstacle Z is at least greater than or equal to the minimum safe distance L. When an obstacle Z appears on the right side of the path line M during the forward movement of the robot 100, the next path point A is shifted to the left, away from obstacle Z, by a predetermined distance Ld, such that the distance between the robot 100 and the obstacle Z is at least greater than or equal to the minimum safe distance L. Here, the left side of the path line M refers to the left side of the robot 100 while moving along the path line M; the right side of the path line M refers to the right side of the robot 100 while moving along the path line M.
[0060] Therefore, in this application, when the robot 100 moves forward, regardless of whether an obstacle Z appears on the left or right side of the path line M, the next path point A will be translated by the preset distance Ld from the obstacle Z in the direction from the obstacle Z to the next path point A, so that the distance between the robot 100 and the obstacle Z is at least greater than or equal to the minimum safe distance L, thereby enabling the robot 100 to move around the obstacle Z.
[0061] Please refer to Figure 4 , Figure 4 This is a schematic diagram showing the obstacle Z spanning both sides of the next path point A in one embodiment of this application. Step 16 specifically includes:
[0062] When it is determined that obstacle Z crosses the path line M, the next path point A is translated along a direction perpendicular to the path line M until it passes through obstacle Z and continues to be translated away from obstacle Z so that the distance between robot 100 and obstacle Z is at least greater than or equal to the minimum safe distance L between robot 100 and obstacle Z.
[0063] In some embodiments, translating the next path point A along a direction perpendicular to the path line M until it passes through the obstacle Z and continuing to translate away from the obstacle Z includes:
[0064] The obstacle Z is divided into a first part Z1 located to the left of the path line M and a second part Z2 located to the right of the path line M;
[0065] Determine the first obstacle point Z10 that is farthest from the next path point A in the first part Z1 of the obstacle Z, and determine the first distance d1 between the first obstacle point Z10 and the next path point A;
[0066] Determine the second obstacle point Z20 that is furthest from the next path point A in the second part Z2 of the obstacle Z, and determine the second distance d2 between the second obstacle point Z20 and the next path point A;
[0067] When the first distance d1 is determined to be greater than the second distance d2, the next path point A is shifted to the right by a preset distance L+d2 along a direction perpendicular to the path line M, where L is the minimum safe distance; or...
[0068] When it is determined that the first distance d1 is less than the second distance d2, the next path point A is shifted to the left by a preset distance L+d1 along a direction perpendicular to the path line M, where L is the minimum safe distance; or...
[0069] When the first distance d1 is determined to be equal to the second distance d2, the next path point A is shifted to the left by a preset distance L+d1 along a direction perpendicular to the path line M, or the next path point A is shifted to the right by a preset distance L+d2 along a direction perpendicular to the path line M, where L is the minimum safe distance.
[0070] Therefore, even if obstacle Z crosses the path line M, it is possible to bypass obstacle Z by translating on the side with the smaller distance between the first distance d1 and the second distance d2. This way, obstacle Z can be bypassed while reducing the detour distance.
[0071] Please refer to Figure 5 , Figure 5 This is a schematic diagram illustrating, in one embodiment of this application, that there are multiple obstacles Z, each located on either side of the next path point A. Step 16 specifically includes:
[0072] When there are at least two obstacles Z located on opposite sides of the path line M, and the distance between at least two obstacles Z does not allow the robot 100 to pass through them, the next path point A passes through one of the obstacles Z along a direction perpendicular to the path line M and continues to translate away from the obstacle Z so that the distance between the robot 100 and the obstacle Z is at least greater than or equal to the minimum safe distance between the robot 100 and the obstacle Z.
[0073] In some embodiments, the step of moving the next path point A from the next path point A along a direction perpendicular to the path line M through one of the obstacles Z and continuing to translate away from the obstacle Z includes:
[0074] The at least two obstacles Z are divided into a first obstacle Z3 located to the left of the path line M and a second obstacle Z4 located to the right of the path line M;
[0075] Determine the third obstacle point Z30 that is farthest from the first obstacle Z3 from the next path point A, and determine the third distance d3 between the third obstacle point Z30 and the next path point A;
[0076] Determine the fourth obstacle point Z40 that is farthest from the second obstacle Z4 from the next path point A, and determine the fourth distance d4 between the fourth obstacle point Z40 and the next path point A;
[0077] When the third distance d3 is determined to be greater than the fourth distance d4, the next path point A is shifted to the right by a preset distance L+d4 along a direction perpendicular to the path line M, where L is the minimum safe distance; or...
[0078] When the third distance d3 is determined to be less than the fourth distance d4, the next path point A is shifted to the left by a preset distance L+d3 along a direction perpendicular to the path line M, where L is the minimum safe distance; or...
[0079] When the third distance d3 is determined to be equal to the fourth distance d4, the next path point A is shifted to the left by a preset distance L+d3 along the direction perpendicular to the path line M, or the next path point A is shifted to the right by a preset distance L+d4 along the direction perpendicular to the path line M, where L is the minimum safe distance.
[0080] Therefore, when there are obstacles Z on both sides of the next path point A, the next path point A can be translated so that the distance between the robot 100 and the obstacle Z is at least greater than or equal to the minimum safe distance L, thereby allowing the robot 100 to bypass the obstacle A.
[0081] In some embodiments, the method further includes the step of:
[0082] When the positional relationship between the obstacle Z and the path line M is determined to be such that the obstacle Z crosses the path line M, or that there are at least two obstacles located on opposite sides of the path line M, the robot 100 is controlled to generate a warning signal or stop moving. The warning signal may be, but is not limited to, an audible and / or visual alert.
[0083] This can remind users to remove obstacles in a timely manner, thus avoiding taking excessively long detours to avoid obstacles, which would reduce the efficiency of the robot 100. For example, when the robot 100 is a sweeping robot, if it takes too long a detour to avoid obstacle Z, some areas may not be cleaned thoroughly.
[0084] In some embodiments, the method further includes the step of:
[0085] When the duration for which the robot 100 generates a warning signal or stops moving exceeds a preset duration, the coordinates of the next path point in the global path planning graph are adjusted.
[0086] For example, according to Figure 4 or Figure 5 The method shown allows for translational adjustment, enabling the robot 100 to avoid obstacle Z and continue performing subsequent operations. This avoids delays caused by the robot 100 getting stuck when encountering obstacle Z and having no one assisting it.
[0087] In some embodiments, the method further includes the step of:
[0088] After the robot 100 is started, the global map is loaded;
[0089] Detect whether there are obstacles within the spatial range corresponding to the global map;
[0090] If an obstacle exists, mark the obstacle at the corresponding location on the global map;
[0091] The global path planning map is planned based on the global map containing obstacle markers.
[0092] It is understood that planning the global path planning graph based on the global map containing obstacle markers includes: planning a global path in real time using Dijkstra's algorithm by using the global map and setting the expansion radius of the obstacles, and smoothing the obtained path by angle and standardization to plan the global path planning graph. In this embodiment, the expansion radius of the obstacles is 20-30cm. It is understood that the expansion radius of the obstacles can be adjusted according to parameters such as the size of the robot 100 and the size of the working scene, and is not limited here. Dijkstra's algorithm starts from the starting point and uses a greedy algorithm strategy, traversing each time to the nearest unvisited vertex adjacent to the starting point until it extends to the ending point. It is a shortest path algorithm from one vertex to all other vertices, solving the shortest path problem in a weighted graph.
[0093] Therefore, in this application, the global path planning map can be generated based on the global map and its obstacle markers.
[0094] In some embodiments, marking obstacles at corresponding locations on the global map includes:
[0095] On the global map, obstacles are marked by a first color, passable objects by a second color, and unknown objects by a third color at their corresponding locations.
[0096] In one specific embodiment, the first color is black, the second color is white, and the third color is gray. It is understood that as long as the first, second, and third colors are different, other colors can be chosen for identification; this is not limited here.
[0097] In some embodiments, after the robot 100 detects the approximate shape of the obstacle using its obstacle detection sensor 30, it also displays an obstacle marker of the corresponding shape on the global path planning map according to the shape of the obstacle. For example, if the detected obstacle is approximately elliptical, then an elliptical obstacle marker is displayed on the global path planning map.
[0098] In some embodiments, loading the global map includes:
[0099] Import a map image containing the obstacle markers, and determine the coordinate information of the robot 100 on the map image to obtain the global map.
[0100] In some embodiments, the obstacle is identified by color. For example, an obstacle is identified by a first color, a passable obstacle by a second color, and an unknown obstacle by a third color.
[0101] It is understood that whenever an obstacle is detected by the obstacle detection sensor 30, an obstacle marker is added at the corresponding position on the global path planning map.
[0102] Accordingly, when an obstacle in the space corresponding to an obstacle marker on the global path planning map is removed, the obstacle marker is removed from the global path planning map accordingly.
[0103] It is understood that between steps 17 and 18, there is also a step: performing angle and standardization smoothing on the local path and the resulting path to obtain the updated global path planning map.
[0104] In some embodiments, the method further includes:
[0105] The local map is determined in real time within a preset area centered on the robot 100, and the global path planning map includes the local map.
[0106] Updating the global path planning graph based on the adjusted coordinates of the next path point includes:
[0107] The local map is updated based on the adjusted coordinates of the next path point.
[0108] Therefore, by setting a local map, when obstacles appear, only corresponding adjustments need to be made on the local map of the global path planning map, reducing the calculation process and improving the obstacle avoidance speed.
[0109] Please refer to Figure 6 , Figure 6 This is a flowchart illustrating an obstacle avoidance control method according to another embodiment of this application. The obstacle avoidance control method can be applied to a robot 100, which can be any type of robot capable of moving according to a preset planned path, or any other intelligent mechanical device capable of moving according to a preset planned path. The obstacle avoidance control method includes:
[0110] Step 61: After starting the robot 100, load the global map.
[0111] Step 62: Detect obstacles within the spatial range corresponding to the global map and mark the obstacles at the corresponding locations on the global map.
[0112] The robot 100 further includes obstacle detection sensors 30. Obstacle detection is achieved through obstacle detection sensors 30 installed on the robot 100. There may be one or more obstacle detection sensors 30, or a combination of one or more. In this embodiment, the obstacle detection sensors 30 include a lidar and a time-of-flight (TOF) sensor. The robot 100 fuses the data acquired by the lidar and at least one TOF sensor into a point cloud and performs point cloud filtering to determine obstacles within the spatial range corresponding to the global map, and marks the obstacles at the corresponding locations on the global map.
[0113] Step 63: Plan the global path planning map based on the global map containing obstacle markers.
[0114] Specifically, a global path is planned in real time using the Dijkstra algorithm by using a global map and setting the expansion radius of obstacles, and the resulting path is smoothed by angle and standardization.
[0115] Step 64: In real time, determine the preset area centered on the robot 100 as a local map, and the global path planning map includes the local map.
[0116] For example, a 5m*5m local map can be set, with the center being the origin of the robot 100. A path within a 5m radius of the global path planning map can be extracted as the local path. It is understood that the size of the local map can be adjusted according to actual needs and is not limited here.
[0117] Step 65: Determine the current path point of the robot 100 in the local map, and determine the next path point of the robot 100 in the global path planning map based on the current path point. Determine whether there are obstacles within the preset range of the next path point. If there are no obstacles, return to step 64; otherwise, proceed to step 66.
[0118] Step 66: When an obstacle is identified, determine the path connection of a preset number of path points starting from the current path point in the global path planning graph, and determine whether the positional relationship between the obstacle and the path connection is that the obstacle is located on the same side of the path connection; if so, proceed to step 67, otherwise proceed to step 68.
[0119] Step 67: Determine the obstacle point closest to the next path point, and determine the distance d between the next path point and the obstacle point. Control the robot 100 to translate a preset distance Ld along the direction from the obstacle point to the next path point, where L is the minimum safe distance for the robot to pass through the obstacle normally.
[0120] Step 68: Control the generation of a warning signal or control the stopping of movement.
[0121] Step 69: Perform angle and standardization smoothing on the local paths and the resulting paths to obtain the updated global path planning graph.
[0122] Step 70: Control the robot 100 to move according to the updated global path planning map.
[0123] Therefore, in this application, the coordinate position of the next path point in the global path planning map can be adjusted based on the positional relationship between the obstacle and the path connection line, so that the obstacle is located on the same side of the path connection line, and the global path planning map can be updated based on the adjusted coordinate position of the next path point.
[0124] Please refer to Figure 7 , Figure 7 This is a flowchart illustrating an obstacle avoidance control method according to another embodiment of this application. The obstacle avoidance control method can be applied to a robot 100, which can be any type of robot capable of moving according to a preset planned path, or any other intelligent mechanical device capable of moving according to a preset planned path. The obstacle avoidance control method includes:
[0125] Step 71: After starting the robot 100, load the global map.
[0126] Step 72: Detect obstacles within the spatial range corresponding to the global map and mark the obstacles at the corresponding positions on the global map.
[0127] The robot 100 further includes obstacle detection sensors 30. Obstacle detection is achieved through obstacle detection sensors 30 installed on the robot 100. There may be one or more obstacle detection sensors 30, or a combination of one or more. In this embodiment, the obstacle detection sensors 30 include a lidar and a time-of-flight (TOF) sensor. The robot 100 fuses the data acquired by the lidar and at least one TOF sensor into a point cloud and performs point cloud filtering to determine obstacles within the spatial range corresponding to the global map, and marks the obstacles at the corresponding locations on the global map.
[0128] Step 73: Plan the global path planning map based on the global map containing obstacle markers.
[0129] Step 74: In real time, a local map is determined within a preset area centered on the robot 100, and the global path planning map includes the local map.
[0130] Step 75: Determine the current path point of the robot 100 in the local map, and determine the next path point of the robot 100 in the global path planning map based on the current path point. Determine whether there are obstacles within the preset range of the next path point. If there are no obstacles, return to step 74; otherwise, proceed to step 76.
[0131] Step 76: Based on the positional relationship between the obstacle and the path line, if it is determined that the positional relationship between an obstacle and the corresponding path line in the historical record is the same or similar, then the movement strategy of the positional relationship between the same or similar obstacle and the corresponding path line in the historical record is obtained, and the next path point is moved directly according to the movement strategy in the historical record.
[0132] Step 77: Perform angle and standardization smoothing on the local paths and the resulting paths to obtain the updated global path planning graph.
[0133] Step 78: Control the robot 100 to move according to the updated global path planning map.
[0134] Therefore, by using the above method, movement strategies with the same or similar positional relationships in the historical records can be directly obtained, and movement can be made directly according to the movement strategies in the historical records. This allows for movement to avoid obstacles without calculation, saving computational resources.
[0135] Please refer to this again. Figure 2 , Figure 2 This is a schematic diagram of a robot module according to one embodiment of this application. The robot 100 includes a processor 10 and a memory 20. The memory 20 stores a computer program, and the processor 10 executes the computer program to perform the following:
[0136] Obtain a global path planning map and determine the position information of the robot 100 in the global path planning map. The position information includes the current path point of the robot 100 in the global path planning map.
[0137] The next path point of the robot 100 in the global path planning map is determined based on the current path point;
[0138] Determine whether there are obstacles within the preset range of the next path point;
[0139] When an obstacle is identified, a path connection is determined for a preset number of path points starting from the current path point in the global path planning graph, and the positional relationship between the obstacle and the path connection is determined.
[0140] Based on the positional relationship between the obstacle and the path line, adjust the coordinate position of the next path point in the global path planning graph;
[0141] The global path planning graph is updated based on the adjusted coordinates of the next path point; and...
[0142] Control the robot 100 to move according to the updated global path planning map.
[0143] For more details, please refer to the relevant description of the obstacle avoidance control method mentioned above.
[0144] Please refer to Figure 8 , Figure 8 This is a schematic diagram of an obstacle avoidance control device according to an embodiment of this application. The obstacle avoidance control device 800 includes:
[0145] The position determination module 810 is used to obtain a global path planning map and determine the position information of the robot 100 in the global path planning map. The position information includes the current path point of the robot 100 in the global path planning map.
[0146] The next path point determination module 820 is used to determine the next path point of the robot 100 in the global path planning map based on the current path point;
[0147] The obstacle detection module 830 is used to determine whether there are obstacles within a preset range of the next path point;
[0148] The position relationship determination module 840 is used to determine, when an obstacle is determined, a path connection line of a preset number of path points starting from the current path point in the global path planning map, and to determine the position relationship between the obstacle and the path connection line;
[0149] The adjustment module 850 is used to adjust the coordinate position of the next path point in the global path planning map based on the positional relationship between the obstacle and the path line.
[0150] Update module 860 is used to update the global path planning graph based on the adjusted coordinates of the next path point; and,
[0151] The movement control module 870 is used to control the robot 100 to move according to the updated global path planning map.
[0152] This application also provides a computer-readable storage medium storing a computer program that can be executed by a processor at least as follows:
[0153] Obtain a global path planning map and determine the position information of the robot 100 in the global path planning map. The position information includes the current path point of the robot 100 in the global path planning map.
[0154] The next path point of the robot 100 in the global path planning map is determined based on the current path point;
[0155] Determine whether there are obstacles within the preset range of the next path point;
[0156] When an obstacle is identified, a path connection is determined for a preset number of path points starting from the current path point in the global path planning graph, and the positional relationship between the obstacle and the path connection is determined.
[0157] Based on the positional relationship between the obstacle and the path line, adjust the coordinate position of the next path point in the global path planning graph;
[0158] The global path planning graph is updated based on the adjusted coordinates of the next path point; and...
[0159] Control the robot 100 to move according to the updated global path planning map.
[0160] For more details, please refer to the relevant description of the obstacle avoidance control method mentioned above.
[0161] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0162] In the several embodiments provided in this application, it should be understood that the disclosed robot 100 can be implemented in other ways. For example, the embodiments of the robot 100 described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical or other forms.
[0163] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0164] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software program modules. The memory 20 may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0165] Furthermore, the processor 10 can be a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The processor can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The processor can be a graphics processor, a microprocessor, or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; for example, the processor 10 can read application programs, computer instructions, or data from the memory and, in conjunction with its hardware, complete the steps of the methods executed by the robot 100.
[0166] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0167] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. An obstacle avoidance control method, applied to a robot, characterized in that, The method includes the following steps: Obtain a global path planning map and determine the position information of the robot in the global path planning map, wherein the position information includes the current path point of the robot in the global path planning map; The next path point of the robot in the global path planning graph is determined based on the current path point; Determine whether there are obstacles within the preset range of the next path point; When an obstacle is identified, a path connection is determined for a preset number of path points starting from the current path point in the global path planning graph, and the positional relationship between the obstacle and the path connection is determined. Based on the positional relationship between the obstacle and the path line, adjust the coordinate position of the next path point in the global path planning graph; The global path planning graph is updated based on the adjusted coordinates of the next path point. as well as, Control the robot to move according to the updated global path planning map; Determining the positional relationship between the obstacle and the path line includes at least one of the following: The obstacle is located on the same side of the path line; The obstacle crosses the path line; The obstacle is at least two and is located on both sides of the path line; The step of adjusting the coordinates of the next path point in the global path planning graph based on the positional relationship between the obstacle and the path line includes: When there are at least two obstacles located on both sides of the path line and the distance between at least two obstacles does not allow the robot to pass through them, the next path point passes through one of the obstacles in a direction perpendicular to the path line and continues to translate away from the obstacle so that the distance between the robot and the obstacle is at least greater than or equal to the minimum safe distance between the robot and the obstacle. Based on the positional relationship between the obstacle and the path line, if it is determined that the positional relationship between an obstacle and the corresponding path line in the historical record is the same or similar, then the movement strategy of the positional relationship between the same or similar obstacle and the corresponding path line in the historical record is obtained, and the movement is carried out directly according to the movement strategy in the historical record.
2. The obstacle avoidance control method according to claim 1, characterized in that, The step of adjusting the coordinates of the next path point in the global path planning graph based on the positional relationship between the obstacle and the path line includes: When it is determined that the obstacle is located on the same side of the path line, the next path point is translated from the obstacle to the side away from the obstacle, so that the distance between the robot and the obstacle is at least greater than or equal to the minimum safe distance between the robot and the obstacle.
3. The obstacle avoidance control method according to claim 2, characterized in that, The step of translating the next path point away from the obstacle includes: The robot is controlled to translate a preset distance Ld along the direction from the obstacle to the next path point, where L is the minimum safe distance. The obstacle is located closest to the next path point, and the distance d between the next path point and the obstacle is determined.
4. The obstacle avoidance control method according to claim 1, characterized in that, The step of adjusting the coordinates of the next path point in the global path planning graph based on the positional relationship between the obstacle and the path line includes: When an obstacle is determined to cross the path line, the next path point is moved through the obstacle in a direction perpendicular to the path line and continues to translate away from the obstacle so that the distance between the robot and the obstacle is at least greater than or equal to the minimum safe distance between the robot and the obstacle.
5. The obstacle avoidance control method according to claim 4, characterized in that, The step of moving the next path point through the obstacle along a direction perpendicular to the path line and continuing to translate it away from the obstacle includes: The obstacle is divided into a first part located on the left side of the path and a second part located on the right side of the path; Determine the first obstacle point that is furthest from the next path point in the first part of the obstacle, and determine the first distance d1 between the first obstacle point and the next path point; Determine the second obstacle point that is furthest from the next path point in the second part of the obstacle, and determine the second distance d2 between the second obstacle point and the next path point; When it is determined that the first distance d1 is greater than the second distance d2, the next path point is shifted to the right by a preset distance L+d2 along a direction perpendicular to the path line, where L is the minimum safe distance; or... When it is determined that the first distance d1 is less than the second distance d2, the next path point is shifted to the left by a preset distance L+d1 along a direction perpendicular to the path line, where L is the minimum safe distance; or... When the first distance d1 is determined to be equal to the second distance d2, the next path point is shifted to the left by a preset distance L+d1 along the direction perpendicular to the path line, or the next path point is shifted to the right by a preset distance L+d2 along the direction perpendicular to the path line, where L is the minimum safe distance.
6. The obstacle avoidance control method according to claim 5, characterized in that, The step of moving the next path point through one of the obstacles along a direction perpendicular to the path line and continuing to translate it away from the obstacle includes: The at least two obstacles are divided into a first obstacle located on the left side of the path and a second obstacle located on the right side of the path; Determine the third obstacle point that is farthest from the first obstacle point from the next path point, and determine the third distance d3 between the third obstacle point and the next path point; Determine the fourth obstacle point that is farthest from the second obstacle point from the next path point, and determine the fourth distance d4 between the fourth obstacle point and the next path point; When the third distance d3 is determined to be greater than the fourth distance d4, the next path point is shifted to the right by a preset distance L+d4 along a direction perpendicular to the path line, where L is the minimum safe distance; or... When the third distance d3 is determined to be less than the fourth distance d4, the next path point is shifted to the left by a preset distance L+d3 along a direction perpendicular to the path line, where L is the minimum safe distance; or... When the third distance d3 is determined to be equal to the fourth distance d4, the next path point is shifted to the left by a preset distance L+d3 along the direction perpendicular to the path line, or the next path point is shifted to the right by a preset distance L+d4 along the direction perpendicular to the path line, where L is the minimum safe distance.
7. The obstacle avoidance control method according to claim 1, characterized in that, The method further includes the following steps: When the positional relationship between the obstacle and the path line is determined to be such that the obstacle crosses the path line or there are at least two obstacles located on both sides of the path line, the robot is controlled to generate a warning signal or to stop moving.
8. The obstacle avoidance control method according to claim 7, characterized in that, The method further includes the following steps: When the duration for which the robot generates a warning signal or stops moving exceeds a preset duration, the coordinates of the next path point in the global path planning graph are adjusted.
9. The obstacle avoidance control method according to claim 1, characterized in that, The method further includes the following steps: After the robot is started, the global map is loaded; Detect whether there are obstacles within the spatial range corresponding to the global map; If an obstacle exists, mark the obstacle at the corresponding location on the global map; The global path planning map is planned based on the global map containing obstacle markers.
10. The obstacle avoidance control method according to claim 9, characterized in that, Marking obstacles at corresponding locations on the global map includes: On the global map, obstacles are marked by a first color, passable objects by a second color, and unknown objects by a third color at their corresponding locations.
11. The obstacle avoidance control method according to claim 9, characterized in that, The loading of the global map includes: Import a map image containing the obstacle markers, and determine the robot's coordinates on the map image to obtain the global map.
12. The obstacle avoidance control method according to claim 1, characterized in that, The method further includes the following steps: The local map is determined in real time within a preset area centered on the robot, and the global path planning map includes the local map. Updating the global path planning graph based on the adjusted coordinates of the next path point includes: The local map is updated based on the adjusted coordinates of the next path point.
13. A robot, characterized in that, It includes a processor and a memory, the memory storing a computer program, and the processor running the computer program to perform the obstacle avoidance control method according to any one of claims 1 to 12.
14. The robot according to claim 13, characterized in that, The robot in question is a robot.
15. An obstacle avoidance control device, characterized in that, include: The position determination module is used to acquire a global path planning map and determine the position information of the robot in the global path planning map. The position information includes the current path point of the robot in the global path planning map. The next path point determination module is used to determine the next path point of the robot in the global path planning graph based on the current path point; An obstacle detection module is used to determine whether there are obstacles within a preset range of the next path point; A positional relationship determination module is used to, when an obstacle is determined, determine a path connection line of a preset number of path points starting from the current path point in the global path planning graph, and determine the positional relationship between the obstacle and the path connection line; wherein, determining the positional relationship between the obstacle and the path connection line includes at least one of the following: The obstacle is located on the same side of the path line; The obstacle crosses the path line; The obstacle is at least two and is located on both sides of the path line; An adjustment module is configured to adjust the coordinate position of the next path point in the global path planning graph based on the positional relationship between the obstacle and the path line; wherein, adjusting the coordinate position of the next path point in the global path planning graph based on the positional relationship between the obstacle and the path line includes: When there are at least two obstacles located on both sides of the path line and the distance between at least two obstacles does not allow the robot to pass through them, the next path point passes through one of the obstacles in a direction perpendicular to the path line and continues to translate away from the obstacle so that the distance between the robot and the obstacle is at least greater than or equal to the minimum safe distance between the robot and the obstacle. Based on the positional relationship between the obstacle and the path line, if it is determined that the positional relationship between an obstacle and the corresponding path line in the historical record is the same or similar, then the movement strategy of the positional relationship between the same or similar obstacle and the corresponding path line in the historical record is obtained, and the movement is carried out directly according to the movement strategy in the historical record. The update module is used to update the global path planning graph based on the adjusted coordinates of the next path point; and, The movement control module is used to control the robot to move according to the updated global path planning map.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed by a processor to perform the obstacle avoidance control method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Robot path planning method based on LSPS algorithm
CN111473796A
Maklink graph-based pathfinding method
WO2020191692A1