Grid Map Operation Method, Chip and Robot Based on Robot Coverage
By dividing unit grids in the map template and using the statistical information of unit grids to clear mark information, the problem of inaccurate grid mark information clearing in the cleaning robot map construction is solved, and higher-precision environmental information annotation and path planning are achieved.
Patent Information
- Application Number
- CN202111580109.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2041-12-22
AI Technical Summary
When the existing cleaning robot is building a map, the grid marking information is inaccurately cleared due to the redundant accuracy of the covered area of the robot body, resulting in the misjudgment of the passable area as unpassable, affecting navigation planning.
Using the raster map operation method based on robot coverage, we divide evenly distributed unit squares in the map template, use the four vertex distances of the unit square to determine whether the grid is completely covered, and clear the mark information based on the statistical information of the unit square to ensure the accuracy of the mark information.
Improve the accuracy of environmental information of the grid map, ensure that the robot can accurately identify passable areas, reduce misjudgments, and improve the accuracy of path planning.
Smart Images

Figure CN116380058B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of map annotation, and particularly to a grid map operation method, a chip and a robot based on robot coverage. Background Art
[0002] When a cleaning robot constructs a map in an indoor environment, the cleaning robot marks the position information of the physical collision during walking on the map for subsequent navigation or cleaning planning. The accuracy (physical measurement unit) marked in the existing grid map is generally the accuracy of one (5cm * 5cm) grid. Before navigation planning, since the area covered by the robot's body is marked as the grid area occupied by obstacles in the grid map, the grid marking information within the area covered by the robot's body needs to be cleared subsequently.
[0003] However, when clearing the grid marking information subsequently, due to a certain accuracy redundancy, the annotation clearing of the corresponding grid is inaccurate, which may lead to a situation where the cleaning robot can actually pass through a place, but is misjudged as impassable during navigation planning. Summary of the Invention
[0004] In order to solve the above technical problems, the present invention provides a grid map operation method, a chip and a robot based on robot coverage, so as to more accurately judge the coverage situation of a single grid, and then more precisely grasp the timing of clearing the marking information of a single grid, and improve the accuracy of the environmental information of real-time map annotation. The specific technical solutions include:
[0005] A grid map operation method based on robot coverage, the grid map operation method includes: within a map template, whenever a grid is completely covered within the area covered by the robot's body, the marking information of the grid is cleared; wherein, the map template is a rectangular area with a specific size within the grid map constructed by the robot, and the map template keeps framing the robot's body.
[0006] Further, within the map template, each grid is set to be composed of uniformly distributed unit squares; wherein, the area covered by the unit square is associated with the area covered by the robot's body, so that the unit square is configured to adapt to the size of the robot's body; wherein, within each grid, the number of unit squares distributed in each row is equal, and the number of unit squares distributed in each column is equal.
[0007] Further, when it is detected that the distances from the four vertices of a unit square to the center point of the map template are all less than the robot coverage radius, record the row number of the unit square and the column number of the unit square, and determine that the unit square is completely within the area covered by the robot's body; wherein, the center point of the map template is configured as the center of the robot's body.
[0008] Further, the shape of the robot's fuselage is circular when reflected in the grid map, and the coverage radius of the robot is the radius of the robot's fuselage; wherein, the side length of the unit square has a preset proportional relationship with the radius of the robot's fuselage.
[0009] Further, within the map template, the vertices of the unit squares located within the coverage area of the robot's fuselage do not touch the contour line of the robot's fuselage; there are intersections between the outermost circle of grids of the map template and the contour line of the robot's fuselage.
[0010] Further, according to the statistical information of the unit squares distributed within the grid, the marking information of the grid is cleared.
[0011] Further, the method of clearing the marking information of the grid according to the statistical information of the unit squares distributed within the grid includes: within the coverage area of the robot's fuselage, when the number of times the unit squares with the recorded row numbers and column numbers appear within the same grid is greater than or equal to the preset division quantity, it is determined that the grid has been completely covered, and the marking information of the grid is cleared; wherein, the preset division quantity is configured to be equal to the number of unit squares existing within a grid.
[0012] Further, within the map template, the row numbers and column numbers of all the unit squares that make up a grid correspond to the same position coordinate, and this position coordinate is the positioning coordinate of the grid; wherein, each unit square within the map template is configured with a row number and a column number; wherein, the map template is composed of evenly distributed grids, such that each grid distributed within the map template is assigned a corresponding positioning coordinate.
[0013] Further, the difference between the row number of a unit square and the row number of the central square is denoted as the row offset difference; the difference between the column number of the unit square and the column number of the central square is denoted as the column offset difference; wherein, the unit square where the center point of the map template is located is set as the central square; the abscissa of a unit square is obtained by adding the coordinate difference corresponding to the column offset difference to the abscissa of the center point of the map template, and the ordinate of the unit square is obtained by adding the coordinate difference corresponding to the row offset difference to the ordinate of the center point of the map template; after obtaining the abscissa and ordinate of the unit square, both the abscissa and ordinate of the unit square are converted into the positioning coordinates of the grid where the unit square is located, and the positioning coordinates are configured as the coordinates stored in real time in the memory space of the unit square; wherein, the coordinates of the center point of the map template change with the change of the real-time position coordinates of the robot; the coordinates of the center point of the map template include the abscissa and ordinate of the center point of the map template; the coordinates of the central square are represented by the coordinates of the center point of the map template.
[0014] Further, if the central square is distributed at the symmetric center position of the grid where it is located, then after determining the coordinates of the center point of the map template and the side length of the unit square, the coordinate range covered by the grid where the central square is located is deduced from the relevant properties of the symmetric center of the rectangle; after determining the coordinate range covered by the grid where the central square is located, the coordinate ranges covered by each grid in the map template are deduced from the relevant properties of the symmetric center of the rectangle, and then the coordinate positions of the unit squares covered by each grid are determined; wherein, the map template is centered on the grid where the central square is located, and evenly distributed grids are divided to form continuous positioning coordinates in the row direction and continuous positioning coordinates in the column direction.
[0015] Further, when the number of times that the unit squares with the recorded row numbers and column numbers appear in the same grid is greater than or equal to the preset division quantity, the specific method for determining that the grid has been completely covered and clearing the mark information of the grid includes: whenever it is detected that the distances from the four vertices of a unit square to the center point of the map template are all less than the coverage radius of the robot, record the row number of the unit square and the column number of the unit square, and obtain the positioning coordinates of the grid where the unit square is located, and then count the number of times the positioning coordinates appear; when the number of times the same positioning coordinates appear is greater than or equal to the preset division quantity, it is determined that the fuselage of the robot has completely covered the grid corresponding to the positioning coordinates in the map template, and the mark information of the grid is cleared to update the mark information collected by the robot at the latest positioning coordinates of the grid.
[0016] Further, when the number of times the unit squares with the recorded row numbers and column numbers appear within the same grid is less than the preset division quantity, new unit squares are continuously indexed.
[0017] Further, within each grid, an odd number of the unit squares are distributed in each row, and an odd number of the unit squares are distributed in each column, such that there are an equal number of unit squares on both sides of the central square within the map template, and there are an equal number of unit squares on both sides of the central square within the grid where it is located.
[0018] Further, the map template is configured to cover a grid of 8 rows and 8 columns; the grid is configured to cover unit squares of 5 rows and 5 columns within the map template; wherein, the side length of each unit square is 1 centimeter in the physical world, such that each unit square represents one square centimeter in the physical world.
[0019] A chip stores program code corresponding to the grid map operation method described above.
[0020] A robot is equipped with the chip and is configured to execute the grid map operation method described above.
[0021] Compared with the prior art, the beneficial technical effects of the present invention are as follows: For the interior of a single grid, the method of dividing it row by row and column by column into unit squares is adopted, converting the calculation of the coverage rate of a single grid into counting the number of unit squares within the same grid, simplifying the calculation complexity; for the exterior of a single grid, the method of forming a map template by multiple grids row by row and column by column is adopted to determine a map detection area that completely covers the robot's fuselage and also determine the effective map area range for clearing grid marking information; thus, within a map template, according to the coordinate statistical number of unit squares that appear within the same grid, the marking information corresponding to the detected single grid that is completely covered is deleted, achieving more precise clearing of the marked obstacle information in the grid. Description of the Drawings
[0022] Figure 1 It is a schematic diagram of a grid (filled diagonal cells) that needs to be cleared and processed and the fuselage coverage area 101 of the robot completely covered within the map template 103 disclosed in an embodiment of the present invention; wherein, the interior of the cell ABCD is divided into unit squares of 5 rows and 5 columns.
[0023] Figure 2 It is a schematic diagram of the distances between the four vertices E, F, M, and N of the unit square and the center O of the robot's fuselage disclosed in another embodiment of the present invention.
[0024] Figure 3 It is a flowchart of a grid map operation method based on robot coverage disclosed in yet another embodiment of the present invention. Detailed implementation manners
[0025] The technical solutions in the embodiments of the present invention will be described in detail below with reference to the accompanying drawings in the embodiments of the present invention. Without conflict, the following embodiments and the features in the embodiments may be combined with each other. In the following description, specific details are given to provide a thorough understanding of the embodiments. However, those of ordinary skill in the art will understand that the embodiments may be implemented without these specific details. For example, the circuit may be shown in a block diagram so as not to obscure the embodiments with unnecessary details. In other cases, well-known circuits, structures, and technologies may not be shown in detail so as not to confuse the embodiments.
[0026] It should be noted that for those skilled in the art, it can be understood that the grid map instantaneously constructed by the robot is marked with the environmental information around the current position of the robot. The grids within the grid area constructed by the robot include three states: marked as free, occupied, and unknown. The grid in the free state refers to the grid not occupied by obstacles, which is the grid position that the robot can reach and can form an unoccupied area. The grid in the occupied state refers to the grid occupied by obstacles, which is the obstacle grid and can form an occupied area. The unknown grid refers to the position where the specific situation is not clear during the process of the robot constructing the map, and is often blocked by obstacles and can form an unknown area.
[0027] As an embodiment, a grid map operation method based on robot coverage is disclosed. The execution subject of the grid map operation method is a robot, including a cleaning robot, a window cleaning robot, a disinfection robot, a patrol security robot, etc. with a regular shape. The grid map operation method includes: in the map template, whenever a grid is completely covered within the coverage area of the robot's body, the marking information of the grid is cleared; wherein, the map template is a rectangular area with a specific size within the grid map constructed by the robot, as shown in Figure 1 the square box 103 shown; the map template keeps framing the robot's body, and the position points occupied by the robot's body in the grid map do not exceed the edge line of the map template. In this embodiment, the grid area occupied by the robot's body in the grid map is the coverage area of the robot's body, as shown in Figure 1As shown by the circle 101; when the robot uses specific technical means to determine that a grid is completely covered by the body coverage area of the robot and the grid does not contact the edge line occupied and formed by the body contour line of the robot in the grid map, the robot records the coordinate position information of the grid and deletes the information marked on the grid, including deleting the obstacle information at the physical position corresponding to the grid, so as to receive new environmental information. After all, the robot has to move later to maintain normal operation. Thus, the robot accurately clears the information marked in the grid map it constructs immediately by executing this grid map operation method, ensuring the accuracy of subsequent path planning.
[0028] It should be noted that in the grid map, the body coverage area of the robot also belongs to the area occupied by obstacles. Therefore, in the grid map, the grids within the body coverage area of the robot are also marked as obstacle grids. However, in fact, the body coverage area of the robot is a passable area for the robot. To avoid marking the body coverage area of the robot as an impassable area during subsequent path planning in the grid map, it is necessary to promptly clear the marking information (marked as obstacle information) of the grids within the body coverage area of the robot. It should be noted that in this embodiment, the grid map constructed immediately is divided into squares with a size of 5 cm * 5 cm, resulting in a grid map with a grid size of 5 cm * 5 cm. In particular, for the convenience of distinction, the pixel value of the obstacle grid is usually set to be different from that of other areas in the grid map.
[0029] As an embodiment, as Figure 1 shown, within the map template 103, each grid is set to be composed of uniformly distributed unit squares, that is, within the grid area delimited by the map template 103, the robot divides each grid into uniformly distributed unit squares. Among them, within each grid, the number of unit squares distributed in each row is equal, which is equal to the ratio of the side length of the grid in the row direction to the side length of the unit square in the row direction; within each grid, the number of unit squares distributed in each column is equal, which is equal to the ratio of the side length of the grid in the column direction to the side length of the unit square in the column direction. In this embodiment, the unit square is a square, and the number of unit squares distributed in each column within a grid is equal to the number of unit squares distributed in each row, corresponding to Figure 1As shown in the grid ABCD, the interior of the grid ABCD is divided into unit squares arranged in 5 rows and 5 columns, that is, there are 5 unit squares in each column and 5 unit squares in each row. The grid is refined into small squares with a uniform distribution. Based on the regular distribution of the unit squares, the area covered by the unit squares is configured to be associated with the area covered by the body of the robot, such that the unit squares are configured to adapt to the size of the robot's body. As a result, the side length of the unit square is in a certain proportion to the width of the robot's body, which may not be a fixed proportional value. Specifically, the area covered by the unit squares may have a ratio relationship within a certain numerical range with the area covered by the body of the robot, not necessarily a fixed value, but ensuring that there are enough unit squares divided within the area covered by the body of the robot to improve the positioning accuracy of the grid map. Thus, more effective grid information is retained, which can be used as the basis for the coordinate addresses of subsequent indexing.
[0030] As an embodiment, when it is detected that the distances from the four vertices of a unit square to the center point of the map template are all less than the robot's coverage radius, record the row number of the unit square and the column number of the unit square, and determine that the unit square is completely within the area covered by the body of the robot (the area covered by the robot's body reflected in the grid map); corresponding to Figure 2 In [figure], the distances from the four vertices of the unit square EFMN to the center point of the map template are the line segment distances OE, OF, OM, and ON in sequence. When the robot detects that the line segment distances OE, OF, OM, and ON are all less than the robot's coverage radius (corresponding to the radius of the circle in Figure 2 [figure]), record the row number and column number of the unit square EFMN in the grid map to facilitate subsequent tracking of the coverage of the remaining unit squares within the grid where the unit square EFMN is located. It is also possible to record the row number and column number of the unit square EFMN in the grid (corresponding to the area covered by the 5-row and 5-column unit squares in Figure 2 [figure]), both of which can be used to represent the index address or the sorting information of the index address in the memory space. This index address can store the physical coordinate information (world coordinates) and / or environmental marking information of the unit square or the grid where it is located, with the significance of clearing and updating, and more accurately calculate which grid needs to be cleared. It should be noted that the center point of the map template is configured as the center O of the robot's body, and the center point of the map template is located within Figure 1 the black unit square 102 in [figure]. This embodiment uses only the four linear distances formed by the four vertices of the unit square and the same body center as the basis for determining whether the unit square is covered by the body of the robot (the area covered by the body of the robot converted from the physical world to the grid map). Compared with using the overall area covered by the square for judgment, it simplifies the calculation amount and improves the judgment accuracy.
[0031] As an embodiment, as shown in Figure 1 , within the map template 103, the vertices of the unit squares located within the body coverage area 101 of the robot do not contact the body contour line of the robot (the edge line of the body coverage area 101 of the robot), that is, there are no intersection points. Among them, Figure 2 the unit square EFMN is located among the filled-slash grids; the outermost circle of grids of the map template 103 has intersection points with the body contour line of the robot, that is, the square ring formed by the outermost circle of grids of the map template 103 intersects with the body contour line of the robot, but the outer edge of this square ring does not contact the body contour line of the robot, so as to enable the map template to completely enclose the body of the robot with the smallest coverage area, effectively cover the body coverage area 101 of the robot, and save the memory space resources consumed by the map template.
[0032] Based on the above embodiment, the shape of the body of the robot reflected in the grid map is circular, corresponding to the shape of the body coverage area 101 of the robot in Figure 1 ; the coverage radius of the robot is the body radius of the robot, and its size is specifically the distance from a point on the edge line (boundary line) of the body coverage area 101 in Figure 1 to the center point of the map template within the black unit square 102, that is, the radius of the circle 101 is equal to the body radius of the robot with a circular model; among them, the side length of the unit square has a preset proportional relationship with the body radius of the robot, so that the area covered by the unit square changes adaptively with the body coverage area of the robot, and the unit squares divided within the grid approximately mark the edge of the body coverage area of the robot relatively completely, approximately describe the edge line of the body coverage area 101, and further enable the unit squares with recorded row numbers and column numbers to more finely cover the body coverage area of the robot, corresponding to the filling of the internal grid area of the body coverage area 101 by the filled-slash squares in Figure 1 . Therefore, this embodiment is applicable to mobile robots with a circular model for marking and deleting grid information of the grid map, with significant symmetry and saving the calculation amount of corner points.
[0033] As an embodiment, according to the statistical information of the unit squares distributed within a grid, the marking information of the grid is cleared. In this embodiment, the robot can, based on the coordinate statistical information or the occurrence frequency information corresponding to the unit squares distributed within each grid, when detecting that specific threshold conditions are met, clear the marking information of the corresponding grid. For example, when the coordinate information within the same grid area appears a preset number of times, the marking information of the corresponding grid is deleted, thereby transforming the detection of the grid coverage area into the statistics of the coordinate information corresponding to the unit squares divided within the grid, improving the accuracy of the detection of complete grid coverage.
[0034] Specifically, the method of clearing the marking information of the grid according to the statistical information of the unit squares distributed within the grid includes: when the number of times the unit squares with recorded row numbers and column numbers appear within the same grid is greater than or equal to the preset division quantity, it is determined that the grid has been completely covered, and the marking information of the grid is cleared within the coverage area of the robot's fuselage. Among them, the preset division quantity is configured to be equal to the number of unit squares existing within a grid, so as to facilitate the detection of all the unit squares divided within a single grid. Specifically, whenever the robot detects that the distances from the four vertices of a unit square to the center point of the map template are all less than the robot's coverage radius, the row number and the column number of the unit square are recorded, which proves that the unit square is within the coverage area of the robot's fuselage and the unit square is within a grid. However, it is not yet determined that this grid is necessarily within the coverage area of the robot's fuselage. Therefore, the robot needs to continue counting among the unit squares with recorded row numbers and column numbers. When the number of unit squares appearing within the same grid is greater than or equal to the preset division quantity, the robot determines that the grid has been completely covered, and then clears the marking information of the grid from the grid map constructed in real time. In summary, in this embodiment, the interior of a single grid is divided into unit squares row by row and column by column, converting the calculation of the coverage rate of a single grid into the statistics of the number of unit squares within the same grid, and further realizing the effective deletion of the marking information of the corresponding grid at the corresponding position in a refined manner using the statistical information of the unit squares within the limited map template.
[0035] In the above embodiment, within the map template, the row numbers and column numbers of all the unit squares that make up a grid correspond to the same position coordinate, which is the positioning coordinate of the grid. That is, the robot corresponds all the unit squares divided within a grid to a coordinate configured for the grid within the grid map, serving as the positioning coordinate of the robot in the actual physical world, which can be represented by the coordinate of the center point of the grid. At this time, the robot can select the center point of the map template as the origin for measurement to obtain it. Corresponding to Figure 1In it, the square ABCD is a grid. In this embodiment, this grid is defined as grid ABCD. Then, the 5 rows and 5 columns of unit squares (25 unit squares) evenly distributed within grid ABCD all correspond to and are matched with the positioning coordinates of grid ABCD. It should be noted that each unit square within the map template is configured with a row number and a column number, which are used to represent the index address of the unit square in the memory space. The row number and column number of the unit square can be the sorting within the grid map or the sorting within the map template. When the side length of the unit square is a unit length, for example, the side length of the unit square is 1 cm, the corner points of the unit square can be ignored, and the coordinates of the unit square are regarded as the coordinates of the center point of the unit square. Then, the row number and column number configured for the unit square are convenient for conversion into the coordinate information of the unit square, especially the physical coordinates or world coordinates that play a positioning role. Within the grid map, within the map template, or within the grid, when traversing the unit squares from left to right, the column number gradually increases; within the grid map, within the map template, or within the grid, when traversing the unit squares from bottom to top, the row number gradually increases. Therefore, in this embodiment, the grid within the map template is divided into regularly arranged unit squares. Based on the fact that the unit squares are regularly arranged within the grid and the grid is regularly arranged within the map template, the unit squares are also regularly arranged in rows and columns within the grid, and are configured with continuously changing row numbers and column numbers, so that the row number of each unit square within the map template is unique, and the column number is also unique.
[0036] As an embodiment, within the map template, the difference between the row number of a unit square and the row number of the central square (corresponding to the Figure 1 black square) is recorded by the robot as the row offset difference; the difference between the column number of this unit square and the column number of the central square (corresponding to the Figure 1 black square) is recorded by the robot as the column offset difference; wherein, the unit square where the center point of the map template is located (corresponding to the Figure 1The black square) is set as the central square; the coordinates of the central square are represented by the coordinates of the center point of the map template. The coordinates of the center point of the map template include the abscissa and the ordinate of the center point of the map template. At this time, the robot selects the center point of the map template as the origin of the coordinate system of the grid map. Then, the abscissa of a unit square is obtained by adding the coordinate difference corresponding to the abscissa of the center point of the map template and the column offset difference, and the ordinate of the unit square is obtained by adding the coordinate difference corresponding to the ordinate of the center point of the map template and the row offset difference. Among them, the coordinate difference corresponding to the column offset difference is obtained by multiplying the physical length of the side length of the unit square and the offset of the column number (i.e., the column offset difference). Among them, the coordinate difference corresponding to the row offset difference is obtained by multiplying the physical length of the side length of the unit square and the offset of the row number (i.e., the column offset difference), so that the coordinates of a unit square are regarded as being offset row by row and column by column from the coordinates of the center point of the map template. After obtaining the abscissa and the ordinate of the unit square, the abscissa and the ordinate of the unit square are both converted into the positioning coordinates of the grid where the unit square is located, and the positioning coordinates are configured as the coordinates stored in real time by the unit square in the memory space. Among them, the coordinates of the center point of the map template change with the change of the real-time position coordinates of the robot, and then the coordinates of the unit square also change with the change of the real-time position coordinates of the robot.
[0037] It should be noted that each unit square has a row number and a column number within the grid where it is located. Then, for a grid, there are numerical limitations on the index ranges of the row numbers and column numbers of the unit squares evenly distributed inside it, so that the row number and column number of a unit square both correspond to a grid within a specific area of a map template, establishing the corresponding relationship between the coordinates of each unit square and the grid where it is located. It can also be understood as realizing that the coverage area of the regularly arranged unit squares is determined by the coverage area of the grid, and the positioning accuracy of the coverage area of the grid is determined by the size of the unit square.
[0038] In some embodiments, each grid of the map template may include i columns of unit squares and j rows of unit squares, which defines (i×j) unit squares. Each column is referenced by a first index value a, where a ranges from 1 to i; each row is referenced by a second index value b, where b ranges from 1 to j; each unit square is referenced by an index pair (a, b). Among them, for the map template, the positioning coordinates of each unit square corresponding to the index pair values a and b are in the same physical measurement unit. The physical measurement unit can be represented by the side length of the unit square and can be adjusted adaptively according to the body size of the robot to determine a suitable grid that can be completely covered by the body of the robot.
[0039] As an embodiment, the central square is distributed at the symmetric center position of the grid it is located in. After the robot determines the coordinates of the center point of the map template and the side length of the unit square, the coordinate range covered by the grid where the central square is located can be deduced from the relevant properties of the symmetric center of the rectangle. Among them, the relevant properties of the symmetric center of the rectangle are the characteristics of the distribution position of the central square in the map template. When the side length of the grid where the central square is located (in fact, the side length of each grid in the grid map constructed by the robot, which is the default configuration, and in this embodiment, the grid is divided into multiple unit squares to improve the accuracy) is obtained in advance, it can be determined starting from the coordinates of the center point of the map template, that is, taking the center point of the map template as the origin, within the coordinate range that the grid where it is located can offset, the coordinates of the remaining unit squares falling into this grid are determined one by one. Then, whenever the robot detects that a unit square is completely covered by the area covered by the fuselage, the coordinates of this unit square can be converted into the positioning coordinates of the grid where this unit square is located. Among them, the position mapping relationship or coordinate conversion relationship between each unit square and the grid where it is located is established in advance.
[0040] After determining the coordinate range covered by the grid where the central square is located, the coordinate range covered by each grid in the map template can be deduced from the relevant properties of the symmetric center of the rectangle. Then, the coordinate positions of the unit squares covered by each grid are determined. Among them, the relevant properties of the symmetric center of the rectangle are the characteristics of the distribution position of the central square in the map template. When the side length of the grid where the central square is located (in fact, the side length of each grid in the grid map constructed by the robot, which is the default configuration, and in this embodiment, the robot divides the grid into multiple unit squares to improve the accuracy) is obtained in advance, the robot starts from the coordinates of the grid where the central square is located and indexes the remaining grids row by row and column by column in the map template to determine the positioning coordinates of each grid in the map template, corresponding to the coordinate range covered by each grid. Then, the robot can also determine the coordinate positions of the unit squares covered by each grid. Among them, the map template takes the grid where the central square is located as the symmetric center and divides it into evenly distributed grids, forming continuous positioning coordinates in the row direction and continuous positioning coordinates in the column direction.
[0041] In this embodiment, the map template is composed of evenly distributed grids, and each grid distributed within the map template is assigned a corresponding positioning coordinate. When using the center position of the grid to represent the true geographical location of the scanned area, the positioning coordinate of each grid will be represented by the coordinates of the center position of the grid. In some embodiments, starting from a given origin, along the positive direction of the coordinate axes of the grid map, traversing the grids from left to right, the abscissa of the positioning coordinate gradually increases; at the same time, traversing the grids from bottom to top, the ordinate of the positioning coordinate gradually increases. Thus, it is ensured that the positioning coordinates of adjacent grids within the map template are continuous, making the path formed by connecting each grid within the grid map continuous.
[0042] As an embodiment, as Figure 3 shown, the grid map operation method executed by the robot specifically includes:
[0043] Step S301: Set a map template in the grid map to frame the body of the robot, then control each grid within the map template to divide into evenly distributed unit squares, and then the robot executes Step S302; in Step S301, the robot also obtains the row number and column number of each unit square within the map template. As for the relationship between the row number and column number of the unit square, the coordinates of the unit square, and the positioning coordinate of the grid where the unit square is located, reference can be made to the foregoing embodiments and will not be elaborated herein.
[0044] Step S302: Whenever it is detected that the distances from the four vertices of a unit square to the center point of the map template are all less than the robot coverage radius, record the row number and column number of the unit square, and at the same time determine that the unit square is completely within the coverage area of the robot's body (the coverage area of the robot's body reflected in the grid map); and obtain the positioning coordinate of the grid where the unit square is located, and then count the number of occurrences of this positioning coordinate. Specifically, count the number of occurrences of the same positioning coordinate, which represents the number of unit squares detected within the same grid; then the robot executes Step S303. Among them, the preset division quantity is configured to be equal to the number of unit squares existing within a grid, so as to facilitate detecting all the unit squares divided within a single grid. The specific implementation steps can refer to the foregoing related embodiments and will not be elaborated herein. In particular, when it is detected that the distances from the four vertices of a unit square to the center point of the map template are not all less than the robot coverage radius, corresponding to the distance relationship of the four vertices of the detected Figure 1 grid ABCD with respect to the black unit square 102, continue to index new unit squares, specifically continue to index within the grid where the latest detected unit square is located, or continue to index within the remaining grids within the map template, and calculate in real time the distances from the four vertices of the newly indexed unit square to the center point of the map template.
[0045] Step S303. When the number of occurrences of the same positioning coordinate is greater than or equal to the preset division quantity, it is determined that the fuselage of the robot has completely covered the grid corresponding to the positioning coordinate in the map template, and the marking information of the grid is cleared, so as to update it to the marking information collected at the latest positioning coordinate of the robot in the grid, thereby realizing clearing the marking information of the grid within the covered area of the robot's fuselage according to the statistical information of the unit squares distributed in one grid. When the number of occurrences of the unit squares with the recorded row numbers and column numbers in the same grid is greater than or equal to the preset division quantity, it is determined that the grid has been completely covered, and the specific manner of clearing the marking information of the grid is as follows. The specific implementation steps can refer to the relevant foregoing embodiments and will not be elaborated here. In particular, within the map template, when the number of occurrences of the same positioning coordinate is greater than or equal to the preset division quantity and less than the preset division quantity, return to step S302, and continue to index new unit squares within the map template. In this way, the loop continues until all the grids or all the unit squares within the map template are indexed, then the robot completes clearing the marking information of the grids within the covered area of the fuselage, realizing accurate and timely refreshing of the marking information of the grids within the covered area of the fuselage, and reducing the problem of misjudgment caused by incomplete and inaccurate clearing.
[0046] In summary, the beneficial technical effects of the present invention are as follows: For the interior of a single grid, the method of dividing it row by row and column by column into unit squares is adopted, converting the calculation of the coverage rate of a single grid into counting the number of unit squares within the same grid, thus simplifying the calculation complexity; for the exterior of a single grid, the method of forming a map template by multiple grids row by row and column by column is adopted to determine a map detection area that completely covers the fuselage of the robot and also determine the effective map area range for clearing the grid marking information; thereby, within a map template, the marking information corresponding to the single grid that is detected to be completely covered is deleted according to the coordinate statistical number of the unit squares appearing in the same grid, realizing more precise clearing of the marked obstacle information in the grid.
[0047] On the basis of the above embodiments, within each grid, specifically, within each grid of the map template, an odd number of the unit squares are distributed in each row, and an odd number of the unit squares are distributed in each column, so that there are an equal number of unit squares on both sides of the central square within the map template, and there are an equal number of unit squares on both sides of the central square within the grid where it is located.
[0048] Preferably, in combination with Figure 1 and Figure 2It can be known that the map template 103 is configured to cover a grid of 8 rows and 8 columns. Here, the grid is a square with the same size as the square filled with diagonal lines, rather than the unit squares divided in the square ABCD; the grid ABCD is configured to cover a unit square of 5 rows and 5 columns within the map template 103; wherein, the shape of each unit square is a square, and the side length of each unit square is 1 centimeter in the physical world, so that each unit square represents one square centimeter in the physical world, which is convenient for indexing new unit squares and new grids using row numbers and column numbers, and calculating the coordinates of the unit squares and converting the positioning coordinates of the corresponding grids on this basis. Specifically, the grids that can be effectively cleared are located to improve the accuracy of the map marking information.
[0049] In this embodiment, the map template 103 includes a grid of 8 rows and 8 columns. Each grid is composed of a unit square of 5 rows and 5 columns. Then, a map template includes 40 rows and 40 columns of unit squares or 41 rows and 41 columns of unit squares (leaving some redundant position spaces). Among them, the map template 103 is configured to frame the body of the robot, that is, to completely cover the body coverage area 101 of the robot. The side length of the unit square can be configured to have a preset proportional relationship with the body width of the robot (when the shape of the robot model is circular, the body width is the body diameter); therefore, when using a unit square with a side length of 1 centimeter to represent the body coverage area 101, the accuracy is higher than using a grid to represent the body coverage area 101; so that the area covered by the unit square follows the change of the body coverage area of the robot, and the unit squares divided inside the grid relatively completely mark the edge of the body coverage area of the robot, approximately describing the edge line of the body coverage area 101.
[0050] Optionally, when the area occupied by the body coverage area 101 in the grid map increases, the side length of the unit square can be appropriately increased; when the area occupied by the body coverage area 101 in the grid map decreases, the side length of the unit square can be appropriately decreased; so that the unit square can adapt to the change of the body size of the robot; among them, the map template keeps framing the body coverage area of the robot. Thus, after determining the body size (including the body width) of the robot, the robot dynamically changes the side length of the unit square through configuration to more finely cover the body coverage area of the robot.
[0051] Based on the foregoing embodiments, a chip is also disclosed. The chip stores computer-executable instructions. When the computer-executable instructions are executed by the chip, a grid map operation method based on robot coverage as described in the foregoing embodiments is implemented, and the judgment of the coverage situation of a single grid is more accurate. Furthermore, the timing of clearing the marking information of a single grid is grasped more precisely, improving the accuracy of the environmental information marked in real time on the map.
[0052] On the one hand, the present application can be implemented in software and / or a combination of software and hardware. For example, it can be implemented using an application specific integrated circuit (ASIC), a general purpose computer, or any other similar hardware device. In one embodiment, the software program of the present application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present application (including related data structures) can be stored in a computer-readable recording medium, such as a RAM memory, a magnetic disk, an optical drive, a floppy disk, and similar devices. Additionally, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with the processor to execute each step or function.
[0053] In addition, a part of the present application can be applied as a computer program product, such as computer program instructions. When executed by a computer, through the operation of the computer, it can call or provide the methods and / or technical solutions according to the present application. The program instructions for calling the methods of the present application may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in the working memory of a computer device that runs according to the program instructions. Here, an embodiment according to the present application includes a device, which includes a memory for storing computer program instructions and a processor for executing the program instructions. When the computer program instructions are executed by the processor, the device is triggered to run the methods and / or technical solutions based on the foregoing multiple embodiments.
[0054] The present invention also discloses a robot, which includes a robot main body; a traveling mechanism provided on the robot main body; a sensor provided on the robot main body, and the sensor is used to collect the position information of obstacles near the working area of the robot; a controller, the controller is built in the robot main body and is connected to the sensor, and is used to mark the position information of the obstacles collected by the sensor as the marking information at the corresponding grid of the grid map, thereby forming map annotation information; the controller includes at least one processor and a memory, the memory is communicatively connected to the at least one processor, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the robot to execute a grid map operation method based on robot coverage described in the foregoing embodiment, and the specific technical effects refer to the foregoing embodiment.
[0055] It should be noted that the robot is a self - moving robot, including but not limited to laser - navigation robots and vision - navigation robots, which can be applied to indoor cleaning operations or security patrols. The shape of the robot model can be circular. Specifically, if the contour line encloses a circle, then the shape of the robot's fuselage is circular when reflected in the grid map, and the coverage radius of the robot is the radius of the robot's fuselage. The at least one processor may include a program - storage area and a data - storage area. Among them, the program - storage area can store an operating system and application programs required for at least one function; the data - storage area can store coordinate data required for creating a two - dimensional grid map and a three - dimensional grid map, etc. In addition, the at least one processor may include a high - speed random - access memory and may also include a non - volatile memory, such as at least one disk storage device, a flash - memory device, or other non - volatile solid - state storage devices. In some embodiments, the at least one processor optionally includes a memory remotely set relative to the corresponding processor, and these remote memories can be connected to the robot through a network. Examples of the above - mentioned network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and their combinations.
[0056] Finally, it should be noted that: the above - mentioned embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or equivalently replace some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A grid map operation method based on robot coverage, characterized in that The grid map operation method includes: In the map template, whenever a grid is completely covered within the area covered by the robot's body, the marking information of the grid is cleared; Among them, the map template is a rectangular area of a specific size within the grid map constructed by the robot, and the map template keeps framing the robot's body; When it is detected that the distances from the four vertices of a unit square to the center point of the map template are all less than the robot's coverage radius, record the row number and the column number of the unit square, and determine that the unit square is completely within the area covered by the robot's body; among them, the center point of the map template is configured as the center of the robot's body; According to the statistical information of the unit squares distributed in the grid, the marking information of the grid is cleared; The method of clearing the marking information of the grid according to the statistical information of the unit squares distributed in the grid includes: Within the area covered by the robot's body, when the number of times the unit squares with the previously recorded row numbers and column numbers appear in the same grid is greater than or equal to the preset division quantity, it is determined that the grid has been completely covered, and the marking information of the grid is cleared; Among them, the preset division quantity is configured to be equal to the number of unit squares existing in a grid.
2. The grid map operation method according to claim 1, characterized in that In the map template, each grid is set to be composed of evenly distributed unit squares; Among them, the area covered by the unit square is associated with the area covered by the robot's body, so that the unit square is configured to adapt to the size of the robot's body; Among them, within each grid, the number of unit squares distributed in each row is equal, and the number of unit squares distributed in each column is equal.
3. The grid map operation method according to claim 2, wherein The shape of the robot's body is circular in the grid map, and the robot's coverage radius is the radius of the robot's body; Among them, the side length of the unit square has a preset proportional relationship with the radius of the robot's body.
4. The grid map operation method according to claim 2, wherein, In the map template, the vertices of the unit squares within the area covered by the robot's body do not contact the contour line of the robot's body; there are intersections between the outermost circle of grids of the map template and the contour line of the robot's body.
5. The grid map operation method according to claim 2, wherein In the map template, the row numbers and column numbers of all the unit squares that make up a grid correspond to the same position coordinate, and this position coordinate is the positioning coordinate of the grid; Among them, each unit square in the map template is configured with a row number and a column number; Among them, the map template is composed of evenly distributed grids, so that each grid distributed in the map template is assigned a corresponding positioning coordinate.
6. The grid map operation method according to claim 5, characterized in that The difference between the row number of a unit square and the row number of the central square is denoted as the row offset difference; the difference between the column number of the unit square and the column number of the central square is denoted as the column offset difference; among them, the unit square where the center point of the map template is located is set as the central square; The abscissa of a unit square is obtained by adding the coordinate difference corresponding to the abscissa of the center point of the map template and the column offset difference, and the ordinate of the unit square is obtained by adding the coordinate difference corresponding to the ordinate of the center point of the map template and the row offset difference; after obtaining the abscissa and ordinate of the unit square, both the abscissa and ordinate of the unit square are converted into the positioning coordinates of the grid where the unit square is located, and the positioning coordinates are configured as the coordinates stored in real time by the unit square in the memory space; Among them, the coordinates of the center point of the map template change with the change of the real-time position coordinates of the robot; the coordinates of the center point of the map template include the abscissa and ordinate of the center point of the map template; the coordinates of the central square are represented by the coordinates of the center point of the map template.
7. The grid map operation method according to claim 6, wherein The central square is distributed at the symmetric center position of the grid where it is located. Then, after determining the coordinates of the center point of the map template and the side length of the unit square, the coordinate range covered by the grid where the central square is located is deduced from the relevant properties of the symmetric center of the rectangle; After determining the coordinate range covered by the grid where the central square is located, the coordinate range covered by each grid in the map template is deduced from the relevant properties of the symmetric center of the rectangle, and then the coordinate positions of the unit squares covered by each grid are determined; Among them, the map template takes the grid where the central square is located as the symmetric center, divides into evenly distributed grids, and forms continuous positioning coordinates in the row direction and continuous positioning coordinates in the column direction.
8. The grid map operation method according to claim 7, wherein, When the number of times that the unit squares with the recorded row numbers and column numbers appear in the same grid is greater than or equal to the preset division quantity, it is determined that the grid has been completely covered, and the specific method for clearing the mark information of the grid includes: Whenever it is detected that the distances from the four vertices of a unit square to the center point of the map template are all less than the coverage radius of the robot, record the row number of the unit square and the column number of the unit square, obtain the positioning coordinates of the grid where the unit square is located, and then count the number of times the positioning coordinates appear; When the number of times the same positioning coordinate appears is greater than or equal to the preset division quantity, it is determined that the body of the robot has completely covered the grid corresponding to the positioning coordinate in the map template, and the mark information of the grid is cleared to update it to the mark information collected at the latest positioning coordinate of the robot in the grid.
9. The grid map operation method according to claim 2, wherein When the number of times that the unit squares with the recorded row numbers and column numbers appear in the same grid is less than the preset division quantity, continue to index new unit squares.
10. The grid map operation method according to claim 7, wherein, In each grid, an odd number of the unit squares are distributed in each row, and an odd number of the unit squares are distributed in each column, so that there are an equal number of unit squares on both sides of the central square in the map template, and there are an equal number of unit squares on both sides of the central square in the grid where it is located.
11. The grid map operation method according to claim 7, wherein The map template is configured to cover a grid of 8 rows and 8 columns; The grid is configured to cover a unit square of 5 rows and 5 columns in the map template; Among them, the side length of each unit square is 1 centimeter in the physical world, so that each unit square represents one square centimeter in the physical world.
12. A chip, characterized in that, The chip stores program codes corresponding to the grid map operation method described in any one of claims 1 to 11.
13. A robot, characterized in that, The robot is equipped with the chip described in claim 12, and the robot is configured to execute the grid map operation method described in any one of claims 1 to 11.
Citation Information
Patent Citations
Method for marking built-in map of robot, chip and indoor cleaning robot
CN108931980A
Map traversal block establishing method of global grid map, chip and mobile robot
CN111631639A