Cliff detection method and device

Through structured light detection method, the problem of poor cliff detection accuracy in the prior art is solved, accurate identification and height detection of cliffs are achieved, and the accuracy and safety of autonomous mobile robot path planning is improved.

CN113721301BActive Publication Date: 2024-12-13GUANGDONG INFORE INTELLIGENT SANITATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110946022.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-17
Publication Date
2024-12-13
Estimated Expiration
2041-08-17

AI Technical Summary

Technical Problem

The existing cliff detection methods have poor detection accuracy, especially infrared signals-based methods are greatly affected by the color and material of the ground, making it difficult to plan the path in time to avoid cliffs.

Method used

The structured light detection method is adopted to emit structured light of preset shapes to the ground area to be detected, collect images, extract and compare the structured light shapes, determine whether there is a cliff on the ground, and perform height detection, and adjust the forward direction of the autonomous mobile robot.

Benefits of technology

It improves the accuracy and stability of cliff detection, reduces the impact of ground materials and colors on the detection results, effectively avoids cliffs of different heights, and improves detection accuracy and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113721301B_ABST
    Figure CN113721301B_ABST
Patent Text Reader

Abstract

The present invention discloses a cliff detection method and device, which installs a camera and a structured light emitter on an autonomous mobile robot so that the angle between the optical axis of the camera and the vertical direction is θ c The angle between the optical axis of the structured light emitter and the vertical direction is θ l ; emit a first structured light of a preset shape to a first ground area to be detected; collect a first image of the first ground area to be detected containing the first structured light; extract the shape of the first structured light contained in the first image, and record it as the shape of the second structured light; compare the shape of the first structured light with the shape of the second structured light; if the shape of the first structured light remains unchanged compared to the shape of the second structured light, it is determined that there is no cliff in the first ground area to be detected; otherwise, it is determined that there is a cliff in the first ground area to be detected. Compared with the prior art, the cliff detection method and device provided by the present invention effectively improve the accuracy of detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cliff detection, and in particular to a cliff detection method and device. Background Art

[0002] When autonomous mobile robots and unmanned vehicles are traveling on a path, they need to detect cliffs on the path in order to plan paths in time to avoid them. Currently, cliff detection devices and methods mainly include detection methods based on contact sensors and infrared signals. Among them, the detection method based on contact sensors has a short detection distance, and the detection method based on infrared signals has poor stability of detection results because infrared signals are greatly affected by the color and material of the ground. Therefore, the existing detection methods are not conducive to timely planning paths for avoidance. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a cliff detection method and device to improve the accuracy of detection.

[0004] In order to solve the above technical problems, the present invention provides a cliff detection method, comprising:

[0005] Emitting a first structured light of a preset shape to a first ground area to be detected;

[0006] Acquire a first image of the first to-be-detected ground area containing the first structured light;

[0007] extracting a shape of the first structured light contained in the first image and recording it as a shape of the second structured light;

[0008] comparing the shape of the second structured light with the shape of the first structured light;

[0009] If the shape of the second structured light remains unchanged compared to the shape of the first structured light, it is determined that there is no cliff in the first ground area to be detected;

[0010] If the shape of the second structured light is different from the shape of the first structured light, it is determined that there is a cliff in the first to-be-detected ground area.

[0011] Furthermore, before emitting the first structured light of a preset shape to the first ground area to be detected, the method further includes:

[0012] A camera is mounted on the autonomous mobile robot so that the angle between the optical axis of the camera and the vertical direction is θ c , and install a structured light emitter on the autonomous mobile robot so that the angle between the optical axis of the structured light emitter and the vertical direction is θ l ; where θ c <θ l .

[0013] Furthermore, the shape of the second structured light is different from that of the first structured light, specifically:

[0014] The shape of the second structured light is missing an edge structure compared with the shape of the first structured light.

[0015] Further, after determining that there is a cliff in the first ground area to be detected, the method further includes:

[0016] Performing height detection on the cliffs in the first ground area to be detected is specifically as follows:

[0017] Controlling the autonomous mobile robot to move forward slowly according to the distance calculated by the first preset formula;

[0018] During the forward movement, a first structured light of a preset shape is emitted to a second ground area to be detected, wherein the second ground area to be detected is located directly in front of the first ground area to be detected at a preset distance;

[0019] Acquire a second image of the second to-be-detected ground area containing the first structured light;

[0020] extracting a shape of the first structured light contained in the second image, and recording the shape as a third structured light;

[0021] comparing the shape of the third structured light with the shape of the second structured light;

[0022] If the edge structure missing from the second structured light does not appear in the shape of the third structured light, it is determined that the height of the cliff is greater than a preset height;

[0023] If an edge structure missing from the second structured light appears in the shape of the third structured light, detecting a pixel distance at which the shape of the third structured light falls on the second image;

[0024] If the descending pixel distance is greater than or equal to the preset descending distance, it is determined that the height of the cliff is greater than or equal to the preset height;

[0025] If the descending pixel distance is less than the preset descending distance, it is determined that the height of the cliff is less than the preset height.

[0026] Furthermore, the autonomous mobile robot is made to adjust its forward direction, specifically:

[0027] When it is determined that the height of the cliff is less than a preset height, the autonomous mobile robot continues to move forward;

[0028] When it is determined that the height of the cliff is greater than or equal to a preset height, the autonomous mobile robot stops moving forward.

[0029] Furthermore, the present invention also provides a cliff detection device, comprising: a first structured light emission module, a first image acquisition module, a first extraction module, a first comparison module and a first determination module;

[0030] Wherein, the first structured light emission module is used to emit a first structured light of a preset shape to the first ground area to be detected;

[0031] The first image acquisition module is used to acquire a first image of the first to-be-detected ground area containing the first structured light;

[0032] The first extraction module is used to extract the shape of the first structured light contained in the first image, which is recorded as the shape of the second structured light;

[0033] The first comparison module is used to compare the shape of the second structured light with the shape of the first structured light;

[0034] The first determination module is used to determine that there is no cliff in the first ground area to be detected if the shape of the second structured light remains unchanged compared with the shape of the first structured light; and to determine that there is a cliff in the first ground area to be detected if the shape of the second structured light is different from the shape of the first structured light.

[0035] Further, the first structured light emission module is installed in the structured light emitter, and the first image acquisition module is installed in the camera;

[0036] The angle between the optical axis of the structured light emitter and the vertical direction is θ l , the angle between the optical axis of the camera and the vertical direction is θ c , where θ c <θ l .

[0037] Further, the first determining module determines that there is a difference between the shape of the second structured light and the shape of the first structured light, specifically:

[0038] It is determined that the shape of the second structured light has a missing edge structure compared with the shape of the first structured light.

[0039] Furthermore, it also includes: a moving module, a second structured light emission module, a second image acquisition module, a second extraction module, a second comparison module and a second determination module;

[0040] The moving module, the second structured light emitting module, the second image acquisition module, the second extraction module, the second comparison module and the second determination module are used to perform height detection on the cliff in the first ground area to be detected after the first determination module determines that there is a cliff in the first ground area to be detected;

[0041] Wherein, the mobile module is used to control the autonomous mobile robot to move slowly according to the distance calculated by the first preset formula;

[0042] During the forward movement, the second structured light module is used to emit a first structured light of a preset shape to a second ground area to be detected, wherein the second ground area to be detected is located directly in front of the first ground area to be detected at a preset distance;

[0043] The second image acquisition module is used to acquire a second image of the second to-be-detected ground area containing the first structured light;

[0044] The second extraction module is used to extract the shape of the first structured light contained in the second image, which is recorded as the shape of the third structured light;

[0045] The second comparison module is used to compare the shape of the third structured light with the shape of the second structured light;

[0046] The second determination module is configured to determine that the height of the cliff is greater than a preset height when the edge structure missing from the second structured light does not appear in the shape of the third structured light;

[0047] The second determination module is further used to detect the pixel distance of the third structured light shape descending on the image when the edge structure missing from the second structured light does not appear in the shape of the third structured light; if the descending pixel distance is greater than or equal to a preset descending distance, determine that the height of the cliff is greater than or equal to a preset height; if the descending pixel distance is less than the preset descending distance, determine that the height of the cliff is less than the preset height.

[0048] Furthermore, the first determination module enables the autonomous mobile robot to adjust its forward direction, specifically:

[0049] When the second determination module determines that the height of the cliff is less than a preset height, the first determination module enables the autonomous mobile robot to continue moving forward;

[0050] When the second determination module determines that the height of the cliff is greater than or equal to a preset height, the first determination module causes the autonomous mobile robot to stop moving forward.

[0051] Compared with the prior art, the cliff detection method and device of the embodiment of the present invention have the following beneficial effects:

[0052] If the ground area to be detected is a plane, emitting structured light onto the plane will not change the shape of the structured light. Therefore, the present invention emits a first structured light of a preset shape to the first ground area to be detected; collects a first image of the first ground area to be detected containing the first structured light; extracts the shape of the first structured light contained in the first image, recorded as the shape of the second structured light; compares the shape of the first structured light with the shape of the second structured light; if the shape of the first structured light remains unchanged compared to the shape of the second structured light, it is determined that there is no cliff in the first ground area to be detected; if there is a difference between the shape of the first structured light and the shape of the second structured light, it is determined that there is a cliff in the first ground area to be detected. Compared with the prior art, the cliff detection method and device provided by the present invention effectively improve the accuracy of detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 is a flow chart of an embodiment of a cliff detection method provided by the present invention;

[0054] Figure 2 It is a detection installation schematic diagram of an embodiment of the cliff detection method provided by the present invention;

[0055] Figure 3 is a schematic diagram of structured light pattern refinement of an embodiment of the cliff detection method provided by the present invention;

[0056] Figure 4 is an image schematic diagram of four convolution kernels of an embodiment of the cliff detection method provided by the present invention;

[0057] Figure 5 is a detection schematic diagram of an autonomous mobile robot when passing through a maximum cliff according to an embodiment of the cliff detection method provided by the present invention;

[0058] Figure 6 This is a schematic diagram of image structure detection during turning in one embodiment of the cliff detection method provided by the present invention;

[0059] Figure 7 It is a structural schematic diagram of an embodiment of the cliff detection device provided by the present invention. DETAILED DESCRIPTION

[0060] The following will be combined with the accompanying drawings in the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0061] Example 1

[0062] See also Figure 1 , Figure 1 : is a flow chart of an embodiment of a cliff detection method and device provided by the present invention, such as Figure 1 As shown, the method includes steps 101 to 106, which are specifically as follows:

[0063] Step 101: emitting a first structured light of a preset shape to a first ground area to be detected.

[0064] In this embodiment, a camera is installed on the autonomous mobile robot, the vertical distance from the installed camera to the ground is H, and the angle between the optical axis of the camera and the vertical direction is θ c At the same time, a structured light transmitter is installed on the autonomous mobile robot. The vertical distance from the installed structured light transmitter to the camera is L, the vertical distance to the ground is H+L, and the angle between the optical axis of the structured light transmitter and the vertical direction is θ l ,like Figure 2 As shown, where θ c <θ l , to ensure that when the structured light is projected under the cliff, the camera has a certain area of ​​visual blindness. The existence of the visual blindness can timely remind the autonomous mobile robot that there may be a cliff in front of it, so that the autonomous mobile robot can prepare in advance. In this embodiment, the detection distance of the autonomous mobile robot is: d l =(H+L)*tan(θ l ), wherein the detection distance can be adjusted by changing the installation height H of the device.

[0065] In this embodiment, the structured light emitter emits structured light of a preset shape to the first ground to be detected, wherein the first ground area to be detected is directly in front of the autonomous mobile robot, and the emission distance does not exceed the detection distance. As a preferred solution in this embodiment, the first structured light of the preset shape is a structured light of a red quadrilateral ABCD pattern, wherein the side AB is the side structure farthest from the autonomous mobile robot, and the color of the emitted light is not limited to red. When the ground has more colors and the luminosity is larger, the structured light can be selected as invisible light, so that the emitted structured light is less affected by the ground color and material, which is conducive to improving the stability of the detection result.

[0066] Step 102: Capture a first image of the first to-be-detected ground area containing a first structured light.

[0067] In this embodiment, the camera is used to collect images of the area directly in front of the autonomous mobile machine emitted by the structured light emitter. When the ground is horizontal, the length of the side AB is equal to the minimum width that the robot can travel, and the quadrilateral ABCD is imaged as quadrilateral abcd on the image, and the side ab is parallel to the u axis of the pixel coordinate system on the image. As a preferred solution in this embodiment, if the color of the selected first structured light is invisible light, a corresponding bandpass filter is added to the camera lens to reduce the impact of the ground on the first structured light while facilitating the camera to collect images containing the first structured light.

[0068] Step 103: extracting the shape of the first structured light contained in the first image and recording it as the shape of the second structured light.

[0069] In this embodiment, the first structured light in the first image acquired by the camera is segmented and detected in the HSV color space, where h represents hue, different colors are in different spectral color positions, s represents color saturation, and v represents brightness. The threshold range is set according to the color and brightness of the structured light, so that the structured light can be stably segmented in the image. This segmentation method is less affected by changes in ground color and material. After the structured light is segmented, the detected structured light pattern is further refined by using a refinement algorithm, so that the width of the edge structure of the first structured light on the first image is one pixel, which is convenient for further analysis of the image, such as Figure 3 As shown, the four vertices of the quadrilateral abcd are detected, wherein the vertex detection is performed using a corner detection algorithm, and four convolution kernels ka, kb, kc, and kd are set to perform sliding window convolution on the first image respectively. ka, kb, kc, and kd are as follows Figure 4 As shown; Specifically: when the convolution kernel slides to the corner point A, the convolution result at this time is:

[0070]

[0071] Among them, S=255 is the maximum value in the convolution result, ka, kb, kc, and kd are the convolution results of the first image respectively, and the position of the brightest point in the first image is the position of the corner points a, b, c, and d of the first structured light in the first image. The existing corner points and the edges connected to the corner points in the first image are extracted and recorded as the shape of the second structured light. At the same time, the pixel height position v0 of the edge ab is recorded at this time. Because the edge ab is horizontal, the pixel height positions of the corner points a and b are the pixel height positions of the edge ab.

[0072] Step 104: Compare the shape of the second structured light with the shape of the first structured light.

[0073] In this embodiment, the shape of the second structured light extracted from the first image is compared with the shape of the first structured light emitted from the structured light emitter.

[0074] Step 105: If the shape of the second structured light remains unchanged compared to the shape of the first structured light, it is determined that there is no cliff in the first to-be-detected ground area.

[0075] In this embodiment, if the shape of the second structured light remains unchanged compared with the shape of the first structured light, that is, the side AB of the quadrilateral ABCD of the first structured light is emitted by the structured light emitter on the first area to be detected, the complete quadrilateral abcd can be stably detected on the first image, and the pixel height position of the side ab on the image is stable near v0, then it is determined that there is no cliff on the first detection ground area. At this time, the autonomous robot can advance to the first ground area to be detected without changing the forward route.

[0076] Step 106: If the shape of the second structured light is different from the shape of the first structured light, it is determined that there is a cliff in the first to-be-detected ground area.

[0077] In this embodiment, if the shape of the second structured light is missing an edge structure compared to the shape of the first structured light, that is, the side AB of the quadrilateral ABCD of the first structured light is emitted by the structured light emitter on the first area to be detected, if the side AB is in the blind spot of the camera's field of view, the side ab disappears on the image, and the complete quadrilateral abcd cannot be detected on the first image, then it is determined that there is a cliff on the first detection ground area.

[0078] In this embodiment, after determining that there is a cliff in the first ground area to be detected, the method further includes: detecting the height of the cliff in the first ground area to be detected, specifically: controlling the autonomous mobile robot to slowly move forward according to the distance calculated by the first preset formula; in the process of moving forward, emitting a first structured light of a preset shape to the second ground area to be detected, wherein the second ground area to be detected is located directly in front of the first ground area to be detected at a preset distance; collecting a second image of the second ground area to be detected containing the first structured light; extracting the shape of the first structured light contained in the second image, which is recorded as the shape of the third structured light; comparing the shape of the third structured light with the shape of the second structured light; if the edge structure missing from the second structured light does not appear in the shape of the third structured light, it is determined that the height of the cliff is greater than the preset height; if the edge structure missing from the second structured light appears in the shape of the third structured light, then detecting the pixel distance of the shape of the third structured light descending on the second image; if the descending pixel distance is greater than or equal to the preset descending distance, it is determined that the height of the cliff is greater than or equal to the preset height; if the descending pixel distance is less than the preset descending distance, it is determined that the height of the cliff is less than the preset height.

[0079] In this embodiment, when it is detected that the edge ab disappears on the image and it is determined that there may be a cliff ahead, the autonomous mobile robot slows down and continues to move forward. At this time, the distance from the autonomous mobile robot to the cliff is also the range of cliff detection: Dl =(H+L)·tan(θ l ). At the same time, through the previous setting of the parameters of the autonomous robot, the maximum cliff depth that the autonomous mobile robot can pass is set to h1, such as Figure 5 As shown, when the height of the cliff is h1, the distance from the preset structured light emitter to the structured light emission point is c1. The preset distance from the camera installation position to the structured light emission point is c2. Among them, c2 is c 21 and c 22 Divided into two sections, The preset horizontal distance from the autonomous mobile robot to the structured light emission point is c3; the preset distance from the autonomous mobile robot to the cliff is Dc, Similarly, the preset distance that the autonomous mobile robot moves forward from the moment edge ab disappears from the image to the moment it reappears in the image is Δx1; where Similarly, if the preset detection cliff depth exceeds the maximum passable cliff depth h1 set by the autonomous mobile robot, and reaches h2, the autonomous mobile robot needs to move forward before the edge ab appears. Therefore, from the time when the edge ab just disappears from the image to the time when the edge ab reappears in the image, the distance Δx2 that the autonomous mobile robot moves forward is greater than Δx1. That is, when there is a cliff with a height greater than h1 in front of the autonomous mobile robot, the distance that the detection device moves forward from the time when the edge ab just disappears from the image to the time when the edge ab reappears in the image is greater than Δx1.

[0080] In this embodiment, during the actual detection process, the distance traveled by the autonomous mobile robot is recorded as d, where the distance traveled by the autonomous mobile robot is recorded by an encoder at an angle α° of rotation of the driving wheel of the autonomous mobile robot when it moves forward, and the radius of the driving wheel is r, and the formula is: It is calculated that, during the process of the autonomous robot moving forward, the camera continues to acquire the first structured light pattern emitted by the structured light emitter, which is then converted into a second image containing the first structured light, and then the shape of the first structured light in the second image is extracted and recorded as the shape of the third structured light. The specific operations are shown in steps 101 to 104.

[0081] In this embodiment, if the distance d advanced by the autonomous mobile robot is greater than Δx1 and the edge ab is not detected on the image, it is determined that there is a cliff with a height greater than h0 ahead, and the detection result is output. If the distance d advanced by the autonomous mobile robot is less than or equal to Δx0 and the edge ab is detected again on the image, the judgment is continued, and the pixel height position v2 of the edge ab appearing at this time on the second image is calculated, and the descending pixel height is: Δv=v2-v0. When the pixel distance Δv of the edge ab descending on the image is greater than v0, it is still determined that there is a cliff with a height greater than h0 ahead. When the pixel distance Δv of the edge ab descending on the image is less than or equal to v0, it is determined that there is a cliff with a height less than or equal to h0 ahead, and the detection result is output.

[0082] In this embodiment, the presence of a cliff is determined by combining multiple aspects such as the position change of structured light in multiple images, the integrity of the structured light pattern, the distance for setting cliff detection, the height threshold of the cliff, the distance the device advances during the disappearance of the structured light, and the pixel height change value of the structured light in the image, so that the output detection result is more comprehensive and accurate.

[0083] In this embodiment, when a cliff greater than h0 is detected in front of the autonomous mobile robot, the autonomous mobile robot is assisted to avoid it. The autonomous mobile robot rotates counterclockwise on the spot. At this time, the quadrilateral abcd of the structured light on the image captured by the current camera is continuously detected. When the quadrilateral abcd appears from nothing, when the four corner points of the quadrilateral abcd can be completely detected in the image, it is determined that the road ahead is passable. At this time, the detection process of the structure on the image is as follows: Figure 6 When a cliff less than or equal to h0 is detected in front of the autonomous mobile robot, the autonomous mobile robot continues to move forward.

[0084] See also Figure 7 , Figure 7 is a schematic structural diagram of an embodiment of a cliff detection device provided by the present invention, such as Figure 7 As shown, the device structure includes: a first structured light emission module 701, a first image acquisition module 702, a first extraction module 703, a first comparison module 704 and a first determination module 705;

[0085] The first structured light emission module 701 is used to emit a first structured light of a preset shape to the first ground area to be detected. In this embodiment, a camera is installed on the autonomous mobile robot, the vertical distance from the installed camera to the ground is H, and the angle between the optical axis of the camera and the vertical direction is θ cAt the same time, a structured light transmitter is installed on the autonomous mobile robot. The first structured light transmitter module 701 is installed in the structured light transmitter. The vertical distance from the installed structured light transmitter to the camera is L, the vertical distance to the ground is H+L, and the angle between the optical axis of the structured light transmitter and the vertical direction is θ l , where θ c <θ l , to ensure that when the structured light is projected under the cliff, the camera has a certain area of ​​blind spot. In this embodiment, the detection distance of the autonomous mobile robot is: d l =(H+L)*tan(θ l ), wherein the detection distance can be adjusted by changing the installation height H of the device. In this embodiment, the structured light emitter emits structured light of a preset shape to the first ground to be detected, wherein the first ground area to be detected is directly in front of the autonomous mobile robot, and the emission distance does not exceed the detection distance. As a preferred scheme in this embodiment, the first structured light of the preset shape is a structured light of a red quadrilateral ABCD pattern, wherein the side AB is the side structure farthest from the autonomous mobile robot, and the color of the emitted light is not limited to red. When the ground color is more and the luminosity is larger, the structured light can be selected as invisible light, so that the emitted structured light is less affected by the ground color and material, which is conducive to improving the stability of the detection result.

[0086] The first image acquisition module 702 is used to acquire a first image of the first ground area to be detected containing the first structured light. In this embodiment, the first image acquisition module 702 is installed in the camera, and is used to acquire images of the area directly in front of the autonomous mobile machine emitted by the structured light emitter. When the ground is horizontal, the length of the side AB is equal to the minimum width that the robot can travel, and the quadrilateral ABCD is imaged as a quadrilateral abcd on the image, and the side ab is parallel to the u-axis of the pixel coordinate system on the image. As a preferred solution in this embodiment, if the color of the first structured light selected by the structured light emitter is invisible light, it is necessary to install a corresponding bandpass filter on the camera lens to facilitate the camera to acquire images containing the first structured light while reducing the influence of the ground on the first structured light.

[0087] The first extraction module 703 is used to extract the shape of the first structured light contained in the first image, which is recorded as the shape of the second structured light. In this embodiment, the first extraction module 703 is set in the autonomous mobile robot, and the first structured light in the first image acquired by the first image acquisition module is segmented and detected in the HSV color space, where h represents hue, different colors are in different spectral color positions, s represents color saturation, and v represents brightness. According to the color and brightness of the structured light, the threshold interval is set respectively, and the structured light can be stably segmented in the image. This segmentation method is less affected by the change of ground color and material; after the structured light is segmented, the detected structured light graphics are also refined by using a refinement algorithm, so that the width of the edge structure of the first structured light on the first image is one pixel, which is convenient for further analysis of the image and detection of the four vertices of the quadrilateral abcd, wherein the vertex detection is detected using a corner detection algorithm, and the first image is respectively subjected to sliding window convolution by setting four convolution kernels ka, kb, kc, and kd, specifically: when the convolution kernel slides to the corner point A, the convolution result at this time is:

[0088]

[0089] Among them, S=255 is the maximum value in the convolution result, ka, kb, kc, and kd are the convolution results of the first image respectively, and the position of the brightest point in the first image is the position of the corner points a, b, c, and d of the first structured light in the first image. The existing corner points and the edges connected to the corner points in the first image are extracted and recorded as the shape of the second structured light. At the same time, the pixel height position v0 of the edge ab is recorded at this time. Because the edge ab is horizontal, the pixel height positions of the corner points a and b are the pixel height positions of the edge ab.

[0090] The first comparison module 704 is used to compare the shape of the second structured light with the shape of the first structured light. In this embodiment, the first comparison module 704 is arranged in the autonomous mobile robot to compare the shape of the second structured light extracted from the first image with the shape of the first structured light emitted from the structured light emitter.

[0091] The first determination module 705 is used to determine that there is no cliff in the first ground area to be detected if the shape of the second structured light remains unchanged compared with the shape of the first structured light; if there is a difference between the shape of the second structured light and the shape of the first structured light, it is determined that there is a cliff in the first ground area to be detected. In this embodiment, the first determination module 705 is arranged in the autonomous mobile robot. If the shape of the first structured light remains unchanged compared with the shape of the second structured light, that is, the side AB of the quadrilateral ABCD of the first structured light is emitted by the structured light emitter on the first area to be detected, the complete quadrilateral abcd can be stably detected on the first image, and the pixel height position of the side ab on the image is stable near v0, then it is determined that there is no cliff on the first detection ground area. At this time, the autonomous robot can move toward the first ground area to be detected without changing the forward route. If the shape of the second structured light is missing an edge structure compared to the shape of the first structured light, that is, the side AB of the quadrilateral ABCD of the first structured light is emitted by the structured light emitter on the first area to be detected, and if the side AB is in the blind spot of the camera's field of view, the side ab disappears on the image, and the complete quadrilateral abcd cannot be detected on the first image, it is determined that there is a cliff on the first detection ground area.

[0092] In this embodiment, the cliff detection device further includes: a moving module, a second structured light emission module, a second image acquisition module, a second extraction module, a second comparison module, and a second determination module. In this embodiment, the second structured light emission module, the second image acquisition module, the second extraction module, the second comparison module, and the second determination module are used to detect the height of the cliff in the first ground area to be detected after the first determination module determines that there is a cliff in the first ground area to be detected;

[0093] The moving module is used to control the autonomous mobile robot to move forward slowly according to the distance calculated by the first preset formula; during the moving process, the second structured light module is used to emit a first structured light of a preset shape to a second ground area to be detected, wherein the second ground area to be detected is located directly in front of the first ground area to be detected at a preset distance; the second image acquisition module is used to acquire a second image of the second ground area to be detected containing the first structured light; the second extraction module is used to extract the shape of the first structured light contained in the second image, which is recorded as the shape of the third structured light; the second comparison module is used to compare the shape of the third structured light with the shape of the second structured light; the second determination module is used to determine that the height of the cliff is greater than the preset height when the edge structure missing from the second structured light does not appear in the shape of the third structured light; when the edge structure missing from the second structured light does not appear in the shape of the third structured light, the second determination module is also used to detect the pixel distance of the shape of the third structured light that descends on the image; if the descending pixel distance is greater than or equal to the preset descending distance, it is determined that the height of the cliff is greater than or equal to the preset height; if the descending pixel distance is less than the preset descending distance, it is determined that the height of the cliff is less than the preset height.

[0094] In this embodiment, the second structured light emission module, the second image acquisition module, the second extraction module, the second comparison module and the second determination module are all arranged in the autonomous mobile robot. When it is detected that the edge ab disappears on the image and it is determined that there may be a cliff ahead, the autonomous mobile robot slows down and continues to move forward. At this time, the distance from the autonomous mobile robot to the cliff is also the range of cliff detection: D l =(H+L)·tan(θ l ). At the same time, through the previous setting of the parameters of the autonomous robot, the maximum cliff depth that the autonomous mobile robot can pass is set to h1. When the cliff height is h1, the distance from the preset structured light emitter to the structured light emission point is c1. The preset distance from the camera installation position to the structured light emission point is c2. Among them, c2 is c 21 and c 22 Divided into two sections, The preset horizontal distance from the autonomous mobile robot to the structured light emission point is c3; the preset distance from the autonomous mobile robot to the cliff is Dc, Similarly, the preset distance that the autonomous mobile robot moves forward from the moment edge ab disappears from the image to the moment it reappears in the image is Δx1; where

[0095] Similarly, if the preset detection cliff depth exceeds the maximum passable cliff depth h1 set by the autonomous mobile robot and reaches h2, the autonomous mobile robot needs to move forward before the edge ab appears. Therefore, from the time when the edge ab just disappears from the image to the time when the edge ab reappears in the image, the distance Δx2 that the autonomous mobile robot moves forward is greater than Δx1. That is, when there is a cliff with a height greater than h1 in front of the autonomous mobile robot, the distance that the detection device moves forward from the time when the edge ab just disappears from the image to the time when the edge ab reappears in the image is greater than Δx1.

[0096] In this embodiment, during the actual detection process, the distance traveled by the autonomous mobile robot is recorded as d, where the distance traveled by the autonomous mobile robot is recorded by an encoder at an angle α° of rotation of the driving wheel of the autonomous mobile robot when it moves forward, and the radius of the driving wheel is r, and the formula is: Calculations show that as the autonomous robot moves forward, the camera continues to acquire the first structured light pattern emitted by the structured light emitter, which is then converted into a second image containing the first structured light, and then the shape of the first structured light in the second image is extracted and recorded as the shape of the third structured light.

[0097] In this embodiment, if the distance d advanced by the autonomous mobile robot is greater than Δx1 and the edge ab is not detected on the image, it is determined that there is a cliff with a height greater than h0 ahead, and the detection result is output. If the distance d advanced by the autonomous mobile robot is less than or equal to Δx0 and the edge ab is detected again on the image, the judgment is continued, and the pixel height position v2 of the edge ab appearing at this time on the second image is calculated, and the descending pixel height is: Δv=v2-v0. When the pixel distance Δv of the edge ab descending on the image is greater than v0, it is still determined that there is a cliff with a height greater than h0 ahead. When the pixel distance Δv of the edge ab descending on the image is less than or equal to v0, it is determined that there is a cliff with a height less than or equal to h0 ahead, and the detection result is output.

[0098] In this embodiment, the presence of a cliff is determined by combining multiple aspects such as the position change of structured light in multiple images, the integrity of the structured light pattern, the distance for setting cliff detection, the height threshold of the cliff, the distance the device advances during the disappearance of the structured light, and the pixel height change value of the structured light in the image, so that the output detection result is more comprehensive and accurate.

[0099] In this embodiment, when a cliff greater than h0 is detected in front of the autonomous mobile robot, the autonomous mobile robot is assisted to avoid it, and the autonomous mobile robot rotates counterclockwise on the spot. At this time, the quadrilateral abcd of the structured light on the image captured by the current camera is continuously detected. When the quadrilateral abcd appears from nothing, when the four corner points of the quadrilateral abcd can be completely detected in the image, it is determined that the road ahead is passable. When a cliff less than or equal to h0 is detected in front of the autonomous mobile robot, the autonomous mobile robot continues to move forward.

[0100] In summary, the present invention provides a cliff detection method and device, which emits a first structured light of a preset shape to a first ground area to be detected; collects a first image of the first ground area to be detected containing the first structured light; extracts the shape of the first structured light contained in the first image, and records it as the shape of the second structured light; compares the shape of the first structured light with the shape of the second structured light; if the shape of the first structured light remains unchanged compared with the shape of the second structured light, it is determined that there is no cliff in the first ground area to be detected; if there is a difference between the shape of the first structured light and the shape of the second structured light, it is determined that there is a cliff in the first ground area to be detected. Compared with the prior art, the cliff detection method and device provided by the present invention are less affected by the material and color of the ground, have a long detection distance and can adjust the detection distance, have high detection accuracy and can be set to detect cliffs of different heights, can assist the autonomous mobile robot to avoid the cliff after detecting the cliff, have low calculation amount, have the advantages of low hardware cost, high stability and high accuracy, and effectively improve the accuracy of detection.

[0101] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention. These improvements and substitutions should also be regarded as the scope of protection of the present invention.

Claims

1. A cliff detection method, characterized in that: include: Emitting a first structured light of a preset shape to a first ground area to be detected; Acquire a first image of the first to-be-detected ground area containing the first structured light; extracting a shape of the first structured light contained in the first image and recording it as a shape of the second structured light; comparing the shape of the second structured light with the shape of the first structured light; If the shape of the second structured light remains unchanged compared to the shape of the first structured light, it is determined that there is no cliff in the first ground area to be detected; If the shape of the second structured light is different from the shape of the first structured light, it is determined that there is a cliff in the first ground area to be detected; After determining that there is a cliff in the first ground area to be detected, the method further includes: Performing height detection on the cliffs in the first ground area to be detected is specifically as follows: Controlling the autonomous mobile robot to move slowly forward according to the distance calculated by the first preset formula; During the moving process, a first structured light of a preset shape is emitted to a second ground area to be detected, wherein the second ground area to be detected is located directly in front of the first ground area to be detected at a preset distance; Acquire a second image of the second to-be-detected ground area containing the first structured light; extracting a shape of the first structured light contained in the second image, and recording the shape as a third structured light; comparing the shape of the third structured light with the shape of the second structured light; If the edge structure missing from the second structured light does not appear in the shape of the third structured light, it is determined that the height of the cliff is greater than a preset height; If an edge structure missing from the second structured light appears in the shape of the third structured light, detecting a pixel distance at which the shape of the third structured light falls on the second image; If the descending pixel distance is greater than or equal to the preset descending distance, it is determined that the height of the cliff is greater than or equal to the preset height; If the descending pixel distance is less than the preset descending distance, it is determined that the height of the cliff is less than the preset height.

2. A cliff detection method as claimed in claim 1, characterized in that: Before emitting the first structured light of a preset shape to the first ground area to be detected, the method further includes: A camera is mounted on the autonomous mobile robot so that the angle between the optical axis of the camera and the vertical direction is , and a structured light transmitter is installed on the autonomous mobile robot so that the angle between the optical axis of the structured light transmitter and the vertical direction is in, .

3. A cliff detection method as claimed in claim 2, characterized in that: The shape of the second structured light is different from that of the first structured light, specifically: The shape of the second structured light is missing an edge structure compared with the shape of the first structured light.

4. A cliff detection method as claimed in claim 1, characterized in that: The autonomous mobile robot is caused to adjust its forward direction, specifically: When it is determined that the height of the cliff is less than a preset height, the autonomous mobile robot continues to move forward; When it is determined that the height of the cliff is greater than or equal to a preset height, the autonomous mobile robot stops moving forward.

5. A cliff detection device, characterized in that: include: A first structured light emission module, a first image acquisition module, a first extraction module, a first comparison module, a first determination module, a moving module, a second structured light emission module, a second image acquisition module, a second extraction module, a second comparison module, and a second determination module; Wherein, the first structured light emission module is used to emit a first structured light of a preset shape to the first ground area to be detected; The first image acquisition module is used to acquire a first image of the first to-be-detected ground area containing the first structured light; The first extraction module is used to extract the shape of the first structured light contained in the first image, which is recorded as the shape of the second structured light; The first comparison module is used to compare the shape of the first structured light with the shape of the second structured light; The first determination module is used to determine that there is no cliff in the first ground area to be detected if the shape of the second structured light remains unchanged compared with the shape of the first structured light; and to determine that there is a cliff in the first ground area to be detected if the shape of the second structured light is different from the shape of the first structured light; The moving module, the second structured light emitting module, the second image acquisition module, the second extraction module, the second comparison module and the second determination module are used to perform height detection on the cliff in the first ground area to be detected after the first determination module determines that there is a cliff in the first ground area to be detected; Wherein, the mobile module is used to control the autonomous mobile robot to move slowly according to the distance calculated by the first preset formula; During the forward movement, the second structured light module is used to emit a first structured light of a preset shape to a second ground area to be detected, wherein the second ground area to be detected is located directly in front of the first ground area to be detected at a preset distance; The second image acquisition module is used to acquire a second image of the second to-be-detected ground area containing the first structured light; The second extraction module is used to extract the shape of the first structured light contained in the second image, which is recorded as the shape of the third structured light; The second comparison module is used to compare the shape of the third structured light with the shape of the second structured light; The second determination module is configured to determine that the height of the cliff is greater than a preset height when the edge structure missing from the second structured light does not appear in the shape of the third structured light; The second determination module is further used to detect the pixel distance of the third structured light shape descending on the image when an edge structure in which the second structured light is missing appears in the shape of the third structured light; if the descending pixel distance is greater than or equal to a preset descending distance, determine that the height of the cliff is greater than or equal to a preset height; if the descending pixel distance is less than the preset descending distance, determine that the height of the cliff is less than the preset height.

6. A cliff detection device as claimed in claim 5, characterized in that: The first structured light emission module is installed in the structured light emitter, and the first image acquisition module is installed in the camera; The angle between the optical axis of the structured light emitter and the vertical direction is , the angle between the optical axis of the camera and the vertical direction is ,in, .

7. A cliff detection device as claimed in claim 6, characterized in that: The first determining module determines that there is a difference between the shape of the second structured light and the shape of the first structured light, specifically: It is determined that the shape of the second structured light has a missing edge structure compared with the shape of the first structured light.

8. A cliff detection device as claimed in claim 5, characterized in that: The first determination module enables the autonomous mobile robot to adjust its forward direction, specifically: When the second determination module determines that the height of the cliff is less than a preset height, the first determination module enables the autonomous mobile robot to continue moving forward; When the second determination module determines that the height of the cliff is greater than or equal to a preset height, the first determination module causes the autonomous mobile robot to stop moving forward.