Boundary configuration method based on obstacle pixels, chip and robot

By using a boundary configuration method for obstacle pixels, obstacle pixels are counted row by row and column by column to generate a regular working area boundary, which solves the problem that cleaning robots have difficulty covering the outline of walls and improves cleaning efficiency and quality.

CN116540685BActive Publication Date: 2026-05-05AMICRO SEMICONDUCTOR CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AMICRO SEMICONDUCTOR CO LTD
Filing Date
2022-01-25
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

The rectangular work area planned by the cleaning robot in the indoor work area is difficult to cover the outline of the wall and corner points, resulting in reduced cleaning efficiency and quality.

Method used

By using a boundary configuration method based on obstacle pixels, the number of obstacle pixels is counted row by row and column by column, the boundary obstacle rows and columns are marked, and configured as boundaries distributed along the row and column directions. Combined with image processing and closing operations, a regular working area boundary is generated.

Benefits of technology

Ensure that the robot's working area boundary covers the complete outline of the obstacle, simplifying path planning and improving cleaning efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116540685B_ABST
    Figure CN116540685B_ABST
Patent Text Reader

Abstract

This invention discloses a boundary configuration method, chip, and robot based on obstacle pixels. The boundary configuration method includes traversing and counting obstacle pixels row-by-row and column-by-column within a pre-configured map area constructed by the robot. Then, based on the number of obstacle pixels in each row, boundary obstacle rows are marked and configured as boundaries distributed along the row direction. Similarly, based on the number of obstacle pixels in each column, boundary obstacle columns are marked and configured as boundaries distributed along the column direction. This ensures that the boundary of the working area contacts the complete or regular contour lines of the obstacles as much as possible, facilitating orderly robot movement within the boundary of the working area and enabling it to traverse more and farther areas.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of map construction, and more particularly to a boundary configuration method, chip, and robot based on obstacle pixels. Background Technology

[0002] When cleaning robots equipped with laser navigation perform cleaning operations in indoor work areas, they divide the entire indoor work area into multiple MxN sub-areas, which are generally 4 meters by 4 meters in the physical environment.

[0003] Generally speaking, the boundary of the first rectangular work area planned by the cleaning robot with the robot as the center of symmetry is not easy to cover the wall outline or corner position of the indoor work area, and the outline of the obstacles surrounded by the corresponding boundary is random; this results in the cleaning robot cleaning the open area (the area not occupied by obstacles) within the rectangular work area being limited and the cleaning route becoming complicated, reducing the overall cleaning efficiency and quality. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention discloses a boundary configuration method, chip, and robot based on obstacle pixels, solving the problem of planning the boundary of a robot's work area in an indoor working environment, enabling the planned boundary to cover the outline of the farthest obstacle within the robot's detection range. The specific technical solution is as follows:

[0005] The boundary configuration method based on obstacle pixels includes traversing and counting obstacle pixels row by row and column by column within a pre-configured map area constructed by the robot, marking boundary obstacle rows according to the number of obstacle pixels in the corresponding rows and configuring them as boundaries distributed along the row direction, and marking boundary obstacle columns according to the number of obstacle pixels in the corresponding columns and configuring them as boundaries distributed along the column direction.

[0006] Further, the boundary configuration method specifically includes: performing image processing on a pre-configured map region; marking obstacle pixels and non-obstacle pixels within the image-processed pre-configured map region, wherein obstacle pixels are pixels representing obstacles in the pre-configured map region, and non-obstacle pixels are pixels representing non-obstacles in the pre-configured map region; marking boundary obstacle rows by counting the number of obstacle pixels in the pre-configured map region row by row, and configuring the boundary obstacle rows as boundaries distributed along the row direction, so that the boundary obstacle rows are configured as the boundaries of the robot's working area in the row direction; marking boundary obstacle columns by counting the number of obstacle pixels in the pre-configured map region column by column, and configuring the boundary obstacle columns as boundaries distributed along the column direction, so that the boundary obstacle columns are configured as the boundaries of the robot's working area in the column direction.

[0007] Furthermore, the method of marking boundary obstacle rows by counting the number of obstacle pixels in the pre-configured map area row by row specifically includes, within the pre-configured map area after image processing, whenever the number of obstacle pixels in a row is greater than the row number threshold, the row is marked as an obstacle row; whenever a row of pixels is traversed or an obstacle row is marked, the next row of pixels is traversed; this is repeated until all rows in the pre-configured map area after image processing have been traversed, and then the two obstacle rows with the largest straight-line distance in the column direction are marked as boundary obstacle rows; wherein, the row number threshold is a preset multiple of the straight-line length occupied by the pre-configured map area in the row direction; the preset multiple is set to be greater than 0 and less than 1.

[0008] Further, the column direction is the vertical axis direction of the pre-configured map area, and the row direction is the horizontal axis direction of the pre-configured map area; within the pre-configured map area, two boundary obstacle rows are marked, where the vertical coordinate of the pixels in one boundary obstacle row is the largest among the vertical coordinates of all obstacle rows, and the vertical coordinate of the pixels in the other boundary obstacle row is the smallest among the vertical coordinates of all obstacle rows; wherein, the vertical coordinates of all pixels in each obstacle row are equal; wherein, the row number threshold is a preset multiple of the length of the pre-configured map area in the horizontal axis direction.

[0009] Further, the system iterates through the pre-configured map area processed by the image processing along the first column, row by row. Whenever the number of obstacle pixels in a row exceeds a row count threshold, that row is marked as an obstacle row. After traversing a row or marking an obstacle row, the system continues traversing the next row of pixels along the first column. This process is repeated. If an obstacle row is detected, the row furthest from the robot's position is marked as the first boundary obstacle row. If no obstacle row is detected, it is determined that the robot cannot find the first boundary obstacle row. The system then iterates through the pre-configured map area processed by the image processing along the second column. Configure the pixels within the map area. Whenever the number of obstacle pixels in a row exceeds the row count threshold, mark that row as an obstacle row. After traversing a row or marking an obstacle row, continue traversing the next row along the second column direction. Repeat this process. If an obstacle row is detected, mark the obstacle row furthest from the robot's position as the second boundary obstacle row. If no obstacle row is detected, determine that the robot cannot find the second boundary obstacle row. The first column direction is opposite to the second column direction. Both the second and first boundary obstacle rows are considered boundary obstacle rows.

[0010] Furthermore, when the direction of the second column is the positive direction of the vertical axis, the direction of the first column is the negative direction of the vertical axis; or, when the direction of the second column is the negative direction of the vertical axis, the direction of the first column is the positive direction of the vertical axis.

[0011] Furthermore, the method of marking boundary obstacle columns by counting the number of obstacle pixels in the pre-configured map area column by column specifically includes, within the pre-configured map area after image processing, whenever the number of obstacle pixels in a column is found to be greater than the column number threshold, the column is marked as an obstacle column; whenever a column of pixels is traversed or an obstacle column is marked, the next column of pixels is traversed; this counting is repeated until all columns in the pre-configured map area after image processing are traversed, and then the two obstacle columns with the largest straight-line distance in the row direction are marked as boundary obstacle columns; wherein, the column number threshold is a preset multiple of the straight-line length occupied by the pre-configured map area in the column direction; the preset multiple is greater than 0 and less than 1.

[0012] Furthermore, the row direction is the horizontal axis direction of the pre-configured map area; within the pre-configured map area, two boundary obstacle columns are marked, where the horizontal coordinate of the pixels in one boundary obstacle column is the largest horizontal coordinate among all the horizontal coordinates of the pixels in all obstacle columns, and the horizontal coordinate of the pixels in the other boundary obstacle column is the smallest horizontal coordinate among all the horizontal coordinates of the pixels in all obstacle columns; wherein, the horizontal coordinates of all pixels in each obstacle column are equal; wherein, the column number threshold is a preset multiple of the width of the pre-configured map area in the vertical axis direction.

[0013] Furthermore, the system iterates column by column along the first row of the pre-configured map area after image processing. Whenever the number of obstacle pixels in a column exceeds a column count threshold, that column is marked as an obstacle column. After traversing a column or marking an obstacle column, the system continues traversing the next column along the first row. This process is repeated. If an obstacle column is detected, the column furthest from the robot's position is marked as the first boundary obstacle column. If no obstacle column is detected, it is determined that the robot cannot find the first boundary obstacle column. The system then iterates column by column along the second row of the pre-configured map area after image processing. Pixels within the map area are defined. Whenever the number of obstacle pixels in a column exceeds a column count threshold, that column is marked as an obstacle column. After traversing a column or marking an obstacle column, the process continues traversing the next column along the second row direction. This process is repeated. If an obstacle column is detected, the obstacle column furthest from the robot's position is marked as the second boundary obstacle column. If no obstacle column is detected, it is determined that the robot cannot find the second boundary obstacle column. The first and second row directions are opposite. Both the second and first boundary obstacle columns are considered boundary obstacle columns.

[0014] Furthermore, when the direction of the second row is the positive direction of the horizontal axis, the direction of the first row is the negative direction of the horizontal axis; or, when the direction of the second row is the negative direction of the horizontal axis, the direction of the first row is the positive direction of the horizontal axis.

[0015] Furthermore, the robot's location is within the pre-configured map area; among all marked obstacle rows, the boundary obstacle row is the obstacle row furthest from the robot's location in the corresponding column direction; among all marked obstacle columns, the boundary obstacle column is the obstacle column furthest from the robot's location in the corresponding row direction.

[0016] Furthermore, the pre-configured map area is a map area symmetrically centered on the robot's position point.

[0017] Furthermore, the method for image processing of the pre-configured map region includes: performing a closing operation on the pre-configured map region so that the outlines of the marked obstacles in the pre-configured map region are fully described, wherein the closing operation is used to connect the connected components in the pre-configured map region; wherein the pre-configured map region is an image region of a specific size constructed by the robot to describe the positional characteristics of the obstacles.

[0018] Furthermore, the closing operation includes binarizing the pre-configured map region to obtain a binarized map; then performing image dilation on the binarized map, and then performing image erosion on the binarized map after image dilation, so that some pixels representing non-obstacles are configured as pixels representing obstacles; wherein, in the binarized map, the pixel values ​​of the pixels representing obstacles are different from the pixel values ​​of the pixels representing non-obstacles.

[0019] A chip with a built-in control program for controlling a robot to perform the boundary configuration method.

[0020] A robot having the aforementioned chip built into it.

[0021] The beneficial technical effect of this invention is that, based on the number of pixels representing obstacles in a specific map area, the outermost boundary obstacle row and boundary obstacle column are extracted as the boundary of the robot's optimal working area in the corresponding working environment. This ensures that the boundary of the working area contacts the complete or regular outline of the obstacle as much as possible, which facilitates the robot's orderly movement within the boundary of the working area and allows it to traverse more and farther areas, thus ensuring the robot's working efficiency and effectiveness. Attached Figure Description

[0022] Figure 1This is a schematic diagram illustrating the marking of a robot in a pre-configured map area according to an embodiment of the present invention.

[0023] Figure 2 This is a schematic diagram of the distribution of obstacle pixels in a pre-configured map area disclosed in an embodiment of the present invention, wherein the obstacle pixels are black and the open area is white; position point O is the position point of the robot.

[0024] Figure 3 This is a schematic diagram of the distribution of obstacle pixels in a pre-configured map area after image processing, as disclosed in one embodiment of the present invention. In this diagram, line segments AB and CD are in the same boundary obstacle row, and line segments EF and MN are in the same boundary obstacle column. Line segments AB, CD, EF, and MN are all line segments formed by sequentially connecting obstacle pixels. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. To further illustrate the embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, mainly used to illustrate the embodiments, and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementations and the advantages of the present invention. The flowchart depicts a process or method. Although the flowchart describes the steps as sequential processes, many of the steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. The process can be terminated when its operation is complete, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subroutine, etc.

[0026] It should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicating orientation or positional relationships, are based on the map orientation or pixel positional relationships shown in the accompanying drawings. They are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the referred device, boundary, pixel, unit grid, line segment, or element must have a specific orientation, be constructed in a specific orientation, or undergo traversal operations. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features.

[0027] As one embodiment, the boundary configuration method based on obstacle pixels provided by this invention is executed by a pixel processing device, which can be implemented by software and / or hardware, and is generally installed in a robot equipped with a ranging sensor. This type of robot can act as the execution subject of the boundary configuration method to plan the boundary of the area to be worked before starting to move. The ranging sensor includes a vision sensor and / or a laser sensor, wherein the vision sensor and / or laser sensor can detect obstacles. A common scenario is that the laser beam emitted by the laser sensor scans the data reflected back from the surface of the objects around the robot's body to form point cloud data of the surrounding objects. The objects around the robot's body can then be identified as obstacles and converted into markers on the map. The point cloud data includes the position information of the obstacle surface scanned by the laser beam of the laser sensor. This map is a map pre-built by the robot (including a map coordinate system) and can be attributed to the grid map of the robot's surrounding environment constructed by SLAM technology.

[0028] The boundary configuration method basically includes: within the map constructed by the robot, the robot defines a pre-configured map area associated with its position point. Before starting to execute a work task, the robot first defines a pre-configured map area within the pre-constructed map to facilitate the robot's movement from its current position point to the boundary of the work area within the pre-configured map area, performing edge-walking, determining the actual environmental contour distribution information, and also facilitating the start of the work task. Preferably, to facilitate controlling the robot to perform edge-walking within the first work area, the robot's position point is set as the center of the pre-configured map area, which also facilitates marking reasonable area boundaries within the pre-configured map area.

[0029] It should be noted that the robot's work area is an indoor work area, such as a cleaning robot or a smart security robot. This work area is typically a home environment, not completely occupied by obstacles. Within this work area, the more complete or regular the obstacle, the larger the area it occupies, and the more open space is left. Conversely, the less complete or irregular the obstacle, the less open space is left. In this case, this embodiment uses the boundary configuration method to obtain boundaries that define more open space, facilitating the robot's smooth and orderly movement along the planned path within the defined work area, thus simplifying path planning.

[0030] Then, the robot traverses and counts the number of obstacle pixels in the pre-configured map area row by row and column by column. Based on the number of obstacle pixels in the corresponding row, the robot marks the boundary obstacle rows and configures them as boundaries distributed along the row direction. Similarly, based on the number of obstacle pixels in the corresponding column, the robot marks the boundary obstacle columns and configures them as boundaries distributed along the column direction. In other words, the boundary obstacle rows are configured by the robot as boundaries distributed along the row direction within the pre-configured map area, and the boundary obstacle columns are configured as boundaries distributed along the column direction within the pre-configured map area. In this embodiment, obstacle pixels in the corresponding row can be represented using obstacle pixels with a specific vertical coordinate, equivalent to using a horizontal line; obstacle pixels in the corresponding column can be represented using obstacle pixels with a specific horizontal coordinate, equivalent to using a vertical line. In some embodiments, in order to define a rectangular robot working area, it is necessary to search row by row and column by column to find two horizontal lines and two vertical lines that meet the statistical requirements for the number of obstacle pixels (quantity information), so that the outline of the obstacles that can be defined by the robot working area (a working partition within the pre-configured map area) tends to be regular and complete.

[0031] In some simple implementation scenarios, the robot counts the number of obstacle pixels in the pre-configured map area row by row and column by column. When the number of obstacle pixels in a specific row and column reaches the corresponding preset threshold, the robot can determine the boundary of the required working area. Thus, a rectangular area is defined in the specific row and column, which is equivalent to a rectangular area enclosed by line segments.

[0032] Specifically, the robot's internal controller reads laser point cloud data or depth images including laser point cloud data collected by the laser sensor in real time, constructs a point cloud model to create a point cloud map, converts it from the lidar coordinate system or pixel coordinate system to the world coordinate system, projects the point cloud map and converts it into a two-dimensional grid map that can be used for navigation, namely the pre-configured map area. This two-dimensional point cloud map reflects the environmental information detected by the robot on the travel plane. The pre-configured map area is a map image to facilitate image processing operations on the pixels in the map image. In the map coordinate system of the pre-configured map area, i.e., the two-dimensional grid coordinate system, there are horizontal coordinate axes (X-axis) and vertical coordinate axes (Y-axis). The origin of the map coordinate system of the pre-configured map area can be defined at the robot's drive wheels, the mounting position of the laser sensor, or the center of the robot body; there are no restrictions here.

[0033] Combination Figure 1It can be seen that each pixel within the pre-configured map area can be represented using a unit grid of a specific size. Here, the unit grid of a specific size is each grid cell in the aforementioned two-dimensional raster map, and the pixel is the unit pixel within the pre-configured map area. That is, the raster serves as the unit grid cell in the pre-configured map area, such that one pixel corresponds to one grid cell; correspondingly, the pre-configured map area is... Figure 1 The grid area (a region composed of unit cells) in the map can be an area centered on the robot's position point, where the vertical distance between the left and right boundaries is 1.75 meters, and the vertical distance between the top and bottom boundaries is 1.75 meters. Further, under the map configuration condition where pixels are configured as grids, the robot configures one pixel as a 5 cm x 5 cm cell to fill the grid of the pre-configured map area. In this case, the grid is equivalent to a 5 cm x 5 cm cell, and one pixel corresponds to one cell. Preferably, in the pre-configured map area, the coordinates of each grid are the coordinates of the lower left corner, the upper left corner, or the lower right corner of the grid. In some implementation scenarios, the center position of the grid is used to represent the actual geographical location of the scanned area, and the coordinates of each grid are represented by the coordinates of the center position of that grid. The coordinates of the relevant corner points and center position of the grid can also represent the row and column numbers of the grid in the pre-configured map area, with the horizontal coordinate equal to the column number and the vertical coordinate equal to the row number. Therefore, the row-by-row counting of the number of obstacle pixels in the pre-configured map area in this embodiment is equivalent to the counting of the number of grid coordinates (pixel coordinates) with equal vertical coordinates, and the column-by-column counting of the number of obstacle pixels in the pre-configured map area in this embodiment is equivalent to the counting of the number of grid coordinates (pixel coordinates) with equal horizontal coordinates.

[0034] In some embodiments, the grid corresponding to each laser point collected by the robot's laser sensor or the grid corresponding to each landmark collected by the vision sensor is represented by pixels within the pre-configured map area; the coordinates of the grid corresponding to the pixel are the coordinates of the laser point transformed into the pre-configured map, also known as the map coordinates of the laser point. Accordingly, the grid corresponding to the laser point is either directly understood as the map coordinate point corresponding to the laser point; the coordinates of the grid corresponding to the laser point are directly understood as the map coordinates of the laser point.

[0035] It should be noted that within the pre-configured map area, each obstacle is composed of adjacent pixels with the same pixel value, so that each obstacle can be composed of adjacent grids within the pre-configured map area. The pixels that make up the obstacle are obstacle pixels, specifically the pixels within the projection area of ​​the obstacle in the two-dimensional map, so that the boundary obstacle row or boundary obstacle column can be composed of adjacent grids.

[0036] Specifically, by using the connected component analysis disclosed in existing technology to process the pre-configured map area, obstacles at different locations can be marked as pixels composed of different pixel values, and obstacles at different locations are composed of pixels of different colors. It should be noted that a connected component is an image region composed of pixels with equal pixel values ​​and adjacent positions. In this embodiment, when pixels are used to represent grids within the pre-configured map area, a connected component is a set of grids composed of adjacent grids with the same pixel value. Preferably, a pixel is configured as a 5 cm x 5 cm cell as the grid filling the pre-configured map area. Furthermore, each grid or pixel within the same connected component has the same number of connected pixels. The size of a connected component is the number of connected pixels, and the number of pixels constituting a connected component reflects the size of the obstacle. Corresponding to... Figure 2 and Figure 3 In this system, obstacles are composed of black pixels and belong to a set of black pixels, simplifying the statistical operation of obstacle pixels within the pre-configured map area.

[0037] As one embodiment, the boundary configuration method specifically includes the robot performing image processing on a pre-configured map area, that is... Figure 2 The map area shown is processed as follows Figure 3 The map area shown; the robot marks obstacle pixels and non-obstacle pixels within the pre-configured map area after image processing. Obstacle pixels represent obstacles in the pre-configured map area, and non-obstacle pixels represent non-obstacle objects in the pre-configured map area. Non-obstacle pixels include pixels representing positions not occupied by obstacles, and pixels not recognized or marked by the robot; unmarked pixels represent unknown locations. Obstacle pixels are sequentially connected to form obstacle line segments, including... Figure 3 Line segments AB, CD, EF, and MN are defined. Then, the robot marks boundary obstacle rows by counting the number of obstacle pixels within the pre-configured map area row by row, and configures these boundary obstacle rows as boundaries distributed along the row direction, thus defining the robot's working area as the boundary in the row direction. Furthermore, the robot also marks boundary obstacle columns by counting the number of obstacle pixels within the pre-configured map area column by column, and configures these boundary obstacle columns as boundaries distributed along the column direction, thus defining the robot's working area as the boundary in the column direction. Corresponding to... Figure 3Line segments AB and CD are both in the same boundary obstacle row, and line segments EF and MN are both in the same boundary obstacle column. By combining the corresponding row and column positions within the pre-configured map area and the number of pixels they contain, a boundary suitable for enclosing the aforementioned robot working area is planned, and this boundary covers, as far as possible, the complete or regular outlines of obstacles located far from the robot.

[0038] As one embodiment, the method of marking boundary obstacle rows by counting the number of obstacle pixels in a pre-configured map area row by row specifically includes the following steps: Within the pre-configured map area after image processing, whenever the number of obstacle pixels in a row exceeds a row count threshold, the robot marks that row as an obstacle row; then, it continues traversing the remaining pixels in that row or directly moves to a new row to continue traversing. Each time a row of pixels is traversed or an obstacle row is marked, the robot continues traversing the next row of pixels. This process is repeated until all rows within the pre-configured map area after image processing have been traversed, including traversing all pixels along the column direction, or traversing all pixels in the pre-configured map area but marking all obstacle rows without traversing all pixels. Then, the two obstacle rows with the largest straight-line distance in the column direction are marked as boundary obstacle rows; wherein, the row count threshold is a preset multiple of the straight-line length occupied by the pre-configured map area in the row direction; the preset multiple is set to be greater than 0 and less than 1, and is related to the size of the obstacle serving as the boundary of the area; preferably, the preset multiple is 0.1. The row number threshold is used to represent the minimum line segment length formed by connecting the obstacle pixels distributed along the row direction in the pre-configured map area. Only when the number of obstacle pixels in a row is greater than the row number threshold can the row of pixels form the boundary of the robot's working area. The preset obstacle is a relatively long obstacle, which can be a continuous obstacle, such as a wall or the two ends of a wall gap. The gap can be a doorway of a room. The obstacles on both sides of the doorway are the four walls in the same room. The four walls are continuous and integrated, and are not isolated obstacles.

[0039] It should be noted that the column direction is the vertical axis direction of the pre-configured map area, and the row direction is the horizontal axis direction of the pre-configured map area. In this embodiment, when two boundary obstacle rows are marked within the pre-configured map area, the vertical coordinate of a pixel in one boundary obstacle row is the largest among all the vertical coordinates of pixels in all obstacle rows, and the vertical coordinate of a pixel in the other boundary obstacle row is the smallest among all the vertical coordinates of pixels in all obstacle rows. All pixels in each obstacle row have the same vertical coordinate. The row number threshold is a preset multiple of the length of the pre-configured map area along the horizontal axis. In summary, this embodiment can obtain the top and bottom two obstacle rows along the column direction within the pre-configured map area, extract the two outermost boundary obstacle rows, and cover a relatively complete or regular outline of the obstacle furthest from the robot's position between these two boundary obstacle rows, thus simplifying the robot's path planning.

[0040] As one embodiment of traversing pixels row by row, the pixels within the pre-configured map area after image processing are traversed row by row along the first column direction. Optionally, the traversal starts from the top edge of the pre-configured map area and proceeds from top to bottom. The first column direction is the negative direction of the vertical axis of the pre-configured map area. Whenever the number of obstacle pixels in a row exceeds a row count threshold, that row is marked as an obstacle row. After traversing a row or marking an obstacle row, the traversal continues along the first column direction to the next row of pixels; this process is repeated. If an obstacle row is detected, the obstacle row with the greatest vertical distance to the robot's position is marked as the first boundary obstacle row. Figure 3 In the diagram, the lengths of line segments AB and CD are significantly greater than the discrete black line segments below them, and they are farther from the robot's position point O in the column direction within the pre-configured map area. Therefore, in... Figure 3 In the pre-configured map area shown, the row containing line segments AB and CD is marked as the first boundary obstacle row; if no obstacle row is detected along the first column direction, it is determined that the robot cannot find the first boundary obstacle row. At this time, the robot has traversed all pixels in the image-processed pre-configured map area, where position point O is the robot's position point.

[0041] It should be noted that when the second column direction is the positive direction of the vertical axis, the first column direction is the negative direction of the vertical axis; or, when the second column direction is the negative direction of the vertical axis, the first column direction is the positive direction of the vertical axis; wherein, the vertical coordinates of all pixels in each obstacle row are equal; wherein, the row number threshold is a preset multiple of the length of the pre-configured map area in the horizontal axis direction. Preferably, the preset multiple is 0.1.

[0042] As another embodiment of traversing pixels row by row, the pixels within the pre-configured map area after image processing are traversed row by row along the second column direction. Optionally, the traversal starts from the bottom edge of the pre-configured map area and proceeds from bottom to top. The second column direction is the positive direction of the vertical axis of the pre-configured map area. Whenever the number of obstacle pixels in a row exceeds the row count threshold, the row is marked as an obstacle row. Whenever a row of pixels is traversed or an obstacle row is marked, the traversal continues along the second column direction to the next row of pixels. This process is repeated. If an obstacle row is detected, the obstacle row farthest from the robot's position is marked as the second boundary obstacle row. If no obstacle row is detected along the second column direction, it is determined that the robot cannot find the second boundary obstacle row. At this point, the robot has traversed all pixels within the pre-configured map area after image processing.

[0043] In summary, the above implementation of traversing pixels row by row extracts the outermost boundary obstacle row within a specific map area based on the number of pixels representing obstacles in the map constructed by the robot. This defines the lateral boundary of the robot's working area within the map area, enabling it to walk along the outline of obstacles as far as possible. It also allows the robot to cover more open areas between the two row boundaries marked with the greatest distance, thus simplifying the robot's path planning.

[0044] It should be noted that the pixels in the boundary obstacle row can be connected sequentially to form a straight line or a line segment. The first boundary obstacle row is parallel to the second boundary obstacle row, and the first boundary obstacle row and the second boundary obstacle row are also considered to be composed of a corresponding row of pixels from the pre-configured map area.

[0045] As one embodiment, the method for obtaining boundary obstacle columns by counting the number of obstacle pixels in a pre-configured map area column by column specifically includes the following steps: Within the pre-configured map area after image processing, whenever the number of obstacle pixels in a column exceeds a column number threshold, the robot marks that column as an obstacle column; after traversing a column of pixels or marking an obstacle column, the robot continues traversing the next column of pixels; this process is repeated until all columns within the pre-configured map area after image processing have been traversed, including traversing all pixels in the pre-configured map area along the row direction, or marking all obstacle columns even if all pixels in all columns of the pre-configured map area have not been traversed. Then, the two obstacle columns with the largest straight-line distance in the row direction are marked as boundary obstacle columns; wherein, the column number threshold is a preset multiple of the straight-line length occupied by the pre-configured map area in the column direction; the preset multiple is greater than 0 and less than 1, preferably, the preset multiple is 0.1. The column number threshold is used to represent the minimum line segment length formed by connecting the obstacle pixels distributed along the column direction in the pre-configured map area. Only when the number of obstacle pixels in a column is greater than the column number threshold can the column of pixels form the boundary of the robot's working area. The preset obstacle is an obstacle with a large length and can be a continuous obstacle, such as a wall or the two ends of a gap in a wall. The gap can be a doorway of a room. The obstacles on both sides of the doorway are the four walls in the same room. The four walls are continuous and integrated and are not isolated obstacles.

[0046] It should be noted that the row direction is the horizontal axis direction of the pre-configured map area. In this embodiment, when two boundary obstacle columns are marked, the horizontal coordinate of the pixels in one boundary obstacle column is the largest horizontal coordinate among all obstacle columns, and the horizontal coordinate of the pixels in the other boundary obstacle column is the smallest horizontal coordinate among all obstacle columns. All pixels in each obstacle column have the same horizontal coordinate. The column number threshold is a preset multiple of the width of the pre-configured map area along the vertical axis. In summary, this embodiment can obtain the leftmost and rightmost obstacle columns along the row direction within the pre-configured map area, extract the two outermost boundary obstacle columns, and cover a relatively complete or regular outline of the obstacle farthest from the robot's position between these two boundary obstacle columns, simplifying the robot's path planning.

[0047] As one embodiment of traversing pixels column by column, the pixels within the pre-configured map area processed by image processing are traversed row by row along the first row direction. Optionally, the traversal starts from the leftmost boundary of the pre-configured map area and proceeds from left to right. The first row direction is the positive direction of the horizontal axis of the pre-configured map area. Whenever the number of obstacle pixels in a column exceeds a column count threshold, the column is marked as an obstacle column. After traversing a column or marking an obstacle column, the traversal continues along the first row direction to the next column. This process is repeated. If an obstacle column is detected, the obstacle column with the longest vertical distance to the robot's position is marked as the first boundary obstacle column. If no obstacle column is detected along the first row direction, it is determined that the robot cannot find the first boundary obstacle column. Figure 3 In the diagram, the lengths of line segments EF and MN are significantly greater than the discrete black line segments to their left, and they are farther from the robot's position point O in the row direction within the pre-configured map area. Therefore, in... Figure 3 The column containing line segments EF and MN within the pre-configured map area shown is marked as the first boundary obstacle column; where position point O is the robot's position point.

[0048] It should be noted that when the second column direction is the positive direction of the vertical axis, the first column direction is the negative direction of the vertical axis; or, when the second column direction is the negative direction of the vertical axis, the first column direction is the positive direction of the vertical axis; wherein, the vertical coordinates of all pixels in each obstacle row are equal; wherein, the row number threshold is a preset multiple of the length of the pre-configured map area in the horizontal axis direction. Preferably, the preset multiple is 0.1.

[0049] As another embodiment of traversing pixels column by column, the pixels within the pre-configured map area after image processing are traversed row by row along the second row direction. Optionally, the traversal starts from the rightmost boundary of the pre-configured map area, where the second row direction is the negative direction of the horizontal axis of the pre-configured map area. Whenever the number of obstacle pixels in a column exceeds a column count threshold, the column is marked as an obstacle column. Whenever a column of pixels is traversed or an obstacle column is marked, the traversal continues along the second row direction to the next column of pixels. This process is repeated. If an obstacle column is detected, the obstacle column farthest from the robot's position is marked as the second boundary obstacle column. If no obstacle column is detected along the second row direction, it is determined that the robot cannot find the second boundary obstacle column, at which point the robot has traversed all pixels within the pre-configured map area after image processing.

[0050] It should be noted that the pixels in the boundary obstacle column can be connected sequentially to form a straight line or a line segment. The first boundary obstacle column is parallel to the second boundary obstacle column, and the first boundary obstacle row and the second boundary obstacle row are also considered to be composed of a corresponding column of pixels belonging to the pre-configured map area.

[0051] In summary, the above embodiment of traversing pixels column by column extracts the outermost boundary obstacle column in a specific map area based on the number of pixels representing obstacles in the map constructed by the robot. This defines the vertical boundary of the robot's working area in the map area, enabling it to walk along the outline of obstacles as far away as possible. It also allows the robot to cover more open areas along the corresponding row direction, making the robot's path planning method more simplified.

[0052] As can be seen from the foregoing embodiments, the present invention extracts the outermost boundary obstacle rows and columns based on the number of pixels representing obstacles in a specific map area, which serve as the boundary of the optimal working area for the robot in the corresponding working environment. This ensures that the boundary of the working area contacts the complete or regular outline of the obstacle as much as possible, facilitating the robot's orderly movement within the boundary of the working area and enabling it to traverse more and farther areas, thus guaranteeing the robot's work efficiency and effectiveness.

[0053] Preferably, the robot's position is located within a pre-configured map area, specifically within the working area enclosed by the second boundary obstacle column, the first boundary obstacle column, the second boundary obstacle row, and the first boundary obstacle row. Specifically, among all marked obstacle rows, the boundary obstacle row is the obstacle row furthest from the robot's position in the corresponding column direction; and among all marked obstacle columns, the boundary obstacle column is the obstacle column furthest from the robot's position in the corresponding row direction. This allows for the acquisition of the topmost and bottommost obstacle rows, and the leftmost and rightmost obstacle columns within the same map area.

[0054] Preferably, the pre-configured map area is a map area symmetrically centered on the robot's position point; wherein, the pre-configured map area is a rectangular area. This allows for pixel traversal along different coordinate axes (including row and column directions) starting from the robot's position point, corresponding to the aforementioned row-by-row and column-by-column traversal, until the corresponding boundary obstacle row and corresponding boundary obstacle column are reached. This allows the points to intersect and form a regular and reasonable rectangular area, enabling the robot to move along the edges within the corresponding rectangular area.

[0055] In the foregoing embodiments, the method for image processing of a pre-configured map region includes: performing a closing operation on the pre-configured map region to completely describe the outlines of the marked obstacles in the pre-configured map region. The closing operation is configured to be performed between steps S1 and S2. The closing operation connects connected components in the pre-configured map region; the pre-configured map region is a specific-sized image region constructed by the robot to describe the positional characteristics of the obstacles. Preferably, the pre-configured map region can be a 3.5m x 3.5m rectangular region symmetrically centered on the robot's position point, and is a local map region extracted from a pre-constructed global map by the robot.

[0056] Specifically, the closing operation includes: the robot first binarizing the pre-configured map region to obtain a binarized map; then performing image dilation on the binarized map; and then performing image erosion on the binarized map after image dilation, so that some pixels representing non-obstacles are configured as pixels representing obstacles, thereby filling the gaps in the outlines of obstacles in the binarized map that has not undergone image dilation and image erosion. Figure 2 The set of discrete points between pixel A and pixel B becomes after the closing operation. Figure 3 line segment AB, Figure 2 The set of discrete points between pixels C and D becomes after the closing operation. Figure 3 line segment CD, Figure 2 The set of discrete points between pixels E and F becomes after the closing operation. Figure 3 line segment EF, Figure 2 The set of discrete points between pixels M and N becomes after the closing operation. Figure 3 The line segment MN is defined. In the binarized map, the pixel values ​​representing obstacles and the pixel values ​​representing non-obstacles are different. Generally, pixels with a value of 255 are configured as obstacles, and pixels with a value of 0 are configured as non-obstacles. Because the same obstacle that was originally connected may be divided into multiple segments in the binarized map, possibly due to instability in the pre-built map by the robot or unstable laser data, causing the map to fail to reflect reality; this embodiment repairs the missing parts between the same obstacles through the aforementioned closing operation.

[0057] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0058] In the above embodiments, a robot capable of performing sweeping tasks (hereinafter referred to as a sweeping robot) is used as an example to illustrate the technical solution of this application, but it is not limited to sweeping robots. The robot in the various embodiments of this application refers to any mechanical device capable of highly autonomous spatial movement in its environment, such as a sweeping robot, a companion robot, or a guide robot, or it can be an air purifier, a self-driving vehicle, etc. Of course, the tasks performed by different robot forms will vary, and this is not limited thereto.

[0059] To understand the embodiments corresponding to the boundary configuration methods described herein, it is necessary to understand that they can be implemented in a stationary state by hardware, software, firmware, middleware, microcode, or any combination thereof. For hardware implementations, the processing unit can be implemented within one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, other electronic units designed to perform the functions described herein, or combinations thereof. When embodiments are implemented in software, firmware, middleware, or microcode, program code, or code segments, they can be stored in a machine-readable medium such as a storage component.

[0060] Building upon the foregoing embodiments, another embodiment of the present invention discloses a chip with a built-in control program. This control program controls a robot to execute the boundary configuration method described in the foregoing embodiments. Based on the number of pixels representing obstacles in a specific map region, the chip extracts the outermost boundary obstacle rows and columns, which serve as the boundary of the robot's optimal working area within the corresponding working environment. This ensures that the boundary of the working area contacts the complete or regular contour lines of the obstacles as closely as possible, facilitating orderly movement of the robot within the defined boundary of the working area and enabling it to traverse more and farther areas, thus guaranteeing the robot's work efficiency and effectiveness.

[0061] To understand the embodiments corresponding to the boundary configuration methods described in this application, it is necessary to understand that they can be implemented by hardware, software, firmware, middleware, microcode, or any combination thereof. For hardware implementations, the processing unit can be implemented within one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, other electronic units designed to perform the functions described herein, or combinations thereof. When embodiments are implemented in software, firmware, middleware, or microcode, program code, or code segments, they can be stored in a machine-readable medium such as a storage component.

[0062] Another embodiment of the present invention discloses a robot whose top body can be equipped with a laser sensor supporting 360-degree detection. The robot has a built-in chip as described in the above embodiments, used to traverse and count obstacle pixels row by row and column by column within a pre-configured map area constructed by the robot. Then, based on the number of obstacle pixels in the corresponding row, boundary obstacle rows are marked and configured as boundaries distributed along the row direction; similarly, based on the number of obstacle pixels in the corresponding column, boundary obstacle columns are marked and configured as boundaries distributed along the column direction, thereby obtaining the top, bottom, left, or right boundary line information that meets the obstacle pixel count requirements. The specific boundary configuration method is described in the foregoing embodiments and will not be repeated here. Generally, depending on the requirements for edge navigation, the robot can be equipped with multiple laser radars and vision sensors, set in different locations, to obtain point cloud data of obstacles around the robot. The laser sensor supports real-time scanning to construct a laser map and stores it in the chip built into the robot.

[0063] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent transformations or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A boundary configuration method based on obstacle pixels, characterized in that, The boundary configuration method includes: Within the map constructed by the robot, the obstacle pixels in the pre-configured map area are traversed and counted row by row and column by column. Then, based on the number of obstacle pixels in the corresponding row, the boundary obstacle row is marked and configured as the boundary distributed along the row direction. Based on the number of obstacle pixels in the corresponding column, the boundary obstacle column is marked and configured as the boundary distributed along the column direction. The boundary configuration method specifically includes: Perform image processing on the pre-configured map area; Obstacle pixels and non-obstacle pixels are marked within a pre-configured map area after image processing. Obstacle pixels are pixels used to represent obstacles in the pre-configured map area, and non-obstacle pixels are pixels used to represent non-obstacles in the pre-configured map area. Boundary obstacle rows are marked by counting the number of obstacle pixels in the pre-configured map area row by row, and the boundary obstacle rows are configured as boundaries distributed along the row direction, so that the boundary obstacle rows are configured as the boundaries of the robot's working area in the row direction. The boundary obstacle column is marked by counting the number of obstacle pixels in the pre-configured map area column by column, and the boundary obstacle column is configured as a boundary distributed along the column direction, so that the boundary obstacle column is configured as the boundary of the robot's working area in the column direction.

2. The boundary configuration method according to claim 1, characterized in that, The method of marking boundary obstacle rows by counting the number of obstacle pixels within a pre-configured map area row by row specifically includes: Within the pre-configured map area after image processing, whenever the number of obstacle pixels in a row exceeds the row count threshold, that row is marked as an obstacle row. Each time a row of pixels is traversed or an obstacle row is marked, the next row of pixels is traversed. This process is repeated until all rows in the pre-configured map area after image processing have been traversed. Then, the two obstacle rows with the largest straight-line distance in the column direction are marked as boundary obstacle rows. The row number threshold is a preset multiple of the straight line length occupied by the pre-configured map area in the row direction; the preset multiple is set to be greater than 0 and less than 1.

3. The boundary configuration method according to claim 2, characterized in that, The column direction is the vertical axis direction of the pre-configured map area, and the row direction is the horizontal axis direction of the pre-configured map area; Within the pre-configured map area, two boundary obstacle rows are marked. The ordinate of the pixel in one boundary obstacle row is the largest among the ordinates of all obstacle rows. The ordinate of the pixel in the other boundary obstacle row is the smallest among the ordinates of all obstacle rows. In this case, the ordinates of all pixels in each obstacle row are equal; The row count threshold is a preset multiple of the length of the pre-configured map area along the horizontal axis.

4. The boundary configuration method according to claim 3, characterized in that, The system iterates through the pre-configured map area processed by the image along the first column. Whenever the number of obstacle pixels in a row exceeds the row count threshold, the row is marked as an obstacle row. After traversing a row or marking an obstacle row, the system continues to traverse the next row along the first column. This process is repeated. If an obstacle row is detected, the obstacle row furthest from the robot's position is marked as the first boundary obstacle row. If no obstacle row is detected, it is determined that the robot cannot find the first boundary obstacle row. The robot iterates through the pre-configured map area processed by the image processing along the second column. Whenever the number of obstacle pixels in a row exceeds the row count threshold, the row is marked as an obstacle row. After traversing a row or marking an obstacle row, the robot continues to traverse the next row along the second column. This process is repeated. If an obstacle row is detected, the obstacle row farthest from the robot's position is marked as the second boundary obstacle row. If no obstacle row is detected, it is determined that the robot cannot find the second boundary obstacle row. The direction of the first column is opposite to that of the second column; Both the second boundary barrier row and the first boundary barrier row are boundary barrier rows.

5. The boundary configuration method according to claim 4, characterized in that, When the direction of the second column is the positive direction of the vertical axis, the direction of the first column is the negative direction of the vertical axis; or, when the direction of the second column is the negative direction of the vertical axis, the direction of the first column is the positive direction of the vertical axis.

6. The boundary configuration method according to claim 1, characterized in that, The method of marking boundary obstacle columns by counting the number of obstacle pixels within a pre-configured map area column by column specifically includes: Within the pre-configured map area after image processing, whenever the number of obstacle pixels in a column exceeds the column number threshold, the column is marked as an obstacle column. After traversing a column of pixels or marking an obstacle column, the next column of pixels is traversed. This process is repeated until all columns in the pre-configured map area after image processing have been traversed. Then, the two obstacle columns with the largest straight-line distance in the row direction are marked as boundary obstacle columns. The column number threshold is a preset multiple of the straight line length occupied by the pre-configured map area in the column direction; the preset multiple is greater than 0 and less than 1.

7. The boundary configuration method according to claim 6, characterized in that, The row direction is the horizontal axis direction of the pre-configured map area; Within the pre-configured map area, two boundary obstacle columns are marked. The x-coordinate of the pixels in one boundary obstacle column is the largest x-coordinate among all the x-coordinates of the pixels in all obstacle columns, and the x-coordinate of the pixels in the other boundary obstacle column is the smallest x-coordinate among all the x-coordinates of the pixels in all obstacle columns. In each obstacle column, the x-coordinates of all pixels are equal; The column number threshold is a preset multiple of the width of the pre-configured map area in the vertical axis direction.

8. The boundary configuration method according to claim 7, characterized in that, The system iterates through the pre-configured map area processed by the image processing column by column along the first row direction. Whenever the number of obstacle pixels in a column exceeds the column number threshold, the column is marked as an obstacle column. After traversing a column of pixels or marking an obstacle column, the system continues to traverse the next column of pixels along the first row direction. This process is repeated. If an obstacle column is detected, the obstacle column farthest from the robot's position is marked as the first boundary obstacle column. If no obstacle column is detected, it is determined that the robot cannot find the first boundary obstacle column. The robot iterates through the pre-configured map area processed by the image processing column by column along the second row direction. Whenever the number of obstacle pixels in a column exceeds the column number threshold, the column is marked as an obstacle column. After traversing a column of pixels or marking an obstacle column, the robot continues to traverse the next column of pixels along the second row direction. This process is repeated. If an obstacle column is detected, the obstacle column farthest from the robot's position is marked as the second boundary obstacle column. If no obstacle column is detected, it is determined that the robot cannot find the second boundary obstacle column. The direction of the first row is opposite to that of the second row; Both the second boundary barrier column and the first boundary barrier column belong to the boundary barrier column category.

9. The boundary configuration method according to claim 8, characterized in that, When the direction of the second row is the positive direction of the horizontal axis, the direction of the first row is the negative direction of the horizontal axis; or, when the direction of the second row is the negative direction of the horizontal axis, the direction of the first row is the positive direction of the horizontal axis.

10. The boundary configuration method according to any one of claims 2 to 9, characterized in that, The robot's location is within a pre-configured map area; Among all the marked obstacle rows, the boundary obstacle row is the obstacle row that is farthest from the robot's position point in the corresponding column direction; Among all the marked obstacle columns, the boundary obstacle column is the obstacle column that is farthest from the robot's position point in the corresponding row direction.

11. The boundary configuration method according to claim 1, characterized in that, The pre-configured map area is a map area symmetrically centered on the robot's position.

12. The boundary configuration method according to claim 11, characterized in that, A method for image processing of a pre-configured map region includes: performing a closing operation on the pre-configured map region so that the outlines of the marked obstacles in the pre-configured map region are fully described, wherein the closing operation is used to connect the connected components in the pre-configured map region; The pre-configured map region is a specific-sized image region constructed by the robot to describe the positional characteristics of obstacles.

13. The boundary configuration method according to claim 12, characterized in that, The closing operation includes: The pre-configured map area is binarized to obtain a binarized map; then the binarized map is subjected to image dilation, and then the binarized map after image dilation is subjected to image erosion, so that some pixels representing non-obstacles are configured as pixels representing obstacles. In a binary map, the pixel values ​​of pixels representing obstacles are different from those of pixels representing non-obstacles.

14. A chip with a built-in control program for controlling a robot to perform the boundary configuration method according to any one of claims 1 to 13.

15. A robot, characterized in that, The robot has the chip described in claim 14 built into it.

Citation Information

Patent Citations

  • Map processing method and device, storage medium and robot

    CN113741481A