CN112100298B - Picture construction method and device, computer readable storage medium and robot - Google Patents

Picture construction method and device, computer readable storage medium and robot Download PDF

Info

Publication number
CN112100298B
CN112100298B CN202010825612.XA CN202010825612A CN112100298B CN 112100298 B CN112100298 B CN 112100298B CN 202010825612 A CN202010825612 A CN 202010825612A CN 112100298 B CN112100298 B CN 112100298B
Authority
CN
China
Prior art keywords
map
grid
key frame
laser
count value
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.)
Active
Application number
CN202010825612.XA
Other languages
Chinese (zh)
Other versions
CN112100298A (en
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.)
Ubtech Robotics Corp
Original Assignee
Ubtech Robotics Corp
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 Ubtech Robotics Corp filed Critical Ubtech Robotics Corp
Priority to CN202010825612.XA priority Critical patent/CN112100298B/en
Publication of CN112100298A publication Critical patent/CN112100298A/en
Application granted granted Critical
Publication of CN112100298B publication Critical patent/CN112100298B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Remote Sensing (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The application belongs to the technical field of robots, and particularly relates to a graph building method, a graph building device, a computer readable storage medium and a robot. The method comprises the following steps: when the map is built for the target area, loading a grid map, a laser key frame sequence and a constraint item stored in the previous map building process, wherein the constraint item is the pose difference between the laser key frames; and carrying out map renewal on the target area according to the grid map, the laser key frame sequence and the constraint item. The application adopts the method of loading the grid map, the laser key frame sequence and the constraint items, can build the map or expand and update the map in time-interval and region-division mode when building the large map, and builds the constraint relation between the renewing map and the previously built map, thereby realizing the map loop, eliminating the accumulated error and avoiding the ghost phenomenon.

Description

Picture construction method and device, computer readable storage medium and robot
Technical Field
The application belongs to the technical field of robots, and particularly relates to a graph building method, a graph building device, a computer readable storage medium and a robot.
Background
The laser mapping and positioning technology (Simultaneous Localization AND MAPPING, SLAM) of the robot is a key technology of the mobile robot, when mapping a large area, a long time is required to run away each channel and road, and a large amount of laser data, odometer data, image data and the like are required to be processed in the mapping process, so that more calculation resources and memory resources are required to be consumed, and the situation that the mapping process is suspended due to insufficient electric quantity, insufficient calculation resources and the like often occurs. In this case, the map can be generally updated from the place of the last break point when the map is built next time, but in this process, the previously built map and the updated map are mutually independent, have weak association, and the updated map cannot generate a loop with the previously built map, so that the ghost phenomenon is very easy to generate.
Disclosure of Invention
In view of the above, the embodiments of the present application provide a mapping method, a mapping device, a computer-readable storage medium, and a robot, so as to solve the problem that the existing mapping method is very prone to generate ghost phenomenon because the map being reconstructed cannot generate a loop with the previously constructed map.
A first aspect of an embodiment of the present application provides a mapping method, which may include:
When the map is built for the target area, loading a grid map, a laser key frame sequence and a constraint item stored in the previous map building process, wherein the constraint item is the pose difference between the laser key frames;
Map renewal is carried out on the target area according to the grid map, the laser key frame sequence and the constraint item, and the map renewal comprises the following steps: generating a probability map corresponding to the grid map; acquiring a current laser key frame, and respectively updating a first count value and a second count value of each connecting grid corresponding to the current laser key frame, wherein the connecting grids are grids positioned on connecting lines between the grids hit by laser and the lasers, the first count value is the number of times hit by the laser emitted by the lasers, and the second count value is the number of times positioned on connecting lines between the grids hit by laser and the lasers; and respectively updating the occupancy probability value of each connecting grid in the probability map according to the updated first count value and the updated second count value.
Further, the generating the probability map corresponding to the grid map may include:
Acquiring a grid type of a target grid, wherein the target grid is any grid in the grid map;
determining a first count value and a second count value of the target grid according to the grid type;
and calculating the occupancy probability value of the target grid in the probability map according to the first count value and the second count value.
Further, the map updating of the target area according to the grid map, the laser key frame sequence and the constraint item may include:
constructing a pose graph according to the laser key frame sequence and the constraint item;
Performing graph optimization on the pose graph according to the current laser key frame;
updating the constraint item according to the graph optimization result;
and updating the grid map and the laser key frame sequence according to the updated constraint item.
Further, the performing graph optimization on the pose graph according to the current laser key frame may include:
Sub-dividing the laser key frame sequence to obtain each sub-image;
and based on each subgraph, carrying out graph optimization on the pose graph according to the current laser key frame.
Further, the mapping method may further include:
and storing the grid map, the laser key frame sequence and the constraint item at the end of the current map construction for use in the next map construction.
A second aspect of an embodiment of the present application provides a mapping apparatus, which may include:
the data loading module is used for loading the grid map, the laser key frame sequence and the constraint item stored in the previous map building process when the map is updated on the target area, wherein the constraint item is the pose difference between the laser key frames;
the map renewing module is configured to renew the map of the target area according to the grid map, the laser key frame sequence and the constraint item, and includes: a probability map generation unit for generating a probability map corresponding to the grid map; the probability map updating unit is used for acquiring a current laser key frame, and respectively updating a first count value and a second count value of each connecting grid corresponding to the current laser key frame, wherein the connecting grids are grids on connecting lines between the grids hit by laser and the lasers, the first count value is the number of times hit by the laser emitted by the lasers, and the second count value is the number of times on connecting lines between the grids hit by laser and the lasers; and respectively updating the occupancy probability value of each connecting grid in the probability map according to the updated first count value and the updated second count value.
Further, the probability map generating unit may include:
a grid type obtaining subunit, configured to obtain a grid type of a target grid, where the target grid is any one grid in the grid map;
A count value determining subunit, configured to determine a first count value and a second count value of the target grid according to the grid type;
and the probability value calculating subunit is used for calculating the occupancy probability value of the target grid in the probability map according to the first count value and the second count value.
Further, the map renewal module may further include:
The pose graph construction unit is used for constructing a pose graph according to the laser key frame sequence and the constraint item;
the map optimization unit is used for performing map optimization on the pose map according to the current laser key frame;
A constraint item updating unit, configured to update the constraint item according to a graph optimization result;
and the data updating unit is used for updating the grid map and the laser key frame sequence according to the updated constraint item.
Further, the graph optimizing unit may include:
A sub-division subunit, configured to sub-divide the laser key frame sequence to obtain each sub-picture;
And the map optimization subunit is used for performing map optimization on the pose map according to the current laser key frame based on each sub-map.
Further, the mapping device may further include:
And the data storage module is used for storing the grid map, the laser key frame sequence and the constraint item at the end of the current map construction for use in the next map construction.
A third aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the mapping methods described above.
A fourth aspect of the embodiments of the present application provides a robot comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of any of the mapping methods described above when executing the computer program.
A fifth aspect of an embodiment of the application provides a computer program product for, when run on a robot, causing the robot to perform the steps of any of the mapping methods described above.
Compared with the prior art, the embodiment of the application has the beneficial effects that: when the map is updated to the target area, the grid map, the laser key frame sequence and the constraint item stored in the previous map building process are loaded, wherein the constraint item is the pose difference between the laser key frames; and carrying out map renewal on the target area according to the grid map, the laser key frame sequence and the constraint item. By adopting the method for loading the grid map, the laser key frame sequence and the constraint items, the embodiment of the application can build the map or expand and update the map in time-interval and area-division mode when building the large map, and builds the constraint relation between the renewing map and the previously built map, thereby realizing map loop, eliminating accumulated errors and avoiding ghost phenomena.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an embodiment of a mapping method according to an embodiment of the present application;
FIG. 2 is a schematic illustration of a grid map;
FIG. 3 is a schematic flow chart of generating a probability map corresponding to a grid map;
FIG. 4 is a schematic flow chart of updating a grid map, a sequence of laser key frames, and a constraint term;
FIG. 5 is a block diagram of an embodiment of a mapping apparatus according to an embodiment of the present application;
fig. 6 is a schematic block diagram of a robot in an embodiment of the application.
Detailed Description
In order to make the objects, features and advantages of the present application more comprehensible, the technical solutions in the embodiments of the present application are described in detail below with reference to the accompanying drawings, and it is apparent that the embodiments described below are only some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application, the terms "first," "second," "third," etc. are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
When the laser mapping is carried out, a laser mapping method based on particle filtering can be adopted, pose estimation is carried out through particle filtering methods such as RBPF (Rao-Blackwellized PARTICLE FILTERS), calculated amount is small and accuracy is high when a small scene map is built, and because the particle-based method is used for improving the mapping accuracy by increasing the number of particles, accumulated errors are eliminated without loop detection, the number of particles is required to be increased sharply when the area is large and the higher accuracy is required to be achieved, and meanwhile, each particle carries a pair of maps, so that memory and calculated amount required when a large map is built are increased sharply. Therefore, the method of particle filtering is not suitable for constructing a large scene map.
In addition, a method based on key frame matching can be adopted, constraint is established among key frames, loop detection and optimization can be well carried out, meanwhile, the structure is also very suitable for building a map of a scene with a large area, but the method is often only suitable for building a map with a large area, only the key frames are adopted when the key frames are calculated in real time, and only the grid map is saved when the key frames and constraint item data are not saved finally, so that when the grid map is reloaded and expanded, the new map cannot generate loop with the old map due to the lack of the key frames and constraint item data of the original map, and ghost phenomena of the new and old building maps are generated. This limits the possibility of continuing the construction of the map after the intermediate storage in the construction of the map over a large area.
In order to ensure that the robot can better perform real-time positioning during navigation, a complete map of the scene needs to be created through SLAM technology, the created map needs to be clear in boundary and complete in loop, serious map ghosts cannot occur when the robot walks on the same path, otherwise, the real-time positioning precision of the robot can be influenced, and even the robot can have positioning drift to generate safety accidents. In order to more flexibly carry out laser mapping and generate no map ghost during large-area mapping, the embodiment of the application provides a method capable of supporting continuous mapping after midway storage and eliminating map ghost so as to enhance the flexibility of large-area mapping.
Referring to fig. 1, an embodiment of a mapping method according to an embodiment of the present application may include:
And step S101, loading a grid map, a laser key frame sequence and a constraint item stored in the last mapping process when the map is updated to the target area.
The target area can be a map to be built area pre-designated by a user, and the target area to be subjected to map renewal can be a place with larger area such as an airport, a station, a square, a playground, a large market and the like, so that the map building process of the whole target area is difficult to complete at one time.
Here, it is assumed that the robot needs M mapping processes to complete the mapping process of the whole target area, where M is greater than or equal to 2. For the 1 st image construction process, the last image construction is not existed, so the robot does not need to load the data stored in the last image construction, and still carries out image construction according to the prior method, but when the image construction is finished, the robot needs to store the grid map, the laser key frame sequence and the constraint item at the moment for the next image construction. For the M-th (M is more than or equal to 2 and less than or equal to M) drawing process, the last drawing (i.e. M-1 th drawing) exists, so that the robot needs to load the grid map, the laser key frame sequence and the constraint item stored in the last drawing, perform the drawing based on the data, and store the grid map, the laser key frame sequence and the constraint item at the moment when the drawing is finished, so as to be used in the next drawing. In particular, for the last construction (i.e. the M-th construction), since no data support is required for the next construction, it can be set according to the actual situation whether to store the grid map, the laser key frame sequence and the constraint item at the end of the construction.
In the embodiment of the application, the grid map is a pixel map composed of three colors of black and white, and fig. 2 is a schematic diagram of the grid map, wherein pixels of the black grid represent obstacles, pixels of the white grid represent free space, and pixels of the gray grid represent non-mapped areas.
The laser key frame refers to laser data containing the pose of the robot, the robot can detect the surrounding environment through a preset laser, the working principle is that a detection signal (laser) is emitted to a target, then the received signal reflected from the target is compared with the detection signal, and after proper processing, the related information of the target can be obtained, so that the target is detected, tracked and identified. Generally, the robot may collect laser data at a preset data collection frequency, and collect one frame of laser data at regular intervals. The specific data acquisition frequency may be set according to practical situations, which is not particularly limited in the embodiment of the present application.
The robot can take the first laser data frame as a laser key frame after starting navigation, when acquiring a new laser data frame subsequently, comparing the new laser data frame with the current laser key frame, if the position difference between the new laser data frame and the current laser key frame is larger than a preset position difference threshold or the angle difference between the new laser data frame and the current laser key frame is larger than a preset angle threshold, judging the new laser data frame as a new laser key frame, otherwise, if the position difference between the new laser data frame and the current laser data frame is smaller than or equal to the position difference threshold and the angle difference between the new laser data frame is smaller than or equal to the angle threshold, judging the new laser data frame as not a new laser key frame. The specific values of the position difference threshold and the angle threshold may be set according to actual situations, which is not particularly limited in the embodiment of the present application. Optionally, if the time difference between the acquisition time of the new laser data frame and the acquisition time of the current laser key frame is greater than a preset time threshold, it may also be determined that the new laser data frame is a new laser key frame. The specific value of the time threshold may be set according to practical situations, which is not specifically limited in the embodiment of the present application. And repeating the above processes continuously to obtain each laser key frame in the mapping process. And sequentially arranging the collected laser key frames in sequence to obtain a laser key frame sequence.
The constraint term refers to the relative pose relationship between two laser key frames, i.e. the pose difference between the two. The constraint items can comprise adjacent constraint items and loop constraint items, specifically, pose differences between adjacent laser key frames are the adjacent constraint items, the robot returns to the original place around the annular map once, the pose differences are loop constraint items after passing through the place twice, the pose differences are generated by accumulated errors, namely, the robot does not know that the robot returns to the original place, and the robot can know that the robot returns to the same place after the environmental features are identified.
And step S102, carrying out map renewal on the target area according to the grid map, the laser key frame sequence and the constraint item.
After loading the grid map stored in the previous mapping process, the robot may first generate a probability map corresponding to the grid map, and the specific process is as shown in fig. 3:
Step S301, acquiring a grid type of the target grid.
The target grid is any one grid in the grid map, and the grid types can comprise black grids, white grids and gray grids.
Step S302, determining a first count value and a second count value of the target grid according to the grid type.
The first count value is the number of times the target grid is hit by the laser light emitted by the laser, namely the number of times the target grid is considered to be an obstacle, the second count value is the number of times the target grid is located on a connecting line between the laser hit grid and the laser (the connecting line comprises the laser hit grid), namely the sum of the number of times the point is considered to be an obstacle and the number of times the point is considered to be not an obstacle, the first count value is denoted as n, and the second count value is denoted as visit. It will be readily appreciated that when the laser strikes the target grid, n and visit of the target grid are accumulated simultaneously, i.e. performed: n=n+1, visit=visit+1; when the laser does not strike the target grid, but the target grid is at the line between the point where the laser strikes and the laser, n remains unchanged, and the visit accumulation, i.e. only performs: visit=visit+1.
In the embodiment of the application, the first count value and the second count value of the target grid can be initialized according to the grid type of the target grid. Specifically, if the grid type of the target grid is a black grid, setting both the first count value and the second count value of the target grid to N, that is, performing: n=n, visit=n; if the grid type of the target grid is a white grid, the first count value of the target grid is set to 0, and the second count value of the target grid is set to N, namely, the following steps are performed: n=0, visit=n; if the grid type of the target grid is gray, setting the first count value and the second count value of the target grid to 0, namely, executing: n=0, visit=0. Wherein N is a positive integer, and its specific value may be set according to practical situations, for example, it may be set to 10, 20 or other values, which is not limited in the embodiment of the present application.
Step S303, calculating an occupancy probability value of the target grid in the probability map according to the first count value and the second count value.
Specifically, the occupancy probability value of the target grid in the probability map may be calculated according to the following equation:
P(hit)=n/visit
wherein P (hit) is the probability value of the target grid occupied in the probability map.
As can be easily understood, the process shown in fig. 3 is only a calculation process of the occupancy probability value of one grid in the probability map, and after traversing all grids in the grid map, the occupancy probability value of all grids in the probability map can be obtained, so as to obtain the probability map corresponding to the grid map, namely, the initialized probability map.
After the initialized probability map is generated, the robot can also continuously acquire the current laser key frame in the subsequent mapping process, and update the probability map according to the current laser key frame.
It should be noted that, in the present application, the "current laser key frame" refers to a laser key frame currently being processed by a robot, which refers to a dynamic object, but not refers to a certain laser key frame, for example, the robot first processes a laser key frame collected for the first time, and marks it as a laser key frame 1, then the current laser key frame is referred to as a laser key frame 1, when the robot processes the laser key frame 1, continues to process a laser key frame collected for the second time, marks it as a laser key frame 2, then the current laser key frame is referred to as a laser key frame 2, when the robot processes the laser key frame 2, continues to process a laser key frame collected for the third time, marks it as a laser key frame 3, then the current laser key frame is referred to as a laser key frame 3, …, and so on.
In the process that the robot updates the probability map according to the current laser key frame, first count values and second count values of all the connecting grids corresponding to the current laser key frame can be updated respectively, wherein the connecting grids are grids on connecting lines between the grids hit by the laser and the laser. Specifically, for a grid hit by a laser, n and visit of the grid are accumulated simultaneously, i.e. performing: n=n+1, visit=visit+1; for a grid of links not hit by the laser, n is kept unchanged, and visit is accumulated, i.e. only: visit=visit+1. After the count value is updated, the occupancy probability value of each connecting grid in the probability map can be updated according to the updated first count value and the updated second count value. The specific occupancy probability value calculation formula is the same as the formula used in step S303, and will not be described here again.
After the laser key frame sequence and the constraint item stored in the previous image construction process are loaded, the robot can continuously acquire the current laser key frame in the subsequent image construction process, and update the grid map, the laser key frame sequence and the constraint item according to the current laser key frame, wherein the specific process is as shown in fig. 4:
And S401, constructing a pose chart according to the laser key frame sequence and the constraint item.
The Graph (Graph) is composed of vertexes (vertexes) and edges (edges), and in the process of constructing the pose Graph of the robot, each laser key frame in the laser key frame sequence can be used as one Vertex, a constraint item, namely, the relative pose relationship between two laser key frames is used as one Edge between the two vertexes, and the pose Graph of the robot is formed by continuously accumulated vertexes and edges.
Step S402, acquiring a current laser key frame, and carrying out graph optimization on the pose graph according to the current laser key frame.
Graph optimization is to express a conventional loop optimization problem in the form of a graph, and the objective of graph optimization is to meet constraints among edges as much as possible by adjusting the pose of the vertex.
In the embodiment of the application, in order to reduce the calculation amount, the laser key frame sequence can be subjected to sub-division to obtain each sub-image, and the pose image is optimized according to the current laser key frame based on each sub-image.
The subgraph is a data structure for quickly finding out laser key frames during loop search, and can comprise a subgraph number, a subgraph position and the number of the laser key frames. When sub-division is performed, the sub-division can be performed according to the position and the number of the laser key frames.
Specifically, if the sub-graph division is performed according to the position, the laser key frame collected when the robot travels a preset distance each time can be constructed as one sub-graph, for example, if the preset distance is 5 meters, the laser key frame collected within the 5 meters distance is constructed as the first sub-graph when the robot travels the first 5 meters distance, the laser key frame collected within the 5 meters distance is constructed as the second sub-graph when the robot travels the second 5 meters distance, and the above processes are repeated continuously, so as to construct the third sub-graph, the fourth sub-graph, … …, and so on.
If the sub-image division is performed according to the number, a specified number of laser key frames collected by the robot can be constructed as one sub-image, for example, if the specified number is 5, when the robot collects the first group of 5 laser key frames, the 5 laser key frames are constructed as the first sub-image, when the robot collects the second group of 5 laser key frames, the 5 laser key frames are constructed as the second sub-image, and the above processes are repeated continuously, thereby constructing a third sub-image, a fourth sub-image, … …, and so on.
And step S403, updating the constraint item according to the graph optimization result.
When the robot walks a repeated path and the path exists in the map constructed before, the current laser key frame and the previous laser key frame generate a constraint relation, namely a new constraint item is generated, and after the map optimization calculation and the global optimization, the map ghost can be eliminated.
And step S404, updating the grid map and the laser key frame sequence according to the updated constraint item.
In the embodiment of the application, new and old constraint items can be screened, if the matching score of the old constraint items in the new map is lower, the map change is larger, the map generated by the old laser key frames is not applicable any more, the old laser key frames can be deleted through a screening strategy, the optimal pose of each laser key frame is optimized by utilizing the latest constraint relation, and finally, the grid map and the laser key frame sequence are updated according to the optimization result.
It should be noted that updating the grid map, the sequence of laser key frames and the constraint term is a continuous process, i.e. the optimization and updating process described above is continuously performed with the continuous accumulation of laser key frames collected by the robot.
And when the current drawing is finished, the grid map, the laser key frame sequence and the constraint item at the moment can be stored for use in the next drawing.
In summary, when the map is updated to the target area, the embodiment of the application loads the grid map, the laser key frame sequence and the constraint item stored in the previous map building process, wherein the constraint item is the pose difference between the laser key frames; and carrying out map renewal on the target area according to the grid map, the laser key frame sequence and the constraint item. By adopting the method for loading the grid map, the laser key frame sequence and the constraint items, the embodiment of the application can build the map or expand and update the map in time-interval and area-division mode when building the large map, and builds the constraint relation between the renewing map and the previously built map, thereby realizing map loop, eliminating accumulated errors and avoiding ghost phenomena.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Corresponding to the method for mapping described in the above embodiments, fig. 5 shows a block diagram of an embodiment of a mapping apparatus according to an embodiment of the present application.
In this embodiment, a mapping apparatus may include:
The data loading module 501 is configured to load a grid map, a laser key frame sequence and a constraint item stored in the previous mapping process when the map is updated on the target area, where the constraint item is a pose difference between the laser key frames;
And the map renewing module 502 is configured to renew the map of the target area according to the grid map, the laser key frame sequence and the constraint item.
Further, the map renewal module may include:
A probability map generation unit for generating a probability map corresponding to the grid map;
And the probability map updating unit is used for acquiring the current laser key frame and updating the probability map according to the current laser key frame.
Further, the probability map generating unit may include:
a grid type obtaining subunit, configured to obtain a grid type of a target grid, where the target grid is any one grid in the grid map;
a count value determining subunit, configured to determine, according to the grid type, a first count value and a second count value of the target grid, where the first count value is a number of times the target grid is hit by laser emitted by a laser, and the second count value is a number of times the target grid is located on a connection line between the hit grid and the laser;
and the probability value calculating subunit is used for calculating the occupancy probability value of the target grid in the probability map according to the first count value and the second count value.
Further, the probability map updating unit may include:
The counting value updating subunit is used for respectively updating a first counting value and a second counting value of each connecting grid corresponding to the current laser key frame, wherein the connecting grids are grids positioned on connecting lines between the grids hit by the laser and the laser;
And the probability value updating subunit is used for updating the occupancy probability value of each connecting grid in the probability map according to the updated first count value and the updated second count value.
Further, the map renewal module may further include:
The pose graph construction unit is used for constructing a pose graph according to the laser key frame sequence and the constraint item;
The image optimization unit is used for acquiring a current laser key frame and performing image optimization on the pose image according to the current laser key frame;
A constraint item updating unit, configured to update the constraint item according to a graph optimization result;
and the data updating unit is used for updating the grid map and the laser key frame sequence according to the updated constraint item.
Further, the graph optimizing unit may include:
A sub-division subunit, configured to sub-divide the laser key frame sequence to obtain each sub-picture;
And the map optimization subunit is used for performing map optimization on the pose map according to the current laser key frame based on each sub-map.
Further, the mapping device may further include:
And the data storage module is used for storing the grid map, the laser key frame sequence and the constraint item at the end of the current map construction for use in the next map construction.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described apparatus, modules and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Fig. 6 shows a schematic block diagram of a robot provided in an embodiment of the present application, and only a portion related to the embodiment of the present application is shown for convenience of explanation.
As shown in fig. 6, the robot 6 of this embodiment includes: a processor 60, a memory 61 and a computer program 62 stored in said memory 61 and executable on said processor 60. The steps of the various embodiments of the mapping method described above, such as steps S101 to S102 shown in fig. 1, are implemented when the processor 60 executes the computer program 62. Or the processor 60, when executing the computer program 62, performs the functions of the modules/units in the above-described device embodiments, such as the functions of the data loading module 501 to the map renewing module 502 shown in fig. 5.
Illustratively, the computer program 62 may be partitioned into one or more modules/units that are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing a specific function for describing the execution of the computer program 62 in the robot 6.
It will be appreciated by those skilled in the art that fig. 6 is merely an example of a robot 6 and is not meant to be limiting of the robot 6, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the robot 6 may also include input and output devices, network access devices, buses, etc.
The processor 60 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-programmable gate array (field-programmable GATE ARRAY, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the robot 6, such as a hard disk or a memory of the robot 6. The memory 61 may be an external storage device of the robot 6, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), or the like, which are provided on the robot 6. Further, the memory 61 may also include both an internal memory unit and an external memory device of the robot 6. The memory 61 is used for storing the computer program as well as other programs and data required by the robot 6. The memory 61 may also be used for temporarily storing data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/robot and method may be implemented in other ways. For example, the apparatus/robot embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable storage medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable storage medium may include content that is subject to appropriate increases and decreases as required by jurisdictions and by jurisdictions in which such computer readable storage medium does not include electrical carrier signals and telecommunications signals.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (8)

1. A method of mapping, comprising:
When the map is built for the target area, loading a grid map, a laser key frame sequence and a constraint item stored in the previous map building process, wherein the constraint item is the pose difference between the laser key frames;
Map renewal is carried out on the target area according to the grid map, the laser key frame sequence and the constraint item, and the map renewal comprises the following steps: generating a probability map corresponding to the grid map; acquiring a current laser key frame, and respectively updating a first count value and a second count value of each connecting grid corresponding to the current laser key frame, wherein the connecting grids are grids positioned on connecting lines between the grids hit by laser and the lasers, the first count value is the number of times hit by the laser emitted by the lasers, and the second count value is the number of times positioned on connecting lines between the grids hit by laser and the lasers; and respectively updating the occupancy probability value of each connecting grid in the probability map according to the updated first count value and the updated second count value.
2. The mapping method according to claim 1, wherein the generating a probability map corresponding to the grid map includes:
Acquiring a grid type of a target grid, wherein the target grid is any grid in the grid map;
determining a first count value and a second count value of the target grid according to the grid type;
and calculating the occupancy probability value of the target grid in the probability map according to the first count value and the second count value.
3. The mapping method according to claim 1, wherein the map updating the target area according to the grid map, the laser key frame sequence, and the constraint term further comprises:
constructing a pose graph according to the laser key frame sequence and the constraint item;
Performing graph optimization on the pose graph according to the current laser key frame;
updating the constraint item according to the graph optimization result;
and updating the grid map and the laser key frame sequence according to the updated constraint item.
4. A mapping method according to claim 3, wherein the performing map optimization on the pose map according to the current laser key frame includes:
Sub-dividing the laser key frame sequence to obtain each sub-image;
and based on each subgraph, carrying out graph optimization on the pose graph according to the current laser key frame.
5. The mapping method according to any one of claims 1 to 4, characterized by further comprising:
and storing the grid map, the laser key frame sequence and the constraint item at the end of the current map construction for use in the next map construction.
6. A mapping apparatus, comprising:
the data loading module is used for loading the grid map, the laser key frame sequence and the constraint item stored in the previous map building process when the map is updated on the target area, wherein the constraint item is the pose difference between the laser key frames;
The map renewing module is configured to renew the map of the target area according to the grid map, the laser key frame sequence and the constraint item, and includes: generating a probability map corresponding to the grid map; acquiring a current laser key frame, and respectively updating a first count value and a second count value of each connecting grid corresponding to the current laser key frame, wherein the connecting grids are grids positioned on connecting lines between the grids hit by laser and the lasers, the first count value is the number of times hit by the laser emitted by the lasers, and the second count value is the number of times positioned on connecting lines between the grids hit by laser and the lasers; and respectively updating the occupancy probability value of each connecting grid in the probability map according to the updated first count value and the updated second count value.
7. A computer-readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the mapping method according to any one of claims 1 to 5.
8. Robot comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the mapping method according to any of the claims 1-5 when the computer program is executed.
CN202010825612.XA 2020-08-17 2020-08-17 Picture construction method and device, computer readable storage medium and robot Active CN112100298B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010825612.XA CN112100298B (en) 2020-08-17 2020-08-17 Picture construction method and device, computer readable storage medium and robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010825612.XA CN112100298B (en) 2020-08-17 2020-08-17 Picture construction method and device, computer readable storage medium and robot

Publications (2)

Publication Number Publication Date
CN112100298A CN112100298A (en) 2020-12-18
CN112100298B true CN112100298B (en) 2024-04-19

Family

ID=73754442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010825612.XA Active CN112100298B (en) 2020-08-17 2020-08-17 Picture construction method and device, computer readable storage medium and robot

Country Status (1)

Country Link
CN (1) CN112100298B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112837241A (en) * 2021-02-09 2021-05-25 贵州京邦达供应链科技有限公司 Method and device for removing image-building ghost and storage medium
CN113032411A (en) * 2021-03-02 2021-06-25 上海景吾智能科技有限公司 Method, system and medium for updating local map based on existing map
CN113064431A (en) * 2021-03-19 2021-07-02 北京小狗吸尘器集团股份有限公司 Grid map optimization method, storage medium and mobile robot
CN113093221A (en) * 2021-03-31 2021-07-09 东软睿驰汽车技术(沈阳)有限公司 Generation method and device of grid-occupied map
CN113624222A (en) * 2021-07-30 2021-11-09 深圳市优必选科技股份有限公司 Map updating method, robot and readable storage medium
CN113787516A (en) * 2021-08-16 2021-12-14 深圳优地科技有限公司 Positioning method and device and robot
CN117387639B (en) * 2023-09-22 2024-06-14 成都睿芯行科技有限公司 Map updating system and method based on laser SALM
CN117451035B (en) * 2023-12-25 2024-02-27 江苏中科重德智能科技有限公司 Method and system for self-adaptively and automatically updating map by laser slam

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108759844A (en) * 2018-06-07 2018-11-06 科沃斯商用机器人有限公司 Robot relocates and environmental map construction method, robot and storage medium
CN109661659A (en) * 2018-07-19 2019-04-19 驭势科技(北京)有限公司 The storage of vision positioning map and loading method, device, system and storage medium
CN109974712A (en) * 2019-04-22 2019-07-05 广东亿嘉和科技有限公司 It is a kind of that drawing method is built based on the Intelligent Mobile Robot for scheming optimization
CN110007670A (en) * 2019-02-14 2019-07-12 四川阿泰因机器人智能装备有限公司 Localization for Mobile Robot builds drawing method
CN111024100A (en) * 2019-12-20 2020-04-17 深圳市优必选科技股份有限公司 Navigation map updating method and device, readable storage medium and robot
CN111177295A (en) * 2019-12-28 2020-05-19 深圳市优必选科技股份有限公司 Image-building ghost eliminating method and device, computer-readable storage medium and robot

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11435194B2 (en) * 2019-01-28 2022-09-06 Uatc, Llc Scaffolds for globally consistent maps

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108759844A (en) * 2018-06-07 2018-11-06 科沃斯商用机器人有限公司 Robot relocates and environmental map construction method, robot and storage medium
CN109661659A (en) * 2018-07-19 2019-04-19 驭势科技(北京)有限公司 The storage of vision positioning map and loading method, device, system and storage medium
CN110007670A (en) * 2019-02-14 2019-07-12 四川阿泰因机器人智能装备有限公司 Localization for Mobile Robot builds drawing method
CN109974712A (en) * 2019-04-22 2019-07-05 广东亿嘉和科技有限公司 It is a kind of that drawing method is built based on the Intelligent Mobile Robot for scheming optimization
CN111024100A (en) * 2019-12-20 2020-04-17 深圳市优必选科技股份有限公司 Navigation map updating method and device, readable storage medium and robot
CN111177295A (en) * 2019-12-28 2020-05-19 深圳市优必选科技股份有限公司 Image-building ghost eliminating method and device, computer-readable storage medium and robot

Also Published As

Publication number Publication date
CN112100298A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
CN112100298B (en) Picture construction method and device, computer readable storage medium and robot
CN106997466B (en) Method and device for detecting road
CN108319655B (en) Method and device for generating grid map
JP6952165B2 (en) Obstacle detection method and equipment
CN111912417B (en) Map construction method, map construction device, map construction equipment and storage medium
US10534870B2 (en) Methods, apparatuses and computer program products for automatic, non-parametric, non-iterative three dimensional geographic modeling
US9489716B1 (en) Street-level imagery acquisition and selection
CN111795687B (en) Robot map updating method and device, readable storage medium and robot
CN104677361B (en) A kind of method of comprehensive location
CN113286982A (en) System and method for generating, updating and enhancing large-scale high-precision 3D road map and multi-level road map
CN112462758A (en) Drawing establishing method and device, computer readable storage medium and robot
CN111126211B (en) Label identification method and device and electronic equipment
CN115953535A (en) Three-dimensional reconstruction method and device, computing equipment and storage medium
CN112560800A (en) Road edge detection method, device and storage medium
CN115406457A (en) Driving region detection method, system, equipment and storage medium
CN112084853A (en) Footprint prediction method, footprint prediction device and humanoid robot
CN113610873A (en) Noctilucent remote sensing image data processing method and device
CN112559539A (en) Method and device for updating map data
CN116051777B (en) Super high-rise building extraction method, apparatus and readable storage medium
CN112630798B (en) Method and apparatus for estimating ground
CN116358528A (en) Map updating method, map updating device, self-mobile device and storage medium
CN116295249A (en) Road element elevation determination and high-precision map manufacturing method, device and medium
CN116434181A (en) Ground point detection method, device, electronic equipment and medium
CN112084854B (en) Obstacle detection method, obstacle detection device and robot
CN111767357B (en) Regional mining complete evaluation method and equipment, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant