A robot cliff detection method, device, equipment and medium
By performing projection and rotational rectangle fitting of non-negative high point clouds and negative high point clouds on point cloud data, combined with voxelization processing, the error detection problem in robot cliff detection is solved, and the accuracy of cliff detection and the smoothness of robot movement are improved.
Patent Information
- Application Number
- CN202311247468.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-09-25
AI Technical Summary
In the prior art, robot cliff detection methods easily misdetect safe areas such as ground gaps into cliff areas, resulting in robot movements that are not smooth, and the detected cliff area is smaller than the actual range, which poses a greater risk of falling.
By receiving point cloud data, it is divided into non-negative high point clouds and negative high point clouds, projection and grid division are performed, the number of projection points is counted, the rotation rectangle fits, cliff point clouds are determined, and voxelization is performed to obtain cliff boundary information for early warning.
It effectively avoids false detection in safe areas such as ground gaps, reduces the probability of false alarms on cliffs, and improves the fluency of robot movement and task execution efficiency.
Smart Images

Figure CN117314854B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of artificial intelligence technology, and specifically relates to a cliff detection method, device, equipment and medium for a robot. Background Art
[0002] With the continuous development of robotics technology, robots are now used in various exploration, patrol, and transportation tasks. If robots fail to correctly perceive dangerous terrain such as stairs, cliffs, and steep slopes during their missions, they may accidentally fall, causing damage to the robot and failing to complete the intended task. Based on this, research on robots' autonomous detection of cliff areas has emerged.
[0003] Conventional technology uses sensors such as depth cameras or lidar to collect point cloud data from the environment. This data is then preprocessed, including denoising and filtering. The ground plane is then extracted from the preprocessed point cloud data, and the height of each point relative to the ground plane is calculated. Finally, points below the ground are merged to create a cliff point cloud. Once the cliff point cloud is generated, adjacent cliff point clouds are aggregated into a single region, forming a cliff area.
[0004] However, due to the limited sensor field of view, some sensors' detection rays are blocked by the ground, preventing them from detecting the actual cliff edge. This causes the algorithm to detect a cliff area that is smaller than the actual area. Consequently, the robot fails to trigger a fall prevention warning for areas where the actual cliff edge is not detected. Continuing to move could result in a fall, posing a significant safety risk. Furthermore, because the cliff point cloud generated by this cliff detection method combines all points below the ground, it may mistakenly detect relatively safe areas such as cracks in the ground and elevator gaps as cliffs, resulting in jerky robot movements. Summary of the Invention
[0005] The embodiments of the present application provide a cliff detection method, apparatus, equipment, and medium for a robot, with the purpose of resolving the problem that the cliff detection method in the prior art may detect a cliff that is possibly a safe area such as a ground gap, thereby causing the robot to move unsmoothly, and the detected cliff area is smaller than the actual cliff area, thereby exposing the robot to a greater risk of falling.
[0006] In a first aspect, an embodiment of the present application provides a cliff detection method for a robot, the method comprising:
[0007] Receiving point cloud data transmitted by a point cloud acquisition device of the robot, dividing the point cloud data to obtain a non-negative high point cloud and a negative high point cloud;
[0008] Projecting the non-negative high point cloud and the negative high point cloud onto a ground plane according to a preset projection rule, and dividing the ground plane into grids according to a preset reference area;
[0009] Counting the sum of the projected points corresponding to the non-negative high point cloud in each grid, and comparing the sum with a preset first threshold, if the sum does not exceed the first threshold, performing a rotated rectangle fitting on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud;
[0010] The shortest side of each rotated rectangle is compared with a preset second threshold, and the negative height point cloud corresponding to the rotated rectangle whose shortest side exceeds the preset second threshold is determined as the first cliff point cloud.
[0011] Furthermore, after respectively counting the sum of the number of corresponding projection points in each grid and comparing the sum with a preset first threshold, the method further includes:
[0012] Count the sum of the projection points corresponding to the negative high points in all grids;
[0013] If there are grids with the number and value exceeding the first threshold, deleting the negative high points of the corresponding grids;
[0014] Count the sum of the projected points corresponding to the retained negative high points, and calculate the ratio of the sum of the projected points corresponding to the retained negative high points to the sum of the projected points corresponding to the negative high points. If the ratio exceeds a preset third threshold, perform rotated rectangle fitting on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud.
[0015] Furthermore, after performing rotated rectangle fitting on the negative height point cloud to obtain at least one rotated rectangle corresponding to the negative height point cloud, the method further includes:
[0016] The shortest side of each rotated rectangle is compared with a preset second threshold, and the negative height point cloud corresponding to the rotated rectangle whose shortest side does not exceed the preset second threshold is determined as the ground gap point cloud.
[0017] Furthermore, after comparing the shortest side of each rotated rectangle with a preset second threshold and determining the negative height point cloud corresponding to the rotated rectangle whose shortest side exceeds the preset second threshold as the first cliff point cloud, the method further includes:
[0018] The first cliff point cloud is voxelized to obtain at least one voxel corresponding to the first cliff point cloud, and the center points of the voxels are merged to determine the merged point cloud as the second cliff point cloud.
[0019] Furthermore, after determining the merged point cloud as the second cliff point cloud, the method further includes:
[0020] Obtaining coordinates of each cliff point of the second cliff point cloud, and determining mapping point coordinates of each cliff point coordinate on the ground according to the coordinates of each cliff point and a preset cliff point mapping expression;
[0021] The position information of the cliff boundary is determined according to the mapping point coordinates, and a cliff warning is performed before the robot drives to the cliff boundary according to the position information and a pre-set cliff warning strategy.
[0022] Furthermore, the preset cliff point mapping expression is as follows:
[0023]
[0024]
[0025] z = 0;
[0026] Where x is the horizontal coordinate of the mapping point coordinate; y is the vertical coordinate of the mapping point coordinate; z is the vertical coordinate of the mapping point coordinate; X is the horizontal coordinate of the cliff point coordinate; Y is the vertical coordinate of the cliff point coordinate; Z is the vertical coordinate of the cliff point coordinate; H is the height of the point cloud acquisition device; D is the distance between the point cloud acquisition device and the robot.
[0027] Furthermore, after dividing the point cloud data to obtain a non-negative high point cloud and a negative high point cloud, the method further includes:
[0028] Count the number of negative high points and the sum of the number of non-negative high points and negative high points in the negative high point cloud;
[0029] Calculate the number of the negative high points and their ratio to the total number of the non-negative high points and the negative high points. If the ratio exceeds a preset fourth threshold, voxelize the negative high point cloud to obtain at least one voxel corresponding to the negative high point cloud, merge the center points of the voxels, and determine the merged point cloud as the third cliff point cloud.
[0030] In a second aspect, an embodiment of the present application provides a cliff detection device for a robot, the device comprising:
[0031] A point cloud data receiving module is used to receive point cloud data transmitted by the robot's point cloud acquisition device, divide the point cloud data into non-negative high point clouds and negative high point clouds;
[0032] A grid division module, configured to project the non-negative high point cloud and the negative high point cloud onto a ground plane according to a preset projection rule, and to perform grid division on the ground plane according to a preset reference area;
[0033] A rotated rectangle fitting module is used to count the sum of the projection points corresponding to the non-negative high point cloud in each grid, and compare the sum with a preset first threshold. If the sum does not exceed the first threshold, a rotated rectangle fitting is performed on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud.
[0034] The cliff point cloud determination module is used to compare the shortest side of each rotated rectangle with a preset second threshold, and determine the negative height point cloud corresponding to the rotated rectangle whose shortest side exceeds the preset second threshold as the first cliff point cloud.
[0035] Furthermore, the device further includes a negative high point number statistics module, and the negative high point number statistics module is used to:
[0036] Count the sum of the projection points corresponding to the negative high points in all grids;
[0037] If there are grids with the number and value exceeding the first threshold, deleting the negative high points of the corresponding grids;
[0038] Count the sum of the projected points corresponding to the retained negative high points, and calculate the ratio of the sum of the projected points corresponding to the retained negative high points to the sum of the projected points corresponding to the negative high points. If the ratio exceeds a preset third threshold, perform rotated rectangle fitting on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud.
[0039] Furthermore, the device also includes a ground gap point cloud determination module:
[0040] The shortest side of each rotated rectangle is compared with a preset second threshold, and the negative height point cloud corresponding to the rotated rectangle whose shortest side does not exceed the preset second threshold is determined as the ground gap point cloud.
[0041] Furthermore, the device further includes a cliff point cloud voxelization module, and the cliff point cloud voxelization module is used to:
[0042] The first cliff point cloud is voxelized to obtain at least one voxel corresponding to the first cliff point cloud, and the center points of the voxels are merged to determine the merged point cloud as the second cliff point cloud.
[0043] Furthermore, the device further includes a cliff warning module, which is configured to:
[0044] Obtaining coordinates of each cliff point of the second cliff point cloud, and determining mapping point coordinates of each cliff point coordinate on the ground according to the coordinates of each cliff point and a preset cliff point mapping expression;
[0045] The position information of the cliff boundary is determined according to the mapping point coordinates, and a cliff warning is performed before the robot drives to the cliff boundary according to the position information and a pre-set cliff warning strategy.
[0046] Furthermore, the preset cliff point mapping expression is as follows:
[0047]
[0048]
[0049] z = 0;
[0050] Where x is the horizontal coordinate of the mapping point coordinate; y is the vertical coordinate of the mapping point coordinate; z is the vertical coordinate of the mapping point coordinate; X is the horizontal coordinate of the cliff point coordinate; Y is the vertical coordinate of the cliff point coordinate; Z is the vertical coordinate of the cliff point coordinate; H is the height of the point cloud acquisition device; D is the distance between the point cloud acquisition device and the robot.
[0051] Furthermore, the device further includes a point cloud quantity statistics module, which is used to:
[0052] Count the number of negative high points and the sum of the number of non-negative high points and negative high points in the negative high point cloud;
[0053] Calculate the number of the negative high points and their ratio to the total number of the non-negative high points and the negative high points. If the ratio exceeds a preset fourth threshold, voxelize the negative high point cloud to obtain at least one voxel corresponding to the negative high point cloud, merge the center points of the voxels, and determine the merged point cloud as the third cliff point cloud.
[0054] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0055] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0056] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method described in the first aspect.
[0057] In an embodiment of the present application, point cloud data transmitted by a point cloud acquisition device of a robot is received, and the point cloud data is divided to obtain a non-negative high point cloud and a negative high point cloud; the non-negative high point cloud and the negative high point cloud are projected onto a ground plane according to a preset projection rule, and the ground plane is grid-divided according to a preset reference area; the sum of the numbers of projection points corresponding to the non-negative high point cloud in each grid is counted respectively, and the sum of the numbers is compared with a preset first threshold value respectively; if the sum of the numbers does not exceed the first threshold value, a rotated rectangle fitting is performed on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud; the shortest side of each rotated rectangle is compared with a preset second threshold value, and the negative high point cloud corresponding to the rotated rectangle whose shortest side exceeds the preset second threshold value is determined as the first cliff point cloud. Through the above-mentioned robot cliff detection method, a rotated rectangle fitting is performed on the negative height point cloud that meets the conditions, and it is possible to further determine whether this negative height point cloud is a cliff point cloud. This can avoid misdetecting safe areas such as ground gaps as cliff point clouds, reducing the probability of false cliff alarms, thereby improving the smoothness of the robot's movements and the efficiency of the robot's task execution. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 1 is a flow chart of a cliff detection method for a robot provided in Example 1 of the present application;
[0059] Figure 2 This is a schematic diagram of the reference area provided in Example 1 of the present application;
[0060] Figure 3 1 is a flow chart of a cliff detection method for a robot provided in Example 2 of the present application;
[0061] Figure 4 This is a schematic diagram of point cloud identification provided in Example 2 of this application;
[0062] Figure 5 1 is a flow chart of a cliff detection method for a robot provided in Example 3 of the present application;
[0063] Figure 6 This is a schematic diagram of the structure of the robot provided in Example 3 of the present application;
[0064] Figure 7 This is a schematic structural diagram of a cliff detection device for a robot provided in Example 4 of the present application;
[0065] Figure 8 This is a structural diagram of the electronic device provided in Example 5 of the present application. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solutions and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. It should also be noted that, for ease of description, only parts related to the present application, not all of the contents, are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0067] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0068] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0069] The following, in conjunction with the accompanying drawings, describes in detail the cliff detection method, device, equipment and medium of the robot provided in the embodiments of the present application through specific embodiments and their application scenarios.
[0070] Example 1
[0071] Figure 1 This is a flow chart of the cliff detection method of the robot provided in Example 1 of this application. Figure 1 As shown, the specific steps include:
[0072] S101, receiving point cloud data transmitted by a point cloud acquisition device of a robot, dividing the point cloud data to obtain a non-negative high point cloud and a negative high point cloud.
[0073] First of all, the usage scenario of this solution can be that the robot's control device receives the point cloud data transmitted by the point cloud acquisition device and divides the point cloud data into non-negative high point cloud and negative high point cloud, and finally performs rotated rectangle fitting on the negative high point cloud that meets the preset conditions to determine whether the negative high point cloud is a cliff point cloud.
[0074] Based on the above usage scenarios, it can be understood that the execution subject of this application can be the control device of the robot, and no excessive restrictions are made here.
[0075] In this solution, the method is executed by a control device of the robot.
[0076] The control device can be a dedicated control system, an independent processing unit or an embedded system, so as to complete the data input received from the point cloud acquisition device, and parse and process the point cloud data, thereby dividing them into negative height point clouds and non-negative height point clouds, and judging whether the negative height point clouds meet the preset conditions. Finally, if the preset conditions are met, the negative height point clouds are rotated and rectangular fitted to judge whether the negative height point clouds are cliff point clouds.
[0077] In this scenario, a robot can be an intelligent machine capable of semi-autonomous or fully autonomous operation. A robot can be programmed and automatically controlled to perform tasks such as work or movement. Possessing fundamental capabilities such as perception, decision-making, and execution, it can assist or even replace humans in completing dangerous, arduous, and complex tasks, improving work efficiency and quality, contributing to human life and expanding or extending the scope of human activities and capabilities.
[0078] The point cloud acquisition device can be a device that can detect the presence of a cliff below the robot. It can include a depth camera, a lidar, and a TOF (Time of Flight) dot matrix sensor. The depth camera can use the depth sensor to obtain depth information for each pixel in the image. It can obtain distance information of objects in the scene, thereby obtaining 3D point cloud information of the objects.
[0079] LiDAR creates a three-dimensional map of the environment by emitting laser beams and measuring their reflection time. By analyzing the reflections of the laser beams, the robot can detect the presence of cliffs (also known as negative obstacles).
[0080] A time-of-flight (TOF) sensor is a sensor technology used to measure the distance from an object to the sensor. It determines distance by sending a light pulse and measuring the time it takes for the light pulse to return. A TOF sensor typically consists of a light source and a receiver that calculates the time it takes for the light pulse to travel from the sensor to the object's surface and back again. By combining multiple light sources and receivers, TOF sensors can create a depth map of an object, helping robots identify cliffs.
[0081] Point cloud data can be a three-dimensional data representation, consisting of a large number of discrete points, each of which contains three-dimensional coordinate information in space and can include other attributes about the point, such as color, reflection intensity, and normal direction. These points are arranged according to their position on the surface of the object or in the environment. Point cloud data is used to accurately describe the shape, position, and surface features of an object and can be used for various applications such as environmental modeling, object recognition, obstacle avoidance, navigation, virtual reality, and computer vision. In this solution, the point cloud acquisition device can be installed in front of the robot, and accordingly, the point cloud data can come from the surrounding area in front of the robot.
[0082] The non-negative high-level point cloud may include a ground point cloud and an obstacle point cloud. The ground point cloud may refer to a set of points representing the ground in the point cloud data, which may be used to establish a reference plane for the robot in the environment.
[0083] Obstacle point cloud can refer to a set of points in point cloud data that represent obstacles or objects. These points are usually scattered in space and are higher than the ground point cloud.
[0084] A negative height point cloud can be a set of points in the point cloud data that contain information about locations below the ground. For example, if a robot is walking on the ground with stairs in front of it, the point cloud data corresponding to all stairs below the ground level can be considered a negative height point cloud. The point cloud data corresponding to the ground level the robot is walking on can be considered a ground point cloud. If there is a chair in front of the robot, the point cloud corresponding to the chair can be considered an obstacle point cloud. In this solution, point clouds 0.05m above the ground level can be defined as obstacle point clouds, and point clouds 0.1m below the ground level can be defined as negative height point clouds.
[0085] The point cloud acquisition device can be connected to the control device through an appropriate interface and communication protocol, and then the control device can use an appropriate data transmission protocol to receive the point cloud data stream. After the point cloud data is received by the control device, the control device can parse the point cloud data, extract the coordinate information and elevation information of the point, and divide the point cloud into non-negative height point cloud and negative height point cloud according to the elevation information.
[0086] Based on the above technical solutions, optionally, after dividing the point cloud data to obtain a non-negative high-point cloud and a negative high-point cloud, the method further includes:
[0087] Count the number of negative high points and the sum of the number of non-negative high points and negative high points in the negative high point cloud;
[0088] Calculate the number of the negative high points and their ratio to the total number of the non-negative high points and the negative high points. If the ratio exceeds a preset fourth threshold, voxelize the negative high point cloud to obtain at least one voxel corresponding to the negative high point cloud, merge the center points of the voxels, and determine the merged point cloud as the third cliff point cloud.
[0089] In this solution, the number of negative high points can represent the number of cliffs or points below the ground in the terrain.
[0090] The sum of the number of non-negative high points and negative high points may be the total number of non-negative high points and negative high points in all point cloud data, including points on the ground, points of obstacles, and points below the ground in cliffs or terrain.
[0091] Before counting the total number of negative points in the negative point cloud and the total number of both non-negative and negative points, the collected negative point cloud data can be traversed. A range can be defined. Specifically, this can be a circular area centered on a negative point, with a radius set based on the actual situation. Each negative point is then traversed and the number of its neighboring points within the range is counted. If the number of neighboring points is less than a certain threshold, the negative point is deleted. After traversing each negative point and filtering out those that meet the criteria, the vertical coordinates of each point in the non-negative and negative point clouds can be obtained. Points are classified as either non-negative or negative based on the sign of the vertical coordinate. A positive vertical coordinate or 0 indicates a non-negative point; a negative vertical coordinate indicates a negative point. After classification, the total number of negative and non-negative points is counted, and the total number of both non-negative and negative points is calculated.
[0092] If the ratio of the number of negative high points to the total number of non-negative high points and negative high points exceeds a fourth threshold, the point cloud with negative high points can be determined to correspond to a cliff area because there is no large area of ground or obstacles above. For example, if the ratio of the number of negative high points to the total number of non-negative high points and negative high points exceeds 25%, the fourth threshold can be exceeded, and the point cloud with negative high points corresponds to a cliff area.
[0093] If the negative elevation point cloud is determined to correspond to a cliff area, the negative elevation point cloud data can be segmented into cubic voxels and the center points of each voxel are merged. The resulting collection of merged voxel centers is then determined as a third cliff point cloud. This third cliff point cloud represents the general shape of the cliff but has a smaller data volume than the original point cloud data.
[0094] In this scheme, by calculating the number of negative high points and their ratio to the total number of non-negative high points and negative high points, it is possible to quickly determine whether the negative high point cloud is a cliff point cloud, thereby improving the efficiency of cliff point cloud determination.
[0095] S102 : Projecting the non-negative high point cloud and the negative high point cloud onto a ground plane according to a preset projection rule, and dividing the ground plane into grids according to a preset reference area.
[0096] The preset projection rule may be to set the vertical coordinates of non-negative height point clouds and negative height point clouds to 0, so as to project the point cloud data into the ground plane so that all points have the same elevation as the ground.
[0097] Figure 2 This is a schematic diagram of the reference area provided in Example 1 of the present application. Figure 2 As shown, the pre-set reference area can be a specific geographic region that defines the boundaries and extent of the ground plane. The purpose of setting this reference area is to project the point cloud data into a known geographic coordinate system for subsequent processing. In this solution, the selected reference area can be a rectangular area, and the area with a relatively uniform and dense point cloud distribution can be used as the reference area.
[0098] The control device can set the vertical coordinates of the non-negative high point cloud and the negative high point cloud to 0 according to the preset projection rules to implement the projection of the point cloud data, and then call the relevant information of the reference area preset in the database, where the relevant information may include the size, position, grid size and grid position of the reference area, and finally divide the ground plane according to the preset grid size and position.
[0099] S103, respectively counting the sum of the number of projection points corresponding to the non-negative high point cloud in each grid, and comparing the sum of the number with a preset first threshold. If the sum of the number does not exceed the first threshold, performing a rotated rectangle fitting on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud.
[0100] The sum of the number of projected points corresponding to the non-negative high point cloud in each grid may refer to the sum of the number of non-negative high point cloud data points projected in each grid.
[0101] The preset first threshold can be a predefined limit value, which can be used to determine in which grids the negative high point deletion operation is performed and in which grids the negative high points need to be retained. If the sum of the number of corresponding projection points in each grid does not exceed the first threshold, it means that there is no large area of ground or obstacles above the corresponding negative high point in the grid. Specifically, before the negative high point cloud and the non-negative high point cloud are projected onto the ground plane according to the preset projection rules, the original vertical coordinates of each point can be stored, and then the original vertical coordinates of each point in the grid can be identified to determine whether the point is a non-negative high point or a negative high point. If the original vertical coordinate of the point is 0 or a positive value, then the point is a non-negative high point; if the original vertical coordinate of the point is a negative value, then the point is a negative high point. For example, it can be set that when the number of projection points corresponding to the non-negative high point cloud exceeds 6, it is considered to exceed the preset first threshold. If each grid has 10 points, among which the projection points corresponding to the negative high point cloud in each grid are 8 in total, and the projection points corresponding to the non-negative high point cloud are 2 in total, then the projection points corresponding to the non-negative high point cloud of each grid do not exceed the first threshold, and accordingly, all the projection points corresponding to the negative high point cloud need to be retained.
[0102] The rotated rectangle can be a 2D rectangle that fits the shape of a set of points. In this scenario, it is used to fit the negative height point cloud to identify cliff areas.
[0103] For each grid, the number of projected points corresponding to the non-negative high point cloud in the grid can be added to obtain the sum of the number, and the sum of the number can be compared with the preset first threshold. If the sum of the number does not exceed the first threshold, it means that the negative high point cloud composed of these negative high points may be the point cloud corresponding to the cliff area because there is no large area of ground and obstacles above. In this case, the step of rotating rectangle fitting can be performed on the original negative high point cloud. Specifically, the convex hull algorithm can be used to calculate the convex hull of the point set. Among them, the convex hull is the minimum convex polygon that encloses the point set, which can help determine the overall shape of the point set. After the convex hull is calculated, the minimum rotated rectangle of the convex hull can be further determined. This rotated rectangle can be a rectangle with the minimum area that can enclose the point set in the convex hull. The L-shape algorithm can also be used to fit the rotated rectangle.
[0104] S104 : Compare the shortest side of each rotated rectangle with a preset second threshold, and determine the negative height point cloud corresponding to the rotated rectangle whose shortest side exceeds the preset second threshold as the first cliff point cloud.
[0105] The second threshold can represent the minimum size of the rotated rectangle, such as width or height. The shortest side of the rotated rectangle must exceed this threshold to be considered a valid cliff point cloud. The second threshold is specifically set based on the robot's ability to pass. The greater the robot's ability to pass, the larger the second threshold is. This means that even if a negative height point cloud is detected due to a ground depression, if the robot's ability to pass is sufficient to ensure the robot passes through the ground depression, this part of the negative height point cloud only represents the existence of the ground depression in terms of height. There is no need to adjust the robot's movement path, and the ground depression will not be identified as a cliff area.
[0106] The cliff point cloud may refer to a point cloud composed of points in the negative height point cloud whose shortest side length of the fitted rotated rectangle exceeds a second threshold, and the positions of these points are the positions of the cliff.
[0107] All cliff regions obtained by fitting the rotated rectangles can be traversed, and then for each rotated rectangle, the length of its shortest side is measured and compared with the second threshold. If the length of the shortest side exceeds the second threshold, it means that the region represented by the rotated rectangle is large enough to be considered a valid cliff region.
[0108] In an embodiment of the present application, point cloud data transmitted by a point cloud acquisition device of a robot is received, and the point cloud data is divided to obtain a non-negative high point cloud and a negative high point cloud; the non-negative high point cloud and the negative high point cloud are projected onto a ground plane according to a preset projection rule, and the ground plane is grid-divided according to a preset reference area; the sum of the numbers of projection points corresponding to the non-negative high point cloud in each grid is counted respectively, and the sum of the numbers is compared with a preset first threshold value respectively; if the sum of the numbers does not exceed the first threshold value, a rotated rectangle fitting is performed on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud; the shortest side of each rotated rectangle is compared with a preset second threshold value, and the negative high point cloud corresponding to the rotated rectangle whose shortest side exceeds the preset second threshold value is determined as the first cliff point cloud. Through the above-mentioned robot cliff detection method, a rotated rectangle fitting is performed on the negative height point cloud that meets the conditions, and it is possible to further determine whether this negative height point cloud is a cliff point cloud. This can avoid misdetecting safe areas such as ground gaps as cliff point clouds, reducing the probability of false cliff alarms, thereby improving the smoothness of the robot's movements and the efficiency of the robot's task execution.
[0109] Example 2
[0110] Figure 3 This is a flow chart of the cliff detection method of the robot provided in the second embodiment of the present application. Figure 2 As shown, the specific steps include:
[0111] S301, receiving point cloud data transmitted by a point cloud acquisition device of a robot, dividing the point cloud data to obtain a non-negative high point cloud and a negative high point cloud.
[0112] S302 : Projecting the non-negative high point cloud and the negative high point cloud onto a ground plane according to a preset projection rule, and dividing the ground plane into grids according to a preset reference area.
[0113] S303 , respectively counting the sum of the number of corresponding projection points in each grid, and respectively comparing the sum of the number with a preset first threshold.
[0114] S304: If there are grids whose sum exceeds the first threshold, the sum of the number of projection points corresponding to the negative high points in all grids is counted, and the negative high points of the corresponding grids are deleted.
[0115] The sum of the number of negative high points can be the sum of the number of negative high points in each grid. It represents the cumulative number of points determined to be negative high points in each grid in the entire point cloud data.
[0116] Figure 4 This is a schematic diagram of point cloud identification provided in Example 2 of this application. Figure 4 As shown, the sum of the projected points corresponding to the non-negative high point cloud in each grid can be traversed. If the sum of the projected points corresponding to the non-negative high point cloud in at least one grid exceeds a first threshold, the corresponding negative high point can be deleted using point cloud filtering techniques. If the sum of the projected points corresponding to the non-negative high point cloud is too high, it indicates that there may be a large area of ground or obstacles above the negative high point. Instead of a point cloud corresponding to a cliff area, it may be a point cloud corresponding to an obstacle below the ground or a point cloud corresponding to an underground structure. For example, if the number of projected points corresponding to the non-negative high point cloud exceeds 6, it is considered to have exceeded the preset first threshold. If there are 10 grids, each with 10 points, and when traversing to the last grid, it is found that there are 9 projected points corresponding to the non-negative high point cloud in this grid and 1 projected point corresponding to the negative high point cloud in this grid, then the grid is considered to have a sum exceeding the first threshold, and the negative high points in this grid are deleted using point cloud filtering techniques.
[0117] S305, counting the sum of the number of projection points corresponding to the retained negative high points, and calculating the ratio of the sum of the number of projection points corresponding to the retained negative high points to the sum of the number of projection points corresponding to the negative high points. If the ratio exceeds a preset third threshold, performing rotated rectangle fitting on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud.
[0118] The purpose of setting the third threshold is to ensure that further analysis of the cliff point cloud is only performed when the number of negative high points in the point cloud accounts for a certain proportion. If the number of deleted negative high points is too large, it indicates that the vast majority of the negative high point cloud belongs to the point cloud corresponding to obstacles below the ground or the point cloud corresponding to underground structures, and the remaining few negative high points that have not been successfully deleted may not be deleted successfully due to sensor errors and algorithm errors. The step of rotating the rectangle fitting of the negative high point cloud can be omitted and the result of the cliff not existing can be directly returned. For example, if the preset third threshold is that the number of retained negative high points accounts for 25% of the total number of negative high points, the total number of negative high points in all grids is 100, 60 negative high points are deleted, and 40 negative high points are retained. Then the number of retained negative high points accounts for 40% of the total number of negative high points, which exceeds the preset third threshold, and the step of rotating the rectangle fitting can be performed on the original negative high point cloud.
[0119] In this embodiment, by comparing the number of projection points corresponding to the non-negative high point clouds of all grids with a set first threshold, and deleting the projection points corresponding to the negative high points in the corresponding grid after the sum of the number exceeds the set first threshold, and by calculating the ratio of the projection points corresponding to the retained negative high points to the projection points corresponding to all negative high points, the negative high point cloud is rotated and fitted only after the ratio exceeds the set third threshold. It can be determined that the negative high point cloud subjected to rotation fitting is not a point cloud corresponding to an underground structure or a point cloud corresponding to an underground obstacle, and further screening is performed for determining the cliff point cloud, thereby improving the efficiency and accuracy of determining the cliff point cloud.
[0120] Based on the above technical solutions, optionally, after performing rotated rectangle fitting on the negative height point cloud to obtain at least one rotated rectangle corresponding to the negative height point cloud, the method further includes:
[0121] The shortest side of each rotated rectangle is compared with a preset second threshold, and the negative height point cloud corresponding to the rotated rectangle whose shortest side does not exceed the preset second threshold is determined as the ground gap point cloud.
[0122] In this solution, the ground gap point cloud refers to the point cloud data of areas below the robot's base that are not cliffs or obstacles. These areas are typically small cracks and crevices in the ground, as well as gaps between elevators and the ground. Unlike cliffs, these areas are generally safe areas, allowing the robot to safely move through them without taking obstacle avoidance actions.
[0123] After obtaining at least one rotated rectangle, the control device can measure the length of the shortest side of each rectangle and compare it with a pre-set second threshold. This second threshold can be used to determine which rotated rectangles represent ground gaps rather than cliffs. If the length of the shortest side of a rotated rectangle does not exceed the set threshold, the control device can determine the point cloud data enclosed by the rotated rectangle as a ground gap point cloud. For example, robots used for precision operations, such as sweeping robots and household robots, may only require very small wheels to accurately control their movement. Therefore, they can only pass through small gaps. Accordingly, the second threshold can be set to 10 cm, meaning that the maximum width of the gap that the robot can pass through does not exceed 10 cm. Therefore, the point cloud data enclosed by rotated rectangles with a shortest side of no more than 10 cm is a ground gap point cloud. On the other hand, robots used for heavy lifting in factory environments may need larger wheels to support their weight and load. Therefore, they can pass through larger gaps. Accordingly, the second threshold can be set to 30 cm, meaning that the maximum width of the gap that the robot can pass through does not exceed 30 cm. Therefore, the point cloud data enclosed by rotated rectangles with a shortest side of no more than 30 cm is a ground gap point cloud.
[0124] In this solution, by comparing the shortest side of the rotated rectangle with a pre-set second threshold, and determining the point cloud data enclosed by the rotated rectangle whose shortest side does not exceed the set threshold as the ground gap point cloud, it is possible to avoid misdetecting safe areas such as ground gaps as cliff point clouds, reducing the probability of false alarms of cliffs, thereby improving the smoothness of the robot's movements and the efficiency of the robot's task execution.
[0125] Example 3
[0126] Figure 5 This is a flow chart of the cliff detection method of the robot provided in the third embodiment of the present application. Figure 5 As shown, the specific steps include:
[0127] S501, receiving point cloud data transmitted by a point cloud acquisition device of a robot, dividing the point cloud data to obtain a non-negative high point cloud and a negative high point cloud;
[0128] S502 : Projecting the non-negative high point cloud and the negative high point cloud onto a ground plane according to a preset projection rule, and dividing the ground plane into grids according to a preset reference area.
[0129] S503, respectively counting the sum of the number of projection points corresponding to the non-negative high point cloud in each grid, and comparing the sum of the number with a preset first threshold. If the sum of the number does not exceed the first threshold, performing a rotated rectangle fitting on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud.
[0130] S504 : Compare the shortest side of each rotated rectangle with a preset second threshold, and determine the negative height point cloud corresponding to the rotated rectangle whose shortest side exceeds the preset second threshold as the first cliff point cloud.
[0131] S505 : voxelize the first cliff point cloud to obtain at least one voxel corresponding to the first cliff point cloud, merge the center points of the voxels, and determine the merged point cloud as the second cliff point cloud.
[0132] A voxel may be a commonly used spatial segmentation unit for dividing point cloud data into smaller cubes or cube-shaped volume units.
[0133] The control device can acquire cliff point cloud data, which includes the three-dimensional coordinate information of the cliff. The cliff point cloud data can then be segmented into cube-shaped voxels. Specifically, the side length of the voxels can be pre-set in a database, determining the granularity of the voxel segmentation. Smaller voxels provide higher point cloud resolution but increase computational complexity. Each voxel has a center point, typically the geometric center of the voxel. This center point can be used to represent the point cloud data within the entire voxel. Specifically, this center point may not be a point in the original cliff point cloud data. Since the original point cloud data may include a large number of data points, and the center point is often located in a significant area within the voxel, using the center point can effectively represent the features and structure in the original point cloud. Combining the point cloud data in each voxel into a single point can achieve downsampling. The center points of each voxel are then merged, and the resulting collection of voxel center points is determined as a second cliff point cloud. This second cliff point cloud represents the general shape of the cliff but has a smaller data volume than the original point cloud data.
[0134] In this embodiment, by voxelizing the first cliff point cloud and merging the center points of each voxel to obtain a second cliff point cloud, the purpose of downsampling can be achieved. In addition, key information can be retained while reducing the amount of data, reducing the burden of calculation and storage, and thus improving the speed of subsequent cliff warning operations.
[0135] Based on the above technical solutions, optionally, after determining the merged point cloud as the second cliff point cloud, the method further includes:
[0136] Obtaining coordinates of each cliff point of the second cliff point cloud, and determining mapping point coordinates of each cliff point coordinate on the ground according to the coordinates of each cliff point and a preset cliff point mapping expression;
[0137] The position information of the cliff boundary is determined according to the mapping point coordinates, and a cliff warning is performed before the robot drives to the cliff boundary according to the position information and a pre-set cliff warning strategy.
[0138] In this solution, the coordinates of each cliff point in the second cliff point cloud can be the coordinate values of each point in the second cliff point cloud in three-dimensional space. These coordinate values represent the position of each point in the second cliff point cloud. The coordinates of each point are generally composed of three values, representing the position of the point on the X, Y, and Z axes, respectively.
[0139] The preset cliff point mapping expression can be a mathematical function or algorithm that describes how to map cliff point coordinates to coordinates on the ground. For each cliff point coordinate, they can be calculated using the preset mapping expression to determine their mapped point coordinates on the ground.
[0140] The three-dimensional coordinates of each cliff point can be extracted from the second cliff point cloud data as the coordinates of each cliff point of the second cliff point cloud. Since the preset cliff point mapping expression can be a mathematical function or algorithm, the coordinates of each cliff point can be input into the preset cliff point mapping expression, and then the corresponding mapping point coordinates can be obtained to represent the position of each cliff point on the ground.
[0141] The location information of the cliff may be a set of coordinate points obtained by processing and mapping the second cliff point cloud data, and includes the shape and location of the cliff on the ground.
[0142] A pre-set cliff warning strategy can be a set of rules or conditions that determine when a cliff warning is triggered. These warning strategies can be based on factors such as the location of the cliff and the robot. Specifically, the control device can obtain the robot's location information in real time through a built-in GPS (Global Positioning System) positioning system and calculate the distance difference between the cliff and robot locations based on the location information. If the distance difference is less than a pre-set distance threshold, a cliff warning is triggered. For example, if the pre-set distance threshold is 3m, a cliff warning is automatically triggered when the distance difference is less than 3m. When a cliff warning is triggered, the control device can first control the robot to slow down or stop, activate a path planning algorithm to recalculate other feasible paths to the destination, and control the robot to travel along the new path after determining the new path. If no other feasible path exists, the robot can be immediately stopped and the robot's current location information and a problem report can be sent to the control center where the staff are located for manual intervention. The purpose of this setting is to be able to promptly switch to other feasible paths when the robot encounters dangerous terrain such as cliffs, stairs and steep slopes, ensuring that the robot can successfully complete the current task, or to brake in time and notify staff to intervene when there are no other feasible paths. Manual intervention can be used to help the robot successfully complete the current task while ensuring the safety of the robot.
[0143] In this solution, by issuing a cliff warning before the robot reaches the cliff boundary, the robot's ability to perceive potential dangers is improved, the risk of falling is reduced, and thus the robot can move safely in complex environments.
[0144] Based on the above technical solutions, optionally, the preset cliff point mapping expression is as follows:
[0145]
[0146]
[0147] z = 0;
[0148] Where x is the horizontal coordinate of the mapping point coordinate; y is the vertical coordinate of the mapping point coordinate; z is the vertical coordinate of the mapping point coordinate; X is the horizontal coordinate of the cliff point coordinate; Y is the vertical coordinate of the cliff point coordinate; Z is the vertical coordinate of the cliff point coordinate; H is the height of the point cloud acquisition device; D is the distance between the point cloud acquisition device and the robot.
[0149] In this plan, Figure 6 This is a schematic diagram of the structure of the robot provided in Example 3 of the present application. Figure 6 As shown in FIG, P1 and P2 are the coordinates of the cliff point, and p1 and p2 are the coordinates of the mapping point. The height of the point cloud acquisition device can be the value where the optical center of the point cloud acquisition device falls on the z-axis of the robot coordinate system.
[0150] The distance between the point cloud acquisition device and the robot may be a value where the optical center of the point cloud acquisition device falls on the x-axis of the robot coordinate system.
[0151] Assume the coordinates of the cliff point are P(X, Y, Z) and the coordinates of the mapping point are p(x, y, z). Since the mapping point in this solution is on the ground, and the ground is the origin of the vertical coordinate reference system, the coordinates of the mapping point can be directly set to 0. Then, the horizontal and vertical coordinates of the mapping point can be determined according to the principle of similar triangles, and the cliff point is mapped to the ground based on the horizontal and vertical coordinates of the mapping point.
[0152] This solution improves the accuracy of cliff detection by mapping cliff points on the ground. This avoids the problem of the robot continuing to move and falling due to the detected cliff being smaller than the actual cliff edge, without triggering the anti-fall warning. This further improves the robot's safety and mission efficiency.
[0153] Example 4
[0154] Figure 7 This is a schematic diagram of the structure of the cliff detection device of the robot provided in the fourth embodiment of the present application. Figure 7As shown, specifically including the following:
[0155] The point cloud data receiving module 701 is used to receive the point cloud data transmitted by the point cloud acquisition device of the robot, and divide the point cloud data into non-negative high point clouds and negative high point clouds;
[0156] A grid division module 702 is used to project the non-negative high point cloud and the negative high point cloud onto a ground plane according to a preset projection rule, and to perform grid division on the ground plane according to a preset reference area;
[0157] The rotated rectangle fitting module 703 is configured to count the sum of the projected points corresponding to the non-negative high point cloud in each grid, and compare the sum with a preset first threshold. If the sum does not exceed the first threshold, a rotated rectangle fitting is performed on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud.
[0158] The cliff point cloud determination module 704 is configured to compare the shortest side of each rotated rectangle with a preset second threshold, and determine the negative height point cloud corresponding to the rotated rectangle whose shortest side exceeds the preset second threshold as the first cliff point cloud.
[0159] Furthermore, the device further includes a negative high point number statistics module, and the negative high point number statistics module is used to:
[0160] Count the sum of the projection points corresponding to the negative high points in all grids;
[0161] If there are grids with the number and value exceeding the first threshold, deleting the negative high points of the corresponding grids;
[0162] Count the sum of the projected points corresponding to the retained negative high points, and calculate the ratio of the sum of the projected points corresponding to the retained negative high points to the sum of the projected points corresponding to the negative high points. If the ratio exceeds a preset third threshold, perform rotated rectangle fitting on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud.
[0163] Furthermore, the device also includes a ground gap point cloud determination module:
[0164] The shortest side of each rotated rectangle is compared with a preset second threshold, and the negative height point cloud corresponding to the rotated rectangle whose shortest side does not exceed the preset second threshold is determined as the ground gap point cloud.
[0165] Furthermore, the device further includes a cliff point cloud voxelization module, and the cliff point cloud voxelization module is used to:
[0166] The first cliff point cloud is voxelized to obtain at least one voxel corresponding to the first cliff point cloud, and the center points of the voxels are merged to determine the merged point cloud as the second cliff point cloud.
[0167] Furthermore, the device further includes a cliff warning module, which is configured to:
[0168] Obtaining coordinates of each cliff point of the second cliff point cloud, and determining mapping point coordinates of each cliff point coordinate on the ground according to the coordinates of each cliff point and a preset cliff point mapping expression;
[0169] The position information of the cliff boundary is determined according to the mapping point coordinates, and a cliff warning is performed before the robot drives to the cliff boundary according to the position information and a pre-set cliff warning strategy.
[0170] Furthermore, the preset cliff point mapping expression is as follows:
[0171]
[0172]
[0173] z = 0;
[0174] Where x is the horizontal coordinate of the mapping point coordinate; y is the vertical coordinate of the mapping point coordinate; z is the vertical coordinate of the mapping point coordinate; X is the horizontal coordinate of the cliff point coordinate; Y is the vertical coordinate of the cliff point coordinate; Z is the vertical coordinate of the cliff point coordinate; H is the height of the point cloud acquisition device; D is the distance between the point cloud acquisition device and the robot.
[0175] Furthermore, the device further includes a point cloud quantity statistics module, which is used to:
[0176] Count the number of negative high points and the sum of the number of non-negative high points and negative high points in the negative high point cloud;
[0177] Calculate the number of the negative high points and their ratio to the total number of the non-negative high points and the negative high points. If the ratio exceeds a preset fourth threshold, voxelize the negative high point cloud to obtain at least one voxel corresponding to the negative high point cloud, merge the center points of the voxels, and determine the merged point cloud as the third cliff point cloud.
[0178] In this embodiment, the point cloud data receiving module is used to receive point cloud data transmitted by the robot's point cloud acquisition device, divide the point cloud data, and obtain a non-negative high point cloud and a negative high point cloud; the grid division module is used to project the non-negative high point cloud and the negative high point cloud onto the ground plane according to a preset projection rule, and divide the ground plane into grids according to a preset reference area; the rotated rectangle fitting module is used to respectively count the sum of the number of projection points corresponding to the non-negative high point cloud in each grid, and respectively compare the sum of the number with a preset first threshold. If the sum of the number does not exceed the first threshold, the negative high point cloud is fitted with a rotated rectangle to obtain at least one rotated rectangle corresponding to the negative high point cloud; the cliff point cloud determination module is used to compare the shortest side of each rotated rectangle with a preset second threshold, and determine the negative high point cloud corresponding to the rotated rectangle whose shortest side exceeds the preset second threshold as the first cliff point cloud. Through the cliff detection device of the above-mentioned robot, a rotated rectangle fitting is performed on the negative height point cloud that meets the conditions, and it is possible to further determine whether this negative height point cloud is a cliff point cloud. This can avoid misdetecting safe areas such as ground gaps as cliff point clouds, reducing the probability of false alarms of cliffs, thereby improving the smoothness of the robot's movements and the efficiency of the robot's task execution.
[0179] The cliff detection device of the robot in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), an ATM or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0180] The cliff detection device of the robot in the embodiment of the present application can be a device having an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0181] The cliff detection device for a robot provided in the embodiment of the present application can implement each process implemented in the above-mentioned method embodiments. To avoid repetition, they will not be described here.
[0182] Example 5
[0183] like Figure 8 As shown, an embodiment of the present application further provides an electronic device 800, including a processor 801, a memory 802, and a program or instruction stored in the memory 802 and executable on the processor 801. When the program or instruction is executed by the processor 801, each process of the cliff detection device embodiment of the above-mentioned robot is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0184] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0185] Example 6
[0186] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the cliff detection device embodiment of the above-mentioned robot are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0187] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk.
[0188] Example 7
[0189] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned robot cliff detection device embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0190] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0191] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0192] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0193] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
[0194] The above are only preferred embodiments of the present application and the technical principles employed. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that are possible for those skilled in the art will not depart from the scope of protection of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments and may include more other equivalent embodiments without departing from the concept of the present application. The scope of the present application is determined by the scope of the claims.
Claims
1. A cliff detection method for a robot, characterized in that: The method is performed by a control device of the robot; the method comprises: Receiving point cloud data transmitted by a point cloud acquisition device of the robot, dividing the point cloud data to obtain a non-negative high point cloud and a negative high point cloud; Projecting the non-negative high point cloud and the negative high point cloud onto a ground plane according to a preset projection rule, and dividing the ground plane into grids according to a preset reference area; Counting the sum of the projected points corresponding to the non-negative high point cloud in each grid, and comparing the sum with a preset first threshold, if the sum does not exceed the first threshold, performing a rotated rectangle fitting on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud; Comparing the shortest side of each rotated rectangle with a preset second threshold, and determining the negative height point cloud corresponding to the rotated rectangle whose shortest side exceeds the preset second threshold as the first cliff point cloud; Wherein, after performing rotated rectangle fitting on the negative height point cloud to obtain at least one rotated rectangle corresponding to the negative height point cloud, the method further includes: The shortest side of each rotated rectangle is compared with a preset second threshold, and the negative height point cloud corresponding to the rotated rectangle whose shortest side does not exceed the preset second threshold is determined as the ground gap point cloud.
2. The robot cliff detection method according to claim 1, characterized in that: After respectively counting the sum of the number of projection points corresponding to the non-negative high point cloud in each grid and comparing the sum with a preset first threshold, the method further includes: If there are grids whose sum exceeds the first threshold, the sum of the number of projection points corresponding to the negative high points in all grids is counted, and the negative high points of the corresponding grids are deleted; Count the sum of the projected points corresponding to the retained negative high points, and calculate the ratio of the sum of the projected points corresponding to the retained negative high points to the sum of the projected points corresponding to the negative high points. If the ratio exceeds a preset third threshold, perform rotated rectangle fitting on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud.
3. The robot cliff detection method according to claim 1, characterized in that: After comparing the shortest side of each rotated rectangle with a preset second threshold, and determining the negative height point cloud corresponding to the rotated rectangle whose shortest side exceeds the preset second threshold as the first cliff point cloud, the method further includes: The first cliff point cloud is voxelized to obtain at least one voxel corresponding to the first cliff point cloud, and the center points of the voxels are merged to determine the merged point cloud as the second cliff point cloud.
4. The robot cliff detection method according to claim 3, characterized in that: After determining the merged point cloud as the second cliff point cloud, the method further includes: Obtaining coordinates of each cliff point of the second cliff point cloud, and determining mapping point coordinates of each cliff point coordinate on the ground according to the coordinates of each cliff point and a preset cliff point mapping expression; The position information of the cliff boundary is determined according to the mapping point coordinates, and a cliff warning is performed before the robot drives to the cliff boundary according to the position information and a pre-set cliff warning strategy.
5. The robot cliff detection method according to claim 4, characterized in that: The preset cliff point mapping expression is as follows: z=0; Where x is the horizontal coordinate of the mapping point coordinate; y is the vertical coordinate of the mapping point coordinate; z is the vertical coordinate of the mapping point coordinate; X is the horizontal coordinate of the cliff point coordinate; Y is the vertical coordinate of the cliff point coordinate; Z is the vertical coordinate of the cliff point coordinate; H is the height of the point cloud acquisition device; D is the distance between the point cloud acquisition device and the robot.
6. The robot cliff detection method according to claim 1, characterized in that: After dividing the point cloud data to obtain a non-negative high-point cloud and a negative high-point cloud, the method further includes: Count the number of negative high points and the sum of the number of non-negative high points and negative high points in the negative high point cloud; Calculate the number of the negative high points and their ratio to the total number of the non-negative high points and the negative high points. If the ratio exceeds a preset fourth threshold, voxelize the negative high point cloud to obtain at least one voxel corresponding to the negative high point cloud, merge the center points of the voxels, and determine the merged point cloud as the third cliff point cloud.
7. A robot cliff detection device, characterized in that: The device is configured on a control device of the robot; the device comprises: A point cloud data receiving module is used to receive point cloud data transmitted by the robot's point cloud acquisition device, divide the point cloud data into non-negative high point clouds and negative high point clouds; A grid division module, configured to project the non-negative high point cloud and the negative high point cloud onto a ground plane according to a preset projection rule, and to perform grid division on the ground plane according to a preset reference area; A rotated rectangle fitting module is used to count the sum of the projection points corresponding to the non-negative high point cloud in each grid, and compare the sum with a preset first threshold. If the sum does not exceed the first threshold, a rotated rectangle fitting is performed on the negative high point cloud to obtain at least one rotated rectangle corresponding to the negative high point cloud. a cliff point cloud determination module, configured to compare the shortest side of each rotated rectangle with a preset second threshold, and determine the negative height point cloud corresponding to the rotated rectangle whose shortest side exceeds the preset second threshold as the first cliff point cloud; The device also includes a ground gap point cloud determination module: The shortest side of each rotated rectangle is compared with a preset second threshold, and the negative height point cloud corresponding to the rotated rectangle whose shortest side does not exceed the preset second threshold is determined as the ground gap point cloud.
8. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the cliff detection method for a robot as described in any one of claims 1 to 6.
9. A readable storage medium, characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the cliff detection method of the robot according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Grid well lid detection method, device and equipment and storage medium
CN115139303A