Robot dynamic obstacle avoidance method and autonomous navigation system based on depth camera

Through the spatial transformation of the depth camera and single-line lidar and the dynamic update of the omnidirectional frustum model, the problem of insufficient adaptability of the robot in avoiding obstacles and high hardware cost in complex environments is solved, and more accurate navigation path planning is achieved.

CN118311970BActive Publication Date: 2024-10-11SHENZHEN MAXVISION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410735386.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-10-11
Estimated Expiration
2044-06-07

AI Technical Summary

Technical Problem

Existing robot obstacle avoidance systems have insufficient adaptability in complex environments and high hardware costs. Single-line and multi-line lidar cannot effectively feedback the position of obstacles in complex scenes, resulting in frequent corrections of navigation paths and slow updates.

Method used

The robot dynamic obstacle avoidance method based on the depth camera is used to obtain the spatial transformation relationship between the depth camera and the single-line lidar through calibration, screen non-ground obstacle point clouds and RGB obstacle targets, and merge them into obstacle clusters with the same orientation, and The obstacle cache is dynamically updated through the omnidirectional frustum model and superimposed onto the map generated by the single-line lidar to plan the obstacle avoidance path.

Benefits of technology

It improves the robot's ability to avoid obstacles in complex environments, reduces hardware costs, and compensates for the blind spots and slow update problems of lidar through the dynamic update of the depth camera, achieving more accurate navigation path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118311970B_ABST
    Figure CN118311970B_ABST
Patent Text Reader

Abstract

The present application provides a robot dynamic obstacle avoidance method based on a depth camera and an autonomous navigation system. The robot dynamic obstacle avoidance method based on a depth camera is applied to the robot, and the method includes the following steps: filtering out non-ground obstacle point clouds from the point cloud image acquired by the depth camera, detecting RGB obstacle targets from the RGB image acquired by the depth camera; converting the RGB obstacle targets into point clouds and merging them with the non-ground obstacle point clouds into obstacle clusters in the same direction; initializing an obstacle cache based on a radar coordinate system, and establishing an omnidirectional cone model of the depth camera based on the radar coordinate system, filtering the obstacle cache within the omnidirectional cone model, and adding omnidirectional obstacle clusters to the obstacle cache. The robot dynamic obstacle avoidance method based on a depth camera of the present application improves the robot's obstacle avoidance adaptability while taking into account costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of robot obstacle avoidance, and more specifically, to a robot dynamic obstacle avoidance method and an autonomous navigation system based on a depth camera. Background Art

[0002] Laser radar is mainly divided into single-line radar and multi-line radar according to the scanning beam. Single-line radar can only obtain information on a certain plane in the environment. In the actual three-dimensional environment, single 2D information usually has a large blind spot, such as suspended tables, warning tapes or raised obstacles on the ground. The information obtained by the single-line radar is difficult to feedback the true location of the obstacle. If the correct environmental obstacle information cannot be given, it will inevitably cause unnecessary collisions with the robot. Therefore, now that multi-line radar technology is mature, industry personnel often use multi-line radar to detect obstacles, but the cost of multi-line laser radar is usually multiples higher than that of single-line laser radar.

[0003] In addition, whether single-line radar or multi-line radar is used on a robot, there will be limitations on the viewing range, and the spatial information of obstacles is fed back by gradually scanning within the rated viewing range. In complex environmental scenes, such as outdoor public places with large crowds and uneven ground, there are major emergencies and the navigation path needs to be frequently corrected. The obstacle feedback of single-line radar and multi-line radar is updated slowly and cannot adapt to complex environment obstacle avoidance and autonomous navigation. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a robot dynamic obstacle avoidance method and an autonomous navigation system based on a depth camera, so as to solve the technical problems of insufficient adaptability and high hardware cost in the prior art in the process of autonomous navigation in complex environments.

[0005] To achieve the above purpose, the technical solution adopted in this application is: to provide a robot dynamic obstacle avoidance method based on a depth camera, the robot dynamic obstacle avoidance method based on a depth camera is applied to a robot, the robot is provided with a single-line laser radar and depth cameras located around it, and the method comprises the steps of:

[0006] Acquire a first spatial transformation relationship between depth cameras and depth cameras, and a second spatial transformation relationship between a single-line laser radar and a depth camera thereof by calibration;

[0007] The point cloud image obtained from the depth camera is used to filter out non-ground obstacle point clouds, and the RGB obstacle targets are detected from the RGB image obtained from the depth camera;

[0008] After converting the RGB obstacle target into a point cloud, it is merged with the non-ground obstacle point cloud into a cluster of obstacles in the same direction;

[0009] The multiple depth cameras are transformed into the same camera reference coordinate system through a first spatial transformation relationship, and then the obstacle clusters with the same orientation in the camera reference coordinate system are transformed into omnidirectional obstacle clusters in the radar coordinate system through a second spatial transformation relationship;

[0010] Initialize the obstacle cache based on the radar coordinate system, and build the omnidirectional cone model of the depth camera based on the radar coordinate system. Filter the obstacle cache within the omnidirectional cone model and add the omnidirectional obstacle clusters to the obstacle cache.

[0011] The updated obstacle cache is superimposed on the map generated based on the single-line lidar to obtain a multi-dimensional map, and the robot's obstacle avoidance path is dynamically planned based on the multi-dimensional map.

[0012] In a preferred embodiment of the present application, a method for obtaining a first spatial transformation relationship between a depth camera and a depth camera by calibration comprises the steps of:

[0013] A first depth camera Cam1, a second depth camera Cam2, a third depth camera Cam3 and a fourth depth camera Cam4 with non-overlapping field of view are respectively installed on the east, south, west and north surfaces of the robot;

[0014] A first auxiliary camera Cthird1, a second auxiliary camera Cthird2, a third auxiliary camera Cthird3 and a fourth auxiliary camera Cthird4 are respectively installed at a certain distance in the southeast, southwest, northwest and northeast directions of the robot;

[0015] The field of view of the first auxiliary camera Cthird1 overlaps with the field of view of the first depth camera Cam1 and the second depth camera Cam2, the field of view of the second auxiliary camera Cthird2 overlaps with the field of view of the second depth camera Cam2 and the third depth camera Cam3, the field of view of the third auxiliary camera Cthird3 overlaps with the field of view of the third depth camera Cam3 and the fourth depth camera Cam4, and the field of view of the fourth auxiliary camera Cthird4 overlaps with the field of view of the fourth depth camera Cam4 and the first depth camera Cam1;

[0016] Place a checkerboard in all overlapping areas, and collect checkerboard images from different perspectives through the first depth camera Cam1, the second depth camera Cam2, the third depth camera Cam3, the fourth depth camera Cam4, and the first auxiliary camera Cthird1, the second auxiliary camera Cthird2, the third auxiliary camera Cthird3, and the fourth auxiliary camera Cthird4;

[0017] Stereo calibration is performed by calculating the positions of the corner points of the same chessboard in the chessboard image, and a closed loop of transformation relationship is formed by using the first auxiliary camera Cthird1, the second auxiliary camera Cthird2, the third auxiliary camera Cthird3 and the fourth auxiliary camera Cthird4 as the medium of the intermediate transformation matrix;

[0018] Finally, the coordinates of the first depth camera Cam1, the second depth camera Cam2, and the fourth depth camera Cam4 are unified to the coordinates of the third depth camera Cam3.

[0019] In a preferred embodiment of the present application, a method for obtaining a second spatial transformation relationship between a single-line laser radar and a depth camera thereof by calibration comprises the steps of:

[0020] The third depth camera Cam3 is located at the same origin as the single-line laser radar;

[0021] Measure the vertical height D of the radar from the ground;

[0022] Use the third depth camera Cam3 to collect ground data, use the Ransac method in PCL to fit the ground plane, and get the ground plane equation ax+by+cz+d=0, where (x, y, z) are spatial coordinates, and a, b, c, d are fixed coefficients;

[0023] Calibration plates are sequentially arranged at different positions in front of the single-line laser radar and the third depth camera Cam3, radar point cloud data of the calibration plate is obtained through the single-line laser radar, and depth point cloud data of the calibration plate is obtained through the third depth camera Cam3;

[0024] The first calibration plate lines in the radar point cloud data are segmented based on the straight-through filtering method in PCL;

[0025] Based on the ground plane equation ax+by+cz+d=0, the depth point cloud data of the vertical height D is segmented from the depth point cloud data of the calibration plate, and the invalid data outside the calibration plate area is filtered out by the segmented depth point cloud data in combination with the straight-through filtering method to obtain the second calibration plate line;

[0026] The same number of equally divided points are respectively set on the lines of the first calibration plate and the lines of the second calibration plate as matching corner points, and the second spatial transformation relationship is obtained according to the stereo matching method.

[0027] In a preferred embodiment of the present application, a method for converting an RGB obstacle target into a point cloud and then merging the point cloud with a non-ground obstacle into a same-direction obstacle cluster comprises the steps of:

[0028] Deep learning will be used to detect RGB obstacle targets from RGB images;

[0029] Get each pixel point (x pixel ,y pixel )’s depth depth;

[0030] The formula for converting RGB obstacle targets into point cloud coordinates (X, Y, Z) is:

[0031]

[0032] Among them, (cx, cy) represents the coordinates of the optical center of the depth camera, and fx and fy represent the focal lengths of the depth camera in the horizontal and vertical directions, respectively.

[0033] In a preferred embodiment of the present application, each pixel (x pixel ,y pixel ) method of depth depth, comprising the steps of:

[0034] Calculate the pixel point (x pixel ,y pixel )’s average height Ah;

[0035] If the average height Ah is less than the height threshold, the RGB obstacle target is classified, and a new depth value depth is assigned to the RGB obstacle target according to the classification result.

[0036] In a preferred embodiment of the present application, each pixel (x pixel ,y pixel ) method of depth depth, comprising the steps of:

[0037] Calculate the ratio of pixels with a depth of zero to all pixels in the RGB obstacle target. If it exceeds the depth missing ratio threshold, detect the average depth Ad of the pixels around the RGB obstacle target detection box, and assign the average depth Ad to the new depth value of the RGB obstacle target.

[0038] In a preferred embodiment of the present application, a method for establishing an omnidirectional cone model of a depth camera based on a radar coordinate system comprises the steps of:

[0039] Get the horizontal field of view angle Fovh and the vertical field of view angle fovv of the depth camera, set the minimum detection distance of the depth camera to mindistance, and the maximum detection distance to maxdistance;

[0040] Calculate the spatial coordinates of the 8 viewing cone points based on the depth camera;

[0041] Based on the spatial coordinates of the eight cone points, the largest circumscribed contour is connected to obtain the cone model corresponding to the position of the depth camera;

[0042] The cone model of each orientation is converted into an all-round cone model in the radar coordinate system through the second space conversion relationship.

[0043] In a preferred embodiment of the present application, after initializing the obstacle cache based on the radar coordinate system, the following steps are further included:

[0044] Detect the minimum distance from the obstacle cache to the omnidirectional frustum model. If the minimum distance is greater than the distance threshold, filter it.

[0045] It can be understood that by detecting the minimum distance from the obstacle cache to the omnidirectional frustum model, the obstacle cache with a longer distance is filtered out, and the effective obstacle cache is retained.

[0046] In a preferred embodiment of the present application, after initializing the obstacle cache based on the radar coordinate system, the following steps are further included:

[0047] Get the current timestamp. If the time interval between the new time of the obstacle cache and the current timestamp exceeds the time threshold, filter it.

[0048] The present application also provides an autonomous navigation system, which includes a public base station and multiple robots. The public base station is communicatively connected to each robot. The robots are used to execute the robot dynamic obstacle avoidance method based on a depth camera as described above. After the robots classify RGB obstacle targets, they upload the classification results and current positioning to the public base station. The public base station summarizes and analyzes the classification results and outputs abnormal obstacle targets and positioning.

[0049] 1. By first converting multiple depth cameras into the same camera reference coordinate system through a first spatial conversion relationship, and then converting the camera reference coordinate system into a radar coordinate system through a second spatial conversion relationship, the spatial conversion of multiple depth cameras and the same single-line laser radar is realized, solving the technical problem of spatial data conflict caused by converting multiple calibration objects into the same radar coordinate system.

[0050] 2. By converting RGB obstacle targets into point clouds and merging them with non-ground obstacle point clouds to obtain the same-orientation obstacle clusters, the RGB image makes up for the defects of point cloud images that cannot detect obstacles that are integrated into the ground and obstacles with missing depth. The point cloud image makes up for the defect that RGB obstacle targets cannot determine the spatial position and height of the target.

[0051] 3. Establish an obstacle filtering and superposition mechanism by maintaining the omnidirectional cone model, and dynamically update the obstacle cache obtained by the depth camera to adapt to complex scenes and emergencies with movement changes.

[0052] 4. After the dynamically updated obstacle cache is superimposed on the map generated by the single-line laser radar, the single-line laser radar and the depth camera complement each other. At long distances, the long-range detection advantage of the single-line laser radar can be used to plan the best macro-perspective route. During the navigation process, the dynamic update advantage of the depth camera can be used to optimize the short-range real-time route, thereby improving the robot's obstacle avoidance adaptability while taking into account the cost.

[0053] The autonomous navigation system provided in the present application includes a public base station and multiple robots. The robots are capable of executing the robot dynamic obstacle avoidance method based on a depth camera as described above. The public base station uses the classification results and positioning of obstacle targets encountered by the robots during the navigation and obstacle avoidance process to analyze and promptly detect abnormal situations in public places. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] 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 creative labor.

[0055] Figure 1 A schematic diagram of a flow chart of a robot dynamic obstacle avoidance method based on a depth camera provided in an embodiment of the present application;

[0056] Figure 2 A schematic diagram of a scene when the depth information obtained by the depth camera is mapped to an RGB image;

[0057] Figure 3 Based on Figure 2 A point cloud diagram of a scene where obstacles are detected through a point cloud image;

[0058] Figure 4 Based on Figure 2 A schematic diagram of the scene where obstacles are detected by combining the point cloud image with the RGB image;

[0059] Figure 5 A multi-dimensional map from a bird's-eye view obtained based on a 3D point cloud diagram;

[0060] Figure 6 A multi-dimensional map from a bird's-eye view obtained based on a 4-point cloud schematic diagram;

[0061] Figure 7 A stereoscopic multi-dimensional map with a cone model provided in an embodiment of the present application (the second depth camera and the fourth depth camera are hidden to reflect the addition and filtering of the obstacle cache);

[0062] Figure 8 A schematic diagram of obtaining a first spatial transformation relationship through calibration provided in an embodiment of the present application;

[0063] Fig. 9 A schematic diagram of obtaining a second space conversion relationship through calibration provided in an embodiment of the present application;

[0064] Fig.10 A schematic diagram of a viewing cone model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0066] It should be noted that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.

[0067] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0068] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0069] Please also read Figures 1 to 6 Now, the robot dynamic obstacle avoidance method based on a depth camera provided in the embodiment of the present application is described. The robot dynamic obstacle avoidance method based on a depth camera is applied to a robot, and the robot is provided with a single-line laser radar and depth cameras located around it.

[0070] It is understandable that the single-line laser radar is set in front of the robot, and the single-line laser radar can scan obstacles at a certain plane height in front, and update the obstacle position to the map. Therefore, although the single-line laser radar has a large detection range radius and is resistant to ambient light interference, even at night or in the sun, it is limited by the large blind spot of the field of view and cannot obtain small obstacles on the surface and high-hanging obstacles. In addition, the scanning angle of the single-line laser radar is limited, and the timeliness of obstacle position updates is insufficient. The depth cameras located around the robot can form a close-range all-round field of view, which complements the single-line laser radar in terms of spatial range.

[0071] The robot dynamic obstacle avoidance method based on a depth camera comprises the following steps:

[0072] Step S1, obtaining a first spatial transformation relationship between depth cameras and a second spatial transformation relationship between a single-line laser radar and a depth camera thereof through calibration.

[0073] In step S1, after obtaining the first spatial transformation relationship between the depth cameras through calibration, it is only necessary to calibrate the single-line laser radar and its one depth camera to transform the first spatial transformation relationship into the second spatial transformation relationship.

[0074] Step S2: filter out non-ground obstacle point clouds from the point cloud image acquired by the depth camera, and detect RGB obstacle targets from the RGB image acquired by the depth camera.

[0075] In step S2, the aligned RGB depth image is obtained through the stream acquisition SDK interface, and the depth information is converted into a point cloud. Each pixel of the depth image is converted from depth to a corresponding point cloud. Since obstacles exist on the ground, all non-ground obstacle point clouds are left after the ground point cloud is removed. However, obstacles that have merged into the ground and obstacles with missing depth cannot be detected in the point cloud image. Obstacles that have merged into the ground will be regarded as ground point cloud filtering. Obstacles that have merged into the ground include obstacles formed by the ground itself and small obstacles on the ground, such as ground water, concave and convex points within ±3cm, cigarette butts, branches and other near-ground objects; and obstacles with missing depth refer to obstacles that prevent light from returning to the depth camera. The causes include dim light, black object surface, mirror reflection, and exceeding the measurement distance limit.

[0076] See also Figures 2 to 4However, obstacles that are integrated into the ground can be highlighted from color features, and obstacles with missing depth can be detected based on their outlines and the background in which they are located. Therefore, the RGB obstacle targets detected from the RGB image obtained by the depth camera include both obstacles that are integrated into the ground and obstacles with missing depth. However, the disadvantage of pure RGB image detection is that pixel targets cannot be converted into spatial parameters.

[0077] In a specific embodiment, after the depth information is converted into a point cloud, the ground is detected based on a straight line fitting of a grid to obtain a boundary line between the ground and non-ground obstacle point clouds.

[0078] Step S3: convert the RGB obstacle target into a point cloud and merge it with the non-ground obstacle point cloud into a cluster of obstacles in the same direction.

[0079] In step S3, the RGB obstacle target is converted into a point cloud and merged with the non-ground obstacle point cloud to obtain the same-orientation obstacle clusters. The RGB image makes up for the defects of the point cloud image that obstacles merged into the ground and obstacles with missing depth cannot be detected. The point cloud image makes up for the defect that the pixel targets in the RGB image cannot be converted into spatial parameters.

[0080] Step S4, converting the multiple depth cameras into the same camera reference coordinate system through the first spatial conversion relationship, and then converting the same-direction obstacle clusters in the camera reference coordinate system into omnidirectional obstacle clusters in the radar coordinate system through the second spatial conversion relationship.

[0081] In step S4, because the single-line laser radar was not calibrated with all the depth cameras in step S1, multiple depth cameras can be first converted into the same camera reference coordinate system through the first spatial conversion relationship, and then the camera reference coordinate system can be converted into the radar coordinate system through the second spatial conversion relationship. In this way, on the one hand, the spatial conversion of multiple depth cameras and the same single-line laser radar is realized; on the other hand, due to the influence of sensor accuracy, there will inevitably be errors in the calibration data between different objects, which can solve the technical problem of spatial data conflict caused by superimposing all calibration data on the radar coordinate system.

[0082] Step S5, initialize the obstacle cache based on the radar coordinate system, and establish the omnidirectional cone model of the depth camera based on the radar coordinate system, filter the obstacle cache within the omnidirectional cone model, and add the omnidirectional obstacle cluster to the obstacle cache.

[0083] See also Figures 5 to 7In step S5, because the radar coordinate system has been compatible with the spatial information of all depth cameras through conversion in step S4, the cone models of the depth cameras in each orientation are merged to obtain a real-time omnidirectional cone model. In order to update the obstacle cache in real time, this application establishes an obstacle filtering and superposition mechanism by maintaining the omnidirectional cone model, filters the obstacle cache in the omnidirectional cone model, and adds omnidirectional obstacle clusters to the obstacle cache, dynamically updating the obstacle cache obtained based on the depth camera to adapt to complex scenes and emergencies with movement changes.

[0084] Step S6, superimposing the updated obstacle cache on the map generated based on the single-line laser radar to obtain a multi-dimensional map, and dynamically planning the robot's obstacle avoidance path based on the multi-dimensional map.

[0085] In step S6, after the dynamically updated obstacle cache is superimposed on the map generated by the single-line laser radar, the single-line laser radar makes up for the defect of insufficient detection radius of the depth camera in the spatial dimension, the depth camera makes up for the defect of insufficient height and angle of the single-line laser radar, and in the time dimension, the depth camera also makes up for the defect of slow update of the map generated by the single-line laser radar.

[0086] Finally, the robot's obstacle avoidance path is dynamically planned based on the multi-dimensional map. At long distances, the long-range detection advantage of the single-line lidar can be used to plan the best macro-perspective route. During the navigation process, the close-range dynamic update advantage of the depth camera can be used to plan the best real-time and precise route.

[0087] Compared with the prior art, the robot dynamic obstacle avoidance method based on a depth camera provided in this application has the following beneficial effects:

[0088] 1. By first converting multiple depth cameras into the same camera reference coordinate system through a first spatial conversion relationship, and then converting the camera reference coordinate system into a radar coordinate system through a second spatial conversion relationship, the spatial conversion of multiple depth cameras and the same single-line laser radar is realized, solving the technical problem of spatial data conflict caused by converting multiple calibration objects into the same radar coordinate system.

[0089] 2. By converting RGB obstacle targets into point clouds and merging them with non-ground obstacle point clouds to obtain the same-orientation obstacle clusters, the RGB image makes up for the defects of point cloud images that cannot detect obstacles that are integrated into the ground and obstacles with missing depth. The point cloud image makes up for the defect that RGB obstacle targets cannot determine the spatial position and height of the target.

[0090] 3. Establish an obstacle filtering and superposition mechanism by maintaining the omnidirectional cone model, and dynamically update the obstacle cache obtained by the depth camera to adapt to complex scenes and emergencies with movement changes.

[0091] 4. After the dynamically updated obstacle cache is superimposed on the map generated by the single-line laser radar, the single-line laser radar and the depth camera complement each other. At long distances, the long-range detection advantage of the single-line laser radar can be used to plan the best macro-perspective route. During the navigation process, the dynamic update advantage of the depth camera can be used to optimize the short-range real-time route, thereby improving the robot's obstacle avoidance adaptability while taking into account the cost.

[0092] In another embodiment of the present application, please refer to Figure 8 A method for obtaining a first spatial transformation relationship between a depth camera and a depth camera by calibration includes the steps of:

[0093] A first depth camera Cam1, a second depth camera Cam2, a third depth camera Cam3 and a fourth depth camera Cam4 with non-overlapping field of view are respectively installed on the east, south, west and north surfaces of the robot;

[0094] A first auxiliary camera Cthird1, a second auxiliary camera Cthird2, a third auxiliary camera Cthird3 and a fourth auxiliary camera Cthird4 are respectively installed at a certain distance in the southeast, southwest, northwest and northeast directions of the robot;

[0095] The field of view of the first auxiliary camera Cthird1 overlaps with the field of view of the first depth camera Cam1 and the second depth camera Cam2, the field of view of the second auxiliary camera Cthird2 overlaps with the field of view of the second depth camera Cam2 and the third depth camera Cam3, the field of view of the third auxiliary camera Cthird3 overlaps with the field of view of the third depth camera Cam3 and the fourth depth camera Cam4, and the field of view of the fourth auxiliary camera Cthird4 overlaps with the field of view of the fourth depth camera Cam4 and the first depth camera Cam1;

[0096] Place a checkerboard in all overlapping areas, and collect checkerboard images from different perspectives through the first depth camera Cam1, the second depth camera Cam2, the third depth camera Cam3, the fourth depth camera Cam4, and the first auxiliary camera Cthird1, the second auxiliary camera Cthird2, the third auxiliary camera Cthird3, and the fourth auxiliary camera Cthird4;

[0097] Stereo calibration is performed by calculating the positions of the corner points of the same chessboard in the chessboard image, and a closed loop of transformation relationship is formed by using the first auxiliary camera Cthird1, the second auxiliary camera Cthird2, the third auxiliary camera Cthird3 and the fourth auxiliary camera Cthird4 as the medium of the intermediate transformation matrix;

[0098] Finally, the coordinates of the first depth camera Cam1, the second depth camera Cam2, and the fourth depth camera Cam4 are unified to the coordinates of the third depth camera Cam3.

[0099] It is understandable that in the prior art, when calibrating two sensors, a certain overlap area is required, which will result in a reduction in the overall field of view, and the error will be greater when more sensors are fused.

[0100] In this embodiment, the first depth camera Cam1, the second depth camera Cam2, the third depth camera Cam3 and the fourth depth camera Cam4 whose fields of view do not overlap with each other are used, and the first auxiliary camera Cthird1, the second auxiliary camera Cthird2, the third auxiliary camera Cthird3 and the fourth auxiliary camera Cthird4 are used as the medium of the transformation matrix to form a closed loop of the transformation relationship, that is, the first spatial transformation relationship between any two depth cameras can be obtained. On the one hand, the layout of the depth cameras expands the field of view and the spatial size of the omnidirectional cone model; on the other hand, the closed loop of the transformation relationship is formed to balance the error between two adjacent calibration objects, that is, to improve the accuracy of the first spatial transformation relationship.

[0101] It is worth noting that in step S1, the step of obtaining the internal parameters of the depth camera can also be included. The main function of the internal parameters of the depth camera is to convert the coordinates from the depth coordinate system to the pixel coordinate system. Generally speaking, it will be fixed after the depth camera leaves the factory. The internal parameters of the depth camera are usually given at the factory. In order to avoid problems with the relevant internal parameters provided by the manufacturer, the internal parameters of each depth camera need to be recalibrated. The main calibration method is to use Zhang's calibration method.

[0102] In addition, step S1 may also include a step of obtaining external parameters of the depth camera. The external parameters reflect the relative transformation relationship between different coordinate systems, and this relative transformation relationship will change as the relative position relationship between the coordinate systems changes. Since the single-line laser radar and all depth cameras are rigidly fixed on the robot in the entire system, the relative position relationship between the depth camera and the single-line laser radar, and the depth camera and the depth camera will not change after the installation and fixation. Therefore, the position transformation relationship between different sensors only needs to be calibrated once. External parameters are usually composed of a rotation transformation matrix and a translation transformation matrix.

[0103] For details, please refer to Fig. 9 , a method for obtaining a second spatial transformation relationship between a single-line laser radar and a depth camera thereof by calibration, comprising the steps of:

[0104] The third depth camera Cam3 is located at the same origin as the single-line laser radar;

[0105] Measure the vertical height D of the radar from the ground;

[0106] Use the third depth camera Cam3 to collect ground data, use the Ransac method in PCL to fit the ground plane, and get the ground plane equation ax+by+cz+d=0, where (x, y, z) are spatial coordinates, and a, b, c, d are fixed coefficients;

[0107] Calibration plates are sequentially arranged at different positions in front of the single-line laser radar and the third depth camera Cam3, radar point cloud data of the calibration plate is obtained through the single-line laser radar, and depth point cloud data of the calibration plate is obtained through the third depth camera Cam3;

[0108] The first calibration plate lines in the radar point cloud data are segmented based on the straight-through filtering method in PCL;

[0109] Based on the ground plane equation ax+by+cz+d=0, the depth point cloud data of the vertical height D is segmented from the depth point cloud data of the calibration plate, and the invalid data outside the calibration plate area is filtered out by the segmented depth point cloud data in combination with the straight-through filtering method to obtain the second calibration plate line;

[0110] The same number of equally divided points are respectively set on the lines of the first calibration plate and the lines of the second calibration plate as matching corner points, and the second spatial transformation relationship is obtained according to the stereo matching method.

[0111] It is understandable that, unlike 3D lidar or multi-line lidar, single-line lidar collects two-dimensional data, while for the three-dimensional point cloud data collected by depth cameras, how to control the accuracy based on existing calibration methods has not been solved.

[0112] In this embodiment, the third depth camera Cam3 and the single-line laser radar are located at the same origin, that is, the origin is used as the origin of the camera reference coordinate system and the origin of the radar coordinate system at the same time, and the calibration factor of the relative position dimension is directly ignored. On the basis of the same origin, the third depth camera Cam3 collects ground data and combines the distance d from the ground to obtain the ground plane equation ax+by+cz+d=0. Based on the ground plane equation and the vertical height D, the second calibration plate lines are found from the depth image. When the calibration plate is located at different positions, the second calibration plate lines are obtained at different positions in the depth image, which achieves the same effect as the calibration of three-dimensional data and three-dimensional data, and improves the accuracy of the second space conversion relationship.

[0113] In another embodiment of the present application, a method for converting an RGB obstacle target into a point cloud and then merging the point cloud with a non-ground obstacle into a same-direction obstacle cluster comprises the steps of:

[0114] Deep learning will be used to detect RGB obstacle targets from RGB images;

[0115] Get each pixel point (x pixel ,y pixel )’s depth depth;

[0116] The formula for converting RGB obstacle targets into point cloud coordinates (X, Y, Z) is:

[0117]

[0118] Among them, (cx, cy) represents the coordinates of the optical center of the depth camera, and fx and fy represent the focal lengths of the depth camera in the horizontal and vertical directions, respectively.

[0119] It can be understood that the aligned RGB image depth image is obtained through the SDK interface of the stream depth camera, and alignment means that the pixel point of each coordinate in the RGB image corresponds one-to-one with the pixel point of the corresponding coordinate in the depth image.

[0120] Further, obtain each pixel point (x pixel ,y pixel ) method of depth depth, comprising the steps of:

[0121] Calculate the pixel point (x pixel ,y pixel )’s average height Ah;

[0122] If the average height Ah is less than the height threshold, the RGB obstacle target is classified and edge detected, and a new depth value is assigned to the RGB obstacle target based on the classification result and area size.

[0123] It is understandable that when the average height Ah of the RGB obstacle target is less than the height threshold, it means that the obstacle is too short, but the obstacle is short and safe, and its actual height has no reference significance, such as water on the ground, branches, etc. Therefore, it is necessary to classify the common obstacles of the RGB obstacle target, distinguish between short and safe and short but unsafe, and convert the classification results and area into the new depth value of the RGB obstacle target. For example, the larger the edge of the waterlogged area, that is, the larger the area, the higher the depth value assigned after being converted to height, so that the robot will give priority to avoiding the waterlogged area when navigating.

[0124] Further, obtain each pixel point (x pixel ,y pixel ) method of depth depth, comprising the steps of:

[0125] Calculate the ratio of pixels with a depth of zero to all pixels in the RGB obstacle target. If it exceeds the depth missing ratio threshold, detect the average depth Ad of the pixels around the RGB obstacle target detection box, and assign the average depth Ad to the new depth value of the RGB obstacle target.

[0126] It is understandable that the reasons for depth loss, such as dark light, black surface, mirror reflection, exceeding the measurement distance limit, etc., result in obstacles where light cannot return to the depth camera, and they are displayed as zero in the depth information. Although there are pixels in the RGB image where the depth loss position cannot be obtained, the obstacle target can be detected from its surrounding environment and assigned a new depth value from its surrounding environment.

[0127] In another embodiment of the present application, please refer to Fig.10 A method for establishing an omnidirectional cone model of a depth camera based on a radar coordinate system comprises the steps of:

[0128] Get the horizontal field of view angle Fovh and the vertical field of view angle fovv of the depth camera, set the minimum detection distance of the depth camera to mindistance, and the maximum detection distance to maxdistance;

[0129] Calculate the spatial coordinates of the 8 viewing cone points based on the depth camera;

[0130] Based on the spatial coordinates of the eight cone points, the largest circumscribed contour is connected to obtain the cone model corresponding to the position of the depth camera;

[0131] The cone model of each orientation is converted into an all-round cone model in the radar coordinate system through the second space conversion relationship.

[0132] It can be understood that each cone model sets the minimum detection distance mindistance and the maximum detection distance maxdistance, thus forming an omnidirectional cone model centered on the robot, filtering the obstacle cache within the omnidirectional cone model while adding omnidirectional obstacle clusters to the obstacle cache, and dynamically updating the obstacle cache obtained based on the depth camera to adapt to complex scenes and emergencies with movement changes.

[0133] For further information, please also refer to Figure 7 After initializing the obstacle cache based on the radar coordinate system, the following steps are also included:

[0134] Detect the minimum distance from the obstacle cache to the omnidirectional frustum model. If the minimum distance is greater than the distance threshold, filter it.

[0135] It can be understood that by detecting the minimum distance from the obstacle cache to the omnidirectional frustum model, the obstacle cache with a longer distance is filtered out, and the effective obstacle cache is retained.

[0136] For further information, please also refer to Figure 7 After initializing the obstacle cache based on the radar coordinate system, the following steps are also included:

[0137] Get the current timestamp. If the time interval between the new time of the obstacle cache and the current timestamp exceeds the time threshold, filter it.

[0138] It is understandable that the obstacle cache that exceeds the time threshold is filtered to improve the real-time performance of the obstacle cache to better adapt to complex scenarios and emergencies with movement changes.

[0139] The present application also provides an autonomous navigation system, which includes a public base station and multiple robots. The public base station is communicatively connected to each robot. The robots are used to execute the robot dynamic obstacle avoidance method based on a depth camera as described above. After the robots classify RGB obstacle targets, they upload the classification results and current positioning to the public base station. The public base station summarizes and analyzes the classification results and outputs abnormal obstacle targets and positioning.

[0140] It is understandable that when the robot is used in public places, the abnormal obstacles such as ground water, garbage, dangerous objects, live pets, etc., can be handled by staff so that they can arrive at the corresponding location in time.

[0141] The autonomous navigation system provided in the present application includes a public base station and multiple robots. The robots are capable of executing the robot dynamic obstacle avoidance method based on a depth camera as described above. The public base station uses the classification results and positioning of obstacle targets encountered by the robots during the navigation and obstacle avoidance process to analyze and promptly detect abnormal situations in public places.

[0142] Finally, it is worth adding that, in the above embodiment, Cam is the abbreviation of camera, which is translated into Chinese as camera; Cthird is translated into Chinese as third, which represents the auxiliary camera in the above embodiment; RANSAC is the abbreviation of Random Sample Consensus random sample consensus algorithm; pixel is translated into Chinese as pixel; depth is translated into Chinese as depth; Fov is translated into field of view in Chinese, and in the above embodiment, Fovh represents the horizontal field of view, and fovv represents the vertical field of view; mindistance is translated into Chinese as minimum distance, which represents the minimum detection distance in the above embodiment; maxdistance is translated into Chinese as maximum distance, which represents the maximum detection distance in the above embodiment.

[0143] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A robot dynamic obstacle avoidance method based on a depth camera, applied to a robot, characterized in that: The robot is provided with a single-line laser radar and depth cameras located around it. The method comprises the steps of: Acquire a first spatial transformation relationship between depth cameras and depth cameras, and a second spatial transformation relationship between a single-line laser radar and a depth camera thereof by calibration; The method for obtaining a first spatial transformation relationship between a depth camera and a depth camera through calibration comprises the steps of: A first depth camera Cam1, a second depth camera Cam2, a third depth camera Cam3 and a fourth depth camera Cam4 with non-overlapping field of view are respectively installed on the east, south, west and north surfaces of the robot; A first auxiliary camera Cthird1, a second auxiliary camera Cthird2, a third auxiliary camera Cthird3 and a fourth auxiliary camera Cthird4 are respectively installed at a certain distance in the southeast, southwest, northwest and northeast directions of the robot; The field of view of the first auxiliary camera Cthird1 overlaps with the field of view of the first depth camera Cam1 and the second depth camera Cam2, the field of view of the second auxiliary camera Cthird2 overlaps with the field of view of the second depth camera Cam2 and the third depth camera Cam3, the field of view of the third auxiliary camera Cthird3 overlaps with the field of view of the third depth camera Cam3 and the fourth depth camera Cam4, and the field of view of the fourth auxiliary camera Cthird4 overlaps with the field of view of the fourth depth camera Cam4 and the first depth camera Cam1; Place a checkerboard in all overlapping areas, and collect checkerboard images from different perspectives through the first depth camera Cam1, the second depth camera Cam2, the third depth camera Cam3, the fourth depth camera Cam4, and the first auxiliary camera Cthird1, the second auxiliary camera Cthird2, the third auxiliary camera Cthird3, and the fourth auxiliary camera Cthird4; Stereo calibration is performed by calculating the positions of the corner points of the same chessboard in the chessboard image, and a closed loop of transformation relationship is formed by using the first auxiliary camera Cthird1, the second auxiliary camera Cthird2, the third auxiliary camera Cthird3 and the fourth auxiliary camera Cthird4 as the medium of the intermediate transformation matrix; Finally, the coordinates of the first depth camera Cam1, the second depth camera Cam2, and the fourth depth camera Cam4 are unified to the coordinates of the third depth camera Cam3; The method for obtaining the second space transformation relationship between a single-line laser radar and any one of the depth cameras by calibration comprises the steps of: The third depth camera Cam3 is located at the same origin as the single-line laser radar; Measure the vertical height D of the radar from the ground; Use the third depth camera Cam3 to collect ground data, use the Ransac method in PCL to fit the ground plane, and get the ground plane equation ax+by+cz+d=0, where (x, y, z) are spatial coordinates, and a, b, c, d are fixed coefficients; Calibration plates are sequentially arranged at different positions in front of the single-line laser radar and the third depth camera Cam3, radar point cloud data of the calibration plate is obtained through the single-line laser radar, and depth point cloud data of the calibration plate is obtained through the third depth camera Cam3; The first calibration plate lines in the radar point cloud data are segmented based on the straight-through filtering method in PCL; Based on the ground plane equation ax+by+cz+d=0, the depth point cloud data of the vertical height D is segmented from the depth point cloud data of the calibration plate, and the invalid data outside the calibration plate area is filtered out by the segmented depth point cloud data in combination with the straight-through filtering method to obtain the second calibration plate line; The same number of equally divided points are respectively set on the lines of the first calibration plate and the lines of the second calibration plate as matching corner points, and a second spatial transformation relationship is obtained according to a stereo matching method; The point cloud image obtained from the depth camera is used to filter out non-ground obstacle point clouds, and the RGB obstacle targets are detected from the RGB image obtained from the depth camera; After converting the RGB obstacle target into a point cloud, it is merged with the non-ground obstacle point cloud into a cluster of obstacles in the same direction; The multiple depth cameras are transformed into the same camera reference coordinate system through a first spatial transformation relationship, and then the obstacle clusters with the same orientation in the camera reference coordinate system are transformed into omnidirectional obstacle clusters in the radar coordinate system through a second spatial transformation relationship; Initialize the obstacle cache based on the radar coordinate system, and build the omnidirectional cone model of the depth camera based on the radar coordinate system. Filter the obstacle cache within the omnidirectional cone model and add the omnidirectional obstacle clusters to the obstacle cache. The method for establishing an omnidirectional cone model of a depth camera based on a radar coordinate system comprises the following steps: Get the horizontal field of view angle Fovh and the vertical field of view angle fovv of the depth camera, set the minimum detection distance of the depth camera to mindistance, and the maximum detection distance to maxdistance; Calculate the spatial coordinates of the 8 viewing cone points based on the depth camera; Based on the spatial coordinates of the eight cone points, the largest circumscribed contour is connected to obtain the cone model corresponding to the position of the depth camera; The cone model of each orientation is converted into an all-round cone model in the radar coordinate system through the second space conversion relationship; The updated obstacle cache is superimposed on the map generated based on the single-line lidar to obtain a multi-dimensional map, and the robot's obstacle avoidance path is dynamically planned based on the multi-dimensional map.

2. The robot dynamic obstacle avoidance method based on a depth camera as claimed in claim 1, characterized in that: The method of converting RGB obstacle targets into point clouds and then merging them with non-ground obstacle point clouds into same-direction obstacle clusters comprises the following steps: Deep learning will be used to detect RGB obstacle targets from RGB images; Get each pixel point (x pixel ,y pixel )’s depth depth; The formula for converting RGB obstacle targets into point cloud coordinates (X, Y, Z) is: Among them, (cx, cy) represents the coordinates of the optical center of the depth camera, f x 、f y Respectively represent the horizontal and vertical focal lengths of the depth camera.

3. The robot dynamic obstacle avoidance method based on a depth camera as claimed in claim 2, characterized in that: Get each pixel point (x pixel ,y pixel ) method of depth depth, comprising the steps of: Calculate the pixel point (x pixel ,y pixel )’s average height Ah; If the average height Ah is less than the height threshold, the RGB obstacle target is classified, and a new depth value depth is assigned to the RGB obstacle target according to the classification result.

4. The robot dynamic obstacle avoidance method based on a depth camera as claimed in claim 2, characterized in that: Get each pixel point (x pixel ,y pixel ) method of depth depth, comprising the steps of: Calculate the ratio of pixels with a depth of zero to all pixels in the RGB obstacle target. If it exceeds the depth missing ratio threshold, detect the average depth Ad of the pixels around the RGB obstacle target detection box, and assign the average depth Ad to the new depth value of the RGB obstacle target.

5. The robot dynamic obstacle avoidance method based on a depth camera as claimed in claim 1, characterized in that: After initializing the obstacle cache based on the radar coordinate system, the following steps are also included: Detect the minimum distance from the obstacle cache to the omnidirectional frustum model. If the minimum distance is greater than the distance threshold, filter it.

6. The robot dynamic obstacle avoidance method based on a depth camera as claimed in claim 5, characterized in that: After initializing the obstacle cache based on the radar coordinate system, the following steps are also included: Detect the minimum distance from the obstacle cache to the omnidirectional frustum model. If the minimum distance is greater than the distance threshold, filter it.

7. An autonomous navigation system, characterized in that: It includes a public base station and multiple robots, the public base station is communicatively connected to each robot, the robots are used to execute the robot dynamic obstacle avoidance method based on a depth camera as described in claim 3, after the robots classify the RGB obstacle targets, they upload the classification results and the current positioning to the public base station, the public base station summarizes and analyzes the classification results, and outputs abnormal obstacle targets and positioning.