Obstacle avoidance method and device applied to robot, robot and storage medium
By constructing the detection area and detection line in each control cycle of the robot, updating the target intersection point, and predicting the movement information of dynamic obstacles, the problem of misjudgment of dynamic obstacle prediction is solved and the smoothness and fluency of the robot movement are improved.
Patent Information
- Application Number
- CN202411444191.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-21
AI Technical Summary
In some special indoor scenarios, dynamic obstacles are large in number and densely distributed, and it is difficult for the prior art to effectively identify and match obstacle characteristics, resulting in an increase in the prediction of dynamic obstacles, affecting the stability and fluency of robot movement.
By constructing a detection area centered on the robot based on the robot's attribute information in each control cycle, a detection line with a preset angular resolution is constructed to detect obstacles, and the obstacle information is updated based on the target intersection point. If there are dynamic obstacles, then Predict its motion information for selective obstacle avoidance.
It is possible to improve the accuracy of dynamic obstacle prediction and ensure the mobile performance of the robot without increasing the computing power.
Smart Images

Figure CN119336022A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of robot technology, and in particular, relates to an obstacle avoidance method applied to a robot, an obstacle avoidance device applied to a robot, a robot, and a computer-readable storage medium. Background Art
[0002] In indoor scenes, to ensure that the robot can move smoothly, 2D features are usually extracted from radar perception data to match obstacle features. Training is performed through neural networks or reinforcement learning to effectively identify obstacles such as humans or other robots. For dynamic obstacles, multi-frame point cloud matching technology can be used for prediction.
[0003] However, in some special indoor scenes, such as restaurants, the number of dynamic obstacles is often large and densely distributed. At this time, it is difficult to effectively identify and match obstacle features based solely on the limited 2D features provided by the lidar sensor, resulting in an increase in prediction errors of dynamic obstacles. Unnecessary navigation decisions may be triggered due to prediction errors, thus affecting the stability and smoothness of the robot's movement. In addition, refined feature matching, such as matching human leg features when people gather, especially through neural networks and reinforcement learning, requires high computing power for the robot.
[0004] Therefore, a low-computing obstacle avoidance method that can ensure the robot's mobility performance needs to be proposed. Summary of the invention
[0005] The present application provides an obstacle avoidance method for a robot, an obstacle avoidance device for a robot, a robot and a computer-readable storage medium, which are capable of improving the accuracy of dynamic obstacle prediction without increasing computing power, without relying on the recognition and extraction of refined features, thereby ensuring the mobility performance of the robot.
[0006] In a first aspect, the present application provides an obstacle avoidance method applied to a robot, comprising:
[0007] In each control cycle, a detection area centered on the robot corresponding to the control cycle is constructed based on the attribute information of the robot;
[0008] In the detection area, a detection line with a preset angular resolution is constructed to detect obstacles and obtain detection results;
[0009] The target intersection is updated based on the obtained obstacle information; each obstacle information is determined based on each detection result corresponding to the control cycle; the target intersection is the intersection of the detection lines bound to any obstacle information, and the detection line intersection is the intersection of the detection lines corresponding to the detection areas of different control cycles;
[0010] If it is determined based on the target intersection that there is a dynamic obstacle, motion information of the dynamic obstacle is predicted based on the target intersection corresponding to the dynamic obstacle, so as to selectively avoid the obstacle based on the motion information.
[0011] In a second aspect, the present application provides an obstacle avoidance device applied to a robot, comprising:
[0012] A construction module, used for constructing a detection area centered on the robot corresponding to the control cycle based on the attribute information of the robot in each control cycle;
[0013] The detection module is used to construct a detection line with a preset angular resolution within the detection area to detect obstacles and obtain detection results;
[0014] An updating module, used for updating a target intersection point based on each obstacle information obtained; each obstacle information is determined based on each detection result corresponding to a control cycle; the target intersection point is a detection line intersection point bound to any obstacle information, and the detection line intersection point is an intersection point where detection lines corresponding to detection areas of different control cycles intersect;
[0015] The obstacle avoidance module is used to predict the motion information of the dynamic obstacle based on the target intersection point corresponding to the dynamic obstacle if the dynamic obstacle is determined to exist based on the target intersection point, so as to selectively avoid the obstacle based on the motion information.
[0016] In a third aspect, the present application provides a robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of the first aspect when executing the computer program.
[0017] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method of the first aspect are implemented.
[0018] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by one or more processors, it implements the steps of the method of the first aspect.
[0019] Compared with the prior art, the present application has the following beneficial effects: the robot does not rely on the identification and extraction of refined features, and can improve the accuracy of dynamic obstacle prediction with lower computing power, thereby ensuring the robot's mobility performance.
[0020] Specifically, the robot detects obstacles in a pre-constructed detection area in each control cycle to obtain detection results. The detection area can be constructed based on the robot's attributes and the robot's position. In order to achieve low-computing power obstacle avoidance, obstacles can be detected by constructing detection lines with preset angular resolution, that is, the robot can send out detection signals to realize obstacle detection in the detection area, and construct detection lines with preset angular resolution according to the detection signals to detect obstacles and obtain detection results. Regardless of whether the robot is stationary or moving, there will be at least an intersection area between the adjacent detection areas of different control cycles, and the detection lines in the intersection area will intersect or overlap to generate detection line intersections. In order to facilitate the distinction between different obstacles, based on the intersections of each detection line, it can be assumed that the movement of the dynamic obstacle is linear, and the obstacle information determined based on the detection results corresponding to multiple control cycles is bound to the intersections of each detection line to obtain the target intersection, thereby achieving linear approximation of the movement of the obstacle. Therefore, by analyzing the linear characteristics of the target intersection, it is possible to determine whether there is a dynamic obstacle in the detection area. If it is determined that there is a dynamic obstacle, the robot can predict the motion information of the dynamic obstacle based on the target intersection corresponding to the dynamic obstacle, so as to facilitate selective obstacle avoidance, that is, avoid the obstacle when there is a possibility of collision with the dynamic obstacle, otherwise continue to move.
[0021] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1 It is a flowchart of an obstacle avoidance method applied to a robot provided in an embodiment of the present application;
[0024] Figure 2 is a schematic diagram of a target intersection corresponding to obstacle information of a dynamic obstacle a provided in an embodiment of the present application;
[0025] Figure 3 This is a schematic diagram of the effect of the robot provided in the embodiment of the present application simultaneously constructing a detection area and a safety area;
[0026] Figure 4 is a schematic diagram of the structure of an obstacle avoidance device applied to a robot provided in an embodiment of the present application;
[0027] Figure 5It is a schematic diagram of the structure of the robot provided in the embodiment of the present application. DETAILED DESCRIPTION
[0028] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0029] In related technologies, in some special indoor scenes, such as restaurants, the number of dynamic obstacles is often large and densely distributed. At this time, it is difficult to effectively identify and match obstacle features based solely on the limited 2D features provided by the lidar sensor, resulting in an increase in prediction misjudgments of dynamic obstacles, which may cause unnecessary navigation decisions due to prediction errors, thereby affecting the stability and smoothness of the robot's movement. In addition, refined feature matching, such as matching human leg features when people gather, especially through neural networks and reinforcement learning, requires high computing power for the robot.
[0030] In order to solve this problem, the present application proposes an obstacle avoidance method for a robot. The robot does not need to perform refined feature recognition and extraction. Even if the computing power is low, the accuracy of dynamic obstacle prediction can be improved, thereby ensuring the mobility of the robot. The obstacle avoidance method for a robot proposed in the present application will be described below through specific embodiments.
[0031] The obstacle avoidance method provided in the embodiment of the present application is applied to a robot, which is equipped with a sensor that can emit a detection signal for detecting obstacles in a detection area, such as a laser radar, an ultrasonic sensor, and an infrared sensor. The robot can map the obstacle information to the cost map of the robot based on the obstacle information detected by one or more sensors.
[0032] In order to illustrate the technical solution proposed in this application, each embodiment will be described below with a robot as the execution subject.
[0033] Figure 1 A schematic flow chart of an obstacle avoidance method applied to a robot provided by the present application is shown. In each control cycle, the obstacle avoidance method applied to the robot includes:
[0034] Step 110: The robot constructs a detection area centered on the robot corresponding to the control cycle based on its own attribute information.
[0035] Obstacles at different locations have different effects on the robot. Generally speaking, obstacles that are closer to the robot may have a greater impact on the robot's movement. Correspondingly, obstacles that are farther away from the robot may have a smaller impact on the robot's movement. Therefore, in order to achieve targeted obstacle avoidance, that is, to focus on obstacles that have a greater impact on the robot, the obstacle detection area can be delineated based on the maximum detection range of the sensor and the current position of the robot.
[0036] Specifically, the robot can construct a detection area with itself as the center.
[0037] Since the robot has a size, if the robot is only regarded as a point when constructing the detection area, the size of the detection area may be constructed unreasonably. Therefore, for example, the robot can construct the detection area of the control cycle within the maximum detection range of the robot sensor based on its own size information and the movement direction of the robot.
[0038] The same obstacle has different effects on the robot in different motion states. For example, the same obstacle has a greater effect on the robot in the low-speed state and the high-speed state, that is, the effect is positively correlated with the robot's moving speed. Therefore, illustratively, the robot can also construct the detection area of the control cycle according to its own moving speed. The size of the detection area of the robot in motion can be positively correlated with the moving speed of the robot.
[0039] That is to say, there are many factors affecting the construction of the detection area. In order to more accurately construct a detection area of appropriate size, the robot can construct the detection area by combining the robot's attribute information. The attribute information may include one or more of the robot's size information, the robot's current position, the robot's movement direction, the robot's movement speed, and the like.
[0040] Exemplarily, assuming that the detection area is semicircular, the radius R of the detection area can be determined based on the width information of the robot and the moving speed of the robot. The faster the moving speed of the robot, the larger R is, R=proportional coefficient*moving speed+1 / 2 robot width.
[0041] Step 120: In the detection area, the robot constructs a detection line with a preset angular resolution to detect obstacles and obtains a detection result.
[0042] After determining the obstacle detection area through step 110, the robot can detect obstacles through configured sensors, such as one or more sensors such as lidar, stereo vision, infrared sensors, etc. For example, the lidar emits a laser beam to detect obstacles, and maps the obtained obstacle information to the robot's cost map. In the detection area, a detection line with a preset angular resolution is constructed to perform collision detection on the obstacles on the cost map. For example, when the detection line intersects with an obstacle in the detection area, the obstacle is detected and the detection result is obtained. The detection line covers the detection area with a certain angular resolution. The detection line can be illustrated in the form of a ray with the robot as the center.
[0043] It can be considered that, depending on whether the detection line intersects with the obstacle in the detection area, the detection result may include whether the obstacle is detected or not. In the case of an obstacle being detected, in order to further explore whether the obstacle will affect the robot, the robot can determine the obstacle information according to the cost map, such as the distance and relative position between the robot and the obstacle. Furthermore, when an obstacle is detected, the surrounding 8 neighborhoods of its corresponding grid are marked as obstacle areas.
[0044] The angular resolution may be set according to the size of obstacles to be detected in common application scenarios. Specifically, the angular resolution is negatively correlated with the size of obstacles.
[0045] Step 130: The robot updates the target intersection point based on the obtained information about each obstacle.
[0046] Obstacles include static obstacles and dynamic obstacles. Static obstacles are fixed in position, and the robot can avoid them by actively avoiding them. Dynamic obstacles have independent motion trajectories and are located at different positions at different times. Based on this, if the robot wants to avoid dynamic obstacles, it needs to predict the motion information of dynamic obstacles in order to estimate whether the dynamic obstacles will affect the robot's motion at a certain moment in the future, thereby achieving obstacle avoidance.
[0047] In order to distinguish different obstacles, it can be assumed that the movement of dynamic obstacles is linear. Based on this assumption, the obstacle information determined based on the detection results corresponding to multiple control cycles can be linearly approximated. Linear approximation is to bind the intersection of each obstacle information with the detection line corresponding to the detection area of multiple control cycles to obtain the target intersection. The target intersections corresponding to the same dynamic obstacle will be linearly distributed. Based on the distribution characteristics, even if the obstacle is not finely identified and extracted, the movement trend of the obstacle can be determined, thereby achieving low-computing obstacle avoidance.
[0048] Among them, multiple control cycles correspond to multiple detection areas, each detection area corresponds to a group of detection lines, and the multiple groups of detection lines corresponding to the multiple detection areas intersect to form multiple detection line intersections. For a robot in motion, the detection areas corresponding to multiple control cycles cover different areas and are at different times, and the corresponding detection lines are also different. The groups of detection lines intersect with each other to form detection line intersections. Therefore, if an obstacle is detected within a certain control cycle, the obstacle information of the obstacle is bound to the adjacent detection line intersection, that is, the adjacent intersection is used as the target intersection of the obstacle information.
[0049] Optionally, in each control cycle, the robot can also update the target intersection bound to the obstacle area in the previous control cycle according to the latest detection line intersection, bind the obstacle area to a new detection line intersection that is closer, and use the new detection line intersection as the target intersection.
[0050] Step 140: If it is determined based on the target intersection that there is a dynamic obstacle, the robot predicts the motion information of the dynamic obstacle based on the target intersection corresponding to the dynamic obstacle, and selectively avoids the obstacle based on the motion information.
[0051] Based on the linear motion assumption, the target intersections corresponding to the same dynamic obstacle can be distributed linearly, so the robot can determine whether there is a dynamic obstacle among the detected obstacles based on the distribution characteristics of the target intersections. When it is determined that there is a dynamic obstacle, the robot can predict the motion information of the dynamic obstacle, such as the direction and speed of motion, based on the target intersections corresponding to the dynamic obstacle. This makes it easier for the robot to determine whether the dynamic obstacle is likely to collide with itself at a future moment based on the motion information; if a collision is likely to occur, the robot executes the relevant obstacle avoidance strategy; if it is determined that a collision is not likely to occur, the robot continues to move.
[0052] In an embodiment of the present application, in each control cycle, the robot first constructs the detection area of the current control cycle, and then performs collision detection on the obstacle based on the detection line simulated on the cost map to obtain the detection result; combined with the detection results corresponding to multiple control cycles, the obstacle information detected in each control cycle can be determined. Under the premise that the movement of the dynamic obstacle is linearly approximated, in order to facilitate the distinction between different dynamic obstacles, each obstacle information can be linearly approximated, that is, each obstacle information is bound to the nearest intersection to obtain the corresponding target intersection. If there is a dynamic obstacle in the obstacle, the target intersection corresponding to the dynamic obstacle can be linearly distributed and can be mapped to a certain detection line at the current moment. Based on this distribution characteristic, the robot can analyze the target intersections on the detection line to determine whether there is a dynamic obstacle, and in the case of a dynamic obstacle, the movement information of the obstacle is avoided based on the target intersection corresponding to the dynamic obstacle, so that the robot can achieve selective obstacle avoidance based on the movement information. Obviously, there is no need for refined feature extraction and identification of obstacles in this process. This not only improves the prediction accuracy of dynamic obstacles, but also enables robots with lower computing power to avoid dynamic and static obstacles, thereby ensuring the robot's mobility performance.
[0053] In some embodiments, if no linearly distributed target intersections are found after analysis, it may be because the robot has not detected enough cycles, resulting in a small number of target intersections, so that the target intersections of the dynamic obstacles have not yet shown the characteristics of linear distribution; or it may be that no dynamic obstacles appear in the detection area of the current control cycle. In either case, the robot can continue to enter the next control cycle to detect new / old dynamic obstacles in real time and accurately.
[0054] In some embodiments, in order to improve the accuracy of updating the target intersection point and thus improve the reliability of the linear approximation, the target intersection point includes a first target intersection point determined in the current control cycle and a second target intersection point determined in the historical control cycle. The first target intersection point is obtained by binding the new intersection point generated in the current control cycle based on each obstacle information not bound to the detected previous intersection point through a preset rule; the second target intersection point is obtained by updating the new intersection point.
[0055] That is to say, the update of the target intersection includes two aspects. On the one hand, for the newly detected obstacle information or the obstacle information detected in the historical cycle that has not been bound due to failure to meet the preset rules, it can be bound based on the new intersection generated in the current control cycle, that is, the first target intersection is a process from nothing to something; on the other hand, for the obstacle information that has been bound to the intersection in the previous control cycle, the bound intersection can be compared with the new intersection to determine the closer one as the binding intersection, that is, the second target intersection is a process from binding to better binding. Through binding and updating, the motion information after linear approximation can be made as close to the real motion information of the dynamic obstacle as possible, which helps to improve the accuracy of the dynamic obstacle motion prediction.
[0056] In some embodiments, in order to improve the accuracy of linear approximation, for each obstacle information not bound to the intersection of the detection line, the robot may perform the following steps:
[0057] Step A1: The robot determines, from the new intersection points, each first new intersection point corresponding to the detection line corresponding to the first position information in the obstacle information.
[0058] For each obstacle information, it is detected by the detection line at the corresponding moment. Based on the first position information in the obstacle information, the detection line that detects the obstacle information can be determined. As the number of control cycles increases, the number of corresponding detection areas increases, and the number of intersections of the detection lines corresponding to the detection areas increases. In order to improve the efficiency of linear approximation, the robot can determine the first new intersection from the new intersections generated in the current control cycle according to the detection line. For example, the new intersection corresponding to the detection line can be determined as the first new intersection.
[0059] Step A2: The robot determines each distance value between the first position information and each first new intersection point.
[0060] Step A3: If the minimum distance value is less than the preset error value, the robot determines the first new intersection point corresponding to the minimum distance value as the first target intersection point of the obstacle information.
[0061] After determining the first new intersection, the robot can determine the distance value between each first new intersection and the first position information. In order to avoid the target intersection from seriously deviating from the actual position of the obstacle for linear approximation, the robot can determine the minimum distance value from each distance value, and determine whether the minimum distance value is less than the preset error value, which can limit the deviation between the first target intersection and the actual position within a reasonable range. Therefore, if the minimum distance value is less than the preset error value, it means that the intersection of the detection line corresponding to the minimum distance value meets the linear approximation requirements, and it can be used as the first target intersection bound to the obstacle information. It can be understood that in the next control cycle, the first target intersection bound to the current control cycle is automatically updated to the second target intersection, that is, it becomes the target intersection determined by the historical control cycle.
[0062] Optionally, the preset error threshold may be determined based on sensor error, positioning error and redundant distance.
[0063] In this embodiment, a detection line for detecting the obstacle information is first determined through the first position information in the obstacle information, and then the first new intersection is filtered out from the plurality of new intersections based on the detection line to improve the efficiency of linear approximation; by calculating the distance value between the first position information and each first new intersection, that is, when it is determined that the deviation between the approximated first target intersection and the actual position of the obstacle is not large, the first new intersection corresponding to the smallest distance value is determined as the target intersection of the obstacle information.
[0064] In some embodiments, in order to minimize the deviation between the second target intersection and the real position of the obstacle, that is, to improve the accuracy of obstacle information binding, the robot can also update each second target intersection based on the detection line of the current control cycle. Therefore, for each second target intersection, the robot can perform the following steps:
[0065] Step B1: The robot determines, from the new intersection points generated in the current control cycle, a second new intersection point corresponding to a detection line corresponding to second position information in obstacle information corresponding to a second target intersection point.
[0066] Step B2: If the distance between the second position information and the second new intersection is smaller than the distance between the second position and the second target intersection, the robot updates the second new intersection to the second target intersection.
[0067] The reason for updating the second target intersection is that the current control cycle simulates a new detection line, which will generate new detection line intersections, i.e., new intersections. The distance between these new intersections and the obstacle information corresponding to the second target intersection may be closer than the distance between the original bound detection line intersections. In this case, in order to minimize the deviation between the second target intersection and the real position of the obstacle and improve the accuracy of obstacle information binding, the robot can update the second new intersection corresponding to the detection line to the second target intersection bound to the obstacle information.
[0068] Based on this, during the update process, the robot only needs to determine the second new intersection between the detection line corresponding to the second position information in the obstacle information corresponding to the second target intersection and the detection line at the current moment, and then determine whether to update the second target intersection based on the second new intersection according to the size relationship between the distance value between the second position information and the second new intersection and the distance value between the second position and the second target intersection. Specifically, if the distance value between the second position information and the second new intersection is less than the distance value between the second position and the second target intersection, the robot updates the second new intersection to the second target intersection; if the distance value between the second position information and the second new intersection is greater than or equal to the distance value between the second position and the second target intersection, the second target intersection is not updated.
[0069] For example, see Figure 2 , there are intersections between the detection lines of the robot at different times. Assume that there are times t1 (blue line), t2 (red line), t3 (yellow line), and t4 (green line).
[0070] Exemplarily, at time t1, the detection line simulated by the robot detects an obstacle at point P1. At this time, the detection line L1 where it is located, the time is t1, and the distance d1 from the robot can be recorded. Because there are no detection lines at other times, P1 cannot be bound to the intersection of the detection lines for the time being. At time t2, the detection line simulated by the robot detects an obstacle at point P2. At this time, the detection line L2 where it is located, the time is t2, and the distance d2 from the robot can be recorded. At time t2, the robot will also determine whether P1 and P2 can be bound to the intersection of the detection lines at times t1 and t2. When the distance between the intersection and P1 and P2 is less than the set value, it can be bound to the intersection of the detection lines to obtain the first target intersection. At t3, the first target intersection bound at t2 becomes the second target intersection. The robot will selectively update each second target intersection based on the detection line intersections at t1, t2, and t3 (the point where any two detection lines intersect is the intersection). If a second new intersection is closer to P1 and P2 than the originally bound second target intersection, the second target intersection bound to P1 and P2 will be updated to the closer detection line intersection.
[0071] That is, at each moment, it will detect whether the target intersection corresponding to the obstacle information detected in the current and previous control cycles (which can be within a set number of cycles, such as within the 10 control cycles closest to the current moment) needs to be updated. For example, the obstacle information that originally had no bound intersection can be updated to be bound to a first target intersection, or the second target intersection bound to the original obstacle information can be updated, such as updating the bound intersection of the A detection line to the closer B detection intersection. Among them, setting the number of cycles instead of all control cycles can reduce the amount of data calculation, improve efficiency and computing load.
[0072] Assuming that the number of cycles is set to 4, at time t4, the robot has obtained the information of the set number of cycles. The robot obtains real-time detected obstacle information at time t4. For example, the robot detects that there is an obstacle at point P3. The detection line corresponding to point P3 is L4, the time is t4, and the distance is d4. At time t4, the second target intersection bound at the first three moments will also be selectively updated, and the intersection information bound with obstacle information and with the target intersection with the detection line at time t4 will be mapped to the detection line at time t4. At this time, there are target intersections P1, P2, and P3 on L4 (P3 can be a target intersection bound to an obstacle or an obstacle point without a suitable target intersection).
[0073] In some embodiments, in order to efficiently and accurately determine the dynamic obstacle, before the aforementioned step 130, the following is further included:
[0074] Step C1, determining the number of target intersections among the detection intersections where each detection line of the current control cycle intersects with the detection lines corresponding to multiple control cycles.
[0075] Step C2: If there is a target detection line, the robot determines that there is a dynamic obstacle.
[0076] After linear approximation of each obstacle information, if there is a dynamic obstacle, the target intersection points corresponding to the dynamic obstacle are linearly distributed. Figure 2 , it can be intuitively seen that the target intersection points of the dynamic obstacles will be distributed on the same detection line, and this detection line is the detection line of the current control cycle. Therefore, in order to efficiently and accurately determine whether there are dynamic obstacles based on each target intersection point, the robot can use the number of intersection points that are target intersection points among the detection intersection points where each detection line of the current control cycle intersects with each detection line corresponding to multiple control cycles. If the number of target intersection points on a certain detection line of the current control cycle is greater than the preset number threshold, it can be considered that the distribution of each target intersection point on the detection line is consistent with the distribution of the target intersection point corresponding to the dynamic obstacle. Based on this, the detection line can be determined as the target detection line, and the presence of a dynamic obstacle is determined based on the target detection line.
[0077] Obstacle information may belong to dynamic obstacles or static obstacles. The position information of static obstacles will not change, and theoretically there is only one target intersection point, but due to the influence of detection errors and environmental factors, the number of target intersection points may fluctuate between 1 and 2. The position information of dynamic obstacles will change over time, so the obstacle information of dynamic obstacles detected at different times can be bound to different detection line intersection points, that is, the number of target intersection points corresponding to dynamic obstacles is large. In order to accurately filter static obstacles, the number threshold can be set larger, such as 5 to 20. Of course, the number threshold is less than or equal to the set number of control cycles.
[0078] Still reading Figure 2 , assuming that the threshold of the number of target intersections is 2 (for ease of explanation only, it is unlikely to be set to 2 in practice), then the number of target intersections on L4 at this time meets the threshold setting, and linear approximation judgment begins. That is, according to the corresponding moments of obstacle detection at points P1, P2, and P3, and the distance from the robot, it is determined whether the robot is approximately linearly approaching the robot. If so, it is determined that there is a dynamic obstacle. For obstacle points bound to target intersections, linear prediction can be directly performed using the coordinate information of the bound target intersection.
[0079] Through this solution, when the robot is making dynamic obstacle judgments, it can preliminarily screen obstacle points with approximate linear motion based on the number of target intersections on the simulated detection line, and then perform linear simulation based on the target intersections and the detection status of the obstacles at the current moment to determine whether there are dynamic obstacles, which is efficient and accurate.
[0080] In the embodiment of the present application, the robot can determine whether there is a target detection line by counting the number of target intersections among the detection intersections where each detection line of the current control cycle intersects with each detection line corresponding to multiple control cycles based on the distribution characteristics of the target intersections on each detection line. If there is a target detection line, it means that the target intersections corresponding to the dynamic obstacle have been found, thereby efficiently and accurately determining the presence of a dynamic obstacle.
[0081] In some embodiments, it is understood that a dynamic obstacle may correspond to a target detection line, that is, to a set of target intersection points. If there is at least one dynamic obstacle, for each target detection line, the robot can accurately predict the motion information of different dynamic obstacles by following the steps below:
[0082] Step D1: The robot screens out singular values in each target intersection point corresponding to the target detection line to obtain a valid target intersection point.
[0083] Errors may occur during obstacle detection and during obstacle linear approximation, which may result in singular values on the target detection line in addition to the target intersections corresponding to dynamic obstacles. Singular values may also appear when dynamic obstacles are blocked. If these singular values are not filtered, the subsequent prediction accuracy of the motion information of dynamic obstacles may be low. In order to improve the accuracy of motion information prediction, the robot can filter out singular values from each target intersection on the target detection line to obtain valid data, i.e., valid target intersections.
[0084] Exemplarily, the robot can filter out singular values in each target intersection through the interquartile range (IQR). The IQR can be determined by calculating the difference between the first quartile (Q1) and the third quartile (Q3) of each target intersection. Based on this, if a target intersection is less than Q1-1.5×IQR or greater than Q3+1.5×IQR, the target intersection can be considered a singular value and can be deleted to ensure the validity of the data.
[0085] For example, the obvious singular values can be eliminated according to the position of the target intersection, the detection time information, the distance information and the linear approximation principle. For example, a dynamic obstacle that moves far and near may be caused by the dynamic obstacle being blocked at the middle moment. In this case, the target intersection at the middle moment can be eliminated.
[0086] Step D2: The robot predicts the movement speed and direction of the dynamic obstacle based on the obstacle information corresponding to each valid target intersection point.
[0087] After determining the effective target intersection point, the robot can predict the movement speed and direction of the dynamic obstacle according to the obstacle information corresponding to the effective target intersection point.
[0088] In this embodiment, in order to avoid the target intersection points corresponding to non-dynamic obstacles on the target detection line, that is, singular values, the target intersection points on the target detection line can be filtered first to remove the singular values to obtain valid target intersection points. Based on this, the robot can accurately predict the movement speed and direction of dynamic obstacles based on the valid target intersection points to facilitate accurate obstacle avoidance.
[0089] In some embodiments, the obstacle information includes location information and time information, and the aforementioned step D2 specifically includes:
[0090] Step D21: The robot constructs a motion model of the dynamic obstacle based on each position information and each time information.
[0091] In the motion modeling of dynamic obstacles, if it is assumed that the motion of the obstacle can be approximated as uniform linear motion, then linearity can be used to construct the motion model. First, a linear equation can be constructed, and then the position information and time information can be brought into the linear equation to determine the parameters of the linear equation to obtain the motion model.
[0092] For example, it is assumed that the linear equation can be expressed as:
[0093] s(t)=υ·t+s0
[0094] S is the position of the dynamic obstacle at time t, v is the moving speed of the dynamic obstacle, t is the moving time of the dynamic obstacle, and S0 is the position of the dynamic obstacle at time t0.
[0095] By bringing each position information and time information into the linear equation, the parameters of the linear equation can be determined to obtain a motion model.
[0096] Step D22: The robot predicts the movement speed and direction based on the movement model.
[0097] After the motion model is constructed, the motion speed and direction of the dynamic obstacle can be predicted through the motion model.
[0098] In the embodiment of the present application, in each obstacle information corresponding to each valid target point, the position information of the dynamic obstacle is advanced over time, so its motion model can be constructed through the dynamic obstacle information. After the motion model is obtained, the dynamic obstacle can be predicted based on the motion model.
[0099] In some embodiments, in order to improve the accuracy of motion information prediction, the robot can also predict the motion information of dynamic obstacles through an extended Kalman filter (EKF).
[0100] Exemplarily, a state vector of a dynamic obstacle may be defined first. Based on a two-dimensional motion model, the state vector may include position and velocity:
[0101]
[0102] Where x and y are the positions of the dynamic obstacle, and v x and v y is the moving speed of the dynamic obstacle on the x-axis and y-axis.
[0103] Assuming that the motion of a dynamic obstacle can be described by a uniform linear motion model, the state transfer equation of the dynamic obstacle can be expressed as:
[0104]
[0105] Among them, u k is the control input and Δt is the time interval.
[0106] The observation equation can be written as:
[0107]
[0108] Based on the observation equation z k , the position of the dynamic obstacle can be directly observed. Specifically, the state vector can be initialized based on the initial state of the obstacle, and the next state of the dynamic obstacle can be predicted by the state transfer equation at each time step k. In order to achieve real-time prediction, the current new observation data can be obtained, and the state estimation of the dynamic obstacle can be updated through the observation equation to obtain accurate and effective motion information.
[0109] In some examples, for the convenience of prediction, after binding the obstacle information to the corresponding target intersection, the position information in the obstacle information can be updated based on the position information of the target intersection. Based on this, when predicting the motion information of the dynamic obstacle, the obstacle information used is the updated obstacle information.
[0110] In some embodiments, in order to efficiently and accurately determine whether there is a risk of collision between the robot and a dynamic obstacle at a future moment, the robot can construct a safety area within the detection area in addition to constructing a detection area. Figure 3 , the safety zone can be centered on the robot, in the same direction as the robot's movement direction and in a pyramid shape, that is, the size of the safety zone perpendicular to the movement direction is negatively correlated with the distance between the robots. The reason for constructing the safety zone in this way is that the farther away from the robot, the smaller the collision risk, so the lateral size of the safety zone (the size perpendicular to the movement direction) is smaller; the closer to the robot, the greater the collision risk, so the lateral size of the safety zone is larger.
[0111] Based on the security area, the aforementioned step 140 specifically includes:
[0112] Step E1: If it is determined based on the motion information that a dynamic obstacle intrudes into the safety area after a preset time period, the robot avoids the obstacle by itself.
[0113] When a robot in motion determines that it may collide with a dynamic obstacle, it can use obstacle avoidance strategies such as emergency stop, deceleration, and change direction for safety reasons.
[0114] For example, the robot's detection area and safety area are first created, and then the cost map filters out temporary obstacles through the static layer, and the stored temporary obstacles are constructed through the radiation algorithm to detect collisions. Then, according to the changes of obstacles on the detection line, the obstacle interference is predicted. When the predicted obstacle invades the safety area, the robot performs a safe navigation strategy. This strategy can reduce the high CPU consumption caused by the perception and recognition algorithm and the abnormal robot behavior caused by misidentification and prediction errors, and reduce the reliance on dynamic prediction accuracy.
[0115] In the embodiment of the present application, the robot constructs a pyramid-shaped safety zone, and can efficiently determine whether the robot will collide with a dynamic obstacle by determining whether the dynamic obstacle invades the safety zone after a preset time period based on the motion information. When the robot determines that it may collide with a dynamic obstacle, the robot can select obstacle avoidance strategies such as emergency stop, deceleration, and change of direction according to the specific situation to improve safety.
[0116] In some embodiments, if it is determined based on the motion information that a dynamic obstacle intrudes into the safety area after a preset time period, the robot is controlled to brake or decelerate, including:
[0117] Step E11: The robot determines the predicted position of the dynamic obstacle within the safety area.
[0118] After determining the preset time period, the robot may substitute the preset time period into the motion model of the aforementioned dynamic obstacle to determine the predicted position of the robot within the safety area after the preset time period.
[0119] Step E12: The robot constructs a speed limit function based on the predicted position.
[0120] Based on the distance between the predicted position and the current position of the robot, a speed limit function is constructed:
[0121]
[0122] v max (d) is the maximum permissible speed based on distance d; v base is the base speed of the robot when there are no obstacles, and d' is the threshold distance. When the distance is less than this value, the speed will gradually decrease.
[0123] Step E13: The robot controls the robot to brake or decelerate based on the speed limit function to avoid dynamic obstacles.
[0124] As the robot moves, d is continuously updated and v is calculated. max (d) When v max (d) When it is less than the current speed of the robot, the robot’s speed is gradually reduced until it reaches vmax (d); when v max (d) When the speed is less than the robot’s current speed, if the distance is small and the risk of collision is high, the robot can brake immediately.
[0125] In an embodiment of the present application, if a dynamic obstacle is determined to invade a safe area after a preset time period based on motion information, the robot can construct a speed limit function according to the predicted position of the dynamic obstacle in the safe area, and avoid the obstacle based on the speed limit function to ensure the safety of the robot and the dynamic obstacle.
[0126] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0127] Corresponding to the obstacle avoidance method applied to the robot in the above embodiment, Figure 4 A structural block diagram of an obstacle avoidance device 4 applied to a robot provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0128] Reference Figure 4 , the obstacle avoidance device 4 applied to the robot comprises:
[0129] A construction module 41 is used to construct a detection area centered on the robot corresponding to the control period based on the attribute information of the robot in each control period;
[0130] A detection module 42 is used to construct a detection line with a preset angular resolution within the detection area to detect obstacles and obtain a detection result;
[0131] An updating module 43 is used to update a target intersection point based on each obstacle information obtained; each obstacle information is determined based on each detection result corresponding to a control cycle; the target intersection point is a detection line intersection point bound to any obstacle information, and the detection line intersection point is an intersection point where detection lines corresponding to detection areas of different control cycles intersect;
[0132] The obstacle avoidance module 44 is configured to predict the motion information of the dynamic obstacle based on the target intersection point corresponding to the dynamic obstacle if the dynamic obstacle is determined to exist based on the target intersection point, so as to selectively avoid the obstacle based on the motion information.
[0133] Optionally, the obstacle avoidance device 4 may further include:
[0134] A first determination module is used to determine the number of intersections that are target intersections among the detection intersections where each detection line of the current control cycle intersects with the detection lines corresponding to the multiple control cycles;
[0135] The second determination module is used to determine the presence of a dynamic obstacle if there is a target detection line, and the number of intersections of the target detection line is greater than a preset number threshold.
[0136] Optionally, at least one dynamic obstacle is included; the obstacle avoidance module 44 may include a prediction unit, the prediction unit being used to:
[0137] For each target detection line:
[0138] Screen out the singular values in each target intersection point corresponding to the target detection line to obtain the valid target intersection point;
[0139] The movement speed and direction of the dynamic obstacle are predicted based on the obstacle information corresponding to each valid target intersection point.
[0140] Optionally, the obstacle information includes location information and time information, and the prediction unit is specifically used to:
[0141] A motion model of a dynamic obstacle is constructed based on each position information and each time information; the motion model is a linear model;
[0142] Predict motion speed and direction based on motion model.
[0143] Optionally, the target intersection point includes a first target intersection point determined in the current control cycle and a second target intersection point determined in the historical control cycle; the updating module 43 includes:
[0144] A binding unit, used for binding the first target intersection point with the new intersection point generated in the current control cycle based on each obstacle information not bound to the detected previous intersection point through a preset rule;
[0145] The updating unit obtains the second target intersection point based on the new intersection point.
[0146] Optionally, the binding unit is specifically used for:
[0147] For each obstacle information that is not bound to the intersection of the detection line:
[0148] Determine, from the new intersection points, each first new intersection point corresponding to the detection line corresponding to the first position information in the obstacle information;
[0149] Determine each distance value between the first position information and each first new intersection point;
[0150] If the minimum distance value is less than the preset error value, the first new intersection point corresponding to the minimum distance value is determined as the first target intersection point of the obstacle information.
[0151] Optionally, a pyramid-shaped safety area centered on the robot and in the same direction as the moving direction of the robot is provided in the detection area, and the size of the safety area perpendicular to the moving direction is negatively correlated with the distance between the robots; the obstacle avoidance module 44 further includes an obstacle avoidance unit, which is used to:
[0152] If it is determined based on the motion information that the dynamic obstacle intrudes into the safety area after a preset time period, determining a predicted position of the dynamic obstacle within the safety area;
[0153] Build a speed limit function based on the predicted position;
[0154] Based on the speed limit function, the robot is controlled to brake or slow down to avoid dynamic obstacles.
[0155] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0156] Figure 5 This is a schematic diagram of the physical structure of a robot provided in one embodiment of the present application. Figure 5 As shown, the robot 5 of this embodiment includes: at least one processor 50 ( Figure 5 Only one processor is shown in the figure), a memory 51, and a computer program 52 stored in the memory 51 and executable on at least one processor 50. When the processor 50 executes the computer program 52, the steps in any of the above-mentioned obstacle avoidance method embodiments applied to a robot are implemented, for example Figure 1 Steps 110-140 are shown.
[0157] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0158] In some embodiments, the memory 51 may be an internal storage unit of the robot 5, such as a hard disk or memory of the robot 5. In other embodiments, the memory 51 may also be an external storage device of the robot 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the robot 5.
[0159] Furthermore, the memory 51 may include both an internal storage unit and an external storage device of the robot 5. The memory 51 is used to store operating devices, applications, boot loaders, data, and other programs, such as program codes of computer programs, etc. The memory 51 may also be used to temporarily store data that has been output or is to be output.
[0160] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0161] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0162] An embodiment of the present application provides a computer program product. When the computer program product runs on a robot, the robot can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0163] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form. The above-mentioned computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera device / robot, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0164] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0165] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0166] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the above modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0167] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0168] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An obstacle avoidance method for a robot, characterized in that: The obstacle avoidance method comprises: In each control cycle, a detection area corresponding to the control cycle and centered on the robot is constructed based on the attribute information of the robot; In the detection area, a detection line with a preset angular resolution is constructed to detect obstacles and obtain a detection result; The target intersection is updated based on each obstacle information obtained; each obstacle information is determined based on each detection result corresponding to the control cycle; the target intersection is a detection line intersection bound to any obstacle information, and the detection line intersection is an intersection where detection lines corresponding to detection areas of different control cycles intersect; If it is determined based on the target intersection that there is a dynamic obstacle, motion information of the dynamic obstacle is predicted based on the target intersection corresponding to the dynamic obstacle, so as to selectively avoid the obstacle based on the motion information.
2. The obstacle avoidance method according to claim 1, characterized in that: The determining the presence of a dynamic obstacle based on the target intersection point includes: Determine the number of intersections that are the target intersections among the detection intersections where each detection line of the current control cycle intersects with the detection lines corresponding to the plurality of control cycles; If there is a target detection line, it is determined that there is a dynamic obstacle, and the number of intersections of the target detection line is greater than a preset number threshold.
3. The obstacle avoidance method according to claim 2, characterized in that: comprising at least one of the dynamic obstacles; and predicting the motion information of the dynamic obstacle based on the target intersection point corresponding to the dynamic obstacle comprises: for each of the target detection lines; Screening out singular values in each of the target intersection points corresponding to the target detection line to obtain a valid target intersection point; The movement speed and movement direction of the dynamic obstacle are predicted based on the obstacle information corresponding to each of the valid target intersection points.
4. The obstacle avoidance method according to claim 3, characterized in that: The obstacle information includes position information and time information, and the predicting of the movement speed and movement direction of the dynamic obstacle based on the obstacle information corresponding to each valid target intersection includes: Constructing a motion model of the dynamic obstacle based on each of the position information and each of the time information; the motion model is a linear model; The motion speed and the motion direction are predicted based on the motion model.
5. The obstacle avoidance method according to any one of claims 1 to 4, characterized in that: The target intersection point includes a first target intersection point determined in the current control cycle and a second target intersection point determined in the historical control cycle; The updating of the target intersection point based on the obtained obstacle information includes: The first target intersection point is obtained by binding each obstacle information not bound to the detected first intersection point and the new intersection point generated in the current control cycle through a preset rule; The second target intersection point is updated based on the new intersection point.
6. The obstacle avoidance method according to any one of claims 1 to 4, characterized in that: The first target intersection point is obtained by binding each obstacle information not bound to the detected first intersection point and the new intersection point generated in the current control cycle through a preset rule, including: For each obstacle information not bound to the intersection of the detection line: Determine, from the new intersection points, each first new intersection point corresponding to the detection line corresponding to the first position information in the obstacle information; Determine each distance value between the first position information and each of the first new intersection points; If the minimum distance value is less than the preset error value, the first new intersection point corresponding to the minimum distance value is determined as the first target intersection point of the obstacle information.
7. The obstacle avoidance method according to any one of claims 1 to 4, characterized in that: A pyramid-shaped safety area is provided in the detection area with the robot as the center and in the same direction as the moving direction of the robot, and the size of the safety area perpendicular to the moving direction is negatively correlated with the distance between the robots; the selective obstacle avoidance based on the motion information includes: If it is determined based on the motion information that the dynamic obstacle intrudes into the safety area after a preset time period, determining a predicted position of the dynamic obstacle in the safety area; constructing a speed limit function based on the predicted position; The robot is controlled to brake or decelerate based on the speed limit function to avoid the dynamic obstacle.
8. An obstacle avoidance device for a robot, characterized in that: include: A construction module, used for constructing a detection area centered on the robot corresponding to each control cycle based on the attribute information of the robot; A detection module, used to construct a detection line with a preset angular resolution within the detection area to detect obstacles and obtain a detection result; An updating module, used for updating the target intersection point based on the obtained information of each obstacle; Each obstacle information is determined based on each detection result corresponding to the control cycle; the target intersection point is a detection line intersection point bound to any obstacle information, and the detection line intersection point is an intersection point where detection lines corresponding to detection areas of different control cycles intersect; The obstacle avoidance module is used to predict the motion information of the dynamic obstacle based on the target intersection point corresponding to the dynamic obstacle if the dynamic obstacle is determined to exist based on the target intersection point, so as to selectively avoid the obstacle based on the motion information.
9. A robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the obstacle avoidance method applied to a robot as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the obstacle avoidance method applied to a robot as described in any one of claims 1 to 7 is implemented.