Carpet identification method based on line laser sensors on two sides of robot and robot

By installing line laser sensors on both sides of the sweeping robot to collect and process laser data and identify carpets, the problem of the robot getting stuck and misidentifying obstacles when encountering carpets is solved, and the cleaning effect is improved.

CN119326337APending Publication Date: 2025-01-21AMICRO SEMICONDUCTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310899334.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-21
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

Existing sweeping robots are prone to being stuck on the edges of the carpet when encountering carpets, and it is difficult to effectively distinguish carpets from obstacles, resulting in poor cleaning results.

Method used

A carpet recognition method based on line laser sensors on both sides of the robot is used to collect laser data on both sides, extract the height value of the laser point, calculate the absolute value of the height difference between adjacent laser points, and accumulate it to obtain the cumulative value of the height difference. Combined with both sides The height difference needs to be determined in data calculation. When it meets the preset jump state, it is identified as carpet.

Benefits of technology

It improves the accuracy of carpet recognition, prevents carpet misidentification, and prevents the robot from misidentifying carpets as obstacles, thus improving the cleaning effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119326337A_ABST
    Figure CN119326337A_ABST
Patent Text Reader

Abstract

The invention discloses a carpet identification method based on line laser sensors on two sides of a robot and the robot, and the carpet identification method comprises the steps: enabling the robot to collect a batch of line laser data through the line laser sensors installed on the two sides of the robot, and obtaining two batches of line laser data at a time; the height value of each laser point is extracted from each batch of line laser data; then, in each batch of line laser data, the absolute value of the height difference between every two adjacent laser points is accumulated, and the accumulated value of the height difference of the laser point on the corresponding side is obtained; and then a to-be-judged height difference value is calculated in combination with the height difference accumulated value of the laser points on the two sides, and when it is detected based on the to-be-judged height difference value that the line laser data collected by the line laser sensors installed on the two sides meet the preset jumping state, the robot recognizes the carpet from the to-be-detected surface so as to eliminate interference of obstacles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of line laser technology, and in particular to a carpet recognition method and a robot based on line laser sensors on both sides of a robot. Background Art

[0002] When a sweeping robot encounters a carpet while cleaning, if it does not use appropriate recognition methods and motion planning means, it is likely to be stuck on the edge of the carpet. Only by using appropriate operation methods and strategies after recognizing the carpet can the sweeping robot clean more smoothly. Therefore, it is particularly important for the sweeping robot to recognize the carpet. At present, the sweeping robot uses line laser to recognize the carpet and analyzes the characteristics of the line laser point cloud data in different scenarios. When the sweeping robot moves to the carpet, the carpet has uneven characteristics due to its fluff and other materials. The line laser hits the carpet, and some laser points hit the fluff, so the height of this part of the laser points collected is larger; in addition, some points hit the gaps between the fluff, so the height of this part of the laser points is smaller.

[0003] Each frame of line laser data includes multiple laser point cloud data, and each laser point cloud data includes three types of data: angle, distance, and height. For example, when a sweeping robot moves on a flat ground, if two line laser sensors in two directions are used to collect ground point clouds, even if the height difference between the laser points is very small, the laser points collected by the two line laser sensors are difficult to connect into a straight line in the same frame image, and there will be two straight line segments intersecting or overlapping. When identifying ground materials, the existing technology needs to transform the posture between the two batches of laser points and fit them to the same straight line for relevant feature judgment, which is easy to introduce errors and restrict the accuracy and calculation efficiency of line laser detection of the ground.

[0004] Also, because obstacles often protrude from the horizontal ground, the height differences of some laser points reflected back from the obstacle surface are large. Therefore, by statistically analyzing the height differences of laser points within the detection space of the line laser sensor, it is impossible to effectively distinguish between the points on the obstacle and the points on the carpet, resulting in misidentification of the carpet. As a result, the sweeping robot will not climb onto the carpet, but will only avoid the carpet, affecting the cleaning effect. Summary of the invention

[0005] A carpet recognition method based on line laser sensors on both sides of a robot, wherein a line laser sensor is installed on each side of the robot body, each line laser sensor is used to emit a line laser to a surface to be detected, and each line laser sensor is used to collect laser points formed by reflection of the line laser on the surface to be detected; the carpet recognition method comprises: the robot collects a batch of line laser data through the line laser sensors installed on both sides, and obtains two batches of line laser data at one time; then extracts the height value of each laser point in each batch of line laser data; then, in each batch of line laser data, the absolute value of the height difference between two adjacent laser points is accumulated to obtain the accumulated value of the height difference of the laser points on the corresponding side; then, the height difference value to be determined is calculated in combination with the accumulated value of the height difference of the laser points on both sides, and when it is detected based on the height difference value to be determined that the line laser data collected by the line laser sensors installed on both sides meets the preset jump state, the robot identifies the carpet from the surface to be detected to eliminate the interference of obstacles.

[0006] This technical solution uses each laser point composed of a batch of line laser data collected on the left and right sides to detect height change characteristics (threshold judgment is performed based on the height difference to be judged obtained based on the accumulation result of the absolute value of the height difference), and identifies the carpet when the preset jump state is met. Without performing straight line fitting processing on the two batches of line laser data, the carpet can be quickly and effectively identified from the surface to be detected with less computing power, thereby improving the effect of carpet recognition and preventing misidentification of the carpet, thereby preventing the robot from climbing on the carpet and only avoiding the carpet after misidentifying the carpet as an obstacle.

[0007] Furthermore, in the carpet recognition method, the method for detecting whether the line laser data collected by the line laser sensors installed on both sides meet the preset jump state based on the height difference to be determined includes: marking two batches of line laser data collected at one time as the first batch of line laser data and the second batch of line laser data respectively; extracting the height value of each laser point in the first batch of line laser data, and determining the laser point with the largest height value as the first extreme height point, and determining the laser point with the smallest height value as the first second extreme height point; extracting the height value of each laser point in the second batch of line laser data, and determining the laser point with the largest height value as the second first extreme height point, and determining the laser point with the smallest height value as the second second extreme height point; in the first batch of line laser data, calculating the absolute value of the height difference between two adjacent laser points in sequence, and obtaining a first height difference accumulated value by accumulating the absolute values ​​of the height difference; in the In the two batches of line laser data, the absolute values ​​of the height difference between two adjacent laser points are calculated in turn, and the second height difference accumulated value is obtained by accumulating the absolute values ​​of the height difference; then the sum of the first height difference accumulated value and the second height difference accumulated value is controlled, and the absolute values ​​of the height difference between the first extreme height point and the first second extreme height point, and the absolute values ​​of the height difference between the second extreme height point and the second second extreme height point are subtracted in turn, and the difference obtained is the height difference value to be determined, and the height difference value to be determined is calculated by combining the accumulated values ​​of the height differences of the laser points on both sides; then it is determined whether the height difference value to be determined is greater than the preset carpet height difference threshold, and if so, it is determined that the robot has identified the ground in front of it, and it is determined that the connection line of each laser point in the two batches of line laser data presents a preset shape, and then it is determined that the line laser data collected by the line laser sensors installed on both sides based on the height difference value to be determined is in line with the preset jump state.

[0008] In summary, the present application detects whether the connecting line of each laser point presents a preset shape according to the relationship between the height difference between the laser point with the largest height and the laser point with the smallest height in each batch of line laser data and the accumulated value of the height difference, so that the accumulated value of the height difference accumulated in the two batches of line laser data, after offsetting the influence of the height difference between the highest point and the lowest point, is represented by a height difference value to be determined, which represents the accumulated value of the height difference of the jumps of the remaining laser points except the highest point and the lowest point in the two batches of line laser data. Then, on the basis of offsetting the influence of the height difference between the highest point and the lowest point, the height difference value to be determined quantitatively describes the jump state of each laser point in the two batches of line laser data; when the height difference value to be determined is greater than the preset carpet height difference threshold, it can be determined that the remaining laser points except the highest point and the lowest point in the two batches of line laser data all keep jumping, so as to determine that the line laser data collected by the line laser sensors installed on both sides conforms to the preset jump state, and it can be determined that the robot recognizes the carpet on the surface of the object to be measured. Compared with the existing technology, the line laser data collected from the left and right sides are processed, which supplements the detection range of the traditional obstacle detection algorithm and prevents the misidentification of the carpet.

[0009] Furthermore, the method of sequentially calculating the absolute value of the height difference between two adjacent laser points and accumulating the absolute value of the height difference comprises: step A, among the laser points extracted from a batch of line laser data, recording the laser point closest to one end of the bright section in the vertical direction of the central axis of the body as the starting search point, then traversing an adjacent laser point, and then calculating the absolute value of the height difference between the currently traversed laser point and the starting search point to obtain the accumulated value of the height difference; and then executing step B; wherein the line laser emitted by each line laser sensor forms a bright section extending in the vertical direction of the central axis of the body on the surface to be detected; step B, traversing an adjacent laser point that does not participate in the calculation of the absolute value of the height difference, and then calculating the absolute value of the height difference between the currently traversed laser point and the laser traversed in step A The absolute value of the height difference between the points, and then add the height difference accumulated value calculated in step A to the absolute value of the height difference currently calculated to obtain a new height difference accumulated value, and then control the new height difference accumulated value to be updated to the height difference accumulated value described in step A; then execute step C; step C, repeat step B until all laser points extracted by a batch of line laser data are traversed, and the height difference accumulated value described in step A is updated by accumulating the absolute value of the height difference; when the batch of line laser data described in step A is the first batch of line laser data, step C configures the last updated height difference accumulated value as the first height difference accumulated value; when the batch of line laser data described in step A is the second batch of line laser data, step C configures the last updated height difference accumulated value as the second height difference accumulated value. By executing steps A to C, the absolute values ​​of the height difference of two adjacent laser points are calculated in turn in the two batches of line laser data, and the first height difference accumulated value and the second height difference accumulated value are obtained by accumulating the absolute value of the height difference.

[0010] Furthermore, each laser point extracted from each batch of line laser data does not include the laser points distributed at the edge of the bright section; the robot combines two batches of line laser data into one frame of line laser data, so that the laser points distributed at both ends of the bright section in the vertical direction of the central axis of the body do not exist in the laser points extracted from one frame of line laser data. This overcomes the error caused by the excessive jump amplitude of the laser points distributed at the edge of the bright section.

[0011] Furthermore, the preset form includes: in the two batches of line laser data, in the line connecting each laser point, concavities and convexities appear alternately, and the number of alternating appearances is at least twice; in the two batches of line laser data, in the line connecting each laser point, there are at least two concavities appearing first and then at least one convexity; in the two batches of line laser data, in the line connecting each laser point, there are at least two convexities appearing first and then at least one concavity; wherein, the height of the laser point formed by the reflection of the line laser on the fluff of the carpet is higher than the height of the laser point formed by the reflection of the line laser in the gap between the fluff of the carpet, so that the line connecting each laser point in the two batches of line laser data presents multiple convexities and multiple concavities, and it is determined that the line laser data collected by the line laser sensors installed on both sides conforms to the preset jump state.

[0012] Furthermore, the larger the height difference to be determined is, the more times each laser point in the two batches of line laser data jumps in the vertical direction of the central axis of the body; the smaller the height difference to be determined is, the smaller the number of times each laser point in the two batches of line laser data jumps in the vertical direction of the central axis of the body; wherein the number of jumps is the sum of the number of convexities and the number of concavities of the line connecting each laser point in the two batches of line laser data.

[0013] In summary, when the height difference to be determined is greater than the preset carpet height difference threshold, the line connecting each laser point presents multiple convexities and multiple concavities within the same detection width; when the height difference to be determined is less than or equal to the preset carpet height difference threshold, the line connecting each laser point presents at most one convexity and / or at most one concavity within the same detection width. Thus, obstacles and carpets can be distinguished by the height variation characteristics of the connecting line of the laser points, preventing the carpet from being misidentified.

[0014] Furthermore, the preset carpet height difference threshold is set between 3.5cm and 4cm; after the line laser is projected onto the surface of the floor, the height difference value to be determined calculated by the line laser data collected by the line laser sensors on both sides of the robot is less than 3.5cm or 3cm; after the line laser is projected onto the surface of the obstacle, the height difference value to be determined calculated by the line laser data collected by the line laser sensors on both sides of the robot is between 2cm and 3cm; wherein the floor and the obstacle are both non-carpet objects. The aforementioned height difference value to be determined is used as the accumulated value of the height difference obtained after offsetting the laser point with extreme height on the surface to be detected, and is directly used to identify the carpet, with a good detection success rate, low calculation cost, and strong real-time performance.

[0015] Further, the robot extracts each laser point from the two batches of line laser data, connects each laser point in turn, and calculates and accumulates the length of the line between two adjacent laser points to obtain the total length of the line of each laser point, and marks the total length as the height connection line length; when the height connection line length calculated by the robot is less than the preset connection line length threshold, if the height difference cumulative value calculated by the robot is less than the preset carpet height difference threshold, the robot recognizes the floor; when the height connection line length calculated by the robot is greater than or equal to the preset connection line length threshold, if the connection line of each laser point in the two batches of line laser data does not present a preset form, the robot recognizes an obstacle; when the height connection line length calculated by the robot is greater than or equal to the preset connection line length threshold, if the connection line of each laser point in the two batches of line laser data presents a preset form, the robot recognizes the carpet. In summary, the carpet, obstacle and floor are distinguished using the sum of the first height difference cumulative value and the second height difference cumulative value, the height connection line length and the preset form.

[0016] Further, after the robot calculates the sum of the first height difference cumulative value and the second height difference cumulative value, the following exists: when the sum of the first height difference cumulative value and the second height difference cumulative value is less than the reference height difference cumulative threshold, the height connection line length calculated by the robot is less than the preset connection line length threshold; when the sum of the first height difference cumulative value and the second height difference cumulative value is greater than or equal to the reference height difference cumulative threshold, the height connection line length calculated by the robot is greater than or equal to the preset connection line length threshold.

[0017] It can be seen that the sum of the first height difference cumulative value and the second height difference cumulative value is positively correlated with the length of the height connection line; even if the floor surface has height increases and decreases, it is understood that there is a jump phenomenon, but the number of jumps, the height of the jumps and the probability of the jumps are far lower than the jumps generated on the carpet surface, forming a unique height unevenness feature of the carpet contour line. Through this feature, the floor surface and even low obstacles can be excluded before the carpet is recognized on the surface of the object to be measured.

[0018] A robot includes a processor and a memory; the memory stores a program, the program is loaded and executed by the processor to implement the carpet recognition method as described above; wherein, a line laser sensor is installed on each of the left and right sides of the robot, and the two line laser sensors are respectively installed on both sides of the central axis of the robot body. The robot uses each laser point composed of a batch of line laser data collected on the left and right sides to detect the height change characteristics (based on the accumulation result of the absolute value of the height difference calculated in the two batches of line laser data, and then offsets the influence of the laser point at the extreme height by difference, the height difference to be determined is obtained, and then the threshold judgment is performed to achieve the purpose of carpet recognition), and the carpet is identified when the preset jump state is met. Without performing linear fitting processing on the two batches of line laser data, the carpet is quickly and effectively identified from the surface to be detected with less computing power, thereby improving the effect of carpet recognition, preventing carpet misidentification, and thus preventing the robot from climbing on the carpet after misidentifying the carpet as an obstacle, but only avoiding the carpet. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a flowchart of a carpet recognition method based on line laser sensors on both sides of a robot, disclosed in an embodiment of the present application.

[0020] Figure 2 This is a schematic diagram of a detection scenario in which a robot enters a carpet according to an embodiment of the present application.

[0021] Figure 3 It is a schematic diagram of the connection lines of various laser points in a frame of line laser data collected from the surface of a carpet according to an embodiment of the present application.

[0022] Figure 4 An embodiment of the present application discloses a schematic diagram of the connection lines of various laser points in a frame of line laser data collected from the surface of an obstacle. Implementation

[0023] The technical scheme in the embodiment of the present invention will be described in detail below in conjunction with the drawings in the embodiment of the present invention. To further illustrate each embodiment, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiment, and can be used in conjunction with the relevant description of the specification to explain the operating principle of the embodiment. With reference to these contents, a person of ordinary skill in the art should be able to understand other possible implementation methods and the advantages of the present invention. Processing or method depicted as a flow chart. Although the flow chart describes each step as a sequential process, many of the steps can be implemented in parallel, concurrently or simultaneously. In addition, the order of each step can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0024] This embodiment discloses a carpet recognition method based on line laser sensors on both sides of a robot. The execution subject of the carpet recognition method is a robot. Specifically, the robot involved may be a sweeping robot, and may have any suitable shape, such as a shell with a more traditional circular body or a triangular body. A line laser sensor is installed on each side of the robot body, and each line laser sensor is specifically assembled in the shells on both sides of the central axis of the body, and can be set symmetrically on the left and right.

[0025] In this embodiment, each line laser sensor includes a line laser emitter and an infrared camera. Each line laser sensor is used to emit a line laser to the surface to be detected. Each line laser sensor is used to emit a line laser diagonally downward in the walking direction of the robot. In essence, the line laser is emitted to the surface to be detected diagonally downward in the walking direction of the robot. The surface to be detected is reflected to form a light strip, which corresponds to a bright section and can be regarded as composed of projected light spots (i.e., laser spots) of multiple light beams. The light strips formed by the line laser sensors installed on both sides of the body emitting to the surface to be detected are regarded as being separated on the left and right sides of the central axis of the body, and can be intersecting, parallel, or partially overlapping.

[0026] For each line laser sensor, the emission angle of the line laser can be 15 degrees, 30 degrees, 45 degrees, 60 degrees, etc. from the horizontal direction. This embodiment does not limit the angle obliquely downward from the walking direction or the value of the emission angle of the line laser. The line laser transmitter is configured to illuminate a width area larger than the width of the robot, forming a bright section or a light strip on the surface to be detected, where the surface to be detected includes but is not limited to the surface of the object to be detected, or the walking surface where the robot is located.

[0027] In the robot, each line laser sensor is also used to collect laser points formed by the reflection of the line laser on the surface to be detected. In essence, the infrared camera collects images of laser points formed by the reflection of the line laser on the surface to be detected, covering all or part of the environment illuminated by the line laser; the infrared camera captures and records multiple frames of images per second, preferably 33 frames per second, and each frame of line laser data includes about 130 laser points, and each laser point includes three types of posture data: angle, distance, and height. Data is extracted from these images through the robot's built-in controller, and the data is usually stored in a memory together with a computer program. In each line laser sensor, the optical axis of the infrared camera intersects with the axis where the line laser transmitter is located to form the detection space range of the line laser sensor, and the line laser sensors installed on both sides of the robot's body form a detection space range covering the left side of the front of the body and the detection space range on the right side. If line laser sensors in two directions are used to collect ground point clouds, even if the height difference between the laser points is very small, the laser points collected by the two line laser sensors are difficult to connect into a straight line in the same frame image, and there will be a phenomenon of two straight line segments intersecting or overlapping. When identifying ground materials, the existing technology needs to perform posture transformation between the two batches of laser points and fit them to the same straight line for relevant feature judgment, which is easy to introduce errors and restrict the accuracy and calculation efficiency of line laser detection of the ground.

[0028] Indicatively, Figure 2 The circular robot 101 in the figure enters the surface of the carpet 103, and the surface fluff of the carpet 103 as a whole presents the words "WELCOME to my home"; the surface of the carpet 103 enters the detection space range of the line laser sensors installed on the left and right sides of the body of the robot 101, and the line segment 1021 can be regarded as a bright segment emitted by a line laser sensor installed on the left side of the body axis of the robot 101. At the same time, the line segment 1022 can be regarded as a bright segment emitted by a line laser sensor installed on the right side of the body axis of the robot 101. Preferably, the line segments 1021 and 1022 are symmetrically distributed on the left and right, and after being collected by the infrared cameras on each side, they form a frame of line laser data. The projection positions of each laser point in the frame of line laser data on the carpet surface are regarded as distributed near a straight line or respectively on two intersecting line segments. The recognition method according to the prior art will increase the amount of fitting calculation, introduce errors, and restrict the accuracy and calculation efficiency of line laser detection of the ground. The carpet recognition method based on the line laser sensors on both sides of the robot disclosed in the present application performs processing in the left and right directions, and uses the same set of algorithms to process the laser points collected on the left and right sides respectively to analyze the height change characteristics of the laser points distributed on each side. This can cope with the errors caused by fitting processing when the line segment 1021 and the line segment 1022 are not parallel or colinear, and save the amount of angle coordinate conversion.

[0029] It should be noted that the carpet described in this embodiment is a broad concept, which can be understood as a floor material or ground medium that is different from hard materials such as wooden floors and tiles. The robot can be a sweeping robot including a cleaning mechanism and a mopping mechanism; the robot walking on the carpet will cause the output power of the roller brush motor or the drive wheel motor to change, or the ground material that is not suitable for the robot to clean in the mopping mode, such as: short-haired carpet, long-haired carpet, plush carpet, etc. The robot involved in this embodiment can use one of the cleaning mechanism or the mopping mechanism or contact the cleaning ground at the same time during the cleaning process to clean the cleaning surface. The mopping mechanism is generally used to clean the floor. The water sprayed by the mopping mechanism during the cleaning process or the water accumulated in the mopping mechanism itself may wet or damage the carpet.

[0030] In addition, whether it is a line laser sensor installed on the left or on the right, in order to use the line laser to identify the carpet, this embodiment needs to analyze the height change characteristics of the point cloud data of the line laser in different scenes or the fluctuation change law of the line connecting the laser points. Connecting two adjacent laser points, for example, when the frame of line laser data comes from flat ground or plane reflection, the height difference of each laser point is very small, basically a straight line, which is not shown in the figure. If the line segment connected by each laser point appears as a plane that is short on the left and high on the right, then the frame of line laser data may come from a bump or uneven ground.

[0031] When the robot uses line laser to scan obstacles, within the detection space of each line laser sensor, the point cloud height of the obstacle area will become higher, while other areas will remain unchanged, such as Figure 4 As shown, the line connecting the laser points formed by the reflection on the obstacle surface forms a protruding part.

[0032] When the robot moves to a carpet, the carpet is uneven due to its fluff and other materials. When the line laser hits the carpet surface, some laser points hit the fluff, so the height of the laser points is high; some laser points hit the gaps between the fluff, so the height of the laser points is low. The heights of two adjacent laser points are connected in sequence to form a Figure 3 The embodiment recognizes the uneven laser point connection line by executing the carpet recognition method, and then can make different action configurations according to the scene, including but not limited to climbing on the carpet, walking along the edge of the carpet, avoiding the carpet and other different operations.

[0033] In this embodiment, whether the line laser data collected by the line laser sensors installed on both sides of the robot conform to the preset jump state will specifically take into account: For a line laser sensor, the main differences in the characteristics of the laser point connection line collected under carpet and other scenes include the length of the laser point connection line or the height difference between two adjacent laser points in the laser point connection line. Generally, within the detection space range of the same line laser sensor, the connection line of each laser point reflected from the carpet surface is longer than the connection line formed by reflection from the flat ground; while the width irradiated by the line laser is constant, the length of the connection line of each laser point reflected from the carpet surface is greater than the width irradiated by the line laser. The reason is that the uneven characteristics of the carpet cause a height difference between two very close laser points. Therefore, after all the height differences of adjacent laser points in a frame of line laser data reflected from the carpet surface are accumulated, the accumulated result is particularly large, greater than a certain threshold, so that the carpet can be identified.

[0034] However, the aforementioned judgment method using the accumulated results is only applicable to distinguishing between the floor plane and the carpet, because the accumulated result of the height difference between adjacent laser points in a frame of line laser data reflected from the floor plane is particularly small, significantly smaller than that of the carpet surface. Figure 4 There is a raised line in the figure. It can be seen that since the obstacle will also increase the height of the laser point of some line laser data, the line laser will rise and fall with the change of the outline of the obstacle, and the height difference formed by a single rise and fall is relatively large, which leads to a larger accumulated value of the height difference. Specifically, if the type of the object is identified by accumulating the height difference between two adjacent laser points within the detection range of the line laser, the point cloud height of the obstacle area is relatively different from the point cloud height of the ground part, and the accumulated height difference of the two adjacent laser points formed by the carpet reflection is also relatively large, even equal to the accumulated height difference of the obstacle. Therefore, in the process of simply using the accumulated result of the height difference between two adjacent laser points to identify the carpet, the accumulated height difference values ​​accumulated by the carpet surface and the obstacle surface will cause the accumulated height difference value to become larger, so that there is no particularly obvious distinction between the obstacle and the carpet, including the inability to effectively distinguish the points of the obstacle and the points on the carpet. Therefore, in the prior art, no matter which side of the line laser sensor collects the laser points, by comparing the height-related information, the points on the carpet cannot be effectively identified, which reduces the effect of carpet identification and causes carpet misidentification.

[0035] As an embodiment, in order to improve the recognition accuracy of carpets, a carpet recognition method based on line laser sensors on both sides of a robot is disclosed, such as Figure 1 As shown, the carpet identification method includes: Step 1: The robot collects a batch of line laser data through the line laser sensors installed on both sides, and obtains two batches of line laser data at one time. The line laser data collected by the line laser sensors on the left and right sides can form a frame of line laser data; then extract the height value of each laser point in each batch of line laser data; then execute step 2. This embodiment uses the line laser data collected by the line laser sensors installed on the left and right sides, and is used to identify the surface to be detected in the same detection area. The surface to be detected may include the overlapping part of the detection space range of the line laser sensors installed on both sides; part of the area of ​​the surface to be detected may be outside the detection space range of the line laser sensor installed on the left, and is supplemented by the detection space range of the line laser sensor installed on the right; part of the area of ​​the surface to be detected may be outside the detection space range of the line laser sensor installed on the right, and is supplemented by the detection space range of the line laser sensor installed on the left.

[0036] Step 2: In each batch of line laser data, the absolute values ​​of the height differences between two adjacent laser points are accumulated to obtain the accumulated value of the height differences of the laser points on the corresponding side; then, step 3 is executed. It can be understood that the robot collects a frame of line laser data through the line laser sensor, and then divides the frame of line laser data into a batch of line laser data collected by the line laser sensors on the left and right sides, and performs accumulation processing in batches, so as to determine whether the lines connecting the laser points in each batch of line laser data form a preset jump state.

[0037] Step 3, the height difference to be determined is calculated by combining the accumulated value of the height difference of the laser points on both sides, and the corresponding height flatness information is obtained. When the line laser data collected by the line laser sensors installed on both sides is detected to meet the preset jump state based on the height difference to be determined, the robot identifies the carpet from the surface to be detected to eliminate the interference of obstacles, including the misjudgment interference of obstacles with a certain height, and realizes the identification of the carpet from the surface to be detected by detecting the height of each laser point and the connection between two adjacent laser points.

[0038] In addition, when it is detected based on the height difference to be determined that the line laser data collected by the line laser sensors installed on both sides do not conform to the preset jump state, the robot identifies the floor or obstacle from the surface to be detected, and the currently identified surface to be detected is non-carpet.

[0039] Therefore, when the height change information indicated by the corresponding side laser points collected by the line laser sensors on both sides of the robot presents a preset form, the robot distinguishes between carpets and non-carpets, and determines that the surface to be detected includes carpets, wherein the surface to be detected may include carpets and surfaces to be detected of other materials, or the surface to be detected may only include carpets.

[0040] It is worth noting that, in combination with step 2 and step 3, it can be seen that in each batch of line laser data, whether the lines connecting each laser point form a preset jump state requires analysis of the height information of the laser points. Therefore, step 3 can be understood as processing the height difference between two adjacent laser points and the accumulated result in two batches of line laser data, including filtering processing, but without performing corresponding threshold judgment separately in batches.

[0041] In some embodiments, when the robot detects that the lines connecting the various laser points present a preset shape, the robot identifies the carpet. Specifically, if a bright segment detected in a captured frame of image is composed of straight and multiple irregularly rising and falling lines, it is determined that the lines connecting the various laser points in a frame of line laser data currently collected present a preset shape, the surface to be detected is determined to include a carpet, and the robot can identify the carpet in the surface to be detected.

[0042] Compared with the prior art, this embodiment integrates steps 1 to 3, uses each laser point composed of a batch of line laser data collected on the left and right sides to detect height change characteristics (threshold judgment is performed based on the height difference to be judged obtained by the accumulation result of the absolute value of the height difference), and identifies the carpet when the preset jump state is met. Without performing straight line fitting processing on the two batches of line laser data, the carpet is quickly and effectively identified from the surface to be detected with less computing power, thereby improving the effect of carpet recognition, preventing misidentification of the carpet, and thus preventing the robot from climbing on the carpet and only avoiding the carpet after misidentifying the carpet as an obstacle.

[0043] It should be noted that the contour information of the surface to be detected collected by the line laser sensor includes but is not limited to the shape and position of the connecting line of each laser point, and each laser point is the result of the positioning of the reflected light of the line laser on the surface to be detected. Optionally, the robot connects the pixel coordinates of the reflected light to obtain the contour information of the surface to be detected.

[0044] In the aforementioned embodiment, when there are no obstacles or carpets in the walking direction of the robot, the connecting line of the laser points collected by each line laser sensor should be flat and smooth; when there are obstacles or carpets in the walking direction of the robot, the contour information collected by each line laser sensor also includes the number of bumps and unevenness, and the number of bumps and unevenness of the laser point connecting line formed by the obstacle and the carpet reflection is different. Corresponding to step 2, the absolute value of the height difference between two adjacent laser points is accumulated in each batch of line laser data, and the robot can determine whether there is an obstacle or carpet in the walking direction by measuring the bump frequency of the laser point connecting line in batches. The line bump frequency is represented by the number of rises and falls of the laser point line. The number of rises of the laser point line represents the number of times the line of two adjacent laser points rises, and the number of falls of the laser point line represents the number of times the line of two adjacent laser points falls. In each batch of line laser data, each laser point rises or falls once, which will cause the cumulative value of the absolute value of the height difference between the two adjacent laser points to increase, that is, the height difference of the area on one side of the surface to be detected is accumulated. Therefore, the height difference cumulative value calculated from the two batches of line laser data is used to describe the number of rises or falls of the line of two adjacent laser points in the left and right directions. Then, the calculation result of the height difference cumulative value calculated from the two batches of line laser data is used in step 3 to make a threshold judgment, so as to determine that the contour indicated by the contour information is the carpet contour when it is greater than a certain threshold.

[0045] In some embodiments, the robot extracts each laser point from the one frame line laser data, and connects each laser point in turn. The formed connection line is continuous and uninterrupted, passing through laser points at different heights, and is used to describe the contour features of the surface to be detected.

[0046] In a work scenario where there is no carpet, in the two batches of line laser data obtained at one time by the line laser sensors installed on both sides of the robot body, the number of laser points at different heights through which the lines connecting the laser points in each batch of line laser data pass may be very small. For example, when the line laser is projected onto the surface of an obstacle at a certain height, the direction of the lines connecting the multiple laser points formed by the reflection may be smoothly changing from low to high (the laser point with a smaller height jumps to the laser point with a larger height), or slowly changing from high to low (the laser point with a larger height jumps to the laser point with a smaller height).

[0047] In the carpet laying work scene, in the two batches of line laser data obtained at one time by the line laser sensors installed on both sides of the robot body, the lines connecting the laser points in each batch of line laser data pass through multiple laser points at different heights, and the height of the laser point keeps changing rapidly, that is, there are multiple rises and falls, causing it to jump through different heights, among which the number of rises and falls are both greater than the corresponding number of changes of the lines connecting the laser points within the same detection width in the work scene without carpet laying.

[0048] As an embodiment, in the carpet recognition method, the method of detecting whether the line laser data collected by the line laser sensors installed on both sides meet the preset jump state based on the height difference to be determined can also be understood as the carpet recognition method specifically including: The robot marks the two batches of line laser data collected at one time as the first batch of line laser data and the second batch of line laser data, respectively. The first batch of line laser data is a batch of line laser data collected by the line laser sensor installed on the left side of the body, and the second batch of line laser data is a batch of line laser data collected by the line laser sensor installed on the right side of the body.

[0049] The height values ​​of each laser point are extracted from the first batch of line laser data, and the laser point with the largest height value is determined as the first extreme height point, and the laser point with the smallest height value is determined as the first second extreme height point. The height values ​​of each laser point are extracted from the second batch of line laser data, and the laser point with the largest height value is determined as the second first extreme height point, and the laser point with the smallest height value is determined as the second second extreme height point.

[0050] The robot collects a batch of line laser data through the line laser sensors installed on both sides, then extracts the height of each laser point in each batch of line laser data, and screens out the laser point with the largest height and the laser point with the smallest height in each batch of line laser data, so as to determine the height difference between the laser point with the largest height and the laser point with the smallest height in each batch of line laser data; in the first batch of line laser data, the absolute value of the height difference between the first extreme height point and the first second extreme height point is the height difference between the laser point with the largest height and the laser point with the smallest height in the batch of line laser data; in the second batch of line laser data, the absolute value of the height difference between the second extreme height point and the second second extreme height point is the height difference between the laser point with the largest height and the laser point with the smallest height in the batch of line laser data.

[0051] Preferably, the number of laser points extracted from the first batch of line laser data is equal to the number of laser points extracted from the second batch of line laser data, wherein the line laser sensors installed on the left and right sides are symmetrically arranged based on the central axis of the robot body, and it can be understood that the laser points extracted from the first batch of line laser data and the laser points extracted from the second batch of line laser data are separated on both sides of the central axis of the robot body. To implement the above step 1.

[0052] In the first batch of line laser data, the absolute values ​​of the height difference between two adjacent laser points are calculated in sequence, and the first height difference cumulative value is obtained by accumulating the absolute values ​​of the height difference to quantitatively describe the jump state of each laser point in the first batch of line laser data, including describing the number of rises or falls of the line connecting the two adjacent laser points; therefore, the height difference cumulative value can also represent the height flatness of the line connecting each laser point in the first batch of line laser data. The aforementioned step 2 is implemented.

[0053] In the second batch of line laser data, the absolute values ​​of the height difference between two adjacent laser points are calculated in sequence, and the second height difference cumulative value is obtained by accumulating the absolute values ​​of the height difference to quantitatively describe the jump state of each laser point in the second batch of line laser data, including describing the number of rises or falls of the line connecting the two adjacent laser points; therefore, the height difference cumulative value can also represent the height flatness of the line connecting each laser point in the second batch of line laser data. The aforementioned step 2 is implemented.

[0054] Then control the sum of the first height difference accumulated value and the second height difference accumulated value, subtract the absolute value of the height difference between the first extreme height point and the first second extreme height point, and the absolute value of the height difference between the second extreme height point and the second second extreme height point in turn, the difference obtained is the height difference value to be determined, and the height difference value to be determined is calculated by combining the accumulated value of the height difference of the laser points on both sides.

[0055] In this embodiment, the operation of subtracting the absolute value of the height difference between the first extreme height point and the first second extreme height point is regarded as filtering the laser points with extreme heights collected by the left-side line laser sensor on the surface to be detected (which can be understood as filtering out points with large fluctuations); in addition, the operation of subtracting the absolute value of the height difference between the second extreme height point and the second second extreme height point is regarded as filtering the laser points with extreme heights collected by the right-side line laser sensor on the surface to be detected (which can be understood as filtering out points with large fluctuations); thereby, on the basis of offsetting the influence of the height difference between the highest point and the lowest point on the left and right sides, the height difference value to be determined more comprehensively and quantitatively describes the jump state of each laser point in the two batches of line laser data.

[0056] It should be noted that the laser point with the largest height in the first batch of line laser data and the laser point with the smallest height in the first batch of line laser data both represent laser points with extreme heights collected by the left line laser sensor on the surface to be detected. The laser point with the largest height in the second batch of line laser data and the laser point with the smallest height in the second batch of line laser data both represent laser points with extreme heights collected by the right line laser sensor on the surface to be detected.

[0057] In this embodiment, in the first batch of line laser data or the second batch of line laser data, the order of each laser point or the distance between the laser points determines multiple adjacent point clouds of a laser point, and a continuous bending line is formed based on a laser point and its multiple adjacent point clouds. The accumulated value of the height difference can be calculated according to the height of the laser point as the smoothness of the line connecting the multiple laser points in the first batch of line laser data or the second batch of line laser data.

[0058] Then, it is determined whether the height difference value to be determined is greater than the preset carpet height difference threshold. If so, it is determined that the robot has recognized the carpet in front of it, and it is determined that the connection line of each laser point in the two batches of line laser data presents a preset shape, and then it is determined that the line laser data collected by the line laser sensors installed on both sides based on the height difference value to be determined meets the preset jump state.

[0059] Based on the foregoing embodiment, when the height difference value to be determined is greater than the preset carpet height difference threshold, it means that the line laser data collected by each line laser sensor on the basis of filtering the laser points with extreme heights in each batch of line laser data meets the preset jump state, which can be understood as confirming that each laser point in the two batches of line laser data keeps jumping, and the jump states of each laser point in each batch of line laser data are not necessarily consistent. In this embodiment, a first height difference accumulated value and a second height difference accumulated value are obtained by cumulative calculation as the accumulated height difference values ​​of the laser points at two positions accumulated in this embodiment. After offsetting the influence of the height difference between the highest point and the lowest point in each batch of line laser data, the height difference value to be determined represents the accumulated height difference accumulated by the jumps of the remaining laser points except the highest point and the lowest point in the two batches of line laser data. It can be understood that the jumps are maintained between the remaining laser points except the highest point and the lowest point in the two batches of line laser data, including the random rise and fall between the connecting lines of two adjacent laser points in the two batches of line laser data. The number of rises and the number of falls accumulate a sufficiently large height difference accumulated value or a height difference value to be determined. Therefore, the height difference value to be determined is greater than the preset carpet height difference threshold, thereby determining that the robot recognizes the carpet in the surface to be detected without misidentification.

[0060] In some embodiments, when the height difference value to be determined is less than or equal to a preset carpet height difference threshold, it means that the line laser data collected by each line laser sensor on the basis of filtering the laser points with extreme heights in each batch of line laser data does not meet the preset jump state. It can be understood that among the laser points in the two batches of line laser data, the remaining laser points except the highest point and the lowest point do not jump all the time. In this embodiment, the first height difference accumulated value and the second height difference accumulated value are obtained by cumulative calculation as the height difference accumulated values ​​of the laser points at the two orientations accumulated in this embodiment. After offsetting the influence of the height difference between the highest point and the lowest point in each batch of line laser data, the height difference value to be determined represents the accumulated height difference accumulated by the jumps of the remaining laser points except the highest point and the lowest point in the two batches of line laser data. Since it can be understood that the remaining laser points except the highest point and the lowest point in the two batches of line laser data do not jump all the time or just continuously become higher or lower, the monotonic change amplitude is relatively small, and the jump frequency is also less than the jump frequency corresponding to the case where the height difference value to be determined is greater than the preset carpet height difference threshold, the jump times of this embodiment accumulate relatively small height difference value to be determined, so that the height difference value to be determined is less than or equal to the preset carpet height difference threshold, thereby determining that the robot recognizes obstacles or non-carpet objects such as flat ground in the surface to be detected.

[0061] In summary, this embodiment detects whether the connecting line of each laser point presents a preset shape according to the relationship between the height difference between the laser point with the largest height and the laser point with the smallest height in each batch of line laser data and the accumulated value of the height difference, so that the accumulated value of the height difference accumulated in the two batches of line laser data, after offsetting the influence of the height difference between the highest point and the lowest point, is represented by a height difference value to be determined, which represents the accumulated value of the height difference of the jumps of the remaining laser points except the highest point and the lowest point in the two batches of line laser data. Then, on the basis of offsetting the influence of the height difference between the highest point and the lowest point, the height difference value to be determined quantitatively describes the jump state of each laser point in the two batches of line laser data; when the height difference value to be determined is greater than the preset carpet height difference threshold, it can be determined that the remaining laser points except the highest point and the lowest point in the two batches of line laser data keep jumping, so as to determine that the line laser data collected by the line laser sensors installed on both sides conforms to the preset jump state, and it can be determined that the robot recognizes the carpet in the surface of the object to be measured. Compared with the existing technology, the line laser data collected from the left and right sides are processed, which supplements the detection range of the traditional obstacle detection algorithm and prevents the misidentification of the carpet.

[0062] Specifically, the method of sequentially calculating the absolute values ​​of the height difference between two adjacent laser points and accumulating the absolute values ​​of the height difference includes: Step A: Among the laser points extracted from a batch of line laser data, the laser point closest to one end of the bright section in the vertical direction of the central axis of the body is recorded as the starting search point. In this embodiment, the line laser is projected on the surface of the object to be measured to form a bright section extending in the vertical direction of the central axis of the body. The laser points formed by the reflection of the bright section constitute the said frame of line laser data. In the said frame of line laser data, the height of each laser point is the height of the laser point from the ground. Preferably, it can be understood that in the bright section, the laser point farthest from one side of the central axis of the body is recorded as the starting search point. The laser point farthest from the central axis of the body can also be the laser point closest to one end of the bright section in the vertical direction of the central axis of the body. Then traverse a laser point adjacent to the position, and then calculate the absolute value of the height difference between the currently traversed laser point and the starting search point to obtain the accumulated value of the height difference; then execute step B.

[0063] Step B, traverse a laser point adjacent to the position that does not participate in the calculation of the absolute value of the height difference, then calculate the absolute value of the height difference between the currently traversed laser point and the laser point traversed in step A, then add the accumulated value of the height difference calculated in step A to the currently calculated absolute value of the height difference to obtain a new accumulated value of the height difference, and then control the new accumulated value of the height difference to be updated to the accumulated value of the height difference described in step A; then execute step C.

[0064] Step C, repeating step B until all laser points extracted from a batch of line laser data are traversed, and updating the height difference accumulation value described in step A by accumulating the absolute value of the height difference.

[0065] When the batch of line laser data described in step A is the first batch of line laser data, step C configures the last updated height difference accumulated value as the first height difference accumulated value; and after step C determines that all laser points extracted from the batch of line laser data have been traversed, the laser point with the largest height value in the first batch of line laser data is marked as the first extreme height point, and the laser point with the smallest height value in the first batch of line laser data is marked as the first second extreme height point.

[0066] When the batch of line laser data described in step A is the second batch of line laser data, step C configures the height difference accumulated value updated last time as the second height difference accumulated value. Moreover, after step C determines that all laser points extracted from the batch of line laser data are traversed, the laser point with the largest height value in the second batch of line laser data is marked as the second-first extreme height point, and the laser point with the smallest height value in the second batch of line laser data is marked as the second-second extreme height point.

[0067] Assume that four laser points A1, B1, C1, and D1 are extracted from the first batch of line laser data. The four laser points A1, B1, C1, and D1 are distributed on the left side of the robot's body axis in the vertical direction of the robot's body axis, and the traversed heights are hA1, hB1, hC1, and hD1, respectively. Among them, laser point A1 is the starting search point and is the laser point closest to the leftmost side of the bright section formed by the left line laser sensor. The four laser points A1, B1, C1, and D1 are arranged in order from left to right. The two adjacent laser points can be taken to calculate the absolute value of the height difference between the currently traversed laser point and the laser point traversed in step A. Then the calculation method of the accumulated value of the height difference of the four laser points A1, B1, C1, and D1 is abs(hA1-hB1)+abs(hB1-hC1)+abs(hC1-hD1), and the calculation result is equal to the first accumulated value of the height difference. abs(hA1-hB1), abs(hB1-hC1), and abs(hC1-hD1) are the absolute values ​​of the height difference between three pairs of adjacent laser points in the same batch of line laser data.

[0068] Assume that four laser points A2, B2, C2, and D2 are extracted from the second batch of line laser data. The four laser points A2, B2, C2, and D2 are distributed on the right side of the robot's body axis in the vertical direction of the robot's body axis, and the traversed heights are hA2, hB2, hC2, and hD2, respectively. Among them, laser point A2 is the starting search point and is the laser point closest to the leftmost side of the bright section formed by the right-side line laser sensor. The four laser points A2, B2, C2, and D2 are arranged in order from left to right. The two adjacent laser points can be taken to calculate the absolute value of the height difference between the currently traversed laser point and the laser point traversed in step A. Then the calculation method of the accumulated value of the height difference of the four laser points A2, B2, C2, and D2 is abs(hA2-hB2)+abs(hB2-hC2)+abs(hC2-hD2), and the calculation result is equal to the second accumulated value of the height difference, abs(hA2-hB2), abs(hB2-hC2), and abs(hC2-hD2) are the absolute values ​​of the height difference between three pairs of adjacent laser points in the second batch of line laser data.

[0069] Schematically, if hA1>hB1>hC1>hD1, then abs(hA1-hB1)+abs(hB1-hC1)+abs(hC1-hD1) is equal to hA1-hD1, and the first height difference cumulative value is determined to be equal to hA1-hD1, and it is determined that the first extreme height point is laser point A1, and the first second extreme height point is laser point D1; at the same time, if hA2>hB2>hC2>hD2, then abs(hA2-hB2)+abs(hB2-hC2)+abs(hC2-hD2) is equal to hA2-hD2, and the second height difference cumulative value is determined to be equal to hA2-hD2, and it is determined that the second extreme height point is laser point A2, and the second second extreme height point is laser point D2. Then, the sum of the first height difference accumulated value and the second height difference accumulated value is controlled, and the absolute value of the height difference between the first extreme height point and the first second extreme height point, and the absolute value of the height difference between the second extreme height point and the second second extreme height point are subtracted in sequence to obtain the height difference value to be determined, which is equal to the value 0. Then, after the height difference accumulated values ​​in the two batches of line laser data offset the influence of the height difference between the highest point and the lowest point in each batch of line laser data, the calculated height difference value to be determined is equal to the value 0, which is less than the preset carpet height difference threshold value, indicating that the line connection of the eight laser points A1, B1, C1, D1, A2, B2, C2, and D2 does not jump frequently, is relatively smooth, does not continuously appear uneven, and does not present the preset form. It can be determined that the line laser data corresponding to the eight laser points A1, B1, C1, D1, A2, B2, C2, and D2 do not meet the preset jump state, and it is determined that the carpet is not recognized.

[0070] Schematically, if hA1>hB1 <hc1>hD1, then abs(hA1-hB1)+abs(hB1-hC1)+abs(hC1-hD1) is equal to hA1+2hC1-2hB1-hD1, and the first height difference accumulation value is obtained, and it is determined that the first extreme height point is laser point C1, and the first second extreme height point is laser point B1; if hA2>hB2 <hc2>hD2, then abs(hA2-hB2)+abs(hB2-hC2)+abs(hC2-hD2) is equal to hA2+2hC2-2hB2-hD2, and the second height difference cumulative value is obtained, and it is determined that the second-most extreme height point is laser point C2, and the second-most extreme height point is laser point B2; then the sum of the first height difference cumulative value and the second height difference cumulative value is controlled, and the absolute value of the height difference between the first-most extreme height point and the first-most extreme height point, and the absolute value of the height difference between the second-most extreme height point and the second-most extreme height point are subtracted in sequence to obtain the height difference value to be determined, which is equal to hA1+hC1+hA2+hC2-hB1-hD1-hB2-hD2, which is greater than the preset carpet height difference threshold The value indicates that the line connecting the eight laser points A1, B1, C1, D1, A2, B2, C2 and D2 is tortuous and uneven, the line connecting the eight laser points jumps frequently, and the uneven state continues to appear. From laser point A1 to laser point D2, the jumping state is maintained between two adjacent laser points, and the jumping speed is faster than the laser point jumping speed under the corresponding conditions of hA1>hB1>hC1>hD1 and hA2>hB2>hC2>hD2. The line connecting the eight laser points A1, B1, C1, D1, A2, B2, C2 and D2 presents the preset shape. It can be determined that the line laser data corresponding to the eight laser points A1, B1, C1, D1, A2, B2, C2 and D2 meet the preset jumping state, and the carpet is identified.

[0071] Preferably, each laser point extracted from each batch of line laser data does not include the laser points distributed at the edge of the bright section; the robot combines two batches of line laser data into one frame of line laser data, so that the laser points distributed at both ends of the bright section in the vertical direction of the central axis of the body do not exist in each laser point extracted from one frame of line laser data. Therefore, in step A, the laser point closest to one end of the bright section in the vertical direction of the central axis of the body is preferentially recorded as the starting search point, rather than the laser points distributed at the edge of the bright section. This overcomes the error caused by the excessive jump amplitude of the laser points distributed at the edge of the bright section.

[0072] Based on the aforementioned embodiment, the robot extracts each laser point from the two batches of line laser data and connects each laser point in turn; the laser points extracted by the robot are separated on both sides of the robot's body axis and located in front of the robot. In the two batches of line laser data, every two adjacent laser points can be connected from left to right to connect each laser point in turn.

[0073] Based on this connection, the preset forms required to identify the carpet include: In the two batches of line laser data, in the lines connecting the laser points, concavities and convexities appear alternately, and the number of alternating appearances is at least twice; schematically, as Figure 3 It can also be understood that there are alternating drops and rises in the connection lines of the laser points, and the number of alternating occurrences is at least two.

[0074] In the two batches of line laser data, the line connecting each laser point has at least two concavities and at least one convexity. Schematically, Figure 3 As shown by the three sequentially connected broken line segments framed by the dotted frame P2, it can also be understood that there are at least two rises and at least one drop in the line connecting each laser point, which can be presented as at least two rises first and then at least one drop.

[0075] In the two batches of line laser data, the line connecting each laser point has at least two convexities and then at least one concavity. Schematically, Figure 3 As shown by the three sequentially connected broken line segments framed by the dotted frame P3, it can also be understood that there are at least two drops and at least one rise in the line connecting each laser point, which can be presented as at least two drops first and then at least one rise.

[0076] In summary, when the lines connecting the laser points in the two batches of line laser data continuously present multiple convexities and multiple concavities, it can be determined that the lines connecting the laser points present a preset shape. Based on this, the lines connecting the laser points collected by the line laser sensors on the left and right sides can be combined to determine the preset jump states of the two batches of line laser data.

[0077] In some embodiments, in at least one batch of line laser data, the line connecting each laser point appears at most once concave and at most once convex within the same detection width, and it is determined that the frequency of rise or fall is relatively low. It can be judged that the line connecting each laser point in a batch of line laser data does not present a preset shape. The robot can identify non-carpet objects from the surface to be detected. Non-carpet objects include obstacles, and there is no specific restriction on the height of the obstacles.

[0078] When the height difference to be determined is less than or equal to the preset carpet height difference threshold, the line connecting each laser point in the two batches of line laser data presents at most one bulge (the probability of the bulge is less than the corresponding probability when the height difference to be determined is greater than the preset carpet height difference threshold), and / or at most one concave (the probability of the concave is less than the corresponding probability when the height difference to be determined is greater than the preset carpet height difference threshold).

[0079] The carpet flatness characteristic (carpet edge characteristic) can be understood as the height of the laser point formed by the reflection of the line laser on the carpet pile is higher than the height of the laser point formed by the reflection of the line laser in the gap between the carpet pile, so that each laser point in the frame of line laser data has multiple jumps. Concave and convex are generally determined based on the line connecting two adjacent laser points, and can be distinguished numerically by the slope of the line connecting the two laser points.

[0080] In some embodiments, the carpet flatness characteristic is that the carpet is jagged and generally includes pieces of fiber material extending vertically upward from the carpet to a few centimeters above the upper side of the carpet. When a line laser hits the carpet, the light segment generated by the light reflected by the carpet will be broken into multiple small, substantially vertical line segments, each vertical line segment has a corresponding laser spot, and the higher the height of the vertical line segment, the thicker the carpet.

[0081] In some embodiments, the robot can count the number of protrusions in the line connecting each laser point in the two batches of line laser data; when the number of protrusions is greater than a number threshold, it is determined that the contour indicated by the contour information is a carpet contour; when the number of protrusions is less than or equal to the number threshold, it is determined that the contour indicated by the contour information is an obstacle contour.

[0082] When the height is used to describe the trend of the connection line of each laser point, each time it bulges or each time it is concave, the height difference of the surface to be detected is accumulated in this embodiment. The number of bulges (which can be equivalent to the number of rises) or the number of concavities (which can be equivalent to the number of descents) of the connection line of two adjacent laser points can be represented by the accumulated value of the height difference. The number of bulges and the number of concavities are collectively referred to as the number of jumps in this embodiment. When the height difference between two adjacent laser points is not large, the larger the number of jumps, the larger the accumulated value of the height difference (not limited to the first accumulated value of the height difference and the second accumulated value of the height difference), based on which the carpet can be identified. Of course, for each batch of line laser data, the height difference between the laser point with the largest height and the laser point with the smallest height has the greatest impact on it, and needs to be offset to avoid the phenomenon of misidentification of the carpet.

[0083] In the aforementioned embodiment, the larger the height difference to be determined is, the more times each laser point in the two batches of line laser data jumps in the vertical direction of the central axis of the body, so that the connecting line of each laser point presents multiple convexities and multiple concavities, but not necessarily multiple continuous convexities or multiple continuous concavities. More often, the convexities and concavities appear randomly, and the jumping frequency of the laser points is relatively large.

[0084] The smaller the height difference to be determined is, the fewer times each laser point in the two batches of line laser data jumps in the vertical direction of the central axis of the fuselage, so that the line connecting each laser point rises at least once, or falls at least once, or extends in a straight line in a single direction, wherein the rising and falling speeds are relatively small, that is, the jumping speed of the laser point is relatively slow.

[0085] The jump number is the sum of the rising and falling times of the connecting line of each laser point in the two batches of line laser data, or the jump number is the sum of the convex and concave times of the connecting line of each laser point in the two batches of line laser data. The descent and the rise can be combined and connected into two trajectory forms of convexity and concaveness in the connecting line of each laser point, and the height change trend of the connecting line of each laser point in the same detection width corresponds to the trend of the line segment.

[0086] Combination Figure 3 and Figure 4 It can be seen that although the two lines connected by the laser points in the two batches of line laser data in different detection scenarios also rise and fall, the line connecting the laser points formed by the line laser in the scene of detecting obstacles will have a bulge; while the line connecting the laser points formed by the line laser in the carpet area on the left and right sides of the detection is constantly rising and falling, that is, there are multiple bulges and multiple concavities, and the line connecting the laser points has multiple height jumps. According to this, the height difference value to be determined can be compared with the preset carpet height difference threshold to distinguish obstacles and carpets on the surface to be detected with a jump in height.

[0087] In summary, when the height difference to be determined is greater than the preset carpet height difference threshold, the line connecting each laser point presents multiple convexities and multiple concavities within the same detection width; when the height difference to be determined is less than or equal to the preset carpet height difference threshold, the line connecting each laser point presents at most one convexity and / or at most one concavity within the same detection width. Thus, obstacles and carpets can be distinguished by the height variation characteristics of the connecting line of the laser points, preventing the carpet from being misidentified.

[0088] Preferably, the preset carpet height difference threshold is set between 3.5cm and 4cm; after the line laser is projected onto the surface of the floor, the height difference value to be determined calculated by the line laser data collected by the line laser sensors on both sides of the robot is less than 3.5cm or 3cm; after the line laser is projected onto the surface of the obstacle, the height difference value to be determined calculated by the line laser data collected by the line laser sensors on both sides of the robot is between 2cm and 3cm; wherein the floor and the obstacle are both non-carpet objects. The aforementioned height difference value to be determined is used as the accumulated value of the height difference obtained after offsetting the laser point with an extreme height on the surface to be detected, and is directly used to identify the carpet, with a good detection success rate, low calculation cost, and strong real-time performance.

[0089] In the case where the corresponding calculated height difference to be determined is greater than the preset carpet height difference threshold, the larger the height difference to be determined, the larger the length of the carpet pile projected by the line laser. In the case where the corresponding calculated height difference to be determined is less than or equal to the preset carpet height difference threshold, the smaller the height difference to be determined, the smaller the length of the carpet pile projected by the line laser. On this basis, short-haired carpets (the corresponding height difference to be determined is between 3 and 4 cm), long-haired carpets (the corresponding height difference to be determined is between 4 and 5 cm), plush mats (the corresponding height difference to be determined is between 5 and 6 cm), and thick carpets (the corresponding height difference to be determined is between 6 and 7 cm) can be specifically divided according to the height difference to be determined.

[0090] As an embodiment, the robot extracts each laser point from the two batches of line laser data, and connects each laser point in turn, which is equivalent to connecting all the extracted laser points in the two batches of line laser data in turn, and at the same time calculates the length of the line between two adjacent laser points and accumulates it to obtain the total length of the line of each laser point, and marks the total length as the height connection line length; it can be along the vertical direction of the robot's body axis, according to the distance between the coordinates of two adjacent laser points, to obtain the total length of the line of each laser point in the two batches of line laser data, and mark the total length as the height connection line length. At this time, the laser points collected by the line laser sensors on the left and right sides are regarded as laser points in the same frame of line laser data for connection calculation to obtain the height connection line length.

[0091] When the height connection line length calculated by the robot is less than the preset connection line length threshold, if the height difference cumulative value calculated by the robot is less than the preset carpet height difference threshold, the robot recognizes the floor. The robot records the height connection line length calculated by the robot as the ground surface height connection line length, and at the same time, the robot records the sum of the first height difference cumulative value and the second height difference cumulative value as the ground surface height difference cumulative value.

[0092] When the height connection line length calculated by the robot is greater than or equal to the preset connection line length threshold, if the connection line of each laser point in the two batches of line laser data does not present the preset form disclosed in the aforementioned embodiment, the robot recognizes an obstacle. The robot records the height connection line length calculated by it as the obstacle height connection line length, and at the same time, the robot records the sum of the first height difference cumulative value and the second height difference cumulative value as the obstacle height difference cumulative value.

[0093] When the height connection line length calculated by the robot is greater than or equal to the preset connection line length threshold, if the connection line of each laser point in the two batches of line laser data presents the preset shape, the robot recognizes the carpet. The robot records the height connection line length calculated by the robot as the carpet height connection line length, and at the same time, the robot records the sum of the first height difference cumulative value and the second height difference cumulative value as the carpet height difference cumulative value.

[0094] After each line laser sensor emits a line laser to the carpet surface, the carpet surface is uneven, so the length of the carpet height connection line is relatively long, and there is a height difference between two relatively close laser points. In contrast, after the line laser sensor emits a line laser to the floor surface, in the two batches of line laser data collected by the robot, the floor surface is flat and smooth, so the length of the ground surface height connection line is much smaller than the length of the carpet height connection line, and there is almost no height difference between any two laser points. Thus, the length of the height connection line is used to distinguish between carpet and floor.

[0095] Within the detection space jointly defined by the line laser sensors on both sides of the aircraft body, the length of the ground height connecting line is smaller than the length of the carpet height connecting line, the accumulated value of the ground height difference is smaller than the accumulated value of the carpet height difference, the length of the ground height connecting line is smaller than the length of the obstacle height connecting line, and the accumulated value of the ground height difference is smaller than the accumulated value of the obstacle height difference.

[0096] Regarding the use of the length of the height connection line to distinguish between carpets, obstacles and floors, the premise is to use the line laser data collected within the detection space formed by the line laser sensors on the left and right sides of the body; the line laser emitted by the line laser sensor on each side forms a bright section with a fixed detection width on the surface to be detected. The bright section is the projection area of ​​the light strip extending in the vertical direction along the central axis of the body formed by the line laser projected on the surface to be detected. The detection width is the size occupied by the bright section in the vertical direction of the central axis of the body, which means the width irradiated by the line laser.

[0097] In summary, the carpet, obstacle and floor are distinguished by using the sum of the first height difference accumulated value and the second height difference accumulated value, the height connection line length and the preset shape.

[0098] After the robot calculates the sum of the first height difference accumulated value and the second height difference accumulated value, there exists: When the sum of the first height difference cumulative value and the second height difference cumulative value is less than the reference height difference cumulative threshold, the height connection line length calculated by the robot is less than the preset connection line length threshold; the robot recognizes the floor, confirms that the line laser is emitted to the floor surface and is recognized by the robot, and the robot records the height connection line length calculated by the robot as the ground surface height connection line length. At the same time, the robot records the sum of the first height difference cumulative value and the second height difference cumulative value as the ground surface height difference cumulative value. This eliminates the influence of floor factors for carpet recognition.

[0099] When the sum of the first height difference accumulated value and the second height difference accumulated value is greater than or equal to the reference height difference cumulative threshold, and the height connection line length calculated by the robot is greater than or equal to the preset connection line length threshold, the robot recognizes a carpet or an obstacle and needs to determine whether the connection line of each laser point in the two batches of line laser data presents a preset shape to distinguish between carpets and obstacles.

[0100] It can be seen that the sum of the first height difference cumulative value and the second height difference cumulative value is positively correlated with the length of the height connection line; even if the floor surface has height increases and decreases, it is understood that there is a jump phenomenon, but the number of jumps, the height of the jumps and the probability of the jumps are far lower than the jumps generated on the carpet surface, forming a unique height unevenness feature of the carpet contour line. Through this feature, the floor surface and even low obstacles can be excluded before the carpet is recognized on the surface of the object to be measured.

[0101] The present application also discloses a robot, the robot comprising a processor and a memory; the memory stores a program, the program is loaded and executed by the processor to implement the carpet recognition method disclosed in the above-mentioned embodiment; wherein a line laser sensor is installed on each of the left and right sides of the robot, the two line laser sensors are respectively mounted on both sides of the central axis of the robot body, the detection directions of the two line laser sensors point to the front of the robot, the line lasers emitted by the two line laser sensors form two symmetrical bright sections on the surface to be detected in front of the robot, and the robot executes steps 1 to 3 disclosed in the above-mentioned embodiment, using the light collected on the left and right sides A batch of line laser data consists of each laser point for detecting the height change characteristics (based on the cumulative result of the absolute value of the height difference calculated in the two batches of line laser data, and then the difference is used to offset the influence of the laser points at extreme heights, and the height difference to be judged is obtained, and then the threshold judgment is performed to achieve the purpose of carpet recognition), and the carpet is identified when the preset jump state is met. Under the premise of not performing straight line fitting processing on the two batches of line laser data, the carpet can be quickly and effectively identified from the surface to be detected with less computing power, thereby improving the effect of carpet recognition and preventing carpet misidentification, thereby preventing the robot from climbing on the carpet after misidentifying the carpet as an obstacle, but only avoiding the carpet.

[0102] The memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory is used to store at least one instruction, which is used to be executed by the processor to implement the carpet recognition method provided in the method embodiment of the present application.

[0103] The above is a detailed introduction to an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A carpet recognition method based on line laser sensors on both sides of a robot, characterized in that: A line laser sensor is installed on each side of the robot body, each line laser sensor is used to emit a line laser to the surface to be detected, and each line laser sensor is used to collect laser points formed by the line laser reflected by the surface to be detected; The carpet identification method comprises: The robot collects a batch of line laser data through the line laser sensors installed on both sides of the robot, and obtains two batches of line laser data at one time; then the height value of each laser point is extracted from each batch of line laser data; Then, in each batch of line laser data, the absolute values ​​of the height differences between two adjacent laser points are accumulated to obtain the accumulated values ​​of the height differences of the laser points on the corresponding side; Then, the height difference value to be judged is calculated by combining the accumulated value of the height difference of the laser points on both sides. When the line laser data collected by the line laser sensors installed on both sides is detected to be in line with the preset jump state based on the height difference value to be judged, the robot identifies the carpet from the surface to be detected to eliminate the interference of obstacles.

2. The carpet identification method according to claim 1, characterized in that: In the carpet recognition method, the method of detecting whether the line laser data collected by the line laser sensors installed on both sides conform to the preset jump state based on the height difference to be determined includes: Marking two batches of line laser data collected at one time as the first batch of line laser data and the second batch of line laser data respectively; Extracting the height values ​​of each laser point from the first batch of line laser data, and determining the laser point with the largest height value as the first extreme height point, and determining the laser point with the smallest height value as the first second extreme height point; Extracting the height values ​​of each laser point from the second batch of line laser data, and determining the laser point with the largest height value as the second-first extreme height point, and determining the laser point with the smallest height value as the second-second extreme height point; In the first batch of line laser data, the absolute values ​​of the height differences between two adjacent laser points are calculated in sequence, and a first height difference accumulated value is obtained by accumulating the absolute values ​​of the height differences; In the second batch of line laser data, the absolute values ​​of the height differences between two adjacent laser points are calculated in sequence, and a second height difference accumulated value is obtained by accumulating the absolute values ​​of the height differences; Then control the sum of the first height difference accumulated value and the second height difference accumulated value, subtract the absolute value of the height difference between the first extreme height point and the first second extreme height point, and the absolute value of the height difference between the second extreme height point and the second second extreme height point in sequence, the difference obtained is the height difference value to be determined, and determine to calculate the height difference value to be determined by combining the accumulated value of the height difference of the laser points on both sides; Then, it is determined whether the height difference value to be determined is greater than the preset carpet height difference threshold. If so, it is determined that the robot has identified the ground in front of it, and it is determined that the connection line of each laser point in the two batches of line laser data presents a preset shape, and then it is determined that the line laser data collected by the line laser sensors installed on both sides based on the height difference value to be determined meets the preset jump state.

3. The carpet identification method according to claim 2, characterized in that: The method of sequentially calculating the absolute values ​​of the height difference between two adjacent laser points and accumulating the absolute values ​​of the height difference comprises: Step A, among the laser points extracted from a batch of line laser data, the laser point closest to one end of the bright section in the vertical direction of the central axis of the body is recorded as the starting search point, and then a laser point adjacent to the position is traversed, and then the absolute value of the height difference between the currently traversed laser point and the starting search point is calculated to obtain the accumulated value of the height difference; and then step B is executed; wherein the line laser emitted by each line laser sensor forms a bright section extending in the vertical direction along the central axis of the body on the surface to be detected; Step B, traverse a laser point adjacent to the position that does not participate in the calculation of the absolute value of the height difference, then calculate the absolute value of the height difference between the currently traversed laser point and the laser point traversed in step A, then add the height difference accumulated value calculated in step A to the currently calculated absolute value of the height difference to obtain a new height difference accumulated value, and then control the new height difference accumulated value to be updated to the height difference accumulated value described in step A; then execute step C; Step C, repeating step B until all laser points extracted from a batch of line laser data are traversed, and updating the height difference accumulated value described in step A by accumulating the absolute value of the height difference; When the batch of line laser data in step A is the first batch of line laser data, step C configures the height difference accumulated value updated last time as the first height difference accumulated value; When the batch of line laser data in step A is the second batch of line laser data, step C configures the height difference accumulated value updated last time as the second height difference accumulated value.

4. The carpet identification method according to claim 3, characterized in that: Each laser point extracted from each batch of line laser data does not include laser points distributed at the edge of the bright section; The robot combines two batches of line laser data into one frame of line laser data, so that the laser points distributed at both ends of the bright section in the vertical direction of the central axis of the body do not exist in the laser points extracted from one frame of line laser data.

5. The carpet identification method according to claim 2, characterized in that: The preset forms include: In the two batches of line laser data, in the lines connecting the laser points, concavities and convexities appear alternately, and the number of alternating appearances is at least twice; In the two batches of line laser data, the line connecting each laser point has at least two concavities and at least one convexity; In the two batches of line laser data, the line connecting each laser point has at least two protrusions and at least one concavity; Among them, the height of the laser point formed by the reflection of the line laser on the pile of the carpet is higher than the height of the laser point formed by the reflection of the line laser in the gap between the pile of the carpet, so that the connecting line of each laser point in the two batches of line laser data shows multiple convexities and multiple concavities, and determines that the line laser data collected by the line laser sensors installed on both sides conforms to the preset jump state.

6. The carpet identification method according to claim 5, characterized in that: The larger the height difference to be determined is, the more times each laser point in the two batches of line laser data jumps in the vertical direction of the central axis of the aircraft body; The smaller the height difference to be determined is, the smaller the number of jumps of each laser point in the two batches of line laser data in the vertical direction of the central axis of the aircraft body is; The jump times are the sum of the convex times and the concave times of the connecting lines of the laser points in the two batches of line laser data.

7. The carpet identification method according to claim 6, characterized in that: The preset carpet height difference threshold is set between 3.5 cm and 4 cm; After the line laser is projected onto the surface of the floor, the height difference to be determined calculated by the line laser data collected by the line laser sensors on both sides of the robot is less than 3.5 cm or 3 cm; After the line laser is projected onto the surface of the obstacle, the height difference to be determined calculated by the line laser data collected by the line laser sensors on both sides of the robot is between 2 cm and 3 cm; Among them, floors and obstacles are both non-carpet objects.

8. The carpet identification method according to claim 7, characterized in that: The robot extracts each laser point from the two batches of line laser data, connects each laser point in turn, and calculates and accumulates the length of the line between two adjacent laser points to obtain the total length of the line between each laser point, and marks the total length as the height connection line length; When the height connection line length calculated by the robot is less than the preset connection line length threshold, if the accumulated value of the height difference calculated by the robot is less than the preset carpet height difference threshold, the robot recognizes the floor; When the height connection line length calculated by the robot is greater than or equal to the preset connection line length threshold, if the connection line of each laser point in the two batches of line laser data does not present a preset shape, the robot recognizes an obstacle; When the height connection line length calculated by the robot is greater than or equal to the preset connection line length threshold, if the connection line of each laser point in the two batches of line laser data presents a preset shape, the robot recognizes the carpet.

9. The carpet identification method according to claim 8, characterized in that: After the robot calculates the sum of the first height difference accumulated value and the second height difference accumulated value, there exists: When the sum of the first height difference accumulated value and the second height difference accumulated value is less than the reference height difference accumulation threshold, the height connection line length calculated by the robot is less than the preset connection line length threshold; When the sum of the first height difference accumulated value and the second height difference accumulated value is greater than or equal to the reference height difference accumulation threshold, the height connection line length calculated by the robot is greater than or equal to the preset connection line length threshold.

10. A robot, characterized in that: The method comprises a processor and a memory; the memory stores a program, and the program is loaded and executed by the processor to implement the carpet identification method according to any one of claims 1 to 9; Among them, a line laser sensor is installed on each of the left and right sides of the robot, and the two line laser sensors are respectively installed on both sides of the central axis of the robot body.