Walking surface identification method based on line laser data
Through the walking surface recognition method based on line laser data, the accumulated height difference value and laser point connection shape in a frame of line laser data are used to solve the problems of low carpet recognition efficiency and difficulty in recognition in dark ambient light in the existing technology. Fast and accurate floor and carpet differentiation is achieved.
Patent Information
- Application Number
- CN202310899167.5
- 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
The prior art requires multiple frames of images to perform feature matching operations when identifying carpets, resulting in large consumption of equipment resources and the visual image processing technology cannot accurately identify the walking surface when the ambient light is dark.
The walking surface recognition method based on line laser data is used to collect a frame of line laser data through a line laser sensor, extract the height value of the laser point, calculate the cumulative value of the height difference, and determine whether it is a carpet by detecting the shape of the line connecting the laser points.
It achieves rapid and accurate distinction between floors and carpets in one frame of line laser data, improves recognition accuracy and efficiency, reduces computing power consumption, and avoids misidentification of carpets.
Smart Images

Figure CN119326335A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of line laser technology, and in particular to a walking surface recognition method based on line laser data. Background Art
[0002] When a sweeping robot encounters a carpet while cleaning, it is very likely to get stuck on the edge of the carpet if it does not have the appropriate identification method and operation means. Only by identifying the carpet and adopting the appropriate operation method and strategy can the robot run and clean more smoothly. It is particularly important for the sweeping robot to identify the carpet. Currently, image recognition algorithms are used to distinguish carpets from other ground materials. Multiple frames of images are required for feature matching operations, which increases the equipment resources required to identify obstacles. Moreover, the visual image processing technology of the sweeping robot cannot accurately identify the walking surface when the ambient light is low. Summary of the invention
[0003] A walking surface recognition method based on line laser data, a line laser sensor is installed on the robot, and the robot moves on the walking surface; the line laser sensor is used to emit a line laser obliquely downward along the walking direction of the robot, and the line laser sensor is also used to collect laser points formed by the reflection of the line laser on the walking surface; the walking surface recognition method includes: the robot collects a frame of line laser data through the line laser sensor, then extracts the height value of each laser point in the frame of line laser data, and then obtains the height difference cumulative value by accumulating the absolute value of the height difference between two adjacent laser points; it is judged whether the height difference cumulative value calculated by the robot is less than the reference height difference cumulative threshold; when the height difference cumulative value calculated by the robot is less than the reference height difference cumulative threshold, the robot recognizes its walking surface as including the floor; when the height difference cumulative value calculated by the robot is greater than or equal to the reference height difference cumulative threshold, if it is detected that the line connecting the laser points in the frame of line laser data presents a preset shape, the robot recognizes its walking surface as including the carpet.
[0004] Compared with the prior art, the present technical solution detects each laser point through one frame of line laser data, and identifies the floor from the walking surface when the accumulated value of the height difference calculated by the height information of the laser point is less than the reference height difference accumulated threshold, and identifies the carpet from the walking surface when the line connecting each laser point meets the preset shape, thereby using one frame of line laser data to distinguish between the floor and the carpet on the walking surface of the robot, and improving the carpet recognition accuracy and recognition efficiency. The present technical solution consumes less computing power and time than the prior art that performs feature matching and recognition based on multiple frames of images, so that the present embodiment quickly and effectively distinguishes the carpet from other material walking surfaces from the walking surface (detection surface that can be easily misjudged) with less computing power, prevents the carpet from being misidentified, and thus avoids the robot from climbing on the carpet after misidentifying the carpet as an obstacle, and only avoids the carpet, thereby expanding the robot's recognition range of the walking surface.
[0005] Furthermore, the walking surface recognition method further includes: when the height difference cumulative value calculated by the robot is greater than or equal to the reference height difference cumulative threshold, if it is detected that the connection line of each laser point in the one frame line laser data is not in a preset form, the robot determines that there is an obstacle on its walking surface, wherein the height of the laser point reflected back from the obstacle surface is greater than the height of the laser point reflected back from the floor surface. This technical solution distinguishes obstacles and carpets by detecting whether the connection line of each laser point in the one frame line laser data presents a preset form based on determining the relationship between the height difference cumulative value and the reference height difference cumulative threshold.
[0006] Furthermore, in the one frame of line laser data, the robot connects each laser point in turn, calculates the total length of the lines connecting each laser point, and marks the total length as the height connection line length; when the cumulative value of the height difference calculated by the robot 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, and the robot records the height connection line length calculated by it as the surface height connection line length; when the cumulative value of the height difference calculated by the robot 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.
[0007] Furthermore, 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 one frame line laser data does not present a preset form, the robot recognizes an obstacle, and the robot records the height connection line length calculated by the robot as the obstacle height connection line length; 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 one frame line laser data presents a preset form, the robot recognizes a carpet, and the robot records the height connection line length calculated by the robot as the carpet height connection line length. For a frame line laser data collected within the same detection width, the calculated obstacle height connection line length and carpet height connection line length are both greater than the ground surface height connection line length. Therefore, the height connection line length is used to eliminate the interference of the floor before the carpet is recognized on the walking surface, and then the carpet and the obstacle are distinguished using the preset form set in advance.
[0008] Further, the method for detecting that the connection line of each laser point in the frame of line laser data presents a preset shape includes: the robot collects a frame of line laser data through a line laser sensor, then extracts the height value of each laser point in the frame of line laser data, and determines the laser point with the largest height value and the laser point with the smallest height value; then in the frame of line laser data, the absolute value of the height difference between two adjacent laser points is calculated in turn, and the height difference cumulative value is obtained by accumulating the absolute value of the height difference; according to the relationship between the height difference between the laser point with the largest height value and the laser point with the smallest height value and the height difference cumulative value, detect whether the connection line of each laser point in the frame of line laser data presents a preset shape; when the robot detects that the connection line of each laser point in the frame of line laser data presents a preset shape, the robot identifies its walking surface as including a carpet. Therefore, the technical solution detects the connection line of each laser point on the basis of considering the relationship between the height difference between the laser point with the largest height value and the laser point with the smallest height value and the height difference cumulative value, so as to achieve the distinction between the carpet and the obstacle after offsetting the influence of the height difference between the laser point with the largest height value and the laser point with the smallest height value, and avoid misidentification of the carpet.
[0009] Furthermore, the method for detecting whether the line connecting each laser point in the frame of line laser data presents a preset shape based on the relationship between the height difference between the laser point with the largest height value and the laser point with the smallest height value and the accumulated value of the height difference includes: after calculating the accumulated value of the height difference in the frame of line laser data, controlling the accumulated value of the height difference to subtract the height difference between the highest point and the lowest point in the frame of line laser data, and the difference obtained is the height difference value to be determined; wherein the highest point in the frame of line laser data is the laser point with the largest height value, and the lowest point in the frame of line laser data is the laser point with the smallest height value; then determining whether the height difference value to be determined is greater than a preset carpet height difference threshold, if so, determining that the robot recognizes the carpet and determines that the line connecting each laser point in the frame of line laser data presents a preset shape, and determining that the accumulated value of the height difference is greater than or equal to the reference height difference cumulative threshold.
[0010] In summary, the above technical solution detects whether the connection line of each laser point presents a preset shape according to the relationship between the height difference between the laser point with the highest height and the laser point with the lowest height and the accumulated value of the height difference, so that the accumulated accumulated value of the height difference, after offsetting the influence of the height difference between the highest point and the lowest point, quantitatively describes the jump state of the connection line of each laser point in the same frame line laser data; when the height difference value to be determined is greater than or equal to the preset carpet height difference threshold, it is determined that the connection line of each laser point presents a continuous ups and downs change state; when the height difference value to be determined is less than the preset carpet height difference threshold, it is determined that the connection line of each laser point presents a relatively small number of ups and downs change states (for example, one to two times), so as to determine that the robot distinguishes between carpets and obstacles in the walking surface, and also prevent misidentification of carpets.
[0011] Furthermore, the method of calculating the absolute values of the height differences between two adjacent laser points in the frame line laser data in sequence, and obtaining the accumulated value of the height differences by accumulating the absolute values of the height differences comprises: step A, among the laser points extracted from the frame line laser data, traversing an adjacent laser point from the laser point closest to one end of the bright section in the vertical direction of the central axis of the body, and then calculating the absolute value of the height difference between two adjacent laser points to obtain the accumulated value of the height difference; then executing step B; step B, traversing an adjacent laser point that does not participate in the calculation of the absolute value of the height difference from the laser point most recently traversed in step A, and then calculating the accumulated value of the height difference between the two adjacent laser points traversed successively. The absolute value of the height difference of each laser point is calculated, and then the accumulated value of the height difference calculated in step A is added to the absolute value of the height difference calculated currently to obtain a new accumulated value of the height difference, and then the new accumulated value of the height difference is controlled to be updated to the accumulated value of the height difference described in step A; step C, repeating step B until all the laser points extracted by a frame of line laser data are traversed, and the accumulated value of the height difference described in step A is updated by accumulating the absolute value of the height difference; wherein, the line laser is projected on the surface of the object to be measured to form a bright section extending in the vertical direction along the central axis of the robot body, and the bright section reflects the formed laser point; the height of each laser point is the height of the laser point from the ground.
[0012] The technical solution accumulates the absolute value of the height difference between two laser points in a frame of line laser data by calculating the absolute value of the height difference and accumulating the height difference, accumulates the height difference between the laser points in a frame of line laser data, and then configures the last updated height difference accumulated value to be used to subtract the height difference between the highest point and the lowest point in the frame of line laser data to detect whether the connecting line of each laser point presents a preset shape.
[0013] Furthermore, the laser points extracted from a frame of line laser data do not include the laser points distributed at the edge of the bright section, so as to retain the laser points with large fluctuations, and to ensure 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 the frame of line laser data, thereby overcoming the error caused by the large jump amplitude of the laser points distributed at the edge of the bright section.
[0014] Furthermore, the preset form presented by the connection line of each laser point includes: in the one frame of line laser data, there are drops and rises in the connection line of each laser point, and the number of alternating appearances is at least twice; in the one frame of line laser data, there are at least two drops and at least one rise in the connection line of each laser point; in the one frame of line laser data, there are at least two rises and at least one drop in the connection line of each laser point; wherein, 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 connection line of each laser point presents multiple convexities and multiple concavities. Based on this, the preset form can be judged using the direction of the connection line of each laser point and the height change information of the connecting laser points.
[0015] Furthermore, the larger the height difference to be determined is, the more times the connection line of each laser point in a frame line laser data jumps in the vertical direction of the central axis of the body within a detection width; the smaller the height difference to be determined is, the fewer times the connection line of each laser point in the same frame line laser data jumps in the vertical direction of the central axis of the body within a detection width; the number of jumps is the sum of the number of rises and the number of falls of the connection line of each laser point in the same frame line laser data, or the number of jumps is the sum of the number of convexities and the number of concavities of the connection line of each laser point in the same frame line laser data. In summary, when the height difference to be determined is greater than the preset carpet height difference threshold, the connection line of each laser point presents multiple rises and multiple falls within a detection width; when the height difference to be determined is less than or equal to the preset carpet height difference threshold, the connection line of each laser point presents at most one rise and / or at most one fall within the same detection width. Improve the accuracy of carpet identification by the line segment trend corresponding to the height change trend of the connection line of each laser point. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 An embodiment of the present application discloses a flow chart of a walking surface recognition method based on line laser data.
[0017] 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.
[0018] 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.
[0019] 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
[0020] 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.
[0021] This embodiment discloses a walking surface recognition method based on line laser data. The execution subject of the walking surface recognition method is a robot. The robot involved may be a sweeping robot, and may have any suitable shape, such as a shell with a more traditional round body or a triangular body. A line laser sensor is installed on the robot. The line laser sensor is specifically assembled on the front side of the shell of the robot. The number of line laser sensors may be one or more, and this embodiment does not limit the number of line laser sensors.
[0022] The line laser sensor includes a line laser emitter and an infrared camera. The line laser sensor is used to emit a line laser obliquely downward along the walking direction of the robot. In essence, the line laser emitter emits a line laser toward the walking surface of the robot, and can emit a column of infrared lasers, which can be regarded as composed of projected light spots of multiple light beams, so that the walking surface in front of the robot is illuminated by the laser beam to form a detection surface. Among them, the emission angle of the line laser can be 15 degrees, 30 degrees, 45 degrees, 60 degrees, etc. with the horizontal direction. This embodiment does not limit the angle obliquely downward in the walking direction or the value of the emission angle of the line laser. The line laser emitter is configured to illuminate a width area larger than the width of the robot, forming a bright section or a light strip on the walking surface.
[0023] The line laser sensor is also used to collect laser points formed by the reflection of the line laser on the walking surface. In essence, the infrared camera collects images of the laser points formed by the reflection of the line laser on the walking surface, 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. Each frame of line laser data includes about 130 laser points. 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 the memory together with the computer program. 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.
[0024] Indicatively, Figure 2 The circular robot 101 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 sensor of the circular robot 101, and the light strip or bright area formed by the emission of the line laser sensor installed on the robot 101 is represented as a line segment 102, which is located on the surface of the carpet 103 and is actually composed of multiple discrete light spots. The extension direction of the line segment 102 is regarded as perpendicular to the walking direction of the robot.
[0025] The walking surface recognition method comprises: The robot collects a frame of line laser data through a line laser sensor, and then extracts the height value of each laser point in the frame of line laser data. At the same time, it is also necessary to detect each laser point in the frame of line laser data, including detecting the height of each laser point and the connection between two adjacent laser points. Then, the absolute value of the height difference between two adjacent laser points is accumulated to obtain the height difference accumulation value, so as to quantitatively describe the jump degree of the connection line of each laser point in the same frame of line laser data, including describing the number of jumps, where the number of jumps includes the number of rises and falls of the connection line of two adjacent laser points; by counting the number of rises and falls, the height difference of multiple pairs of adjacent laser points is accumulated to obtain the height difference accumulation value; the height difference accumulation value can also represent the height flatness of the connection line of each laser point in the frame of line laser data.
[0026] The area covered by a frame of line laser data may be a walking surface within the detection space of the line laser sensor. The walking surface may include carpets and other detection surfaces, or the walking surface may be a carpet.
[0027] In the same frame of line laser data, the order of each laser point or the distance between laser points determines multiple adjacent point clouds of a laser point. A laser point and its multiple adjacent point clouds form a continuous bending line. 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 multiple laser points.
[0028] In the floor scene, in the frame of line laser data, the number of laser points at different heights through which the connecting line passes 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 connecting line of multiple laser points formed by reflection may be smoothly changed from low to high (a laser point with a smaller height jumps to a laser point with a larger height), or slowly changed from high to low (a laser point with a larger height jumps to a laser point with a smaller height), so that the accumulated value of the height difference accumulated within a horizontal detection range of the line laser is relatively small.
[0029] In the work scene of laying carpet, in the one frame of line laser data, the connecting line passes through multiple laser points at different heights, and the height of the laser point keeps changing rapidly, that is, there are multiple rises and multiple falls, causing it to jump through different heights, wherein the number of rises and falls are both greater than the corresponding number of changes of the connecting lines of the laser points in the work scene without laying carpet, so that the accumulated value of the height difference accumulated within the same horizontal detection range is greater than the accumulated value of the height difference accumulated in the work scene of the floor.
[0030] Then, it is determined whether the height difference accumulation value calculated by the robot is less than the reference height difference accumulation threshold. In this embodiment, the reference height difference accumulation threshold is set at the recognition threshold of the carpet and the floor at the height difference accumulation value level.
[0031] When the accumulated value of the height difference calculated by the robot is less than the reference height difference accumulation threshold, the robot identifies its walking surface as including the floor, and the connecting line of each laser point distributed in the one frame of line laser data is within a detection width limited by the line laser. Since the floor surface is flat and smooth, the accumulated value of the height difference calculated by the robot is relatively small, and there is almost no height difference between any two laser points.
[0032] When the accumulated height difference value calculated by the robot is greater than or equal to the reference height difference cumulative threshold, if it is detected that the lines connecting the laser points in the one frame of line laser data present a preset shape, the robot identifies the walking surface as including a carpet; it can be understood that in some embodiments, when the robot does not compare the accumulated height difference value calculated with the reference height difference cumulative threshold, but only detects that the lines connecting the laser points in the one frame of line laser data present a preset shape, the robot may also identify the walking surface as including a carpet.
[0033] The connecting lines of the laser points distributed in the one frame of line laser data are within the same detection width defined by the line laser. Since the surface of the carpet is uneven, the accumulated value of the height difference calculated by the robot is relatively large, and the connecting lines of the laser points present a preset shape, and there is a height difference between two relatively close laser points. In some embodiments, when the robot detects that the connecting lines of the laser points present a preset shape, the robot identifies the carpet. Specifically, if a bright section detected in the captured one frame of laser image is composed of straight and multiple irregularly rising and falling line segments connected in sequence, it is determined that the connecting lines of the laser points in the currently collected one frame of line laser data present a preset shape.
[0034] Compared with the prior art, this embodiment detects each laser point only through one frame of line laser data. When the accumulated value of the height difference calculated by the height information of the laser point is less than the reference height difference accumulated threshold, it is identified as including the floor from the walking surface, and the carpet is identified from the walking surface when the line connecting each laser point meets the preset shape, thereby using one frame of line laser data to distinguish between the floor and the carpet on the walking surface of the robot, thereby improving the carpet recognition accuracy and recognition efficiency.
[0035] Compared with the prior art that performs feature matching and recognition based on multiple frames of images, the computing power and time consumed are less, so this embodiment uses less computing power to quickly and effectively distinguish carpets from walking surfaces (detection surfaces that can be easily misjudged) from walking surfaces, prevents carpets from being misidentified, and further avoids the robot from climbing on the carpet after misidentifying the carpet as an obstacle, thereby expanding the robot's recognition range of walking surfaces.
[0036] It should be noted that in order to use line laser to identify carpets, this embodiment needs to analyze the characteristics of line laser point cloud data in different scenarios. When connecting two adjacent laser points, for example, when the frame of line laser data comes from flat ground or plane reflection, the height difference between the laser points is very small, basically a straight line, which is not shown in the figure. If the line segment formed by the laser points appears as a plane that is short on the left and high on the right, the frame of line laser data may come from a bump or uneven ground.
[0037] When the robot uses a line laser to scan an obstacle, within the detection range of the line laser, the point cloud height of the obstacle area will become higher, and 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, specifically a protruding part of a line segment.
[0038] The carpet described in this embodiment is a broad concept and can be understood as a floor material or ground medium different from hard materials such as wooden floors and tiles, such as short-hair carpets, long-hair carpets, plush carpets, etc. During the cleaning process, the robot involved in this embodiment can use one of the sweeping mechanism or the mopping mechanism or both to contact the cleaning ground to clean the cleaning surface.
[0039] 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 tortuous and uneven connection line shown is consistent with the preset shape. This embodiment identifies the tortuous and uneven connection line by executing the walking surface recognition method, and then different action configurations can be made according to the scene, including but not limited to climbing onto the carpet, walking along the edge of the carpet, avoiding the carpet and other different operations, to achieve better cleaning effect and cleaning planning.
[0040] It is worth noting that in this embodiment, the robot detects that the connection line of each laser point presents a preset form, which specifically takes into account: For the characteristics of the laser point connection lines collected in carpet and other scenes, the main differences 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 spatial range detected by the same line laser sensor, the connection line of each laser point reflected back 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 back 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, it can be inferred that after all the height differences of adjacent laser points in a frame of line laser data reflected back from the carpet surface are accumulated, the accumulated result is particularly large, greater than a certain threshold, so that the carpet can be identified.
[0041] However, the above embodiment is only applicable to distinguishing the floor plane from the carpet, because the accumulated height difference of adjacent laser points in a frame of line laser data reflected from the floor plane is particularly small, and is significantly smaller than that of the carpet surface. Figure 4It can be seen that, since obstacles will also increase the height of the laser points of some line laser data, the line laser will rise and fall as the contour of the obstacle changes, and the height difference formed by a single rise and a single fall is relatively large, which will also cause the accumulated value of the height difference to become larger; 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 will be relatively different from the point cloud height of the ground part, and within the same detection width of the line laser, the 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 for carpet recognition, the accumulated values of the height difference accumulated by the carpet surface and the obstacle surface will cause the accumulated value of the height difference 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, by comparing the height-related information, the points on the carpet cannot be effectively identified, which reduces the effect of carpet recognition and causes carpet misrecognition.
[0042] Therefore, in order to distinguish carpets, this embodiment identifies carpets and non-carpets by detecting whether the lines connecting the laser points in a frame of line laser data present a preset shape; in this embodiment, the preset shape specifically requires analyzing the height information of its laser points, including processing the height difference between two adjacent laser points and the accumulated result thereof, including filtering processing and corresponding threshold judgment, to obtain corresponding height flatness information, so as to improve the recognition accuracy of carpets.
[0043] Based on the foregoing embodiment, the walking surface recognition method also includes: when the accumulated value of the height difference calculated by the robot is greater than or equal to the reference height difference accumulated threshold, if it is detected that the line connecting the laser points in the one frame line laser data does not present a preset shape, the robot determines that there is an obstacle on its walking surface, wherein the height of the laser point reflected back from the surface of the obstacle is greater than the height of the laser point reflected back from the surface of the floor.
[0044] The height of the laser point reflected from the obstacle surface is generally greater than the height of the laser point reflected from the carpet surface, especially when the height of the obstacle contour relative to the surface undulation is greater than the height of the carpet nap. In addition, in some embodiments, the height of the obstacle point cloud at a lower height on the ground is very similar to the ground point cloud, but the height value cannot effectively distinguish the points of small obstacles from the points on the carpet. Therefore, it is necessary to further detect whether the connection line of each laser point in the one frame of line laser data presents a preset shape to improve the recognition accuracy.
[0045] It should be noted that the contour information of the object to be measured collected by the line laser sensor includes but is not limited to the shape and position of the line connecting each laser point, and each laser point is the result of the positioning of the line laser reflected light on the walking surface. Optionally, the robot connects the pixel coordinates of the reflected light to obtain the contour information of the object to be measured.
[0046] In some embodiments, when there are no obstacles or carpets in the walking direction of the robot, the connecting line of the laser points collected by the line laser sensor should be flat and smooth; when there are obstacles or carpets in the walking direction of the robot, the contour information also includes the number of bumps and concavities, and the number of bumps and concavities of the laser point connecting line formed by the obstacle and the carpet reflection is different. Based on this, the robot can determine whether there is an obstacle or carpet in the walking direction by the contour bump frequency. In this embodiment, the contour bump frequency is represented by the number of rises and falls of the laser point connecting line. The number of rises of the laser point connecting line represents the number of times the connecting line of two adjacent laser points rises, and the number of falls of the laser point connecting line represents the number of times the connecting line of two adjacent laser points falls. Every rise or fall 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 walking surface is accumulated. Therefore, in this embodiment, the cumulative value of the height difference is used to describe the number of rises or falls of the connecting line of two adjacent laser points to distinguish obstacles and carpets, and specifically perform threshold judgment to achieve the determination that the contour indicated by the contour information is an obstacle contour when it is less than a certain threshold, and the determination that the contour indicated by the contour information is a carpet contour when it is greater than a certain threshold.
[0047] In some embodiments, the robot extracts each laser point from the one frame line laser data, and connects each laser point in turn, so that the formed connection line is continuous and uninterrupted, and passes through laser points at different heights to produce a certain number of jumps.
[0048] As an embodiment, in the frame of line laser data, the robot connects each laser point in turn, and then calculates the total length of the lines connecting each laser point. Specifically, this embodiment is along a direction perpendicular to the central axis of the body, and the distances between the coordinates of two adjacent laser points are accumulated and calculated in turn to obtain the total length of the lines connecting each laser point, and the total length is marked as the height connection line length; wherein, the length of the line connecting two adjacent line laser points is the distance between the coordinates of the two adjacent line laser points, and the total length of the lines connecting each laser point is obtained by accumulating the distances between the coordinates of the two adjacent line laser points in turn.
[0049] When the accumulated height difference calculated by the robot 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, and the robot records the calculated height connection line length as the ground surface height connection line length; it can be understood that when the height connection line length calculated by the robot is less than the preset connection line length threshold, if the accumulated height difference calculated by the robot is less than the preset carpet height difference 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 calculated height connection line length as the ground surface height connection line length. Thus, the height connection line length is used to eliminate the interference of the floor before the carpet is recognized on the walking surface.
[0050] When the height difference accumulated value calculated by the robot is greater than or equal to the reference height difference accumulated threshold, the height connection line length calculated by the robot is greater than or equal to the preset connection line length threshold. It can be understood that when the height connection line length calculated by the robot is greater than or equal to the preset connection line length threshold, the robot may identify a carpet or an obstacle.
[0051] It should be noted that after the line laser is projected onto the surface of the floor, the height connection line length calculated by a frame of line laser data collected by the robot is recorded as the ground surface height connection line length, and the calculated height difference cumulative value is the ground surface height difference cumulative value; after the line laser is projected onto the surface of the carpet, the height connection line length calculated by a frame of line laser data collected by the robot is recorded as the carpet height connection line length, and the calculated height difference cumulative value is the carpet height difference cumulative value; after the line laser is projected onto the surface of the obstacle, the height connection line length calculated by a frame of line laser data collected by the robot is recorded as the obstacle height connection line length, and the calculated height difference cumulative value is the obstacle height difference cumulative value. Among them, the ground surface height difference cumulative value is less than the obstacle height difference cumulative value, and the carpet height difference cumulative value is greater than the ground surface height difference cumulative value.
[0052] Regarding the use of the length of the height connection line to distinguish between carpets, obstacles and floors, the premise is to use a frame of line laser data collected within the detection space range formed by the same line laser sensor; the line laser forms a bright section with a fixed detection width on the walking surface. The bright section is the projection area of the light strip extending in the vertical direction along the central axis of the machine body formed by the line laser projected on the walking surface. The detection width is the size occupied by the bright section in the vertical direction of the central axis of the machine body, which means the width irradiated by the line laser.
[0053] After the line laser is emitted to the carpet surface, in the frame of line laser data collected by the robot, the line connecting each laser point distributed within the same detection width is recorded as the carpet height connecting line, and the total length of each line segment connecting the carpet height connecting line is equal to the length of the carpet height connecting line. Since the carpet surface is uneven, the length of the carpet height connecting line is relatively long, and there is a height difference between two relatively close laser points.
[0054] After the line laser is emitted to the surface of the obstacle, in the frame of line laser data collected by the robot, the line connecting each laser point distributed within the same detection width is recorded as the obstacle height connecting line, and the total length of each line segment connecting the obstacle height connecting line is equal to the length of the obstacle height connecting line. Since the obstacle has an undulation relative to the ground, the number of undulations (number of jumps) on the obstacle surface is much greater than the number of undulations (number of jumps) on the carpet surface, and there is generally a large height difference between one or two pairs of adjacent laser points.
[0055] After the line laser is emitted to the floor surface, in the frame of line laser data collected by the robot, the line connecting each laser point distributed within the same detection width is recorded as the ground height connection line, and the total length of each line segment connecting the ground height connection line is equal to the length of the ground height connection line. Since the floor surface is flat and smooth, the length of the ground 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.
[0056] In order to further distinguish between carpets and obstacles, the robot takes the following approach: In the case where 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 one frame of line laser data does not present a preset shape, the robot recognizes an obstacle, and the robot records the height connection line length calculated by it as the obstacle height connection line length. In some embodiments, when the accumulated value of the height difference calculated by the robot is less than the reference height difference accumulated threshold, the line laser may be projected onto the surface of the obstacle, but the height connection line length calculated by the robot is not necessarily less than the preset connection line length threshold. If the connection line of each laser point in the one frame of line laser data does not present a preset shape, the robot recognizes an obstacle, and the height connection line length calculated by the one frame of line laser data collected by the robot is recorded as the obstacle height connection line length.
[0057] 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 lines of the laser points in the frame of line laser data present a preset shape, the robot recognizes a carpet, and the robot records the height connection line length calculated by the robot as the carpet height connection line length.
[0058] For a frame of line laser data collected within the same detection width, the distribution range of each extracted laser point is within the detection space range of the same line laser sensor. When viewed from the vertical direction of the central axis of the aircraft body, the span of each laser point along the vertical direction of the central axis of the aircraft body does not exceed the detection width. Based on this, the obstacle height connection line length and carpet height connection line length calculated within the detection space range of the same line laser sensor are both greater than the ground height connection line length. Therefore, the height connection line length is used to eliminate the interference of the floor before the carpet is recognized on the walking surface, and then the carpet and obstacles are distinguished using the preset form set in advance.
[0059] It can be seen that even if the floor surface and the obstacle surface have height increases and decreases, which is understood as a jump phenomenon, the number of jumps, the height of the jumps, and the probability of the jumps are far lower than the jumps produced on the carpet surface, forming a unique height unevenness feature of the carpet. Through this feature, the floor surface and even low obstacles can be excluded before the carpet is recognized on the walking surface. In this way, the carpet, floor, and obstacles can be distinguished using the accumulated value of the height difference.
[0060] As an example, see Figure 1 It can be seen that the walking surface recognition method includes the following steps: Step S1, the robot collects a frame of line laser data through a line laser sensor, and then extracts the height value of each laser point in the frame of line laser data, specifically extracts the laser point with the largest height value and the laser point with the smallest height value from the frame of line laser data; obtains the accumulated value of the height difference by accumulating the absolute values of the height difference between two adjacent laser points; the accumulated calculation in this embodiment is to calculate the absolute values of the height difference between two adjacent laser points in the frame of line laser data in turn, and obtain the accumulated value of the height difference by accumulating the absolute values of the height difference; then execute step S2.
[0061] Step S2, determine whether the height difference cumulative value calculated by the robot is less than the reference height difference cumulative threshold, if yes, execute step S3, otherwise execute step S4. The height difference cumulative value is used to describe the jump degree of each laser point connection line in the same frame line laser data, including describing the jump number, where the jump number includes the rise and fall times of the connection line of two adjacent laser points; by counting the rise and fall times, the height difference of multiple pairs of adjacent laser points is accumulated to obtain the height difference cumulative value; the height difference cumulative value can also represent the height flatness of the walking surface indicated by the connection line of each laser point in the frame line laser data.
[0062] Step S3: The robot identifies the walking surface as including the floor. In the floor scene, in the frame of line laser data, the number of laser points at different heights through which the connecting line passes may be small. For example, when the line laser is projected onto the surface of an obstacle at a certain height, the connecting line of multiple laser points formed by reflection may change smoothly from low to high (a laser point with a smaller height jumps to a laser point with a larger height), or slowly change from high to low (a laser point with a larger height jumps to a laser point with a smaller height), so that the accumulated value of the height difference accumulated within a horizontal detection range of the line laser is relatively small.
[0063] Step S4, in the one frame of line laser data, determine whether the connection line of each laser point presents a preset shape, if yes, execute step S6, otherwise execute step S5. In some embodiments, according to the relationship between the height difference between the laser point with the largest height value and the laser point with the smallest height value and the accumulated value of the height difference, detect whether the connection line of each laser point in the one frame of line laser data presents a preset shape.
[0064] Step S5, the robot determines that there is an obstacle on its walking surface. When there is an obstacle or carpet on the walking surface of the robot, the number of contour bumps of the laser point connection line formed by the obstacle and the carpet reflection is different, that is, the sum of the number of rising and falling times. Based on this, the contour bump shape of the carpet can be represented by a preset shape, and the number of contour bumps is measured and threshold judged by the accumulated value of the height difference, so that the robot can determine the difference between the obstacle and the carpet on the walking surface by the number of contour bumps. Among them, the height of the laser point reflected back by the obstacle surface is greater than the height of the laser point reflected back by the floor surface.
[0065] Step S6, the robot identifies the walking surface as including carpet. In the work scene where carpet is laid, in the one frame of line laser data, the connecting line passes through multiple laser points at different heights, and the height of the laser point keeps changing rapidly, that is, there are multiple rises and multiple falls, so that it jumps through different heights, wherein the number of rises and falls are both greater than the corresponding number of changes of the connecting line of each laser point in the work scene where carpet is not laid, so that the accumulated value of the height difference accumulated within the same horizontal detection range is greater than the accumulated value of the height difference accumulated in the work scene of the floor, and the direction of the connecting line of each laser point is closer to the preset form relative to the direction of the connecting line of each laser point in the obstacle detection scene.
[0066] Preferably, when the robot determines that there is an obstacle on its walking surface, the height of the laser point reflected from the obstacle surface is generally greater than the height of the laser point reflected from the carpet surface, especially when the height of the obstacle contour relative to the surface undulation is greater than the height of the carpet fluff. In some embodiments, the height of the obstacle point cloud at a lower height on the ground is very similar to the ground point cloud, but the height value cannot effectively distinguish the points of the small obstacle from the points on the carpet. Therefore, it is necessary to further detect whether the connection line of each laser point in the one frame of line laser data presents a preset shape to improve the recognition accuracy.
[0067] Specifically, the method of detecting that the connection line of each laser point in the one frame of line laser data presents a preset shape includes: The robot collects a frame of line laser data through a line laser sensor, and then extracts the height value of each laser point in the frame of line laser data, and determines the laser point with the largest height value and the laser point with the smallest height value; the robot screens out the laser point with the largest height and the laser point with the smallest height, and can determine the height difference between the laser point with the largest height and the laser point with the smallest height in advance; wherein, the various laser points extracted from the frame of line laser data are distributed in the vertical direction of the robot's body central axis and are located in front of the robot; it can be understood that the various laser points extracted from a frame of line laser data are separated on both sides of the robot's body central axis.
[0068] Then, the robot calculates the absolute value of the height difference between two adjacent laser points in the frame line laser data in turn, and obtains the accumulated value of the height difference by accumulating the absolute value of the height difference, so as to quantify the jump state of the connection line of each laser point in the same frame line laser data, including describing the number of rises or falls of the connection line of two adjacent laser points, or understanding it as the number of convexities and concavities of the connection line of each laser point within the same detection width of the line laser; therefore, the present embodiment uses the accumulated value of the height difference to represent the jump frequency of the connection line of each laser point, and the greater the jump frequency of the connection line of each laser point (the number of jumps of the connection line of laser points within the same unit width), the greater the accumulated value of the height difference; the smaller the jump frequency of the connection line of each laser point (the number of jumps of the connection line of laser points within the same unit width), the smaller the accumulated value of the height difference.
[0069] In this embodiment, in the same frame 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. 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.
[0070] Then, based on the relationship between the height difference between the laser point with the largest height value and the laser point with the smallest height value and the accumulated value of the height difference, it is detected whether the connecting line of each laser point in the one frame of line laser data presents a preset shape; when the robot detects that the connecting line of each laser point in the one frame of line laser data presents a preset shape, the robot identifies its walking surface as including a carpet.
[0071] The highest point in the one frame of line laser data is the laser point with the highest height, and the lowest point in the one frame of line laser data is the laser point with the lowest height. In this embodiment, the laser point with the largest height value and the laser point with the smallest height value are both a pair of laser points with extreme heights on the walking surface.
[0072] The height difference between the laser point with the largest height value and the laser point with the smallest height value in the one frame line laser data forms a height error factor that affects the distinction between obstacles and carpets in this embodiment, that is, the height value of the laser point with the largest height value and the height value of the laser point with the smallest height value become a pair of height values that have the largest influence on the calculated height difference cumulative value, so that: whether in the working scene of detecting carpets or the working scene of detecting obstacles, the height difference between the laser point with the largest height value and the laser point with the smallest height value occupies a relatively large proportion in the process of calculating the height difference cumulative value, so that the height difference cumulative value calculated for obstacles and carpets with originally different contour shapes is the same. Therefore, it is necessary to detect the connection line of each laser point on the basis of considering the relationship between the height difference between the laser point with the largest height value and the laser point with the smallest height value and the height difference cumulative value, so as to achieve the distinction between carpets and obstacles after offsetting the influence of the height difference between the laser point with the largest height value and the laser point with the smallest height value, and avoid misidentification of carpets.
[0073] In the above embodiment, the method for detecting whether the line connecting each laser point in the one frame line laser data presents a preset shape according to the relationship between the height difference between the laser point with the largest height value and the laser point with the smallest height value and the accumulated value of the height difference includes: After calculating the height difference cumulative value in a frame of line laser data, the height difference between the highest point and the lowest point in the frame of line laser data is controlled to be subtracted from the height difference cumulative value, and the difference obtained is the height difference value to be determined; wherein, the highest point in the frame of line laser data is the laser point with the largest height value, and the lowest point in the frame of line laser data is the laser point with the smallest height value. Thus, the laser points with extreme heights on the surface of the object to be measured are filtered out (which can be understood as filtering out points with large fluctuations), so that the height difference value to be determined quantitatively describes the jump state of the connection line of each laser point in the same frame of line laser data on the basis of offsetting the influence of the height difference between the highest point and the lowest point; wherein, the highest point in the frame of line laser data is the laser point with the largest height, and the lowest point in the frame of line laser data is the laser point with the smallest height, both of which indicate that the surface of the object to be measured has laser points with extreme heights.
[0074] Then, it is determined whether the height difference value to be determined is greater than the preset carpet height difference threshold value. If so, it is determined that the robot recognizes the carpet and determines that the line connecting the laser points in the one frame of line laser data presents a preset shape, and determines that the height difference cumulative value is greater than or equal to the reference height difference cumulative threshold value; otherwise, it is determined that the robot recognizes the obstacle and determines that the line connecting the laser points in the one frame of line laser data does not present a preset shape, and the height difference cumulative value may be greater than or equal to the reference height difference cumulative threshold value. Therefore, this embodiment realizes the detection of whether each laser point presents a preset jump state according to the size relationship between the height difference between the laser point with the largest height and the laser point with the smallest height and the height difference cumulative value.
[0075] In some embodiments, when the height difference value to be determined is greater than a preset carpet height difference threshold, it indicates that each laser point detected on the basis of filtering the laser points with extreme heights is in a preset jump state, which can be understood as confirming that each laser point in a frame of line laser data keeps jumping, so that the accumulated height difference cumulative value, after offsetting the influence of the height difference between the highest point and the lowest point, is represented by the height difference value to be determined. The accumulated height difference accumulated by the jumps of the remaining laser points except the highest point and the lowest point, since it can be understood that the remaining laser points except the highest point and the lowest point keep jumping, including the line between two adjacent laser points showing random rise and fall, the number of rises and the number of falls accumulate a sufficiently large height difference cumulative value or a height difference value to be determined, so 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 walking surface.
[0076] In some embodiments, when the height difference value to be determined is less than or equal to a preset carpet height difference threshold, it indicates that the connection line of each laser point detected on the basis of filtering the laser points with extreme heights is not in a preset form. It can be understood that in one frame of line laser data, the connection line of each laser point other than the highest point and the lowest point is not continuously fluctuating (continuously changing into concave and convex multiple times), so that the accumulated height difference cumulative value, after offsetting the influence of the height difference between the highest point and the lowest point, is represented by the height difference value to be determined. The accumulated height difference value accumulated by the jump of each laser point other than the highest point and the lowest point is represented by the height difference value to be determined. Since it can be understood that the laser points other than the highest point and the lowest point do not jump all the time or only bulge once, and the change frequency is relatively low, the jump times of this embodiment accumulate a 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 an obstacle in the walking surface.
[0077] In summary, the aforementioned embodiment detects whether the connection line of each laser point presents a preset shape according to the relationship between the height difference between the laser point with the highest height and the laser point with the lowest height and the accumulated value of the height difference, so that the accumulated accumulated value of the height difference, after offsetting the influence of the height difference between the highest point and the lowest point, quantitatively describes the jump state of the connection line of each laser point in the same frame line laser data; when the height difference value to be determined is greater than or equal to the preset carpet height difference threshold, it is determined that the connection line of each laser point presents a continuous ups and downs change state; when the height difference value to be determined is less than the preset carpet height difference threshold, it is determined that the connection line of each laser point presents a relatively small number of ups and downs change states (for example, one to two times), so as to determine that the robot distinguishes between carpets and obstacles in the walking surface, and also prevent misidentification of carpets.
[0078] Specifically, the method of sequentially calculating the absolute values of the height differences between two adjacent laser points in the frame line laser data, and obtaining the height difference accumulated value by accumulating the absolute values of the height differences includes: Step A, among the laser points extracted from a frame of line laser data, traverse an adjacent laser point from the laser point closest to one end of the bright section in the vertical direction of the central axis of the body, and then calculate the absolute value of the height difference between the two adjacent laser points to obtain the height difference cumulative value; then execute step B. Among the laser points extracted from the frame 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. 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, and 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 an adjacent laser point, and then calculate the absolute value of the height difference between the currently traversed laser point and the starting search point to obtain the height difference cumulative value.
[0079] Step B, starting from the most recently traversed laser point in step A, traverse an adjacent laser point that does not participate in the calculation of the absolute value of the height difference, and then calculate the absolute value of the height difference between the two adjacent laser points traversed successively, and then add the accumulated value of the height difference calculated in step A to the absolute value of the height difference calculated currently 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; and then execute step C.
[0080] Step C, repeating step B until all laser points extracted from a frame 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.
[0081] The present embodiment executes the aforementioned steps A to C, and accumulates the absolute values of the height differences between two laser points in a frame of line laser data by calculating the absolute values of the height differences and accumulating the calculations, and accumulates the height differences between the laser points in a frame of line laser data, and then configures the height difference accumulated value updated for the last time to be used for subtracting the height difference between the highest point and the lowest point in the frame of line laser data, so as to detect whether the connecting line of each laser point presents a preset shape.
[0082] In this embodiment, a line laser is projected onto the surface of the object to be measured to form a bright section extending in a direction perpendicular to the central axis of the body. The laser points formed by the reflection of the bright section constitute the frame of line laser data. In the frame of line laser data, the height of each laser point is the height of the laser point from the ground.
[0083] Preferably, the laser points extracted from a frame of line laser data do not include the laser points distributed at the edge of the bright section, so as to retain the laser points with larger fluctuations, and determine 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 among the laser points extracted from a frame of line laser data, thereby overcoming the error caused by the excessive jump amplitude of the laser points distributed at the edge of the bright section.
[0084] Assume that four laser points A1, B1, C1, and D1 are extracted from a frame of line laser data. The four laser points A1, B1, C1, and D1 are distributed in sequence along the vertical direction of the robot's body axis, and the traversed heights are hA1, hB1, hC1, and hD1, respectively, where laser point A1 is the starting search point; the four laser points A1, B1, C1, and D1 are arranged in sequence, and 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. 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 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 two pairs of adjacent laser points.
[0085] Schematically, if hA1>hB1>hC1>hD1, then abs(hA1-hB1)+abs(hB1-hC1)+abs(hC1-hD1) is equal to hA1-hD1, and it is also determined that the height difference between the highest point and the lowest point is equal to hA1-hD1; then the height difference cumulative value minus the height difference between the highest point and the lowest point is controlled to be equal to the height difference value to be determined, that is, the value 0, then the accumulated height difference cumulative value after offsetting the influence of the height difference between the highest point and the lowest point, the calculated height difference value to be determined is equal to the value 0, which is less than the preset carpet height difference threshold, indicating that the line connecting the four laser points A1, B1, C1, and D1 is relatively smooth and in an ascending state, then the carpet is not identified, but the walking surface can be identified as having an obstacle, and the line connecting the four laser points A1, B1, C1, and D1 represents a partial contour line of the currently identified obstacle.
[0086] Schematically, if hA1>hB1 <hc1>hD1, then abs(hA1-hB1)+abs(hB1-hC1)+abs(hC1-hD1) is equal to hA1+2hC1-2hB1-hD1, and it is also determined that the height difference between the highest point and the lowest point is equal to hC1-hB1; then the height difference accumulated value minus the height difference between the highest point and the lowest point is controlled to be equal to the height difference value to be determined, that is, hA1+hC1-hB1-hD1, which is greater than the preset carpet height difference threshold, indicating that the line connecting the four laser points A1, B1, C1, and D1 is tortuous and uneven, and from laser point A1 to laser point D1, the two adjacent laser points maintain a jumping state, and the jumping speed is faster than the laser point jumping speed when hA1>hB1>hC1>hD1, then the carpet is identified, and the line connecting the four laser points A1, B1, C1, and D1 represents a partial contour line of the currently identified carpet surface.
[0087] 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 a frame of line laser data collected by 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 a frame of line laser data collected by 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 filtering the laser points with extreme heights on the surface of the object 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.
[0088] 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.
[0089] As an embodiment, the preset form of the connection line of each laser point includes: in the one frame of line laser data, there are alternating drops and rises in the connection line of each laser point, and the number of alternating occurrences is at least twice. Schematically, Figure 3 As shown by four sequentially connected broken line segments framed by the dotted frame P1.
[0090] In the frame of line laser data, there are at least two rises and at least one fall in the line connecting each laser point, which can be presented as at least two rises first and then at least one fall. Schematically, as shown in FIG. Figure 3 As shown by three sequentially connected broken line segments framed by the dotted frame P2.
[0091] In the frame of line laser data, there are at least two drops and at least one rise in the line connecting the laser points, which can be presented as at least two drops first and then at least one rise. Schematically, as shown in FIG. Figure 3 As shown by three sequentially connected broken line segments framed by the dotted frame P3.
[0092] 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 connection line of each laser point rises and falls multiple times. In the case where the connection line of each laser point rises and falls multiple times within a detection width, it can be determined that the connection line of each laser point presents a preset shape. Based on this, the preset shape can be judged using the direction of the connection line of each laser point and the height change information of the connecting laser points.
[0093] In the frame of line laser data, if there is at most one drop and at most one rise in the line connecting each laser point within the same detection width, it is determined that the frequency of rise or the frequency of drop is relatively low, and it can be judged that the line connecting each laser point does not present a preset form. The robot can identify non-carpet objects from the walking surface, and non-carpet objects include obstacles, without making specific restrictions on the height of obstacles.
[0094] When the height difference value to be determined is less than or equal to the preset carpet height difference threshold, the line connecting the laser points within the same detection width rises at most once (the probability of the line rising is less than the probability corresponding to the case where the height difference value to be determined is greater than the preset carpet height difference threshold), and / or falls at most once (the probability of the line falling is less than the probability corresponding to the case where the height difference value to be determined is greater than the preset carpet height difference threshold).
[0095] Therefore, when the height is used to describe the trend of the connection line of each laser point, the present embodiment accumulates the height difference of the surface of the object to be measured every time it rises or falls, and the number of rises or falls of the connection line of two adjacent laser points can be represented by the accumulated value of the height difference. The number of rises and the number of falls are collectively referred to as the number of jumps. When the height difference between two adjacent laser points is not large, the greater the number of jumps, the greater the accumulated value of the height difference, based on which the carpet can be identified. Of course, the height difference between the laser point with the highest height and the laser point with the lowest height has the greatest impact on it, and needs to be offset to avoid misidentification of the carpet.
[0096] 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 the connection line of each laser point in the frame of line laser data has multiple jumps or multiple fluctuations. The drop and rise are generally determined based on the connection line of two adjacent laser points. The drop and rise can be combined and connected into two forms of convex and concave in the connection line of each laser point. The slope of the connection line of two laser points can be used to distinguish them numerically.
[0097] 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.
[0098] In some embodiments, the robot can count the number of protrusions in the line connecting each laser point in the frame 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.
[0099] On the basis of the foregoing embodiment, the larger the height difference to be determined is, the more times the lines connecting the laser points in a frame of line laser data jump in the vertical direction of the central axis of the body within a detection width, so that the lines connecting the laser points show multiple rises and multiple falls, but not necessarily continuous multiple rises or continuous multiple falls. More often, the rises and falls occur randomly, and the jumping frequency of the lines connecting the laser points is relatively large.
[0100] The smaller the height difference to be determined is, it means that within a detection width, the number of jumps of the lines connecting the laser points in the same frame line laser data in the vertical direction of the central axis of the body is small, so that the lines connecting the laser points rise at least once, or fall at least once, or extend in a straight line along a single direction, wherein the rising and falling speeds are relatively small, that is, the jumping speed of the lines connecting the laser points is relatively small.
[0101] The jump number is the sum of the rising and falling times of the connecting line of each laser point in the same frame 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 same frame 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 line segment trend form.
[0102] Combination Figure 3 and Figure 4 It can be seen that although the two lines connected by the laser points in a frame of line laser data also rise and fall in different detection scenes, the line connecting the laser points formed by the line laser in the scene of detecting obstacles will have one rise and one fall; while the line connecting the laser points formed by the line laser in the scene of detecting carpets is constantly rising and falling, that is, there are multiple rises and multiple falls, and the laser points have multiple height jumps. In this way, 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 of the object to be detected where the height jump occurs.
[0103] 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 rises and multiple falls within one 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 rise and / or at most one fall within the same detection width. This improves the accuracy of carpet identification through the line segment trend corresponding to the height change trend of the line connecting each laser point.
[0104] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0105] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0106] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
Claims
1. A walking surface recognition method based on line laser data, characterized in that: A line laser sensor is installed on the robot, and the robot moves on the walking surface; the line laser sensor is used to emit a line laser obliquely downward along the walking direction of the robot, and the line laser sensor is also used to collect laser points formed by the reflection of the line laser on the walking surface; The walking surface recognition method comprises: The robot collects a frame of line laser data through a line laser sensor, extracts the height value of each laser point in the frame of line laser data, and then accumulates the absolute value of the height difference between two adjacent laser points to obtain the accumulated value of the height difference; Determine whether the accumulated height difference value calculated by the robot is less than the reference height difference accumulation threshold; When the accumulated height difference value calculated by the robot is less than the reference accumulated height difference threshold, the robot recognizes its walking surface as including the floor; When the accumulated height difference value calculated by the robot is greater than or equal to the reference height difference accumulation threshold, if it is detected that the connection line of each laser point in the frame line laser data presents a preset shape, the robot recognizes its walking surface as including a carpet.
2. The walking surface recognition method according to claim 1, characterized in that: The walking surface recognition method also includes: when the accumulated value of the height difference calculated by the robot is greater than or equal to the reference height difference accumulated threshold, if it is detected that the line connecting the laser points in the frame line laser data does not present a preset shape, the robot determines that there is an obstacle on its walking surface, wherein the height of the laser point reflected back from the surface of the obstacle is greater than the height of the laser point reflected back from the surface of the floor.
3. The walking surface recognition method according to claim 2, characterized in that: In the one frame of line laser data, the robot connects each laser point in turn, calculates the total length of the lines connecting each laser point, and marks the total length as the height connection line length; When the accumulated value of the height difference calculated by the robot 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, and the robot records the height connection line length calculated by the robot as the surface height connection line length; When the accumulated value of the height difference calculated by the robot 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.
4. The walking surface recognition method according to claim 3, characterized in that: 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 one frame of line laser data does not present a preset shape, the robot recognizes an obstacle, and the robot records the height connection line length calculated by the robot as the obstacle height connection line length; 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 frame of line laser data presents a preset shape, the robot recognizes a carpet, and the robot records the height connection line length calculated by the robot as the carpet height connection line length.
5. The walking surface recognition method according to claim 2, characterized in that: The method for detecting that the connection line of each laser point in the one frame of line laser data presents a preset shape comprises: The robot collects a frame of line laser data through a line laser sensor, extracts the height value of each laser point in the frame of line laser data, and determines the laser point with the largest height value and the laser point with the smallest height value; Then, in the frame line laser data, the absolute values of the height differences between two adjacent laser points are calculated in sequence, and the height difference accumulated value is obtained by accumulating the absolute values of the height differences; According to the relationship between the height difference between the laser point with the largest height value and the laser point with the smallest height value and the accumulated value of the height difference, detecting whether the connecting line of each laser point in the one frame line laser data presents a preset shape; When the robot detects that the line connecting the laser points in the frame of line laser data presents a preset shape, the robot recognizes the walking surface as including a carpet.
6. The walking surface recognition method according to claim 5, characterized in that: The method for detecting whether the connection line of each laser point in the one frame line laser data presents a preset shape according to the relationship between the height difference between the laser point with the largest height value and the laser point with the smallest height value and the accumulated value of the height difference comprises: After calculating the height difference cumulative value in a frame of line laser data, control the height difference cumulative value to subtract the height difference between the highest point and the lowest point in the frame of line laser data, and the difference obtained is the height difference value to be determined; wherein the highest point in the frame of line laser data is the laser point with the largest height value, and the lowest point in the frame of line laser data is the laser point with the smallest height value; Then, it is determined whether the height difference to be determined is greater than a preset carpet height difference threshold. If so, it is determined that the robot has recognized the carpet and that the line connecting the laser points in the frame of line laser data presents a preset shape, and that the height difference cumulative value is greater than or equal to the reference height difference cumulative threshold.
7. The walking surface recognition method according to claim 6, characterized in that: The method of sequentially calculating the absolute values of the height differences between two adjacent laser points in the frame line laser data and obtaining the height difference accumulated value by accumulating the absolute values of the height differences comprises: Step A, among the laser points extracted from a frame of line laser data, traverse an adjacent laser point starting from the laser point closest to one end of the bright section in the vertical direction of the central axis of the body, and then calculate the absolute value of the height difference between two adjacent laser points to obtain the accumulated value of the height difference; then execute step B; Step B, starting from the most recently traversed laser point in step A, traverse an adjacent laser point that does not participate in the calculation of the absolute value of the height difference, and then calculate the absolute value of the height difference between the two adjacent laser points traversed successively, and 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; Step C, repeating step B until all laser points extracted from one frame 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; The line laser is projected onto the surface of the object to be measured to form a bright section extending in a vertical direction along the central axis of the robot body, and a laser point is formed by reflection of the bright section; the height of each laser point is the height of the laser point from the ground.
8. The walking surface recognition method according to claim 7, characterized in that: The laser points extracted from a frame of line laser data do not include the laser points distributed at the edge of the bright section, and it is determined 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 among the laser points extracted from a frame of line laser data.
9. The walking surface recognition method according to claim 6, characterized in that: The preset forms of the lines connecting the laser points include: In the one frame of line laser data, a line connecting each laser point has a falling and a rising alternately appearing, and the number of times of the alternating appearance is at least two; In the one frame of line laser data, there are at least two drops and at least one rise in the line connecting the laser points; In the one frame of line laser data, there are at least two rises and at least one fall in the line connecting the laser points; The height of the laser spot formed by the reflection of the line laser on the pile of the carpet is higher than the height of the laser spot formed by the reflection of the line laser in the gap between the pile of the carpet, so that the line connecting the laser spots presents multiple protrusions and multiple concavities.
10. The walking surface recognition method according to claim 9, characterized in that: The larger the height difference to be determined is, the more times the line connecting the laser points in a frame of line laser data jumps in the vertical direction of the central axis of the aircraft body within a detection width; The smaller the height difference to be determined is, the smaller the number of jumps of the line connecting the laser points in the same frame line laser data in the vertical direction of the central axis of the body is within a detection width; The jump number is the sum of the rising and falling times of the connecting line of each laser point in the same frame line laser data, or the jump number is the sum of the convexity and concaveity times of the connecting line of each laser point in the same frame line laser data.