Robot obstacle avoidance method, mobile robot and chip

Through real-time local map update and obstacle classification based on line laser data, the problem of high cost or low accuracy of robots in establishing local maps is solved, high-precision obstacle recognition and obstacle avoidance strategies are realized, and the user experience of sweeping robots is improved.

CN119225347APending Publication Date: 2024-12-31AMICRO SEMICONDUCTOR CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310766354.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-27
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Existing robots have high cost or low accuracy when building local maps, and they cannot choose the appropriate cleaning path according to the type of obstacles, resulting in poor user experience.

Method used

By updating local maps in real time based on line laser data, judging and classifying obstacles, triggering corresponding obstacle avoidance strategies based on obstacle categories and operating modes, using a single camera single-line laser module to obtain point cloud data, fusing and processing point cloud data to improve the map Precision and obstacle length judgment.

Benefits of technology

It realizes low-cost and high-precision local map updates and obstacle classification, improves the smoothness of robot obstacle avoidance and strategic planning, and enhances the user experience of sweeping robots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225347A_ABST
    Figure CN119225347A_ABST
Patent Text Reader

Abstract

The invention provides a robot obstacle avoidance method, a mobile robot and a chip, and the obstacle avoidance method greatly improves the precision of a local map through the comparison and fusion of real-time line laser point cloud data and point cloud data marked in the local map, so that the robot can avoid obstacles in real time, and the operation is smoother. Meanwhile, the length information of the obstacle can be accurately obtained, the defect that in the prior art, only line laser data height information can be utilized is overcome, and after the obstacle is classified based on the length information of the obstacle, the mobile robot can plan more obstacle avoidance strategies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent robots, and in particular to a robot obstacle avoidance method, a mobile robot and a chip. Background Art

[0002] In SLAM technology, the robot mainly relies on the map established by the sensor for positioning and navigation. The map can be divided into two types: local map and global map. Among them, the global map records all feature points since the SLAM operation. Obviously, it is larger in scale and is mainly used to express the entire environment. If the positioning is directly performed on the global map, the burden on the computer will be too great. The global map is mainly used for loop detection and map expression. The local map only retains the feature points close to the current position of the robot, and discards the feature points far away or out of the field of view, describing the feature point information near the robot. During the movement, the robot mainly adjusts its own movement path according to the obstacle position marked in the local map to avoid obstacles. However, the current robots mainly use laser radar or visual sensors to establish local maps. The former is high in cost and the latter is low in precision. It is urgent to develop a low-cost solution that can establish high-precision local maps. In addition, most sweeping robots clean along the edge of the obstacle when encountering obstacles, and cannot choose the appropriate cleaning path according to the type of obstacle. Although some sweeping robots can classify obstacles, they can only judge whether to cross obstacles through simple height information. Therefore, it is necessary to provide a technical solution that can classify obstacles to improve the user experience of the sweeping robot. Summary of the invention

[0003] The present application provides a robot obstacle avoidance method, a mobile robot and a chip. The specific technical solutions are as follows:

[0004] A robot obstacle avoidance method, the obstacle avoidance method comprising: step S1, based on line laser data, the robot continuously updates a local map; step S2, based on the local map, the robot classifies obstacles marked therein; step S3, based on the category of the obstacle and the operation mode of the robot, the robot triggers a corresponding obstacle avoidance strategy.

[0005] Furthermore, in the step S1, the method for the robot to continuously update the local map based on the line laser data includes: step S11, obtaining the line laser data of the current frame and processing it to obtain point cloud data that meets the preset conditions; step S12, judging whether the current local map is an empty map, if so, using the point cloud data that meets the preset conditions to update the local map, if not, entering step S13; step S13, judging whether the degree of consistency between the point cloud data that meets the preset conditions and the point cloud data in the local map is within an error range, if not, updating the point cloud data that meets the preset conditions into the local map, if so, entering step S14; step S14, fusing the point cloud data that meets the preset conditions with the point cloud data in the local map, and then clearing the local map and using the fused point cloud data to update the local map.

[0006] Furthermore, in the step S11, the line laser data of the current frame is obtained and processed to obtain the method of point cloud data that meets the preset conditions, including: step S111, after obtaining the line laser data of the current frame, retain the point cloud data whose height exceeds the preset height; step S112, every preset angle, from one end to the other end of the line laser data, take a point cloud data at each angle, if there is only one point cloud data at an angle, then the point cloud data is the point cloud data that meets the preset conditions, if there are multiple point cloud data at an angle, then enter step S113; step S113, compare the distances between the multiple point cloud data and the robot, take the minimum distance value, and at the same time perform mean filtering on the heights of the multiple point cloud data to obtain the average height value, and take the point cloud data with the minimum distance value and the average height value as the only point cloud data at the angle.

[0007] Furthermore, the step S12 also includes: when the current local map is not an empty map, determining whether the current position of the robot differs from the position of the robot when the local map is updated by more than a preset distance; if so, clearing the local map, and then using point cloud data that meets the preset conditions to update the local map; if not, entering step S13; wherein the robot records its world coordinates each time it acquires a line laser.

[0008] Furthermore, in step S14, the method for fusing the point cloud data that meets the preset conditions with the point cloud data in the local map includes: comparing the distances between the point cloud data that meets the preset conditions and the point cloud data in the local map and the robot at each angle, taking the minimum distance value therebetween, performing mean filtering on the heights of the point cloud data that meets the preset conditions and the point cloud data in the local map to obtain an average height value, and using the point cloud data with a distance of the minimum distance value and a height of the average height value as the only point cloud data at the angle to obtain fused point cloud data.

[0009] Furthermore, the updating method also includes: when the distance between the robot and the point cloud data marked in the local map is less than a preset distance, the robot triggers obstacle avoidance and clears the current local map, otherwise the current local map is retained.

[0010] Furthermore, in the step S2, based on the local map, the method for the robot to classify the obstacles marked therein includes: step S21, based on the point cloud data that meets the preset conditions, judging whether the obstacle is a linear obstacle, if so, using the point cloud data of the two end points of the line laser data to calculate the length of the obstacle, if not, entering step S22, wherein the point cloud data is used to represent the obstacle; step S22, using the point cloud data that meets the preset conditions to fit an ellipse and calculate the length of the obstacle, and then entering step S23; step S23, classifying based on the length of the obstacle, when the length of the obstacle exceeds a threshold, classifying the obstacle as a large obstacle, otherwise it is classified as a small obstacle.

[0011] Furthermore, in step S21, the method for determining whether the obstacle is a linear obstacle includes: step S211, calculating a regression equation by a linear regression equation formula based on point cloud data that meets preset conditions; step S212, calculating a residual based on the regression equation, if the residual is less than a threshold value, the obstacle is a linear obstacle, otherwise it is a nonlinear obstacle.

[0012] Furthermore, in the step S21, the method of calculating the length of the obstacle using the point cloud data at the two endpoints of the line laser data includes: step S213, projecting the point cloud data at the two endpoints of the line laser data onto the regression equation respectively to obtain two projection points; step S214, calculating the distance between the two projection points based on the two-point distance formula to obtain the length of the obstacle.

[0013] Furthermore, in step S22, the method of fitting an ellipse using the point cloud data that meets the preset conditions and calculating the length of the obstacle includes: step S221, fitting an ellipse by the least squares method, wherein the general formula of the ellipse equation is Ax 2 +Axy+By 2 +Cx+Dy+E=0; Step S222, set the partial derivatives of each parameter to zero, and obtain the following equations:

[0014]

[0015] Wherein, N is the number of point cloud data that meets the preset conditions, and N is greater than or equal to 5; Step S223, solve the above equations to obtain the values ​​of A, B, C, D and E, and then calculate the semi-major axis a of the ellipse, Among them, twice the semi-major axis of the ellipse is the length of the obstacle.

[0016] Furthermore, in the step S3, based on the type of obstacle and the operation mode of the robot, the method for the robot to trigger a corresponding obstacle avoidance strategy includes: step S31, based on the local map, after the robot detects an obstacle in front, it obtains the current operation mode, when the robot is in the bow-shaped operation mode, it enters step S32, when the robot is in the navigation mode, it enters step S33, when the robot is in the edge mode, it enters step S34; step S32, the robot reduces the speed and determines the type of obstacle in front at the same time, if it is a small obstacle, the robot goes around the obstacle, if it is a large obstacle, the robot turns around; step S33, the robot determines the type of obstacle in front, if it is a small obstacle, the robot goes around the obstacle, if it is a large obstacle, the robot re-plans the operation path; step S34, the robot rotates to avoid obstacles along the edge.

[0017] A mobile robot is used to implement the robot obstacle avoidance method. The mobile robot comprises a line laser module, and the line laser module is used to obtain point cloud data.

[0018] Furthermore, the line laser module is arranged at the front end of the mobile robot, and the line laser emitted by the line laser module is a horizontal straight line slanting downward. The number of the line laser module is 1, the model is ALF02-S, and it includes a straight line laser and a camera.

[0019] A chip stores computer program code, and the robot obstacle avoidance method is implemented when the computer program code is executed.

[0020] The robot obstacle avoidance method described in the present application greatly improves the accuracy of the local map by comparing and integrating the real-time line laser point cloud data with the point cloud data marked in the local map, so that the robot can avoid obstacles in real time and run more smoothly. The present application can implement the local map update method only through a single camera single-line laser (i.e., a line laser module), which reduces the cost compared with the laser radar and improves the accuracy compared with the visual sensor. In addition, the obstacle is judged whether it is a linear obstacle by the line laser data, and then the length of the obstacle is calculated in different ways according to whether the obstacle is linear or not, so as to achieve the classification of the obstacle. Using the method, the length information of the obstacle can be accurately obtained, which improves the disadvantage of only being able to use the height information of the line laser data in the prior art, and after classifying the obstacles based on the length information of the obstacles, the robot can plan more obstacle avoidance strategies. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic flow chart of a robot obstacle avoidance method according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] 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.

[0023] It should be understood that when used in this application, the term "comprising" indicates the presence of the described features, integral bodies, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integral bodies, steps, operations, elements, components and / or their collections. It should also be understood that the term "and / or" used in this application refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0024] As used in this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0025] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance. The reference to "one embodiment" or "some embodiments" described in the specification of the present application means that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in the differences in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0026] When the robot is moving, it mainly adjusts its own moving path according to the position of the obstacle marked in the local map to avoid the obstacle. However, the current robots mainly use lidar or visual sensors to establish local maps. The former is expensive and the latter is low-precision. There is an urgent need to develop a low-cost solution that can establish a high-precision local map. In addition, when most sweeping robots encounter obstacles, they clean along the edge of the obstacle and cannot choose a suitable cleaning path according to the type of obstacle. Although some sweeping robots can classify obstacles, they can only judge whether to cross the obstacle based on simple height information. Therefore, it is necessary to provide a technical solution that can classify obstacles to improve the user experience of sweeping robots.

[0027] In order to solve the above problems, the present application provides a robot obstacle avoidance method, such as Figure 1 As shown, the obstacle avoidance method includes:

[0028] Step S1, based on the line laser data, the robot continuously updates the local map;

[0029] Step S2, based on the local map, the robot classifies the obstacles marked therein;

[0030] Step S3: Based on the type of obstacle and the operation mode of the robot, the robot triggers a corresponding obstacle avoidance strategy.

[0031] Optionally, the local map is built on a map template. When there is no point cloud data on the map template, it is equivalent to an empty map. The point cloud data on the map template can be deleted, added, and modified. In this application, the local map is updated once each frame of line laser data is obtained.

[0032] It should be noted that the line laser data is generated by the line laser module, the module frame rate is 33 frames per second, the robot working speed is generally 300mm / s, and each frame is about 1cm apart. The line laser module emits an infrared laser through the laser transmitter and scans the target object, and then the receiver receives the reflected light and calculates the three-dimensional coordinate information of the target object based on the calibrated relative position between the receiver and the laser transmitter. It can obtain information such as height, distance and angle, thereby completing the precise positioning of the target object.

[0033] As one of the implementation modes, in the step S1, the method for the robot to continuously update the local map based on the line laser data includes: step S11, obtaining the line laser data of the current frame and processing it to obtain the point cloud data that meets the preset conditions; step S12, judging whether the current local map is an empty map, if so, using the point cloud data that meets the preset conditions to update the local map, if not, entering step S13; step S13, whether the degree of consistency between the point cloud data that meets the preset conditions and the point cloud data in the local map is within the error range, if not, updating the point cloud data that meets the preset conditions into the local map, if so, entering step S14; step S14, fusing the point cloud data that meets the preset conditions with the point cloud data in the local map, then clearing the local map and using the fused point cloud data to update the local map. The method described in this embodiment greatly improves the accuracy of the local map by comparing and fusing the real-time line laser point cloud data with the point cloud data marked in the local map, so that the robot can avoid obstacles in real time and run more smoothly.

[0034] As one of the implementation modes, in the step S11, the method of obtaining the line laser data of the current frame and processing it to obtain the point cloud data that meets the preset conditions includes: step S111, after obtaining the line laser data of the current frame, retain the point cloud data whose height exceeds the preset height; step S112, every preset angle, from one end to the other end of the line laser data, take a point cloud data at each angle, if there is only one point cloud data at an angle, then the point cloud data is the point cloud data that meets the preset conditions, if there are multiple point cloud data at an angle, then enter step S113; step S113, compare the distance between multiple point cloud data and the robot, take the minimum distance value, and perform mean filtering on the height of multiple point cloud data to obtain the average height value, and take the point cloud data with the minimum distance value and the average height value as the only point cloud data at the angle. Among them, it is known that the line laser module hits a straight line on the obstacle, and the straight line has two endpoints, and the point cloud data is selected from one end to the other end of the straight line. Preferably, a point cloud data is selected every 1 degree on the straight line to facilitate subsequent calculations. Preferably, in step S11, the preset height is 1.5 cm, and the robot can directly cross obstacles lower than 1.5 cm.

[0035] As one of the implementation modes, the step S12 also includes: when the current local map is not an empty map, determining whether the current position of the robot differs from the position of the robot when the local map is updated by more than a preset distance, if so, clearing the local map, and then using the point cloud data that meets the preset conditions to update the local map, if not, entering step S13; wherein the robot records its world coordinates each time it acquires a line laser. The position of the robot when updating the local map is the position of the robot when the last frame of line laser data is acquired. Preferably, the preset distance is the farthest distance detected by the line laser module, and the farthest distance is 10 cm. If the current robot recognizes an obstacle 10 cm away from the last time the obstacle was marked, the current local map situation is updated to avoid errors.

[0036] As one of the implementation modes, in the step S13, whether the degree of coincidence between the point cloud data that meets the preset conditions and the point cloud data in the local map is within the error range, if not, the point cloud data that meets the preset conditions is updated into the local map, if so, proceed to step S14. Among them, the degree of coincidence refers to the distance between the point cloud data at the same two positions. When the error is 0, the point cloud data at the same two positions overlap. By comparing the errors of the two frames of point cloud data, it can be determined whether the robot detects the same obstacle. When the error is large, it is considered that the current frame of point cloud data and the previous frame of point cloud data do not represent the same obstacle, so the current frame of point cloud data is updated into the local map. It should be noted that the previous frame of point cloud data is not cleared at this time. When the error is small, it is considered that the current frame of point cloud data and the previous frame of point cloud data represent the same obstacle, and the two frames of point cloud data need to be fused together.

[0037] Based on the above embodiment, in step S14, the method for fusing the point cloud data that meets the preset conditions with the point cloud data in the local map includes: comparing the distance between the point cloud data that meets the preset conditions and the point cloud data in the local map and the robot at each angle, taking the minimum distance value therebetween, performing mean filtering on the height of the point cloud data that meets the preset conditions and the point cloud data in the local map to obtain an average height value, and taking the point cloud data with the minimum distance value and the average height value as the only point cloud data at the angle to obtain fused point cloud data. The method described in this embodiment fuses two frames of point cloud data representing the same obstacle together to reduce errors and improve map accuracy.

[0038] As one implementation method, the updating method further includes: when the distance between the robot and the point cloud data marked in the local map is less than a preset distance, the robot triggers obstacle avoidance and clears the current local map, otherwise the current local map is retained. It should be noted that the robot only clears the current local map, and the obstacles will still be marked in the grid map or the global map.

[0039] As one of the implementation modes, in the step S2, based on the local map, the method for the robot to classify the obstacles marked therein includes: step S21, based on the point cloud data that meets the preset conditions, judging whether the obstacle is a linear obstacle, if so, using the point cloud data of the two end points of the line laser data to calculate the length of the obstacle, if not, entering step S22, wherein the point cloud data is used to represent the obstacle; step S22, using the point cloud data that meets the preset conditions to fit an ellipse and calculate the length of the obstacle, and then entering step S23; step S23, classifying based on the length of the obstacle, when the length of the obstacle exceeds the threshold, the obstacle is classified as a large obstacle, otherwise it is classified as a small obstacle. The method described in this embodiment first determines whether the obstacle is a linear obstacle through the line laser data, and then calculates the length of the obstacle in different ways according to whether the obstacle is linear or not, so as to achieve the classification of the obstacle. By adopting the method, the length information of the obstacle can be accurately obtained, which improves the disadvantage of only using the height information of the line laser data in the prior art, and after classifying the obstacles based on the length information of the obstacle, the robot can plan more obstacle avoidance strategies.

[0040] As one of the implementation modes, in step S21, the method for determining whether the obstacle is a linear obstacle includes: step S211, based on the point cloud data that meets the preset conditions, the regression equation is calculated by the linear regression equation formula; step S212, the residual is calculated based on the regression equation, if the residual is less than the threshold, the obstacle is a linear obstacle, otherwise it is a nonlinear obstacle. In step S21, it is first assumed that the obstacle is a linear obstacle, and then the linear regression equation is fitted to obtain y^=bx^+a, where y^ is the y estimate, x^ is the x estimate, a is the intercept, and b is the regression coefficient. In step S22, the assumption is verified by the residual, the horizontal coordinate xi value of the point cloud data that meets the preset conditions is substituted into the regression equation, the corresponding yi^ value is obtained, and the residual e=(yi-yi^)2 is calculated. If the residual e is less than the threshold, it indicates that the point cloud data that meets the preset conditions conforms to the linear regression equation, and the obstacle is a linear obstacle. If the residual e is greater than the threshold, it indicates that the point cloud data that meets the preset conditions does not conform to the linear regression equation, and the obstacle is not a linear obstacle. The method described in the embodiment of the present application determines whether the obstacle is linear or not, which can improve the accuracy of subsequent obstacle length calculation.

[0041] Based on the above embodiment, in step S21, the method for calculating the length of the obstacle using the point cloud data at the two endpoints of the line laser data includes: step S213, projecting the point cloud data at the two endpoints of the line laser data onto the regression equation respectively to obtain two projection points; step S214, calculating the distance between the two projection points based on the two-point distance formula to obtain the length of the obstacle. When the obstacle is a linear obstacle, the horizontal coordinates of the two endpoints of the obstacle are substituted into the regression equation to obtain two projection points, and the distance between the two projection points is used to represent the length of the obstacle. Compared with the method of directly calculating the length of the obstacle using the original point cloud data, the method described in the embodiment of the present application is more accurate and the result is closer to the actual length of the obstacle.

[0042] As one implementation method, in step S22, the method of fitting an ellipse using point cloud data that meets preset conditions and calculating the length of the obstacle includes: step S221, fitting an ellipse by the least squares method, wherein the general formula of the ellipse equation is Ax 2 +Axy+By 2 +Cx+Dy+E=0; Step S222, set the partial derivatives of each parameter to zero, and obtain the following equations:

[0043]

[0044] Wherein, N is the number of point cloud data that meets the preset conditions, and N is greater than or equal to 5; Step S223, solve the above equations to obtain the values ​​of A, B, C, D and E, and then calculate the semi-major axis a of the ellipse, The length of the obstacle is twice the semi-major axis of the ellipse. When the obstacle is not a linear obstacle, in order to obtain a more accurate obstacle length, an ellipse is fitted on the plane, and finally the length of the obstacle is represented by the major axis.

[0045] As one of the implementation modes, in step S3, based on the category of the obstacle and the operation mode of the robot, the method for the robot to trigger the corresponding obstacle avoidance strategy includes: step S31, based on the local map, after the robot detects an obstacle in front, it obtains the current operation mode, when the robot is in the bow-shaped operation mode, it enters step S32, when the robot is in the navigation mode, it enters step S33, when the robot is in the edge mode, it enters step S34; step S32, the robot reduces the speed and determines the category of the obstacle in front at the same time, if it is a small obstacle, the robot bypasses the obstacle, if it is a large obstacle, the robot turns around; step S33, the robot determines the category of the obstacle in front, if it is a small obstacle, the robot bypasses the obstacle, if it is a large obstacle, the robot replans the operation path; step S34, the robot rotates to avoid obstacles along the edge. Among them, when the robot bypasses the obstacle, it bypasses to the side opposite to the location of the small obstacle. The location of the small obstacle refers to the position of the small obstacle relative to the robot. For example, if the small obstacle is located on the left side of the robot, the robot bypasses from the right side of the small obstacle.

[0046] Based on the above embodiment, after the robot obtains the line laser data of the current frame, if point cloud data with a certain height is obtained but the height does not exceed the preset height, the obstacle is classified as a low obstacle. For low obstacles, the robot takes the obstacle-crossing approach regardless of the operating mode of the robot.

[0047] The present application also provides a mobile robot, which is used to implement the robot obstacle avoidance method, and the mobile robot includes a line laser module, which is used to obtain point cloud data. The mobile robot described in the embodiment of the present application greatly improves the accuracy of the local map by comparing and fusing the real-time line laser point cloud data with the point cloud data marked in the local map, so that the robot can avoid obstacles in real time and run more smoothly. At the same time, the length information of the obstacle can also be accurately obtained, which improves the disadvantage of the prior art that only the height information of the line laser data can be used, and after classifying the obstacles based on the length information of the obstacles, the mobile robot can plan more obstacle avoidance strategies.

[0048] As one of the implementation methods, the line laser module is arranged at the front end of the mobile robot, and the line laser emitted by the line laser module is a horizontal straight line obliquely downward. The number of the line laser module is 1, and the model is ALF02-S, which includes a straight line laser and a camera, with high precision and good effect. Among them, the camera is a camera specially used to receive infrared lasers. Using a single line laser module can obtain the rotation angle required for the robot to avoid obstacles, with a simple structure, low cost, and high practical value.

[0049] The present application also provides a chip, the chip stores a computer program code, and the computer program code implements the robot obstacle avoidance method when executed. The chip is set in the above-mentioned mobile robot, so that the mobile robot can greatly improve the accuracy of the local map by comparing and fusing the real-time line laser point cloud data with the point cloud data marked in the local map, so that the robot can avoid obstacles in real time and run more smoothly. At the same time, it also enables the mobile robot to accurately obtain the length information of the obstacle, improving the disadvantage of the existing technology that only the height information of the line laser data can be used, and after classifying the obstacles based on the length information of the obstacles, the mobile robot can plan more obstacle avoidance strategies.

[0050] It will be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the references to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory ROM, programmable memory PROM, electrically programmable memory DPROM, electrically erasable programmable memory DDPROM or flash memory. Volatile memory may include random access memory RAM or external cache memory.

[0051] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0052] The above embodiments only express several embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent application. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.

Claims

1. A robot obstacle avoidance method, characterized in that: The obstacle avoidance method comprises: Step S1, based on the line laser data, the robot continuously updates the local map; Step S2, based on the local map, the robot classifies the obstacles marked therein; Step S3: Based on the type of obstacle and the operation mode of the robot, the robot triggers a corresponding obstacle avoidance strategy.

2. A robot obstacle avoidance method according to claim 1, characterized in that: In step S1, the method for the robot to continuously update the local map based on the line laser data includes: Step S11, acquiring and processing the line laser data of the current frame to obtain point cloud data that meets preset conditions; Step S12, determining whether the current local map is an empty map, if so, updating the local map using point cloud data that meets the preset conditions, if not, proceeding to step S13; Step S13, whether the degree of agreement between the point cloud data meeting the preset conditions and the point cloud data in the local map is within the error range, if not, then the point cloud data meeting the preset conditions is updated into the local map, if yes, then proceed to step S14; Step S14, fusing the point cloud data that meets the preset conditions with the point cloud data in the local map, then clearing the local map and updating the local map with the fused point cloud data.

3. A robot obstacle avoidance method according to claim 2, characterized in that: In step S11, the method of acquiring and processing the line laser data of the current frame to obtain point cloud data that meets the preset conditions includes: Step S111, after acquiring the line laser data of the current frame, retaining the point cloud data whose height exceeds the preset height; Step S112, every preset angle, from one end to the other end of the line laser data, a point cloud data is obtained at each angle. If there is only one point cloud data at an angle, the point cloud data is the point cloud data that meets the preset conditions. If there are multiple point cloud data at an angle, proceed to step S113; Step S113, compare the distances between multiple point cloud data and the robot, take the minimum distance value, and perform mean filtering on the heights of multiple point cloud data to obtain the average height value. The point cloud data with the minimum distance value and the average height value is used as the only point cloud data at this angle.

4. A robot obstacle avoidance method according to claim 3, characterized in that: The step S12 further includes: When the current local map is not an empty map, determine whether the current robot position differs from the robot position when the local map is updated by more than a preset distance. If so, clear the local map, and then use the point cloud data that meets the preset conditions to update the local map. If not, enter step S13; wherein the robot records its world coordinates each time it obtains a line laser.

5. A robot obstacle avoidance method according to claim 4, characterized in that: In step S14, the method of fusing the point cloud data satisfying the preset conditions with the point cloud data in the local map includes: At each angle, compare the distances between the point cloud data that meets the preset conditions and the point cloud data in the local map and the robot, take the minimum distance value, perform mean filtering on the heights of the point cloud data that meets the preset conditions and the point cloud data in the local map, and obtain the average height value. The point cloud data with the minimum distance value and the average height value is used as the only point cloud data at this angle to obtain the fused point cloud data.

6. A robot obstacle avoidance method according to claim 1, characterized in that: The updating method further comprises: When the distance between the robot and the point cloud data marked in the local map is less than the preset distance, the robot triggers obstacle avoidance and clears the current local map, otherwise the current local map is retained.

7. A robot obstacle avoidance method according to claim 5, characterized in that: In step S2, based on the local map, the method in which the robot classifies the obstacles marked therein includes: Step S21, based on the point cloud data that meets the preset conditions, determine whether the obstacle is a linear obstacle. If so, calculate the length of the obstacle using the point cloud data at the two end points of the line laser data. If not, proceed to step S22, where the point cloud data is used to represent the obstacle. Step S22, fitting an ellipse using the point cloud data that meets the preset conditions and calculating the length of the obstacle, and then proceeding to step S23; Step S23, classifying based on the length of the obstacle, when the length of the obstacle exceeds a threshold, classifying the obstacle as a large obstacle, otherwise classifying the obstacle as a small obstacle.

8. A robot obstacle avoidance method according to claim 7, characterized in that: In step S21, the method for determining whether the obstacle is a linear obstacle includes: Step S211, calculating the regression equation by a linear regression equation formula based on the point cloud data that meets the preset conditions; Step S212: Calculate the residual based on the regression equation. If the residual is less than a threshold, the obstacle is a linear obstacle; otherwise, it is a nonlinear obstacle.

9. A robot obstacle avoidance method according to claim 8, characterized in that: In step S21, the method of calculating the length of the obstacle using the point cloud data at the two end points of the line laser data includes: Step S213, projecting the point cloud data of the two end points of the line laser data onto the regression equation respectively to obtain two projection points; Step S214, based on the two-point distance formula, calculate the distance between the two projection points to obtain the length of the obstacle.

10. A robot obstacle avoidance method according to claim 9, characterized in that: In step S22, the method of fitting an ellipse using point cloud data that meets preset conditions and calculating the length of the obstacle includes: Step S221, fitting an ellipse by the least square method, wherein the general formula of the ellipse equation is Ax 2 +Axy+By 2 +Cx+Dy+E=0; Step S222, set the partial derivatives of each parameter to zero, and obtain the following equations: Wherein, N is the number of point cloud data that meets the preset conditions, and N is greater than or equal to 5; Step S223, solve the above equations to obtain the values ​​of A, B, C, D and E, and then calculate the semi-major axis a of the ellipse. Among them, twice the semi-major axis of the ellipse is the length of the obstacle.

11. A robot obstacle avoidance method according to claim 10, characterized in that: In step S3, based on the type of obstacle and the operation mode of the robot, the method for the robot to trigger a corresponding obstacle avoidance strategy includes: Step S31, based on the local map, after the robot detects an obstacle ahead, it obtains the current operation mode. When the robot is in the bow operation mode, it proceeds to step S32; when the robot is in the navigation mode, it proceeds to step S33; when the robot is in the edge mode, it proceeds to step S34; Step S32: The robot reduces its speed and determines the type of the obstacle ahead. If it is a small obstacle, the robot goes around it; if it is a large obstacle, the robot turns around. Step S33, the robot determines the type of obstacle ahead. If it is a small obstacle, the robot will go around it. If it is a large obstacle, the robot will re-plan its running path. In step S34, the robot rotates to avoid obstacles along the edge.

12. A mobile robot, characterized in that: The mobile robot is used to implement the robot obstacle avoidance method described in any one of claims 1 to 11, and the mobile robot includes a line laser module, and the line laser module is used to acquire point cloud data.

13. A mobile robot according to claim 12, characterized in that: The line laser module is arranged at the front end of the mobile robot, and the line laser it emits is a horizontal straight line slanting downward. The number of the line laser module is 1, the model is ALF02-S, and it includes a straight line laser and a camera.

14. A chip storing computer program code, characterized in that: When the computer program code is executed, the robot obstacle avoidance method according to any one of claims 1 to 11 is implemented.

Citation Information

Cited By

  • Robot obstacle avoidance method, robot obstacle avoidance device and computer storage medium

    CN120993922A