CN116465390A - Method and device for building map by robot and map generation system - Google Patents

Method and device for building map by robot and map generation system Download PDF

Info

Publication number
CN116465390A
CN116465390A CN202310387394.XA CN202310387394A CN116465390A CN 116465390 A CN116465390 A CN 116465390A CN 202310387394 A CN202310387394 A CN 202310387394A CN 116465390 A CN116465390 A CN 116465390A
Authority
CN
China
Prior art keywords
robot
map
building
area
controlling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310387394.XA
Other languages
Chinese (zh)
Inventor
曾繁宇
谭泽汉
高彩红
杨双赫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Gree Intelligent Equipment Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Gree Intelligent Equipment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai, Zhuhai Gree Intelligent Equipment Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202310387394.XA priority Critical patent/CN116465390A/en
Publication of CN116465390A publication Critical patent/CN116465390A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/38Electronic maps specially adapted for navigation; Updating thereof
    • G01C21/3804Creation or updating of map data
    • G01C21/3807Creation or updating of map data characterised by the type of data
    • G01C21/383Indoor data
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/38Electronic maps specially adapted for navigation; Updating thereof
    • G01C21/3804Creation or updating of map data
    • G01C21/3833Creation or updating of map data characterised by the source of data
    • G01C21/3837Data obtained from a single source
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S13/00Systems using the reflection or reradiation of radio waves, e.g. radar systems; Analogous systems using reflection or reradiation of waves whose nature or wavelength is irrelevant or unspecified
    • G01S13/88Radar or analogous systems specially adapted for specific applications
    • G01S13/89Radar or analogous systems specially adapted for specific applications for mapping or imaging

Landscapes

  • Engineering & Computer Science (AREA)
  • Remote Sensing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Electromagnetism (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The application provides a method and a device for building a map by a robot and a map generation system, wherein the robot comprises a radar, and the method comprises the following steps: controlling the robot to move along the building edge until the robot moves to the initial position of the robot, controlling the radar to scan and building a map according to the scanning result in the moving process to obtain a plurality of first map blocks, and synthesizing the plurality of first map blocks into a first building map, wherein the building edge is a wall body of a building to be built; controlling the robot to move in a blank area, controlling the radar to scan in the moving process, and building a map according to the scanning result to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in a first building map in a building to be mapped; a plurality of second map blocks and the first building map are combined into a second building map, so that the problem that the map is incomplete due to blind map building in the prior art is solved.

Description

Method and device for building map by robot and map generation system
Technical Field
The present invention relates to the field of map generation, and in particular, to a method and apparatus for robot to create a map, a computer readable storage medium, and a map generation system.
Background
Along with the higher and higher automation level of the factory, the requirement on the cargo transportation is higher and higher, and meanwhile, the requirement on the automatic cargo carrying of the agv trolley is higher and higher, but the factory is required to be autonomously constructed at the beginning of the cargo transportation, so that the agv trolley can be from a starting point to a target point, and the cargo carrying is satisfied; however, in the process of autonomous mapping, the agv trolley often suffers from incomplete mapping, and falls out of a factory area where a map needs to be established.
Disclosure of Invention
The main objective of the present application is to provide a method, an apparatus, a computer readable storage medium and a map generation system for creating a map by a robot, so as to at least solve the problem of incomplete map caused by blind map creation in the prior art.
To achieve the above object, according to one aspect of the present application, there is provided a method of building a map by a robot including a radar, the method comprising: controlling the robot to move along the building edge until the robot moves to the starting position of the robot, controlling the radar to scan and building a map according to the scanning result in the moving process to obtain a plurality of first map blocks, and synthesizing the plurality of first map blocks into a first building map, wherein the building edge is a wall body of a building to be built; controlling the robot to move in a blank area, controlling the radar to scan and establishing a map according to a scanning result in the moving process to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be constructed; and synthesizing a plurality of the second map blocks and the first building map into a second building map.
Optionally, controlling the robot to move along the building edge until the robot moves to a starting position of the robot includes: a generation step of generating a robot activity area with the current position of the robot as a center, so that the robot activity area is in contact with the building edge; a third moving step of controlling the robot to move in the robot moving area from the current position until the minimum distance between any point in the robot moving area and the moving track of the robot is smaller than a preset distance; a fourth moving step of controlling the robot to move to a target point, wherein the target point is one boundary point on the building edge of the first map, and the target point is one point with the largest distance from the center of the robot active area among all the boundary points; and sequentially repeating the generating step, the third moving step and the fourth moving step at least once until the robot moves to the starting position of the robot.
Optionally, before controlling the robot to move to the target point, the method further comprises: detecting a building edge intersection line by adopting a Hough straight line detection method, wherein the building edge intersection line is a part of the building edge and is the longest straight line segment in the first building map; calculating the distance between two end points of the building edge intersection line and the center of the robot moving area to obtain the distance between the two end points; and determining the endpoint corresponding to the largest endpoint distance as the target point.
Optionally, generating a robot activity area with the current position of the robot as a center includes: generating a rectangular area by taking the current position of the robot as a symmetry center; the rectangular area is determined as the robot activity area.
Optionally, the third moving step includes: and controlling the robot to move in the robot moving area, recording the moving track of the robot until the minimum distance between any point in the robot moving area and the moving track is smaller than the preset distance, and controlling the robot to stop moving.
Optionally, controlling the robot to move in the blank area includes: generating an external rectangle according to the blank area, so that the blank area is positioned in the external rectangle, and all sides of the external rectangle are contacted with the blank area; and controlling the robot to move in the circumscribed rectangle.
Optionally, after synthesizing a plurality of the second map blocks and the first building map into a second building map, the method further comprises: and controlling the robot to stop moving and controlling the radar to stop building a map under the condition that the second building map covers all the blank areas.
According to another aspect of the present application, there is provided an apparatus for a robot to build a map, the robot including a radar, the apparatus comprising: the first control unit is used for controlling the robot to move along the building edge until the robot moves to the starting position of the robot, controlling the radar to scan and building a map according to the scanning result in the moving process to obtain a plurality of first map blocks, and synthesizing the plurality of first map blocks into a first building map, wherein the building edge is a wall body of a building to be built; the second control unit is used for controlling the robot to move in a blank area, controlling the radar to scan in the moving process and building a map according to the scanning result to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be built; and a synthesizing unit for synthesizing a plurality of the second map blocks and the first building map into a second building map.
According to still another aspect of the present application, there is provided a computer readable storage medium, where the computer readable storage medium includes a stored program, and when the program runs, controls a device in which the computer readable storage medium is located to perform any one of the methods.
According to yet another aspect of the present application, there is provided a map generation system including: one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing any of the methods.
In the method for building the map by the robot, firstly, the robot is controlled to move along the building edge until the robot moves to the starting position of the robot, in the moving process, the radar is controlled to scan, the map is built according to the scanning result, a plurality of first map blocks are obtained, the plurality of first map blocks are synthesized into a first building map, and the building edge is a wall body of a building to be built; then, controlling the robot to move in a blank area, and controlling the radar to scan and building a map according to a scanning result in the moving process to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be built; finally, a plurality of the second map blocks and the first building map are combined into a second building map. According to the method, the robot is controlled to move for one circle along the edge of the building to complete the establishment of the peripheral map, then the robot is controlled to move in the blank area to complete the establishment of the map in the blank area, the full coverage of the map of the building to be built is achieved, and the problem that the map is incomplete due to blind map building in the prior art is solved.
Drawings
Fig. 1 illustrates a hardware block diagram of a mobile terminal performing a method for robot map creation according to an embodiment of the present application;
FIG. 2 shows a flow diagram of a method for a robot to build a map provided in accordance with an embodiment of the present application;
FIG. 3 illustrates a flow diagram of another method for a robot to build a map provided in accordance with an embodiment of the present application;
fig. 4 shows a block diagram of a robot map-building apparatus according to an embodiment of the present application.
Detailed Description
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the present application described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As described in the background art, in order to solve the problem that the map is incomplete due to blind map creation in the prior art, embodiments of the present application provide a method, an apparatus, a computer readable storage medium, and a map generation system for creating a map by a robot.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the operation on a mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of a mobile terminal of a method for building a map by a robot according to an embodiment of the present invention. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a display method of device information in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, to implement the above-described method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In the present embodiment, a method of creating a map by a robot operating on a mobile terminal, a computer terminal, or a similar computing device is provided, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different from that herein.
Fig. 2 is a flow chart of a method of robot mapping according to an embodiment of the present application. The robot comprises radar, as shown in fig. 2, the method comprising the steps of:
step S201, controlling the robot to move along the building edge until the robot moves to the initial position of the robot, controlling the radar to scan and building a map according to the scanning result in the moving process to obtain a plurality of first map blocks, and synthesizing the plurality of first map blocks into a first building map, wherein the building edge is a wall body of a building to be built;
specifically, the robot is a agv trolley, the agv trolley is placed near a corner, the robot is controlled to move along the edge of a building, the radar is controlled to scan in the moving process, a map is built according to the scanning result, the character shape returning detection is realized, and the peripheral map is built.
Step S202, controlling the robot to move in a blank area, and controlling the radar to scan and building a map according to a scanning result in the moving process to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be built;
specifically, after the peripheral map is built, an unknown area which is not scanned, namely a blank area, is still present, the robot is controlled to move in the blank area, and the radar scans simultaneously to build the map until map blocks of all the blank areas, namely a plurality of second map blocks, are obtained.
Step S203, synthesizing a plurality of second map blocks and the first building map into a second building map.
Specifically, the map blocks and the peripheral map of the blank area are combined into a complete map, that is, a plurality of second map blocks and the first building map are combined into a second building map, that is, the complete map of the building to be mapped.
In the method for building the map by the robot, firstly, the robot is controlled to move along the edge of a building until the robot moves to the initial position of the robot, in the moving process, the radar is controlled to scan, the map is built according to the scanning result, a plurality of first map blocks are obtained, the plurality of first map blocks are synthesized into a first building map, and the edge of the building is a wall body of a building to be built; then, controlling the robot to move in a blank area, and controlling the radar to scan and building a map according to a scanning result in the moving process to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be built; and finally, combining a plurality of the second map blocks and the first building map into a second building map. According to the method, the robot is controlled to move for one circle along the edge of the building to complete the establishment of the peripheral map, then the robot is controlled to move in the blank area to complete the establishment of the map in the blank area, the full coverage of the map of the building to be built is achieved, and the problem that the map is incomplete due to blind map building in the prior art is solved.
To ensure that the robot moves along the building edge, in an alternative embodiment, step S201 includes:
step S2011 of generating a robot activity area around the current position of the robot so that the robot activity area contacts the building edge;
step S2012, a third moving step of controlling the robot to move in the robot movement area from the current position until a minimum distance between any point in the robot movement area and a movement trajectory of the robot is smaller than a predetermined distance;
step S2013, a fourth moving step of controlling the robot to move to a target point, wherein the target point is one boundary point on the building edge of the first map, and the target point is one point with the largest distance from the center of the robot moving area among all the boundary points;
step S2014, repeating the generating step, the third moving step, and the fourth moving step at least once in sequence until the robot moves to the start position of the robot.
Specifically, a agv trolley is placed near a corner, a robot activity area is generated by taking the current position of the robot as the center, an autonomous drawing building mode is started, and a foundation is laid for a subsequent continuous autonomous drawing building small area; after a map is established, determining the longest straight line side of the established map as a building edge, and then going to the vertex of the longest straight line side for next map establishment; and (3) issuing four points, searching the top point of the longest straight line side, continuing issuing the four points, and establishing a grid map clockwise along the wall until the trolley performs multiple map establishment in a closed factory, and finally coinciding with the position of the first map establishment, so that the robot moves to the initial position of the robot, and the establishment of the peripheral map is completed.
To further ensure that the robot moves along the building edge, in an alternative embodiment, before step S2013, the method further comprises:
step S301, detecting building edge intersection lines by adopting a Hough straight line detection method, wherein the building edge intersection lines are part of the building edges and are the longest straight line segments in the first building map;
step S302, calculating the distance between two endpoints of the building edge intersection line and the center of the robot active area to obtain the distance between the two endpoints;
step S303, the end point corresponding to the largest end point distance is determined as the target point.
Specifically, the detection is performed in a Hough straight line mode, the position where no target point is finally detected by the trolley is used as the center of a circle according to the obtained map, the longest side is found out simultaneously in the front, the back, the left and the right of the trolley, the longest side is found out to be the wall side, then the trolley moves to the longest side of the map, and the vicinity of a vertex where the longest side of the map is not perpendicular to the other side is in an open field, the radar scans the map edge irregularly in the process of opening the map, so that the place where the longest side is perpendicular to the other straight line is a corner, the other line and the point are marked as a point with the largest distance from the center of a robot moving area on the intersection of the building edge, when agv is found out that the longest side is perpendicular to the other side again, the corner is described, the intersection line of the two sides and the building edge at the beginning is perpendicular to the first side, the point is selected, the intersection line of the one side is perpendicular to the building edge, the point is detected to the latest point, and the position of the highest point is detected along the edge, and the position of the machine is guaranteed to be the edge.
In order to improve the efficiency of map building, in an alternative embodiment, the step S2011 includes:
step S20111, generating a rectangular area by taking the current position of the robot as a symmetry center;
step S20112, determining the rectangular area as the robot movement area.
Specifically, four points are issued by taking the trolley as the center, and the four points are enclosed to form a rectangle, namely the robot moving area, so that the robot planning path finishes the scanning of the robot moving area, and the efficiency of map establishment is improved.
In order to avoid missing areas of the building edge in the map building, in an alternative embodiment, the step S2012 includes:
and step S20121, controlling the robot to move in the robot moving area, recording the moving track of the robot until the minimum distance between any point in the robot moving area and the moving track is smaller than the preset distance, and controlling the robot to stop moving.
Specifically, the robot is controlled to move in the robot moving area so as to complete the scanning of the robot moving area until the minimum distance between any point in the robot moving area and the moving track is smaller than a preset distance, the complete scanning of the robot moving area can be completed, a complete map near the robot moving area is obtained, the area near the building edge near the robot moving area is avoided being omitted, and the robot can stop moving and the radar stops scanning.
In order to reduce the mapping workload, in an alternative embodiment, the step S202 includes:
step S2021, generating an external rectangle according to the blank area, such that the blank area is located in the external rectangle, and all sides of the external rectangle are in contact with the blank area;
step S2022, controlling the robot to move within the circumscribed rectangle.
Specifically, the unknown area which is not scanned in the maximum range on the map is calculated to be an external rectangle, then four vertexes of the external rectangle are calculated, autonomous exploration and map construction are carried out in the range of the four vertexes, the external rectangle is scanned, the area of the scanned area is ensured to be minimum while the map area is not missed, and the map construction workload is reduced.
In order to ensure the integrity of the map, in an alternative embodiment, after the step S202, the method further includes:
step S401, when the second building map covers all the blank areas, controlling the robot to stop moving and controlling the radar to stop building the map.
Specifically, autonomous exploration and mapping are carried out within the range of four vertexes of the circumscribed rectangle until no unknown area exists in the circumscribed rectangle, exploration is stopped, and autonomous mapping is completed, so that the integrity of the map is ensured.
In order to enable those skilled in the art to more clearly understand the technical solutions of the present application, the implementation process of the method for creating a map by a robot of the present application will be described in detail below with reference to specific embodiments.
The embodiment relates to a specific method for building a map by a robot, as shown in fig. 3, comprising the following steps:
step S1: the agv trolley is placed near the corner, so that the longest side of the built graph can be successfully found after the autonomous building of the graph, the vertex of the longest side is found, four points are issued by taking the trolley as the center, the four points are enclosed to form a rectangle, and the autonomous building graph is explored in the rectangle;
step S2: extracting the built map by using opencv software, detecting by adopting a Hough straight line mode, taking the position of the car, which is finally detected to be free of the target point, as a circle center according to the obtained picture, adopting the car to search the longest side at the same time in the front, back, left and right of the car, finding the longest side to be a wall side, then walking to the position near the vertex of the map, which is the longest side and is not perpendicular to the other side, wherein the scanned map edge is irregular in the process of starting the map on an open field, so that the position where the longest side is perpendicular to the other straight line is the corner, and marking the other line and the point as the intersection line of the target point and the building edge; then, moving to the vicinity of the vertex coordinates to continue to issue four points, and performing autonomous construction within the range of the four points which are issued continuously, so that the agv trolley performs cyclic reciprocation, when the situation that the longest edge is vertical to the other edge appears in the autonomous construction again, describing a corner, discarding a line which is vertical to two edges at the same time, intersecting the target point and the building edge which are marked at the beginning, and selecting the vertex of the latest detected edge length of one edge which is vertical to only one edge as the next target point; the detection is circularly carried out in such a way, and the intersection line of the detected target point and the building edge is known;
Step S3: after detecting intersection lines and target points of the edges of the building at the beginning, extracting the whole map, solving an external rectangle for an unscanned unknown area in the maximum range on the map, solving four vertexes of the external rectangle, and automatically searching and mapping within the range of the four vertexes until no unknown area exists in the defined external rectangle, stopping searching, and completing the automatic mapping.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides a device for building the map by the robot, and the device for building the map by the robot can be used for executing the method for building the map by the robot. The device is used for realizing the above embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The following describes a device for creating a map by a robot according to an embodiment of the present application.
Fig. 4 is a block diagram of a robot map-building apparatus according to an embodiment of the present application. The robot includes a radar, as shown in fig. 4, and the apparatus includes:
a first control unit 10, configured to control a robot to move along a building edge until the robot moves to a starting position of the robot, and in a moving process, control the radar to scan and build a map according to a scanning result to obtain a plurality of first map blocks, and combine the plurality of first map blocks into a first building map, where the building edge is a wall of a building to be mapped;
specifically, the robot is a agv trolley, the agv trolley is placed near a corner, the robot is controlled to move along the edge of a building, the radar is controlled to scan in the moving process, a map is built according to the scanning result, the character shape returning detection is realized, and the peripheral map is built.
A second control unit 20, configured to control the robot to move in a blank area, and in the moving process, control the radar to scan and set up a map according to a result of the scanning to obtain a plurality of second map blocks, where the blank area is an area in the building to be built, where the first building map does not include the first building map;
Specifically, after the peripheral map is built, an unknown area which is not scanned, namely a blank area, is still present, the robot is controlled to move in the blank area, and the radar scans simultaneously to build the map until map blocks of all the blank areas, namely a plurality of second map blocks, are obtained.
And a synthesizing unit 30 for synthesizing the plurality of second map blocks and the first building map into a second building map.
Specifically, the map blocks and the peripheral map of the blank area are combined into a complete map, that is, a plurality of second map blocks and the first building map are combined into a second building map, that is, the complete map of the building to be mapped.
In the device for building the map by the robot, the first control unit controls the robot to move along the building edge until the robot moves to the initial position of the robot, and in the moving process, controls the radar to scan and build the map according to the scanning result to obtain a plurality of first map blocks, and synthesizes the plurality of first map blocks into a first building map, wherein the building edge is a wall body of a building to be built; the second control unit controls the robot to move in a blank area, and in the moving process, controls the radar to scan and establishes a map according to the scanning result to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be mapped; the synthesizing unit synthesizes the plurality of second map blocks and the first building map into a second building map. The device controls the robot to move a circle along the edge of the building to complete the establishment of the peripheral map, then controls the robot to move in the blank area to complete the establishment of the map in the blank area, realizes the full coverage of the map of the building to be built, and solves the problem that the map is incomplete due to blind map building in the prior art.
In order to ensure that the robot moves along the building edge, in an alternative embodiment, the first control unit comprises:
a first generation module for executing a generation step of generating a robot activity area centering on a current position of the robot so that the robot activity area is in contact with the building edge;
a first control module for executing a third movement step of controlling the robot to move in the robot moving area from the current position until a minimum distance between any point in the robot moving area and a movement track of the robot is smaller than a predetermined distance;
a second control module for executing a fourth movement step to control the robot to move to a target point, wherein the target point is one boundary point on the building edge of the first map, and the target point is one point with the largest distance from the center of the robot moving area among all the boundary points;
and a repeating module, configured to sequentially repeat the generating step, the third moving step, and the fourth moving step at least once until the robot moves to the starting position of the robot.
Specifically, a agv trolley is placed near a corner, a robot activity area is generated by taking the current position of the robot as the center, an autonomous drawing building mode is started, and a foundation is laid for a subsequent continuous autonomous drawing building small area; after a map is established, determining the longest straight line side of the established map as a building edge, and then going to the vertex of the longest straight line side for next map establishment; and (3) issuing four points, searching the top point of the longest straight line side, continuing issuing the four points, and establishing a grid map clockwise along the wall until the trolley performs multiple map establishment in a closed factory, and finally coinciding with the position of the first map establishment, so that the robot moves to the initial position of the robot, and the establishment of the peripheral map is completed.
To further ensure that the robot moves along the building edge, in an alternative embodiment, the apparatus further comprises:
a processing unit, configured to detect a building edge intersection line by using a hough straight line detection method before controlling the robot to move to a target point, where the building edge intersection line is a part of the building edge and is a longest straight line segment in the first building map;
the calculating unit is used for calculating the distance between the two end points of the building edge intersection line and the center of the robot moving area to obtain the distance between the two end points;
And a determining unit configured to determine the endpoint corresponding to the largest endpoint distance as the target point.
Specifically, the detection is performed in a Hough straight line mode, the position where no target point is finally detected by the trolley is used as the center of a circle according to the obtained map, the longest side is found out simultaneously in the front, the back, the left and the right of the trolley, the longest side is found out to be the wall side, then the trolley moves to the longest side of the map, and the vicinity of a vertex where the longest side of the map is not perpendicular to the other side is in an open field, the radar scans the map edge irregularly in the process of opening the map, so that the place where the longest side is perpendicular to the other straight line is a corner, the other line and the point are marked as a point with the largest distance from the center of a robot moving area on the intersection of the building edge, when agv is found out that the longest side is perpendicular to the other side again, the corner is described, the intersection line of the two sides and the building edge at the beginning is perpendicular to the first side, the point is selected, the intersection line of the one side is perpendicular to the building edge, the point is detected to the latest point, and the position of the highest point is detected along the edge, and the position of the machine is guaranteed to be the edge.
In order to improve the efficiency of map building, in an alternative embodiment, the first generating module includes:
the generation submodule is used for generating a rectangular area by taking the current position of the robot as a symmetry center;
and the determining submodule is used for determining the rectangular area as the robot activity area.
Specifically, four points are issued by taking the trolley as the center, and the four points are enclosed to form a rectangle, namely the robot moving area, so that the robot planning path finishes the scanning of the robot moving area, and the efficiency of map establishment is improved.
In order to avoid missing areas of building edges in map building, in an alternative embodiment, the first control module includes:
and the control sub-module is used for controlling the robot to move in the robot moving area, recording the moving track of the robot, and controlling the robot to stop moving until the minimum distance between any point in the robot moving area and the moving track is smaller than the preset distance.
Specifically, the robot is controlled to move in the robot moving area so as to complete the scanning of the robot moving area until the minimum distance between any point in the robot moving area and the moving track is smaller than a preset distance, the complete scanning of the robot moving area can be completed, a complete map near the robot moving area is obtained, the area near the building edge near the robot moving area is avoided being omitted, and the robot can stop moving and the radar stops scanning.
In order to reduce the mapping workload, in an alternative embodiment, the second control unit includes:
the second generation module is used for generating an external rectangle according to the blank area, so that the blank area is positioned in the external rectangle, and all sides of the external rectangle are in contact with the blank area;
and the third control module is used for controlling the robot to move in the circumscribed rectangle.
Specifically, the unknown area which is not scanned in the maximum range on the map is calculated to be an external rectangle, then four vertexes of the external rectangle are calculated, autonomous exploration and map construction are carried out in the range of the four vertexes, the external rectangle is scanned, the area of the scanned area is ensured to be minimum while the map area is not missed, and the map construction workload is reduced.
In order to ensure the integrity of the map, in an alternative embodiment, the apparatus further includes:
and a third control unit configured to control the robot to stop moving and control the radar to stop building a map when the second building map covers all the empty areas after the robot is controlled to move in the empty areas.
Specifically, autonomous exploration and mapping are carried out within the range of four vertexes of the circumscribed rectangle until no unknown area exists in the circumscribed rectangle, exploration is stopped, and autonomous mapping is completed, so that the integrity of the map is ensured.
The robot map creating device comprises a processor and a memory, wherein the first control unit, the second control unit, the synthesis unit and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions. The modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one kernel, and the problem of incomplete map caused by blind map building in the prior art is solved by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the invention provides a computer readable storage medium, which comprises a stored program, wherein the program is used for controlling equipment where the computer readable storage medium is located to execute a method for establishing a map by a robot.
Specifically, the method for building the map by the robot comprises the following steps:
step S201, controlling the robot to move along the building edge until the robot moves to the initial position of the robot, controlling the radar to scan and building a map according to the scanning result in the moving process to obtain a plurality of first map blocks, and synthesizing the plurality of first map blocks into a first building map, wherein the building edge is a wall body of a building to be built;
specifically, the robot is a agv trolley, the agv trolley is placed near a corner, the robot is controlled to move along the edge of a building, the radar is controlled to scan in the moving process, a map is built according to the scanning result, the character shape returning detection is realized, and the peripheral map is built.
Step S202, controlling the robot to move in a blank area, and controlling the radar to scan and building a map according to a scanning result in the moving process to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be built;
specifically, after the peripheral map is built, an unknown area which is not scanned, namely a blank area, is still present, the robot is controlled to move in the blank area, and the radar scans simultaneously to build the map until map blocks of all the blank areas, namely a plurality of second map blocks, are obtained.
Step S203, synthesizing a plurality of second map blocks and the first building map into a second building map.
Specifically, the map blocks and the peripheral map of the blank area are combined into a complete map, that is, a plurality of second map blocks and the first building map are combined into a second building map, that is, the complete map of the building to be mapped.
Optionally, the step S201 includes: step S2011 of generating a robot activity area around the current position of the robot so that the robot activity area contacts the building edge; step S2012, a third moving step of controlling the robot to move in the robot movement area from the current position until a minimum distance between any point in the robot movement area and a movement trajectory of the robot is smaller than a predetermined distance; step S2013, a fourth moving step of controlling the robot to move to a target point, wherein the target point is one boundary point on the building edge of the first map, and the target point is one point with the largest distance from the center of the robot moving area among all the boundary points; step S2014, repeating the generating step, the third moving step, and the fourth moving step at least once in sequence until the robot moves to the start position of the robot.
Specifically, a agv trolley is placed near a corner, a robot activity area is generated by taking the current position of the robot as the center, an autonomous drawing building mode is started, and a foundation is laid for a subsequent continuous autonomous drawing building small area; after a map is established, determining the longest straight line side of the established map as a building edge, and then going to the vertex of the longest straight line side for next map establishment; and (3) issuing four points, searching the top point of the longest straight line side, continuing issuing the four points, and establishing a grid map clockwise along the wall until the trolley performs multiple map establishment in a closed factory, and finally coinciding with the position of the first map establishment, so that the robot moves to the initial position of the robot, and the establishment of the peripheral map is completed.
Optionally, before the step S2013, the method further includes: step S301, detecting building edge intersection lines by adopting a Hough straight line detection method, wherein the building edge intersection lines are part of the building edges and are the longest straight line segments in the first building map; step S302, calculating the distance between two endpoints of the building edge intersection line and the center of the robot active area to obtain the distance between the two endpoints; step S303, the end point corresponding to the largest end point distance is determined as the target point.
Specifically, the detection is performed in a Hough straight line mode, the position where no target point is finally detected by the trolley is used as the center of a circle according to the obtained map, the longest side is found out simultaneously in the front, the back, the left and the right of the trolley, the longest side is found out to be the wall side, then the trolley moves to the longest side of the map, and the vicinity of a vertex where the longest side of the map is not perpendicular to the other side is in an open field, the radar scans the map edge irregularly in the process of opening the map, so that the place where the longest side is perpendicular to the other straight line is a corner, the other line and the point are marked as a point with the largest distance from the center of a robot moving area on the intersection of the building edge, when agv is found out that the longest side is perpendicular to the other side again, the corner is described, the intersection line of the two sides and the building edge at the beginning is perpendicular to the first side, the point is selected, the intersection line of the one side is perpendicular to the building edge, the point is detected to the latest point, and the position of the highest point is detected along the edge, and the position of the machine is guaranteed to be the edge.
Optionally, the step S2011 includes: step S20111, generating a rectangular area by taking the current position of the robot as a symmetry center; step S20112, determining the rectangular area as the robot movement area.
Specifically, four points are issued by taking the trolley as the center, and the four points are enclosed to form a rectangle, namely the robot moving area, so that the robot planning path finishes the scanning of the robot moving area, and the efficiency of map establishment is improved.
Optionally, the step S2012 includes: and step S20121, controlling the robot to move in the robot moving area, recording the moving track of the robot until the minimum distance between any point in the robot moving area and the moving track is smaller than the preset distance, and controlling the robot to stop moving.
Specifically, the robot is controlled to move in the robot moving area so as to complete the scanning of the robot moving area until the minimum distance between any point in the robot moving area and the moving track is smaller than a preset distance, the complete scanning of the robot moving area can be completed, a complete map near the robot moving area is obtained, the area near the building edge near the robot moving area is avoided being omitted, and the robot can stop moving and the radar stops scanning.
Optionally, the step S202 includes: step S2021, generating an external rectangle according to the blank area, such that the blank area is located in the external rectangle, and all sides of the external rectangle are in contact with the blank area; step S2022, controlling the robot to move within the circumscribed rectangle.
Specifically, the unknown area which is not scanned in the maximum range on the map is calculated to be an external rectangle, then four vertexes of the external rectangle are calculated, autonomous exploration and map construction are carried out in the range of the four vertexes, the external rectangle is scanned, the area of the scanned area is ensured to be minimum while the map area is not missed, and the map construction workload is reduced.
Optionally, after the step S202, the method further includes: step S401, when the second building map covers all the blank areas, controlling the robot to stop moving and controlling the radar to stop building the map.
Specifically, autonomous exploration and mapping are carried out within the range of four vertexes of the circumscribed rectangle until no unknown area exists in the circumscribed rectangle, exploration is stopped, and autonomous mapping is completed, so that the integrity of the map is ensured.
The embodiment of the invention provides a processor, which is used for running a program, wherein the program runs to execute the method for building the map by the robot.
Step S201, controlling the robot to move along the building edge until the robot moves to the initial position of the robot, controlling the radar to scan and building a map according to the scanning result in the moving process to obtain a plurality of first map blocks, and synthesizing the plurality of first map blocks into a first building map, wherein the building edge is a wall body of a building to be built;
specifically, the robot is a agv trolley, the agv trolley is placed near a corner, the robot is controlled to move along the edge of a building, the radar is controlled to scan in the moving process, a map is built according to the scanning result, the character shape returning detection is realized, and the peripheral map is built.
Step S202, controlling the robot to move in a blank area, and controlling the radar to scan and building a map according to a scanning result in the moving process to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be built;
specifically, after the peripheral map is built, an unknown area which is not scanned, namely a blank area, is still present, the robot is controlled to move in the blank area, and the radar scans simultaneously to build the map until map blocks of all the blank areas, namely a plurality of second map blocks, are obtained.
Step S203, synthesizing a plurality of second map blocks and the first building map into a second building map.
Specifically, the map blocks and the peripheral map of the blank area are combined into a complete map, that is, a plurality of second map blocks and the first building map are combined into a second building map, that is, the complete map of the building to be mapped.
Optionally, the step S201 includes: step S2011 of generating a robot activity area around the current position of the robot so that the robot activity area contacts the building edge; step S2012, a third moving step of controlling the robot to move in the robot movement area from the current position until a minimum distance between any point in the robot movement area and a movement trajectory of the robot is smaller than a predetermined distance; step S2013, a fourth moving step of controlling the robot to move to a target point, wherein the target point is one boundary point on the building edge of the first map, and the target point is one point with the largest distance from the center of the robot moving area among all the boundary points; step S2014, repeating the generating step, the third moving step, and the fourth moving step at least once in sequence until the robot moves to the start position of the robot.
Specifically, a agv trolley is placed near a corner, a robot activity area is generated by taking the current position of the robot as the center, an autonomous drawing building mode is started, and a foundation is laid for a subsequent continuous autonomous drawing building small area; after a map is established, determining the longest straight line side of the established map as a building edge, and then going to the vertex of the longest straight line side for next map establishment; and (3) issuing four points, searching the top point of the longest straight line side, continuing issuing the four points, and establishing a grid map clockwise along the wall until the trolley performs multiple map establishment in a closed factory, and finally coinciding with the position of the first map establishment, so that the robot moves to the initial position of the robot, and the establishment of the peripheral map is completed.
Optionally, before the step S2013, the method further includes: step S301, detecting building edge intersection lines by adopting a Hough straight line detection method, wherein the building edge intersection lines are part of the building edges and are the longest straight line segments in the first building map; step S302, calculating the distance between two endpoints of the building edge intersection line and the center of the robot active area to obtain the distance between the two endpoints; step S303, the end point corresponding to the largest end point distance is determined as the target point.
Specifically, the detection is performed in a Hough straight line mode, the position where no target point is finally detected by the trolley is used as the center of a circle according to the obtained map, the longest side is found out simultaneously in the front, the back, the left and the right of the trolley, the longest side is found out to be the wall side, then the trolley moves to the longest side of the map, and the vicinity of a vertex where the longest side of the map is not perpendicular to the other side is in an open field, the radar scans the map edge irregularly in the process of opening the map, so that the place where the longest side is perpendicular to the other straight line is a corner, the other line and the point are marked as a point with the largest distance from the center of a robot moving area on the intersection of the building edge, when agv is found out that the longest side is perpendicular to the other side again, the corner is described, the intersection line of the two sides and the building edge at the beginning is perpendicular to the first side, the point is selected, the intersection line of the one side is perpendicular to the building edge, the point is detected to the latest point, and the position of the highest point is detected along the edge, and the position of the machine is guaranteed to be the edge.
Optionally, the step S2011 includes: step S20111, generating a rectangular area by taking the current position of the robot as a symmetry center; step S20112, determining the rectangular area as the robot movement area.
Specifically, four points are issued by taking the trolley as the center, and the four points are enclosed to form a rectangle, namely the robot moving area, so that the robot planning path finishes the scanning of the robot moving area, and the efficiency of map establishment is improved.
Optionally, the step S2012 includes: and step S20121, controlling the robot to move in the robot moving area, recording the moving track of the robot until the minimum distance between any point in the robot moving area and the moving track is smaller than the preset distance, and controlling the robot to stop moving.
Specifically, the robot is controlled to move in the robot moving area so as to complete the scanning of the robot moving area until the minimum distance between any point in the robot moving area and the moving track is smaller than a preset distance, the complete scanning of the robot moving area can be completed, a complete map near the robot moving area is obtained, the area near the building edge near the robot moving area is avoided being omitted, and the robot can stop moving and the radar stops scanning.
Optionally, the step S202 includes: step S2021, generating an external rectangle according to the blank area, such that the blank area is located in the external rectangle, and all sides of the external rectangle are in contact with the blank area; step S2022, controlling the robot to move within the circumscribed rectangle.
Specifically, the unknown area which is not scanned in the maximum range on the map is calculated to be an external rectangle, then four vertexes of the external rectangle are calculated, autonomous exploration and map construction are carried out in the range of the four vertexes, the external rectangle is scanned, the area of the scanned area is ensured to be minimum while the map area is not missed, and the map construction workload is reduced.
Optionally, after the step S202, the method further includes: step S401, when the second building map covers all the blank areas, controlling the robot to stop moving and controlling the radar to stop building the map.
Specifically, autonomous exploration and mapping are carried out within the range of four vertexes of the circumscribed rectangle until no unknown area exists in the circumscribed rectangle, exploration is stopped, and autonomous mapping is completed, so that the integrity of the map is ensured.
The embodiment of the invention provides a map generation system, which comprises a processor, a memory and a program which is stored in the memory and can run on the processor, wherein the processor realizes at least the following steps when executing the program:
Step S201, controlling the robot to move along the building edge until the robot moves to the initial position of the robot, controlling the radar to scan and building a map according to the scanning result in the moving process to obtain a plurality of first map blocks, and synthesizing the plurality of first map blocks into a first building map, wherein the building edge is a wall body of a building to be built;
specifically, the robot is a agv trolley, the agv trolley is placed near a corner, the robot is controlled to move along the edge of a building, the radar is controlled to scan in the moving process, a map is built according to the scanning result, the character shape returning detection is realized, and the peripheral map is built.
Step S202, controlling the robot to move in a blank area, and controlling the radar to scan and building a map according to a scanning result in the moving process to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be built;
specifically, after the peripheral map is built, an unknown area which is not scanned, namely a blank area, is still present, the robot is controlled to move in the blank area, and the radar scans simultaneously to build the map until map blocks of all the blank areas, namely a plurality of second map blocks, are obtained.
Step S203, synthesizing a plurality of second map blocks and the first building map into a second building map.
Specifically, the map blocks and the peripheral map of the blank area are combined into a complete map, that is, a plurality of second map blocks and the first building map are combined into a second building map, that is, the complete map of the building to be mapped.
Optionally, the step S201 includes: step S2011 of generating a robot activity area around the current position of the robot so that the robot activity area contacts the building edge; step S2012, a third moving step of controlling the robot to move in the robot movement area from the current position until a minimum distance between any point in the robot movement area and a movement trajectory of the robot is smaller than a predetermined distance; step S2013, a fourth moving step of controlling the robot to move to a target point, wherein the target point is one boundary point on the building edge of the first map, and the target point is one point with the largest distance from the center of the robot moving area among all the boundary points; step S2014, repeating the generating step, the third moving step, and the fourth moving step at least once in sequence until the robot moves to the start position of the robot.
Specifically, a agv trolley is placed near a corner, a robot activity area is generated by taking the current position of the robot as the center, an autonomous drawing building mode is started, and a foundation is laid for a subsequent continuous autonomous drawing building small area; after a map is established, determining the longest straight line side of the established map as a building edge, and then going to the vertex of the longest straight line side for next map establishment; and (3) issuing four points, searching the top point of the longest straight line side, continuing issuing the four points, and establishing a grid map clockwise along the wall until the trolley performs multiple map establishment in a closed factory, and finally coinciding with the position of the first map establishment, so that the robot moves to the initial position of the robot, and the establishment of the peripheral map is completed.
Optionally, before the step S2013, the method further includes: step S301, detecting building edge intersection lines by adopting a Hough straight line detection method, wherein the building edge intersection lines are part of the building edges and are the longest straight line segments in the first building map; step S302, calculating the distance between two endpoints of the building edge intersection line and the center of the robot active area to obtain the distance between the two endpoints; step S303, the end point corresponding to the largest end point distance is determined as the target point.
Specifically, the detection is performed in a Hough straight line mode, the position where no target point is finally detected by the trolley is used as the center of a circle according to the obtained map, the longest side is found out simultaneously in the front, the back, the left and the right of the trolley, the longest side is found out to be the wall side, then the trolley moves to the longest side of the map, and the vicinity of a vertex where the longest side of the map is not perpendicular to the other side is in an open field, the radar scans the map edge irregularly in the process of opening the map, so that the place where the longest side is perpendicular to the other straight line is a corner, the other line and the point are marked as a point with the largest distance from the center of a robot moving area on the intersection of the building edge, when agv is found out that the longest side is perpendicular to the other side again, the corner is described, the intersection line of the two sides and the building edge at the beginning is perpendicular to the first side, the point is selected, the intersection line of the one side is perpendicular to the building edge, the point is detected to the latest point, and the position of the highest point is detected along the edge, and the position of the machine is guaranteed to be the edge.
Optionally, the step S2011 includes: step S20111, generating a rectangular area by taking the current position of the robot as a symmetry center; step S20112, determining the rectangular area as the robot movement area.
Specifically, four points are issued by taking the trolley as the center, and the four points are enclosed to form a rectangle, namely the robot moving area, so that the robot planning path finishes the scanning of the robot moving area, and the efficiency of map establishment is improved.
Optionally, the step S2012 includes: and step S20121, controlling the robot to move in the robot moving area, recording the moving track of the robot until the minimum distance between any point in the robot moving area and the moving track is smaller than the preset distance, and controlling the robot to stop moving.
Specifically, the robot is controlled to move in the robot moving area so as to complete the scanning of the robot moving area until the minimum distance between any point in the robot moving area and the moving track is smaller than a preset distance, the complete scanning of the robot moving area can be completed, a complete map near the robot moving area is obtained, the area near the building edge near the robot moving area is avoided being omitted, and the robot can stop moving and the radar stops scanning.
Optionally, the step S202 includes: step S2021, generating an external rectangle according to the blank area, such that the blank area is located in the external rectangle, and all sides of the external rectangle are in contact with the blank area; step S2022, controlling the robot to move within the circumscribed rectangle.
Specifically, the unknown area which is not scanned in the maximum range on the map is calculated to be an external rectangle, then four vertexes of the external rectangle are calculated, autonomous exploration and map construction are carried out in the range of the four vertexes, the external rectangle is scanned, the area of the scanned area is ensured to be minimum while the map area is not missed, and the map construction workload is reduced.
Optionally, after the step S202, the method further includes: step S401, when the second building map covers all the blank areas, controlling the robot to stop moving and controlling the radar to stop building the map.
Specifically, autonomous exploration and mapping are carried out within the range of four vertexes of the circumscribed rectangle until no unknown area exists in the circumscribed rectangle, exploration is stopped, and autonomous mapping is completed, so that the integrity of the map is ensured.
The present application also provides a computer program product adapted to perform a program initialized with at least the following method steps when executed on a data processing device:
Step S201, controlling the robot to move along the building edge until the robot moves to the initial position of the robot, controlling the radar to scan and building a map according to the scanning result in the moving process to obtain a plurality of first map blocks, and synthesizing the plurality of first map blocks into a first building map, wherein the building edge is a wall body of a building to be built;
specifically, the robot is a agv trolley, the agv trolley is placed near a corner, the robot is controlled to move along the edge of a building, the radar is controlled to scan in the moving process, a map is built according to the scanning result, the character shape returning detection is realized, and the peripheral map is built.
Step S202, controlling the robot to move in a blank area, and controlling the radar to scan and building a map according to a scanning result in the moving process to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be built;
specifically, after the peripheral map is built, an unknown area which is not scanned, namely a blank area, is still present, the robot is controlled to move in the blank area, and the radar scans simultaneously to build the map until map blocks of all the blank areas, namely a plurality of second map blocks, are obtained.
Step S203, synthesizing a plurality of second map blocks and the first building map into a second building map.
Specifically, the map blocks and the peripheral map of the blank area are combined into a complete map, that is, a plurality of second map blocks and the first building map are combined into a second building map, that is, the complete map of the building to be mapped.
Optionally, the step S201 includes: step S2011 of generating a robot activity area around the current position of the robot so that the robot activity area contacts the building edge; step S2012, a third moving step of controlling the robot to move in the robot movement area from the current position until a minimum distance between any point in the robot movement area and a movement trajectory of the robot is smaller than a predetermined distance; step S2013, a fourth moving step of controlling the robot to move to a target point, wherein the target point is one boundary point on the building edge of the first map, and the target point is one point with the largest distance from the center of the robot moving area among all the boundary points; step S2014, repeating the generating step, the third moving step, and the fourth moving step at least once in sequence until the robot moves to the start position of the robot.
Specifically, a agv trolley is placed near a corner, a robot activity area is generated by taking the current position of the robot as the center, an autonomous drawing building mode is started, and a foundation is laid for a subsequent continuous autonomous drawing building small area; after a map is established, determining the longest straight line side of the established map as a building edge, and then going to the vertex of the longest straight line side for next map establishment; and (3) issuing four points, searching the top point of the longest straight line side, continuing issuing the four points, and establishing a grid map clockwise along the wall until the trolley performs multiple map establishment in a closed factory, and finally coinciding with the position of the first map establishment, so that the robot moves to the initial position of the robot, and the establishment of the peripheral map is completed.
Optionally, before the step S2013, the method further includes: step S301, detecting building edge intersection lines by adopting a Hough straight line detection method, wherein the building edge intersection lines are part of the building edges and are the longest straight line segments in the first building map; step S302, calculating the distance between two endpoints of the building edge intersection line and the center of the robot active area to obtain the distance between the two endpoints; step S303, the end point corresponding to the largest end point distance is determined as the target point.
Specifically, the detection is performed in a Hough straight line mode, the position where no target point is finally detected by the trolley is used as the center of a circle according to the obtained map, the longest side is found out simultaneously in the front, the back, the left and the right of the trolley, the longest side is found out to be the wall side, then the trolley moves to the longest side of the map, and the vicinity of a vertex where the longest side of the map is not perpendicular to the other side is in an open field, the radar scans the map edge irregularly in the process of opening the map, so that the place where the longest side is perpendicular to the other straight line is a corner, the other line and the point are marked as a point with the largest distance from the center of a robot moving area on the intersection of the building edge, when agv is found out that the longest side is perpendicular to the other side again, the corner is described, the intersection line of the two sides and the building edge at the beginning is perpendicular to the first side, the point is selected, the intersection line of the one side is perpendicular to the building edge, the point is detected to the latest point, and the position of the highest point is detected along the edge, and the position of the machine is guaranteed to be the edge.
Optionally, the step S2011 includes: step S20111, generating a rectangular area by taking the current position of the robot as a symmetry center; step S20112, determining the rectangular area as the robot movement area.
Specifically, four points are issued by taking the trolley as the center, and the four points are enclosed to form a rectangle, namely the robot moving area, so that the robot planning path finishes the scanning of the robot moving area, and the efficiency of map establishment is improved.
Optionally, the step S2012 includes: and step S20121, controlling the robot to move in the robot moving area, recording the moving track of the robot until the minimum distance between any point in the robot moving area and the moving track is smaller than the preset distance, and controlling the robot to stop moving.
Specifically, the robot is controlled to move in the robot moving area so as to complete the scanning of the robot moving area until the minimum distance between any point in the robot moving area and the moving track is smaller than a preset distance, the complete scanning of the robot moving area can be completed, a complete map near the robot moving area is obtained, the area near the building edge near the robot moving area is avoided being omitted, and the robot can stop moving and the radar stops scanning.
Optionally, the step S202 includes: step S2021, generating an external rectangle according to the blank area, such that the blank area is located in the external rectangle, and all sides of the external rectangle are in contact with the blank area; step S2022, controlling the robot to move within the circumscribed rectangle.
Specifically, the unknown area which is not scanned in the maximum range on the map is calculated to be an external rectangle, then four vertexes of the external rectangle are calculated, autonomous exploration and map construction are carried out in the range of the four vertexes, the external rectangle is scanned, the area of the scanned area is ensured to be minimum while the map area is not missed, and the map construction workload is reduced.
Optionally, after the step S202, the method further includes: step S401, when the second building map covers all the blank areas, controlling the robot to stop moving and controlling the radar to stop building the map.
Specifically, autonomous exploration and mapping are carried out within the range of four vertexes of the circumscribed rectangle until no unknown area exists in the circumscribed rectangle, exploration is stopped, and autonomous mapping is completed, so that the integrity of the map is ensured.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
1) In the method for building the map by the robot, firstly, the robot is controlled to move along the edge of a building until the robot moves to the initial position of the robot, in the moving process, the radar is controlled to scan, the map is built according to the scanning result, a plurality of first map blocks are obtained, the plurality of first map blocks are synthesized into a first building map, and the edge of the building is a wall body of a building to be built; then, controlling the robot to move in a blank area, and controlling the radar to scan and building a map according to a scanning result in the moving process to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be built; and finally, combining a plurality of the second map blocks and the first building map into a second building map. According to the method, the robot is controlled to move for one circle along the edge of the building to complete the establishment of the peripheral map, then the robot is controlled to move in the blank area to complete the establishment of the map in the blank area, the full coverage of the map of the building to be built is achieved, and the problem that the map is incomplete due to blind map building in the prior art is solved.
2) In the device for building the map by the robot, the first control unit controls the robot to move along the building edge until the robot moves to the initial position of the robot, in the moving process, controls the radar to scan and builds the map according to the scanning result to obtain a plurality of first map blocks, and synthesizes the plurality of first map blocks into a first building map, wherein the building edge is a wall body of a building to be built; the second control unit controls the robot to move in a blank area, and in the moving process, controls the radar to scan and establishes a map according to the scanning result to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be mapped; the synthesizing unit synthesizes the plurality of second map blocks and the first building map into a second building map. The device controls the robot to move a circle along the edge of the building to complete the establishment of the peripheral map, then controls the robot to move in the blank area to complete the establishment of the map in the blank area, realizes the full coverage of the map of the building to be built, and solves the problem that the map is incomplete due to blind map building in the prior art.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method for a robot to build a map, the robot comprising radar, the method comprising:
controlling the robot to move along the building edge until the robot moves to the starting position of the robot, controlling the radar to scan and building a map according to the scanning result in the moving process to obtain a plurality of first map blocks, and synthesizing the plurality of first map blocks into a first building map, wherein the building edge is a wall body of a building to be built;
controlling the robot to move in a blank area, controlling the radar to scan and establishing a map according to a scanning result in the moving process to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be constructed;
and synthesizing a plurality of the second map blocks and the first building map into a second building map.
2. The method of claim 1, wherein controlling the robot to move along an edge of a building until the robot moves to a starting position of the robot comprises:
a generation step of generating a robot activity area with the current position of the robot as a center, so that the robot activity area is in contact with the building edge;
a third moving step of controlling the robot to move in the robot moving area from the current position until the minimum distance between any point in the robot moving area and the moving track of the robot is smaller than a preset distance;
a fourth moving step of controlling the robot to move to a target point, wherein the target point is one boundary point on the building edge of the first map, and the target point is one point with the largest distance from the center of the robot active area among all the boundary points;
and sequentially repeating the generating step, the third moving step and the fourth moving step at least once until the robot moves to the starting position of the robot.
3. The method of claim 2, wherein prior to controlling the robot to move to a target point, the method further comprises:
Detecting a building edge intersection line by adopting a Hough straight line detection method, wherein the building edge intersection line is a part of the building edge and is the longest straight line segment in the first building map;
calculating the distance between two end points of the building edge intersection line and the center of the robot moving area to obtain the distance between the two end points;
and determining the endpoint corresponding to the largest endpoint distance as the target point.
4. The method of claim 2, wherein generating a robot activity area centered on a current location of the robot comprises:
generating a rectangular area by taking the current position of the robot as a symmetry center;
the rectangular area is determined as the robot activity area.
5. The method of claim 2, wherein the third moving step comprises:
and controlling the robot to move in the robot moving area, recording the moving track of the robot until the minimum distance between any point in the robot moving area and the moving track is smaller than the preset distance, and controlling the robot to stop moving.
6. The method of any one of claims 1 to 4, wherein controlling the robot to move in the empty region comprises:
Generating an external rectangle according to the blank area, so that the blank area is positioned in the external rectangle, and all sides of the external rectangle are contacted with the blank area;
and controlling the robot to move in the circumscribed rectangle.
7. The method of any one of claims 1 to 4, wherein after synthesizing a plurality of the second map tiles and the first building map into a second building map, the method further comprises:
and controlling the robot to stop moving and controlling the radar to stop building a map under the condition that the second building map covers all the blank areas.
8. An apparatus for a robot to build a map, the robot comprising radar, the apparatus comprising:
the first control unit is used for controlling the robot to move along the building edge until the robot moves to the starting position of the robot, controlling the radar to scan and building a map according to the scanning result in the moving process to obtain a plurality of first map blocks, and synthesizing the plurality of first map blocks into a first building map, wherein the building edge is a wall body of a building to be built;
The second control unit is used for controlling the robot to move in a blank area, controlling the radar to scan in the moving process and building a map according to the scanning result to obtain a plurality of second map blocks, wherein the blank area is an area which is not included in the first building map in the building to be built;
and a synthesizing unit for synthesizing a plurality of the second map blocks and the first building map into a second building map.
9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program, when run, controls a device in which the computer readable storage medium is located to perform the method of any one of claims 1 to 7.
10. A map generation system, comprising: one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the method of any of claims 1-7.
CN202310387394.XA 2023-04-11 2023-04-11 Method and device for building map by robot and map generation system Pending CN116465390A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310387394.XA CN116465390A (en) 2023-04-11 2023-04-11 Method and device for building map by robot and map generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310387394.XA CN116465390A (en) 2023-04-11 2023-04-11 Method and device for building map by robot and map generation system

Publications (1)

Publication Number Publication Date
CN116465390A true CN116465390A (en) 2023-07-21

Family

ID=87183657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310387394.XA Pending CN116465390A (en) 2023-04-11 2023-04-11 Method and device for building map by robot and map generation system

Country Status (1)

Country Link
CN (1) CN116465390A (en)

Similar Documents

Publication Publication Date Title
US11618168B2 (en) Dynamic region division and region passage identification methods and cleaning robot
CN111728535B (en) Method and device for generating cleaning path, electronic equipment and storage medium
CN112581535B (en) Robot positioning method, device, storage medium and electronic equipment
CN112171675B (en) Obstacle avoidance method and device for mobile robot, robot and storage medium
CN112130165A (en) Positioning method, positioning device, positioning medium and unmanned equipment
CN111026136A (en) Port unmanned sweeper intelligent scheduling method and device based on monitoring equipment
CN115494834A (en) Robot path planning method and device and robot
CN114911228A (en) Robot path planning method and device and robot
CN114431771B (en) Sweeping method of sweeping robot and related device
CN112418038A (en) Human body detection method, human body detection device, electronic equipment and medium
CN115981305A (en) Robot path planning and control method and device and robot
CN116465390A (en) Method and device for building map by robot and map generation system
CN113359705A (en) Path planning method, formation cooperative operation method and equipment
CN111759230A (en) Walking control method and device for mobile robot, floor washing machine and storage medium
US11694396B1 (en) Methods and apparatuses for cleaning pool
CN112991527B (en) Target object avoiding method and device, storage medium and electronic device
US11999375B2 (en) Method and system for maneuvering vehicles using adjustable ultrasound sensors
CN113485372A (en) Map search method and apparatus, storage medium, and electronic apparatus
CN115444311B (en) Cleaning method for cleaning robot, storage medium, and cleaning robot
US20220326007A1 (en) Scanning Control Method and Apparatus, System, Storage Medium, and Processor
CN113031006A (en) Method, device and equipment for determining positioning information
CN114636416B (en) Robot drawing method, device, robot and storage medium
CN112672297B (en) Indoor positioning method, server, positioning client, equipment and storage medium
CN115657679A (en) Self-moving equipment control method, equipment and storage medium
JP2023011167A (en) Environmental map creating device for autonomous running body and environmental map creating method for autonomous running body

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination