Search

CN-117218178-B - Room area-based robot map construction optimization method, chip and robot

CN117218178BCN 117218178 BCN117218178 BCN 117218178BCN-117218178-B

Abstract

The invention discloses a robot map construction optimization method based on room area, a chip and a robot, wherein the method comprises the steps of obtaining all rooms in a robot map construction result; and traversing to calculate the area of each room, judging whether the area of the room is larger than a preset area threshold, optimizing the room by adopting a first mapping optimization method if the area of the room is larger than the preset area threshold, and optimizing the room by adopting a second mapping optimization method if the area of the room is smaller than or equal to the preset area threshold. The invention determines the type of the map construction optimization method adopted by each room based on the comparison result of the areas of all rooms in the robot map construction result and the preset area threshold value, thereby realizing targeted optimization of each room in the robot map construction result, improving the optimization effect of the robot map construction result and improving the reliability of the robot map construction.

Inventors

  • ZHANG ZIQIAN
  • HUANG HUIBAO
  • CHEN JINJIE
  • You Sixia

Assignees

  • 珠海一微半导体股份有限公司

Dates

Publication Date
20260505
Application Date
20220602

Claims (13)

  1. 1. The robot map construction optimization method based on the room area is characterized by comprising the following steps of: Acquiring all rooms in a robot map construction result; Traversing to calculate the area of each room, judging whether the area of the room is larger than a preset area threshold, optimizing the room by adopting a first map-building optimization method if the area of the room is larger than the preset area threshold, and optimizing the room by adopting a second map-building optimization method if the area of the room is smaller than or equal to the preset area threshold; The first mapping optimization method is a mapping optimization method for correcting only rooms without deleting the rooms directly, and the second mapping optimization method is a mapping optimization method for deleting rooms which do not meet limiting conditions from mapping results through screening of some limiting conditions.
  2. 2. The method for optimizing the robot mapping based on the room area according to claim 1, wherein the optimizing the room by adopting the first mapping optimization method specifically comprises the steps of performing line scanning on the room row by row and column by column, judging whether each pixel gray value is smaller than a preset gray value, if yes, deleting the pixel, otherwise, reserving the pixel until all pixel gray values in the room are scanned and judged, and completing the optimizing of the room.
  3. 3. The method for optimizing the map of the robot based on the room area of claim 1, wherein the optimizing the room by adopting the second map optimizing method comprises the steps of scanning the edges of the room, counting the total edge length and the unknown edge length of the room, and determining whether to delete the room from the map construction result according to the ratio of the unknown edge length to the total edge length of the room; wherein the total edge length of the room comprises a known edge length and an unknown edge length, the known edge comprises an edge definitely occupied by the obstacle and an edge definitely not occupied by the obstacle, and the unknown edge is an edge with unclear state of whether the unknown edge is occupied by the obstacle or not.
  4. 4. The method for optimizing the map building of the robot based on the room area of claim 3, wherein determining whether to delete the room from the map building result according to the ratio of the unknown edge length of the room to the total edge length of the room comprises deleting the room from the map building result if the ratio of the unknown edge length of the room to the total edge length of the room is greater than a first threshold.
  5. 5. The method for optimizing a map of a robot based on an area of a room of claim 4, wherein determining whether to delete the room from the map result based on a ratio of an unknown edge length of the room to a total edge length of the room further comprises retaining the room in the map result if the ratio of the unknown edge length of the room to the total edge length of the room is less than a second threshold, wherein the second threshold is less than the first threshold.
  6. 6. The method for optimizing a map of a robot based on a room area of claim 5, wherein determining whether to delete the room from the map result according to a ratio of an unknown edge length of the room to a total edge length thereof, further comprises optimizing the room by a third map optimizing method if the ratio of the unknown edge of the room to the total edge length thereof is less than or equal to a first threshold and greater than or equal to a second threshold.
  7. 7. The method for optimizing the map of the robot based on the room area of claim 5, wherein the optimizing the room by the third map optimizing method comprises the steps of horizontally projecting and vertically projecting the room, and determining whether to delete the room from the map construction result according to the result form of the horizontal projection and the result form of the vertical projection of the room.
  8. 8. The method for optimizing a map of a robot based on a room area of claim 7, wherein determining whether to delete the room from the map result according to the result form of the horizontal projection and the result form of the vertical projection of the room comprises deleting the room from the map result when at least one of the result form of the horizontal projection or the result form of the vertical projection of the room satisfies a triangle form or a trapezoid form.
  9. 9. The robot map construction optimization method is characterized by comprising the following steps of: Acquiring all rooms in a robot map construction result; acquiring the area of each room; Selecting a room with the largest area from all rooms, optimizing the room with the largest area by adopting a first map construction optimization method, and optimizing the room with the largest non-area by adopting a second map construction optimization method; The first mapping optimization method is a mapping optimization method for correcting only rooms without deleting the rooms directly, and the second mapping optimization method is a mapping optimization method for deleting rooms which do not meet limiting conditions from mapping results through screening of some limiting conditions.
  10. 10. The robot mapping optimization method according to claim 9, wherein the room with the largest area is optimized by adopting a first mapping optimization method, specifically comprising the steps of performing line scanning on the room with the largest area row by row and column by column, judging whether the gray value of each pixel is smaller than a preset gray value, if so, deleting the pixel, otherwise, reserving the pixel until all the gray values of the pixels in the room with the largest area are scanned and judged, and completing the optimization of the room with the largest area.
  11. 11. The robot mapping optimization method according to claim 9, wherein the optimizing the room with the largest non-area by the second mapping optimization method specifically comprises: Scanning the edge of each room with the largest non-area, and counting the total edge length and the unknown edge length of each room with the largest non-area; calculating the ratio of the unknown edge length to the total edge length of each room with the largest non-area; Judging the relation between the ratio of the unknown edge length of each room with the largest non-area to the total edge length and the first threshold value and the second threshold value; when the ratio of the unknown edge length of the room with the largest non-area to the total edge length is larger than a first threshold value, deleting the room with the largest non-area from the mapping result, and completing the optimization of the room with the largest non-area; when the ratio of the unknown edge length of the room with the largest non-area to the total edge length is smaller than or equal to a first threshold value and larger than or equal to a second threshold value, optimizing the room with the largest non-area by adopting a third mapping optimization method; When the ratio of the unknown edge length of the room with the largest non-area to the total edge length of the room with the largest non-area is smaller than a second threshold value, the room with the largest non-area is reserved in a mapping result, and the optimization of the room with the largest non-area is completed; wherein the second threshold is less than the first threshold; The total edge length of the room with the largest non-area refers to the total edge length of the room with the largest non-area, which is recorded in a cumulative way in the process of scanning the edge of the room with the largest non-area, wherein the total edge length comprises a known edge length and an unknown edge length, the known edge comprises an edge which is definitely occupied by an obstacle and an edge which is definitely unoccupied by the obstacle, and the unknown edge refers to an edge which cannot be definitely occupied by the obstacle or not.
  12. 12. The robot mapping optimization method according to claim 11, wherein the optimizing the room with the largest non-area by using a third mapping optimization method specifically comprises: performing horizontal projection and vertical projection on the room with the largest non-area; Judging whether at least one of the result form of horizontal projection or the result form of vertical projection of the room with the largest non-area meets the triangle form or the trapezoid form; If yes, deleting the room with the largest non-area from the mapping result, and completing the optimization of the room with the largest non-area; If not, the room with the largest non-area is reserved in the mapping result, and the optimization of the room with the largest non-area is completed.
  13. 13. A robot is characterized in that, the robot includes: The environment sensing sensor is used for acquiring surrounding environment data of the robot; the mapping module is used for generating a robot mapping result based on the environmental data acquired by the environmental perception sensor; a chip having stored therein a computer program which, when executed by a processor, performs the robot mapping optimization method based on a room area according to any one of claims 1 to 8, or performs the robot mapping optimization method according to claims 9 to 12; and the processor is used for running the computer program stored in the chip.

Description

Room area-based robot map construction optimization method, chip and robot Technical Field The invention relates to the technical field of robot mapping, in particular to a robot mapping optimization method based on room area, a chip and a robot. Background At present, due to the existence of transparent objects such as glass and plastic or mirror objects in the working environment of the robot, the environment information perceived by the environment sensor is easy to have larger error, so that the room division is disordered in the robot drawing result, and even more than one room is combined into one room. When more than one room is merged into one room in the mapping result, there may be a case where a room with incomplete mapping and a complete room are merged together, how to better optimize the robot mapping result function for this case is currently to be solved. Disclosure of Invention In order to solve the problems, the invention provides a robot mapping optimization method based on room area, a chip and a robot, and the method for optimizing the mapping result is selected by the area of a room in the robot mapping result, so that the mapping result optimization problem that more than one room is combined into one room can be solved pertinently, and the reliability of the robot mapping result is improved. The specific technical scheme of the invention is as follows: The robot map construction optimization method based on the room area comprises the steps of obtaining all rooms in a robot map construction result, traversing and calculating the area of each room, judging whether the area of the room is larger than a preset area threshold, optimizing the room by adopting a first map construction optimization method if the area of the room is larger than the preset area threshold, and optimizing the room by adopting a second map construction optimization method if the area of the room is smaller than or equal to the preset area threshold. Further, the first mapping optimization method is adopted for optimizing the room, and specifically comprises the steps of carrying out line scanning on the room line by line and column by column, judging whether the gray value of each pixel is smaller than a preset gray value, if yes, deleting the pixel, and if not, reserving the pixel until all the gray values of the pixels in the room are scanned and judged, and completing the optimization of the room. Further, the second mapping optimization method is adopted for optimizing the room, and specifically comprises the steps of scanning the edges of the room, counting the total edge length and the unknown edge length of the room, and determining whether to delete the room from the mapping result according to the ratio of the unknown edge length to the total edge length of the room. Further, determining whether to delete the room from the mapping result according to the ratio of the unknown edge length of the room to the total edge length of the room, specifically includes deleting the room from the mapping result if the ratio of the unknown edge length of the room to the total edge length of the room is greater than a first threshold. Further, determining whether to delete the room from the mapping result according to the ratio of the unknown edge length of the room to the total edge length of the room, and further comprising retaining the room in the mapping result if the ratio of the unknown edge length of the room to the total edge length of the room is less than a second threshold, wherein the second threshold is less than the first threshold. Further, determining whether to delete the room from the mapping result according to the ratio of the unknown edge length of the room to the total edge length of the room, and optimizing the room by adopting a third mapping optimization method if the ratio of the unknown edge of the room to the total edge length of the room is smaller than or equal to a first threshold value and larger than or equal to a second threshold value. Further, the optimizing of the room by the third mapping optimization method specifically comprises the steps of horizontally projecting and vertically projecting the room, and determining whether to delete the room from the mapping result according to the horizontal projection result form and the vertical projection result form of the room. Further, determining whether to delete the room from the mapping result according to the horizontal projection result form and the vertical projection result form of the room specifically includes deleting the room from the mapping result when at least one of the horizontal projection result form or the vertical projection result form of the room satisfies the triangle form or the trapezoid form. The invention also discloses a robot map construction optimization method which comprises the steps of obtaining all rooms in a robot map construction result, obtaining the area of each room, selecting the room with the l