Obstacle processing method and device, storage medium, and electronic device

By mapping laser point cloud data to a grid map and performing clustering, the problem of inaccurate obstacle type identification by mobile robots is solved, improving the accuracy of obstacle identification and cleaning efficiency.

CN117250944BActive Publication Date: 2026-06-09DREAM INNOVATION TECH (SUZHOU) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DREAM INNOVATION TECH (SUZHOU) CO LTD
Filing Date
2022-06-09
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Mobile robots have low accuracy in identifying obstacle types, which may cause them to run over items that should not be passed or ignore areas that should be cleaned.

Method used

By acquiring single-frame laser point cloud data collected by a laser sensor, mapping it to a target grid map, determining the type of each grid, and clustering grids that meet preset conditions, the obstacle type is determined based on the characteristics of the clusters.

Benefits of technology

This improves the accuracy of mobile robots in identifying obstacle types, ensuring that obstacles are correctly avoided and cleaning areas are properly covered.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117250944B_ABST
    Figure CN117250944B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an obstacle processing method and device, a storage medium and an electronic device. The obstacle processing method comprises: obtaining single-frame laser point cloud data collected by a laser sensor on a target region, wherein the laser sensor is arranged on a mobile robot; mapping the single-frame laser point cloud data to a target grid map to obtain a first grid, wherein each grid in the first grid has a point cloud in the single-frame laser point cloud data; determining the type of each grid in the first grid, and clustering a plurality of grids with the same type that meet a preset condition to obtain a target cluster; and determining the type of an obstacle corresponding to the point cloud in the plurality of grids included in the target cluster according to the features corresponding to the target cluster. The above technical solution solves the problem of low accuracy of the mobile robot in identifying the type of the obstacle.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This invention relates to the field of communications, and more specifically, to a method and apparatus for handling obstacles, a storage medium, and an electronic device. [Background Technology]

[0002] With the advancement of science and technology and the development of artificial intelligence, intelligent robots have been applied to various fields.

[0003] There are many types of mobile robots on the market, and their applications can assist users in handling various tasks. However, during their movement, mobile robots need to identify obstacles to avoid them. Currently, however, the obstacle identification process for mobile robots is not always very accurate, causing them to run over items they shouldn't be passing or to miss areas they should be cleaning.

[0004] There is currently no effective technical solution to the problem of low accuracy in identifying obstacle types by mobile robots in related technologies.

[0005] Therefore, it is necessary to improve the relevant technology to overcome the aforementioned defects. [Summary of the Invention]

[0006] This invention provides an obstacle handling method and apparatus, a storage medium, and an electronic device to at least address the problem of low accuracy in identifying obstacle types by mobile robots.

[0007] According to an embodiment of the present invention, an obstacle handling method is provided, comprising: acquiring single-frame laser point cloud data collected by a laser sensor on a target area, wherein the laser sensor is mounted on a mobile robot; mapping the single-frame laser point cloud data to a target grid map to obtain a first grid, wherein each grid in the first grid contains point clouds from the single-frame laser point cloud data; determining the type of each grid in the first grid, and clustering multiple grids of the same type that meet preset conditions to obtain a target cluster; and determining the obstacle type corresponding to the point clouds in the multiple grids included in the target cluster based on the features corresponding to the target cluster.

[0008] According to another embodiment of the present invention, an obstacle processing device is provided, comprising: an acquisition module for acquiring single-frame laser point cloud data collected by a laser sensor on a target area, wherein the laser sensor is mounted on a mobile robot; a mapping module for mapping the single-frame laser point cloud data to a target grid map to obtain a first grid, wherein each grid in the first grid contains point clouds from the single-frame laser point cloud data; a processing module for determining the type of each grid in the first grid and clustering multiple grids of the same type that meet preset conditions to obtain a target cluster; and a determination module for determining the obstacle type corresponding to the point clouds in the multiple grids included in the target cluster based on the features corresponding to the target cluster.

[0009] According to another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, wherein the computer program is configured to execute the above-described obstacle handling method when running.

[0010] According to another embodiment of the present invention, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the obstacle handling method through the computer program.

[0011] In this invention, a first grid is obtained by mapping the acquired single-frame laser point cloud data onto a target grid map. The type of each grid in the first grid is determined, and multiple grids of the same type that meet preset conditions are clustered. Then, based on the features corresponding to the target cluster, the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is determined. In this invention, because the obstacle type corresponding to the point cloud is determined on a grid-by-grid basis, the problem of low accuracy in obstacle type identification by mobile robots is solved, thus improving the accuracy of obstacle type identification by mobile robots. [Attached Image Description]

[0012] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0013] Figure 1 This is a hardware structure block diagram of a mobile robot for an obstacle handling method according to an embodiment of the present invention;

[0014] Figure 2 This is a flowchart of an obstacle handling method according to an embodiment of the present invention;

[0015] Figure 3This is a structural block diagram of an obstacle handling device according to an embodiment of the present invention.

Detailed Implementation Methods

[0016] The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the present application can be combined with each other.

[0017] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0018] The method embodiments provided in this application can be executed in a mobile robot or similar device. Taking operation on a mobile robot as an example, Figure 1 This is a hardware structure block diagram of a mobile robot for an obstacle handling method according to an embodiment of the present invention. Figure 1 As shown, a mobile robot may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. In one exemplary embodiment, the mobile robot may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile robot described above. For example, the mobile robot may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 Equivalent functions or ratios shown Figure 1 The functions shown have more different configurations.

[0019] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the obstacle handling method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile robot via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0020] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile robot's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0021] This embodiment provides a method for handling obstacles. This method can be applied to mobile robots, including but not limited to sweeping robots and transport robots.

[0022] Figure 2 This is a flowchart of an obstacle handling method according to an embodiment of the present invention, the process including the following steps:

[0023] Step S202: Acquire single-frame laser point cloud data of the target area collected by the laser sensor, wherein the laser sensor is mounted on the mobile robot;

[0024] As an optional example, the laser sensor described above includes, but is not limited to, linear laser sensors and area laser sensors. The target area is the area in front of the mobile robot. "In front" refers to the direction of movement of the mobile robot. The single-frame laser point cloud data includes multiple points. It should be noted that the points in this embodiment are points in three-dimensional space.

[0025] Step S204: Map the single-frame laser point cloud data to the target grid map to obtain a first grid, wherein each grid in the first grid contains the point cloud from the single-frame laser point cloud data;

[0026] It should be noted that the first grid contains the first number of grids containing the target.

[0027] As an optional example, the resolution of the target raster map can be 1cm*1cm. Different points in a single frame of laser point cloud data have different coordinates, and thus can be mapped according to the horizontal and vertical coordinates of the points. Therefore, points in a single frame of laser point cloud data can fall on different raster grids according to their coordinates. All raster grids on which the points in the single frame of laser point cloud data fall are determined as the first raster.

[0028] Step S206: Determine the type of each grid cell in the first grid, and cluster multiple grid cells of the same type that meet the preset conditions to obtain the target cluster;

[0029] As an optional example, determining the type of each grid cell in the first grid can be achieved by at least one of the following steps S21 to S24:

[0030] Step S21: Determine the highest and lowest heights of the point clouds in each grid cell, and calculate the height difference between the highest and lowest heights; determine the type of the grid cells whose height difference between the point clouds in the first grid cell is less than a first preset threshold as planar type;

[0031] As an optional example, the point cloud in each grid has multiple points. Since the height of each of these multiple points is known, the highest and lowest heights of the points in the point cloud can be determined, and the height difference between the highest and lowest heights can be calculated. If a grid has a point cloud height difference that is less than a first preset threshold, then this grid can be determined to be a planar type, i.e., a planar grid. This allows us to identify all planar grids in the first grid.

[0032] Step S22: Determine the density of the point cloud in each grid below a first preset height; determine the type of the grid in the first grid where the density of the point cloud below the first preset height is greater than a second preset threshold and the height of the point cloud is within a first preset range as a step type;

[0033] As an optional example, the density of the point cloud below the first preset height in the raster is obtained by dividing the number of points below the first preset height by the total number of points in the point cloud. Specifically, assuming a raster has 50 points, of which 45 points are below the first preset height, the density of the point cloud below the first preset height in this raster can be determined to be 45 / 50 = 0.9.

[0034] Optionally, the height corresponding to the point cloud is the average height or median height of the points in the point cloud. If the height corresponding to the point cloud is within a first preset range, then the point cloud is determined to conform to the step cross-sectional feature. That is, the type of the raster where the density of the point cloud below the first preset height is greater than a second preset threshold and the point cloud conforms to the step cross-sectional feature is determined as the step type, thereby identifying all raster types of the step type in the first raster. Optionally, the first preset height, the second preset threshold, and the first preset range are set by the developer. For example, the first preset height is 25mm, the second preset threshold is 0.85, and the first preset range is (5mm-25mm).

[0035] Step S23: Determine the slope corresponding to the point cloud in each grid, and determine the type of the grid whose slope corresponding to the point cloud in the first grid is within a second preset range as the slope type;

[0036] As an optional example, the slope of the point cloud can be calculated from the heights of multiple points included in the point cloud within the raster. If the slope of the point cloud is within a second preset range, the raster can be determined to be of the slope type, and thus all raster types within the first raster can be identified. Optionally, the second preset range can be (tan15°, tan65°).

[0037] Step S24: Determine the projection length of multiple points in the point cloud of each grid that have a height greater than the second preset height onto the horizontal plane; determine the grid in the first grid whose projection length is within the third preset range as the wall type.

[0038] As an optional example, if there are multiple points in the point cloud of a raster with a height greater than a second preset height, these multiple points are projected onto a horizontal plane to obtain the projection length. If the projection length is within a third preset range, then this raster can be determined to be a wall type, and thus all wall type rasteres in the first raster can be identified. Optionally, the first preset height and the second preset height can be equal or unequal.

[0039] As an optional example, steps S21, S22, S23, and S24 above are executed asynchronously.

[0040] As an optional example, clustering multiple rasters of the same type that meet preset conditions can be achieved through the following steps: S31, S32, S33, or S34.

[0041] Step S31: If there are two grids in the first grid that satisfy the first preset condition, cluster the two grids that satisfy the first preset condition. The first preset condition includes: the grids are all planar, the distance between the grids is less than a third preset threshold, and the difference in the average height of the point clouds between the grids is less than a fourth preset threshold. The preset condition includes the first preset condition.

[0042] As an optional example, if the distance between two grids is less than a third preset threshold (optionally, the distance can be determined based on the coordinates of the corresponding grids), then the two grids are considered adjacent. If two adjacent grids are both planar and the difference in the average height of the point clouds within the two grids is less than a fourth preset threshold, then these two grids can be clustered to obtain the target cluster. Optionally, if multiple pairs of grids satisfy the first preset condition exist within the first grid, then these multiple pairs of grids satisfying the first preset condition are clustered to obtain the target cluster.

[0043] Step S32: If there are two grids in the first grid that satisfy the second preset condition, cluster the two grids that satisfy the second preset condition, wherein the second preset condition includes: the grid type is step type, and the distance between the grids is less than a fifth preset threshold; the preset condition includes the second preset condition.

[0044] As an optional example, if there are multiple pairs of grids in the first grid that satisfy the second preset condition, then the multiple pairs of grids that satisfy the second preset condition are clustered to obtain the target cluster.

[0045] Step S33: If there are two grids in the first grid that satisfy the third preset condition, cluster the two grids that satisfy the third preset condition. The third preset condition includes: the grids are all of the slope type, the continuity of the point cloud between the grids is greater than the sixth preset threshold, and the difference in the slope of the point cloud between the grids is less than the seventh preset threshold. The preset condition includes the third preset condition.

[0046] As an optional example, if the continuity between two slope-type rasters is greater than a sixth preset threshold, and the difference in slope between the point clouds of the rasters is less than a seventh preset threshold, then these two rasters are considered part of a slope, and they are clustered. Optionally, if there are multiple pairs of rasters in the first raster that satisfy the third preset condition, and the continuity between any two adjacent rasters in these pairs is greater than the sixth preset threshold, and the difference in slope between the point clouds of the rasters is less than the seventh preset threshold, then these multiple pairs of rasters satisfying the third preset condition are clustered. Optionally, the continuity between rasters can be determined based on the coordinates corresponding to the two rasters.

[0047] Step S34: If there are two grids in the first grid that satisfy the fourth preset condition, cluster the two grids that satisfy the fourth preset condition, wherein the fourth preset condition includes: the grid type is wall type, and the distance between the grids is less than the eighth preset threshold; the preset condition includes the fourth preset condition;

[0048] As an optional example, if there are multiple pairs of grids in the first grid that satisfy the fourth preset condition, then the multiple pairs of grids that satisfy the fourth preset condition are clustered to obtain the target cluster.

[0049] Step S208: Determine the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster based on the features corresponding to the target cluster.

[0050] As an optional example, step S208 above can be implemented in one of the following ways: method one, method two, method three, or method four.

[0051] Method 1: If all grids in the target cluster are planar, the distance between the target cluster and the mobile robot is less than a ninth preset threshold, the number of grids included in the target cluster is within a fourth preset range, and the height corresponding to the target cluster is less than a tenth preset threshold, then the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is determined to be ground.

[0052] In other words, it is necessary to comprehensively determine whether the obstacle type corresponding to the point cloud of multiple grids in the target cluster is ground, based on the distance between the target cluster and the mobile robot, the number of grids in the target cluster, and the height of the target cluster. Optionally, the distance between the target cluster and the mobile robot can be determined by the coordinates of the grids in the target cluster.

[0053] Method 2: If all grids in the target cluster are of the step type, the ratio of the number of points representing the step type in the target cluster to the total number of points in the target cluster is greater than the eleventh preset threshold, the straightness of the step type point cloud in the target cluster is greater than the twelfth preset threshold, and the length corresponding to the step type point cloud exceeds the length of the mobile robot, then the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is determined to be a step, wherein the height of the point representing the step type is less than the first preset height;

[0054] In other words, for the target cluster, it is necessary to determine whether the points of the step type account for a high proportion, and to calculate the straightness and length of the point cloud representing the step type. If it meets the straightness condition, the length exceeds the fuselage, and the points of the step type account for a high proportion, then the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is considered to be a step.

[0055] Method 3: If all the grids in the target cluster are of the ramp type, determine that the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is ramp;

[0056] As an optional example, after determining that the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is a slope, the slope corresponding to the target cluster can also be determined according to the slope corresponding to the point cloud in the multiple grids; if the slope corresponding to the target cluster is less than a preset slope, the target area is determined as the area that the mobile robot is allowed to pass through.

[0057] It should be noted that the average slope of the point cloud across multiple grid cells can be used to determine the slope of the target cluster. The preset slope can be equal to one.

[0058] Method 4: If all grids in the target cluster are of the wall type and the number of points with heights within the sixth preset range in the fifth preset range of the target cluster is greater than the thirteenth preset threshold, then the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is determined to be a wall.

[0059] In other words, it is necessary to determine whether there are points with heights within a sixth preset range around the target cluster. If so, and the number exceeds a certain threshold, then the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is determined to be a wall. Optionally, the aforementioned sixth preset range is (4mm, 5mm).

[0060] Through steps S202-S208, the acquired single-frame laser point cloud data is mapped onto a target grid map to obtain a first grid. The type of each grid in the first grid is determined, and multiple grids of the same type that meet preset conditions are clustered. Then, based on the features corresponding to the target cluster, the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is determined. Since the obstacle type corresponding to the point cloud is determined on a grid-by-grid basis, the problem of low accuracy in obstacle type identification by mobile robots is solved, and the accuracy of obstacle type identification by mobile robots is improved.

[0061] As an optional example, after determining the type of each grid in the first grid, it is also necessary to determine whether there is a first target grid in the first grid, wherein the type of the first target grid is a wall type, and there are points in the point cloud of the first target grid with a height within a sixth preset range or a seventh preset range; and if there is a first target grid in the first grid, the obstacle type corresponding to the point cloud of the first target grid is determined to be a wall.

[0062] In other words, if the height of a point in a wall-type grid falls within the sixth or seventh preset range, then the obstacle type corresponding to the point cloud in the wall-type grid is determined to be a wall.

[0063] As an optional example, after determining the type of each cell in the first grid, the following steps S41-S45 may also be performed:

[0064] Step S41: Acquire multiple frames of laser point cloud data obtained by the laser sensor scanning the target area;

[0065] Step S42: Map the multi-frame laser point cloud data to the target grid map to obtain a second grid, wherein each grid in the second grid contains the point cloud from the multi-frame laser point cloud data; it should be noted that the second grid contains a second target number of grids.

[0066] Step S43: Determine the type of each cell in the second grid;

[0067] As an optional example, the method for determining the type of each grid cell in the second grid is the same as the method for determining the type of each grid cell in the first grid.

[0068] Step S44: If the distance between the step-type grid in the first grid and the step-type grid in the second grid is less than a fifth preset threshold, the step-type grid in the first grid and the step-type grid in the second grid are clustered to obtain a first cluster.

[0069] Step S45: If the ratio of the number of points representing the step type in the first cluster to the total number of points in the first cluster is greater than the eleventh preset threshold, the straightness of the point cloud representing the step type in the first cluster is greater than the twelfth preset threshold, and the length corresponding to the point cloud representing the step type exceeds the length of the mobile robot, then the obstacle type corresponding to the point cloud in the multiple grids included in the first cluster is determined to be a step, wherein the height of the points representing the step type is less than the first preset height.

[0070] In this embodiment, since a single frame of laser point cloud data only represents a portion of the point cloud data corresponding to the obstacle, it is impossible to accurately determine the type of obstacle. Therefore, it is necessary to combine multiple frames of laser point cloud data to jointly determine the type of obstacle.

[0071] As an optional example, after performing step S43 above, the following steps S61-S62 can also be performed:

[0072] Step S61: If the distance between the wall-type grids in the first grid and the wall-type grids in the second grid is less than an eighth preset threshold, the wall-type grids in the first grid and the wall-type grids in the second grid are clustered to obtain a second cluster.

[0073] Step S62: If the number of points with heights within the fifth preset range of the second cluster is greater than the thirteenth preset range, determine that the obstacle type corresponding to the point cloud in the multiple grids included in the second cluster is a wall.

[0074] To better understand the above-mentioned obstacle handling methods, the technical solutions are explained below in conjunction with optional embodiments, but are not intended to limit the technical solutions of the embodiments of the present invention.

[0075] As an optional example, the above obstacle handling method can be implemented through the following steps S71-S74:

[0076] Step S71: Project the single-frame laser point cloud data onto a 1cm*1cm resolution raster map;

[0077] Step S72: Calculate the minimum and maximum height difference for the point cloud in each grid cell. If the height difference is lower than a certain threshold, it is judged as a planar grid cell; otherwise, it is classified as a non-planar grid cell.

[0078] Step S73: Using the mobile robot as a reference, traverse the grid from near to far. If the average height difference between adjacent grids is less than a certain threshold, they are clustered into one class.

[0079] Step S74: Determine whether the cluster is ground based on the distance of the cluster from the machine, the number of cluster grids, and whether the difference between the cluster height and the 0 height is less than a threshold.

[0080] The obstacle avoidance area and the cleaning area can be identified through the above steps S71-S74.

[0081] As an optional example, the above obstacle handling method can be implemented through the following steps S81-S84:

[0082] Step S81: Project the single-frame laser point cloud data onto a 1cm*1cm resolution raster map;

[0083] Step S82: Determine the maximum height and density of point clouds below 25mm in each grid cell. If most point clouds fall below 25mm and the cell meets the characteristics of a stepped cross section, then classify it as a stepped type grid cell.

[0084] Step S83: Acquire multiple frames of laser point cloud data, and cluster them according to whether the grid distances of the step type in the multiple frames of laser point cloud data are close;

[0085] Step S84: For each grid in a cluster, determine whether the point cloud of the step type has a high proportion, calculate the straightness and length. If it meets the straightness condition, the length exceeds the fuselage, and the point cloud of the step type has a high proportion, then it is considered a step.

[0086] Steps S81-S84 above can realize the recognition of sliding door tracks and thresholds, and can also recognize protruding parts, straightness, and length based on dual-line structured light point cloud, assisting the door information recognized by LDS and camera for recognition.

[0087] As an optional example, the above method for handling obstacles can be implemented through the following steps S91-S94:

[0088] Step S91: Project the single-frame laser point cloud data onto a 1cm*1cm resolution raster map;

[0089] Step S92: Determine whether the point cloud in each grid has an upward slope and whether the machine can pass through;

[0090] Step S93: For all grids in the current frame that match the slope of the laser point cloud data, determine their continuity and whether they are continuous.

[0091] Step S94: If the slope is continuous and the machine can pass through, then it is set as a passable area.

[0092] Steps S91-S94 above can achieve slope identification, and the slope can be identified based on the cumulative results of the dual-line structured light point cloud.

[0093] As an optional example, the above obstacle handling method can be implemented through the following steps S101-S105:

[0094] Step S101: Project the single-frame laser point cloud data onto a 1cm*1cm resolution raster map;

[0095] Step S102: Determine whether any point cloud in each grid cell falls to a height exceeding 25mm;

[0096] Step S103: Project the point cloud with a height exceeding 25mm in the grid onto the XY plane. If the projection length is within a certain threshold, it is considered a suspicious wall grid.

[0097] Step S104: If the point cloud within the suspected wall grid falls within the range of PSD (equivalent to the sixth preset range in the above embodiment) or LDS (equivalent to the seventh preset range in the above embodiment), then it is determined to be a wall grid.

[0098] Step S105: After clustering the remaining suspicious wall grid frames according to distance, determine whether there are LDS point clouds in the surrounding area. If the number exceeds a certain threshold, they are also considered as wall grids and sent to the planning department.

[0099] Wall recognition is achieved through the above steps S101-S105.

[0100] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0101] This embodiment also provides a mobile robot for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0102] Figure 3 This is a structural block diagram of an obstacle handling device according to an embodiment of the present invention, such as... Figure 3 As shown, it includes:

[0103] The acquisition module 32 is used to acquire single-frame laser point cloud data collected by the laser sensor on the target area, wherein the laser sensor is mounted on the mobile robot.

[0104] Mapping module 34 is used to map the single-frame laser point cloud data to a target grid map to obtain a first grid, wherein each grid in the first grid contains the point cloud in the single-frame laser point cloud data;

[0105] Processing module 36 is used to determine the type of each grid in the first grid, and to cluster multiple grids of the same type that meet preset conditions to obtain a target cluster.

[0106] The determination module 38 is used to determine the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster based on the features corresponding to the target cluster.

[0107] Using the aforementioned device, the acquired single-frame laser point cloud data is mapped onto a target grid map to obtain a first grid. The type of each grid in the first grid is determined, and multiple grids of the same type that meet preset conditions are clustered. Then, based on the features corresponding to the target cluster, the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is determined. In this invention, because the obstacle type corresponding to the point cloud is determined on a grid-by-grid basis, the problem of low accuracy in obstacle type identification by mobile robots is solved, thus improving the accuracy of obstacle type identification by mobile robots.

[0108] Optionally, processing module 36 includes:

[0109] A determining unit is configured to: determine the highest and lowest heights of the point clouds in each grid cell, and calculate the height difference between the highest and lowest heights; classify grid cells whose height difference is less than a first preset threshold as plane types; and / or determine the density of the point clouds in each grid cell below a first preset height; classify grid cells whose density below the first preset height is greater than a second preset threshold, and whose height is within a first preset range, as step types; and / or determine the slope of the point clouds in each grid cell, classifying grid cells whose slope is within a second preset range as slope types; and / or determine the projection length of multiple points in the point clouds in each grid cell whose height is greater than the second preset height onto a horizontal plane; and classify grid cells whose projection length is within a third preset range as wall types.

[0110] A clustering unit is configured to cluster two grids that satisfy a first preset condition if two grids in the first grid satisfy a first preset condition. The first preset condition includes: all grids are planar, the distance between grids is less than a third preset threshold, and the difference in the average height of the point clouds between grids is less than a fourth preset threshold. The preset condition includes the first preset condition. Alternatively, if two grids in the first grid satisfy a second preset condition, the unit clusters these two grids. The second preset condition includes: all grids are stepped, and the distance between grids is less than a fifth preset threshold. The preset condition includes the second preset condition. Alternatively, if there are two grids in the first grid that satisfy a third preset condition, the two grids that satisfy the third preset condition are clustered, wherein the third preset condition includes: the grids are all of the slope type, the continuity of the point cloud between the grids is greater than a sixth preset threshold, and the difference in the slope of the point cloud between the grids is less than a seventh preset threshold; the preset condition includes the third preset condition; or if there are two grids in the first grid that satisfy a fourth preset condition, the two grids that satisfy the fourth preset condition are clustered, wherein the fourth preset condition includes: the grids are all of the wall type, and the distance between the grids is less than an eighth preset threshold; the preset condition includes the fourth preset condition.

[0111] Optionally, the determining module 38 is further configured to determine that the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is ground when: the grid types in the target cluster are all planar; the distance between the target cluster and the mobile robot is less than a ninth preset threshold; the number of grids included in the target cluster is within a fourth preset range; and the height corresponding to the target cluster is less than a tenth preset threshold. Alternatively, when the grid types in the target cluster are all step-type; the ratio of the number of points representing step type in the target cluster to the number of points included in the target cluster is greater than an eleventh preset threshold; the straightness of the step-type point cloud in the target cluster is greater than a twelfth preset threshold; and the... If the length of the point cloud corresponding to the step type exceeds the length of the mobile robot, the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is determined to be a step, wherein the height of the point representing the step type is less than a first preset height; or if the type of all grids in the target cluster is slope type, the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is determined to be a slope; or if the type of all grids in the target cluster is wall type, and the number of points with heights within the sixth preset range in the fifth preset range of the target cluster is greater than a thirteenth preset threshold, the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is determined to be a wall.

[0112] Optionally, the determining module 38 is further configured to determine the slope corresponding to the target cluster based on the slope of the point cloud in the multiple grids after determining that the obstacle type is a slope; and if the slope corresponding to the target cluster is less than a preset slope, determine the target area as the area that the mobile robot is allowed to pass through.

[0113] Optionally, the determining module 38 is further configured to determine whether a first target grid exists in the first grid, wherein the type of the first target grid is a wall type, and the point cloud in the first target grid contains points with heights within a sixth preset range or a seventh preset range; if the first target grid exists in the first grid, the obstacle type corresponding to the point cloud in the first target grid is determined to be a wall.

[0114] Optionally, the processing module 36 is further configured to, after determining the type of each grid in the first grid, acquire multiple frames of laser point cloud data obtained by the laser sensor scanning the target area; map the multiple frames of laser point cloud data to the target grid map to obtain a second grid, wherein each grid in the second grid contains point clouds from the multiple frames of laser point cloud data; determine the type of each grid in the second grid; if the distance between the step-type grids in the first grid and the step-type grids in the second grid is less than a fifth preset threshold, cluster the step-type grids in the first grid and the step-type grids in the second grid to obtain a first cluster; if the ratio of the number of points representing the step type in the first cluster to the number of points included in the first cluster is greater than an eleventh preset threshold, the straightness of the step-type point cloud in the first cluster is greater than a twelfth preset threshold, and the length corresponding to the step-type point cloud exceeds the length of the mobile robot, determine that the obstacle type corresponding to the point cloud in the multiple grids included in the first cluster is a step, wherein the height of the points representing the step type is less than a first preset height.

[0115] Optionally, the processing module 36 is further configured to, after determining the type of each grid in the second grid, cluster the grids of the wall type in the first grid and the grids of the wall type in the second grid if the distance between them is less than an eighth preset threshold, to obtain a second cluster; and if the number of points in the second cluster whose height is within a sixth preset range within a fifth preset range is greater than a thirteenth preset range, determine that the obstacle type corresponding to the point cloud in the multiple grids included in the second cluster is a wall.

[0116] Embodiments of the present invention also provide a storage medium comprising a stored program, wherein the program, when executed, performs any of the methods described above.

[0117] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:

[0118] S1, acquire single-frame laser point cloud data collected by the laser sensor on the target area, wherein the laser sensor is mounted on the mobile robot;

[0119] S2, map the single-frame laser point cloud data to the target grid map to obtain a first grid, wherein each grid in the first grid contains the point cloud from the single-frame laser point cloud data;

[0120] S3, determine the type of each grid in the first grid, and cluster multiple grids of the same type that meet the preset conditions to obtain the target cluster;

[0121] S4, determine the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster based on the features corresponding to the target cluster.

[0122] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0123] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0124] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0125] S1, acquire single-frame laser point cloud data collected by the laser sensor on the target area, wherein the laser sensor is mounted on the mobile robot;

[0126] S2, map the single-frame laser point cloud data to the target grid map to obtain a first grid, wherein each grid in the first grid contains the point cloud from the single-frame laser point cloud data;

[0127] S3, determine the type of each grid in the first grid, and cluster multiple grids of the same type that meet the preset conditions to obtain the target cluster;

[0128] S4, determine the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster based on the features corresponding to the target cluster.

[0129] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0130] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0131] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0132] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0133] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for handling obstacles, characterized in that, include: Acquire single-frame laser point cloud data of a target area collected by a laser sensor, wherein the laser sensor is mounted on a mobile robot; The single-frame laser point cloud data is mapped to a target grid map to obtain a first grid, wherein each grid in the first grid contains the point cloud data from the single-frame laser point cloud data; Determine the type of each grid in the first grid, and cluster multiple grids of the same type that meet preset conditions to obtain a target cluster; Based on the features corresponding to the target cluster, determine the obstacle types corresponding to the point clouds in the multiple grids included in the target cluster; The step of clustering multiple graticles of the same type that meet preset conditions includes: If two grids in the first grid satisfy a first preset condition, then the two grids satisfying the first preset condition are clustered. The first preset condition includes: all grids are planar, the distance between grids is less than a third preset threshold, and the difference in the average height of the point clouds between grids is less than a fourth preset threshold. The preset condition includes the first preset condition; or If two grids in the first grid satisfy the second preset condition, then the two grids satisfying the second preset condition are clustered. The second preset condition includes: all grids are of the step type, and the distance between grids is less than a fifth preset threshold; the preset condition includes the second preset condition; or If two grids in the first grid satisfy a third preset condition, then the two grids satisfying the third preset condition are clustered. The third preset condition includes: both grids are of the slope type; the continuity of the point clouds between grids is greater than a sixth preset threshold; and the difference in the slopes of the point clouds between grids is less than a seventh preset threshold. The preset condition includes the third preset condition. If there are two grids in the first grid that satisfy the fourth preset condition, the two grids that satisfy the fourth preset condition are clustered. The fourth preset condition includes: the grids are all of the wall type and the distance between the grids is less than the eighth preset threshold. The preset condition includes the fourth preset condition.

2. The method according to claim 1, characterized in that, Determining the type of each cell in the first grid includes: Determine the highest and lowest heights of the point cloud in each grid cell, and calculate the height difference between the highest and lowest heights; classify grid cells whose height difference is less than a first preset threshold as planar; and / or Determine the density of the point cloud in each grid below a first preset height; classify the grid type of the grid whose point cloud density below the first preset height is greater than a second preset threshold and whose corresponding height is within a first preset range as a step type; and / or Determine the slope corresponding to the point cloud in each of the first grid cells, and define the type of the grid cells whose slopes correspond to the point cloud in the first grid cell fall within a second preset range as the slope type; and / or Determine the projection length of multiple points in the point cloud of each grid that have a height greater than a second preset height onto a horizontal plane; determine the grid in the first grid whose projection length is within a third preset range as a wall type.

3. The method according to claim 1, characterized in that, The step of determining the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster based on the features corresponding to the target cluster includes: If all grids in the target cluster are planar, the distance between the target cluster and the mobile robot is less than a ninth preset threshold, the number of grids included in the target cluster is within a fourth preset range, and the height corresponding to the target cluster is less than a tenth preset threshold, then the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is determined to be ground; or If the grid type in the target cluster is all step type, the ratio of the number of points representing step type in the target cluster to the total number of points in the target cluster is greater than an eleventh preset threshold, the straightness of the step type point cloud in the target cluster is greater than a twelfth preset threshold, and the length corresponding to the step type point cloud exceeds the length of the mobile robot, then the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is determined to be step, wherein the height of the points representing step type is less than a first preset height; or If all the grid cells in the target cluster are of the ramp type, then the obstacle type corresponding to the point cloud in the multiple grid cells included in the target cluster is determined to be ramp; or If all grids in the target cluster are of the wall type, and the number of points in the target cluster whose height is within the sixth preset range within the fifth preset range is greater than the thirteenth preset threshold, then the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is determined to be a wall.

4. The method according to claim 3, characterized in that, After determining that the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster is a slope, the method further includes: The slope corresponding to the target cluster is determined based on the slope of the point cloud in the plurality of grids; If the slope corresponding to the target cluster is less than a preset slope, the target area is determined as the area that the mobile robot is allowed to pass through.

5. The method according to claim 1, characterized in that, After determining the type of each grid cell in the first grid, the method further includes: Determine whether a first target grid exists in the first grid, wherein the type of the first target grid is a wall type, and the point cloud in the first target grid contains points with heights within a sixth preset range or a seventh preset range; If a first target grid exists in the first grid, the obstacle type corresponding to the point cloud in the first target grid is determined to be a wall.

6. The method according to claim 1, characterized in that, After determining the type of each grid cell in the first grid, the method further includes: Acquire multiple frames of laser point cloud data obtained by scanning the target area with a laser sensor; The multi-frame laser point cloud data is mapped onto a target grid map to obtain a second grid, wherein each grid in the second grid contains point clouds from the multi-frame laser point cloud data; Determine the type of each cell in the second grid; If the distance between a step-type grid in the first grid and a step-type grid in the second grid is less than a fifth preset threshold, the step-type grids in the first grid and the step-type grids in the second grid are clustered to obtain a first cluster. If the ratio of the number of points representing the step type in the first cluster to the total number of points in the first cluster is greater than an eleventh preset threshold, the straightness of the point cloud representing the step type in the first cluster is greater than a twelfth preset threshold, and the length of the point cloud representing the step type exceeds the length of the mobile robot, then the obstacle type corresponding to the point cloud in the multiple grids included in the first cluster is determined to be a step, wherein the height of the points representing the step type is less than a first preset height.

7. The method according to claim 6, characterized in that, After determining the type of each grid cell in the second grid, the method further includes: If the distance between a wall-type grid in the first grid and a wall-type grid in the second grid is less than an eighth preset threshold, the wall-type grids in the first grid and the wall-type grids in the second grid are clustered to obtain a second cluster. If the number of points with a height within the fifth preset range of the second cluster is greater than the number within the sixth preset range, then the obstacle type corresponding to the point cloud in the multiple grids included in the second cluster is determined to be a wall.

8. An obstacle handling device, characterized in that, include: An acquisition module is used to acquire single-frame laser point cloud data collected by a laser sensor on a target area, wherein the laser sensor is mounted on a mobile robot; A mapping module is used to map the single-frame laser point cloud data to a target grid map to obtain a first grid, wherein each grid in the first grid contains the point cloud from the single-frame laser point cloud data. The processing module is used to determine the type of each grid in the first grid, and to cluster multiple grids of the same type that meet preset conditions to obtain a target cluster. The determination module is used to determine the obstacle type corresponding to the point cloud in the multiple grids included in the target cluster based on the features corresponding to the target cluster; The step of clustering multiple graticles of the same type that meet preset conditions includes: If two grids in the first grid satisfy a first preset condition, then the two grids satisfying the first preset condition are clustered. The first preset condition includes: all grids are planar, the distance between grids is less than a third preset threshold, and the difference in the average height of the point clouds between grids is less than a fourth preset threshold. The preset condition includes the first preset condition; or If two grids in the first grid satisfy the second preset condition, then the two grids satisfying the second preset condition are clustered. The second preset condition includes: all grids are of the step type, and the distance between grids is less than a fifth preset threshold; the preset condition includes the second preset condition; or If two grids in the first grid satisfy a third preset condition, then the two grids satisfying the third preset condition are clustered. The third preset condition includes: both grids are of the slope type; the continuity of the point clouds between grids is greater than a sixth preset threshold; and the difference in the slopes of the point clouds between grids is less than a seventh preset threshold. The preset condition includes the third preset condition. If there are two grids in the first grid that satisfy the fourth preset condition, the two grids that satisfy the fourth preset condition are clustered. The fourth preset condition includes: the grids are all of the wall type and the distance between the grids is less than the eighth preset threshold. The preset condition includes the fourth preset condition.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 7.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 7 through the computer program.