CN112100298A - Drawing establishing method and device, computer readable storage medium and robot - Google Patents

Drawing establishing method and device, computer readable storage medium and robot Download PDF

Info

Publication number
CN112100298A
CN112100298A CN202010825612.XA CN202010825612A CN112100298A CN 112100298 A CN112100298 A CN 112100298A CN 202010825612 A CN202010825612 A CN 202010825612A CN 112100298 A CN112100298 A CN 112100298A
Authority
CN
China
Prior art keywords
map
grid
key frame
laser
laser key
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.)
Granted
Application number
CN202010825612.XA
Other languages
Chinese (zh)
Other versions
CN112100298B (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

Images

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 mapping method, a mapping device, a computer-readable storage medium and a robot. The method comprises the following steps: loading a grid map, a laser key frame sequence and a constraint item stored in the last map building process when a target area is subjected to map rebuilding, wherein the constraint item is a pose difference between laser key frames; and reconstructing the target area according to the grid map, the laser key frame sequence and the constraint items. By the method for loading the grid map, the laser key frame sequence and the constraint items, map building or map updating expansion can be carried out in different time-division areas when a large map is built, and a constraint relation is built between a map to be built and a map built before, so that map loop is realized, accumulated errors are eliminated, and a double image phenomenon is avoided.

Description

Drawing establishing 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 mapping method, a mapping device, a computer-readable storage medium and a robot.
Background
A laser Mapping And positioning technology (SLAM) of a robot is a key technology of a mobile robot, And when a large-area map is built, a long time is required to be spent to walk each channel And road, And a large amount of laser data, odometry data, image data And the like are required to be processed in the map building process, so that more computing resources And memory resources are required to be consumed, And the situation that the map building process is suspended due to insufficient electric quantity, insufficient computing resources And the like often occurs. In this case, the map can be reconstructed from the position of the last breakpoint in the next map reconstruction, but in this process, the previously constructed map and the reconstructed map are independent of each other and have weak association, and the reconstructed map cannot generate a loop with the previously constructed map, which is very likely to generate a ghost phenomenon.
Disclosure of Invention
In view of this, embodiments of the present application provide a mapping method, an apparatus, a computer-readable storage medium, and a robot, so as to solve the problem that when a map is reconstructed by an existing mapping method, a reconstructed map cannot generate a loop with a previously constructed map, and a ghost phenomenon is easily generated.
A first aspect of an embodiment of the present application provides a method for creating a graph, which may include:
loading a grid map, a laser key frame sequence and a constraint item stored in the last map building process when a target area is subjected to map rebuilding, wherein the constraint item is a pose difference between laser key frames;
and reconstructing the target area according to the grid map, the laser key frame sequence and the constraint items.
Further, the reconstructing the target region according to the grid map, the sequence of laser key frames, and the constraint term may include:
generating a probability map corresponding to the grid map;
and acquiring a current laser key frame, and updating the probability map according to the current laser key frame.
Further, the generating a probability map corresponding to the grid map may include:
acquiring a grid type of a target grid, wherein the target grid is any one grid in the grid map;
determining a first count value and a second count value of the target grid according to the grid type, wherein the first count value is the number of times that the target grid is hit by laser emitted by a laser, and the second count value is the number of times that the target grid is located on a connecting line between the laser hit grid and the laser;
and calculating an occupation probability value of the target grid in the probability map according to the first count value and the second count value.
Further, the updating the probability map according to the current laser key frame may include:
updating a first count value and a second count value of each connection grid corresponding to the current laser key frame respectively, wherein the connection grids are grids on a connection line between a grid hit by laser and a laser;
and respectively updating the occupation probability values of the connection grids in the probability map according to the updated first count value and the updated second count value.
Further, the reconstructing the target region according to the grid map, the sequence of laser key frames, and the constraint term may include:
constructing a pose graph according to the laser key frame sequence and the constraint items;
acquiring a current laser key frame, and carrying out 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 items.
Further, the map optimizing the pose graph according to the current laser key frame may include:
performing subgraph division on the laser key frame sequence to obtain each subgraph;
and based on each sub-graph, 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 items at the end of the map building for use in the next map building.
A second aspect of an embodiment of the present application provides an apparatus for creating an image, which may include:
the data loading module is used for loading a grid map, a laser key frame sequence and a constraint item which are stored in the last map building process when a target area is subjected to map rebuilding, wherein the constraint item is a pose difference between laser key frames;
and the map reconstruction module is used for reconstructing the target area according to the grid map, the laser key frame sequence and the constraint items.
Further, the map renewal module may include:
a probability map generating 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:
the grid type obtaining subunit is 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 that the target grid is hit by laser light emitted by a laser, and the second count value is a number of times that the target grid is located on a connection line between the laser-hit grid and the laser;
and the probability value calculation operator unit is used for calculating the occupation probability value of the target grid in the probability map according to the first count value and the second count value.
Further, the probabilistic map updating unit may include:
a count value updating subunit, configured to update a first count value and a second count value of each connection grid corresponding to the current laser key frame, where the connection grid is a grid on a connection line between a grid hit by a laser and the laser;
and the probability value updating subunit is used for respectively updating the occupation probability values of the connection grids 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 constructing unit is used for constructing a pose graph according to the laser key frame sequence and the constraint items;
the image optimization unit is used for acquiring a current laser key frame and carrying out image optimization on the pose image according to the current laser key frame;
the constraint item updating unit is used for updating the constraint item according to the 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 items.
Further, the graph optimizing unit may include:
a sub-graph dividing subunit, configured to perform sub-graph division on the laser key frame sequence to obtain each sub-graph;
and the graph optimization subunit is used for performing graph optimization on the pose graph according to the current laser key frame based on each sub graph.
Further, the map building apparatus may further include:
and the data storage module is used for storing the grid map, the laser key frame sequence and the constraint items when the map building is finished so as to be used in the next map building.
A third aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the steps of any one of the mapping methods described above.
A fourth aspect of the embodiments of the present application provides a robot, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of any one of the mapping methods when executing the computer program.
A fifth aspect of embodiments of the present application provides a computer program product, which, when run on a robot, causes 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 advantages that: when a target area is subjected to map reconstruction, loading a grid map, a laser key frame sequence and a constraint item which are stored in the last map construction process, wherein the constraint item is a pose difference between laser key frames; and reconstructing the target area according to the grid map, the laser key frame sequence and the constraint items. By adopting the method for loading the grid map, the laser key frame sequence and the constraint items, the map can be built or updated in an expanding way in different time-division areas when the large map is built, and the constraint relation is built between the map to be built and the map built before, so that the map loop is realized, the accumulated error is eliminated, and the ghost phenomenon is avoided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed for the embodiments or the prior art descriptions 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 it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flowchart of an embodiment of a method for creating a graph according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a grid map;
FIG. 3 is a schematic flow diagram of generating a probability map corresponding to a grid map;
FIG. 4 is a schematic flow diagram of updating a grid map, a sequence of laser keyframes, and constraint terms;
FIG. 5 is a block diagram of an embodiment of a mapping apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic block diagram of a robot in an embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present invention more apparent and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the embodiments described below are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It will 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 present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application 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 this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In addition, in the description of the present application, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
During laser mapping, a laser mapping method based on Particle filtering can be adopted, the method carries out pose estimation through Particle filtering methods such as RBPF (Rao-Black plated particulate Filters), the calculated amount is small and the accuracy is high during small scene map construction, the Particle-based method improves the mapping accuracy by increasing the number of particles without loop detection to eliminate accumulated errors, when the area is large, the number of particles needs to be increased rapidly to achieve high accuracy, and each Particle carries a map, so the required memory and calculated amount can be increased rapidly during large map construction. Therefore, the particle filtering method is not suitable for constructing a large scene map.
In addition, a method based on key frame matching can be adopted, constraints are built among key frames, loop detection and optimization can be well carried out, meanwhile, the structure is also very suitable for drawing construction of a scene with a large area, however, the method usually only adopts the key frames during real-time calculation, only the grid map is stored during final storage, and key frames and constraint item data are not stored, so that when the grid map is reloaded and drawing construction is carried out in an expansion mode, a new map cannot loop with an old map due to the lack of the key frames and the constraint item data of the original map, and a ghost phenomenon of the new map and the old map is generated. This limits the way of saving the subsequent continuous map construction in the middle of the process when the large-area map construction is carried out.
In order to ensure that the robot can better perform real-time positioning during navigation, a complete map of a scene needs to be created by using an SLAM technology, the created map needs to have a clear boundary and complete loop, and serious map ghosting cannot occur when the robot walks the same path, otherwise, the real-time positioning accuracy of the robot is affected, and even the robot generates a positioning drift to generate a safety accident. In order to more flexibly perform laser mapping and avoid map ghosting during large-area mapping, the embodiment of the application provides a method which can support subsequent continuous mapping during midway storage and can eliminate map ghosting, so that the flexibility of large-area mapping is enhanced.
Referring to fig. 1, an embodiment of a method for creating a graph in an embodiment of the present application may include:
step S101, loading a grid map, a laser key frame sequence and a constraint item stored in the last mapping process when the target area is subjected to map reconstruction.
The target area can be a to-be-mapped area which is specified by a user in advance, and the target area which needs to be subjected to mapping renewal can be a place with a large area, such as an airport, a station, a square, a stadium, a large shopping mall and the like, so that the mapping process of the whole target area is difficult to complete at one time.
It is assumed here that the robot needs M times of mapping to complete the mapping process of the whole target area, where M is greater than or equal to 2. For the 1 st mapping process, the last mapping does not exist, so the robot does not need to load data stored in the last mapping and still performs mapping according to the existing method, but at the end of the current mapping, the robot needs to store the grid map, the laser key frame sequence and the constraint items at the time for use in the next mapping. For the mth mapping process (M is more than or equal to 2 and less than or equal to M), the previous mapping process (namely M-1 mapping process) exists, so that the robot needs to load the grid map, the laser key frame sequence and the constraint item stored in the previous mapping process, perform the current mapping process based on the data, and store the grid map, the laser key frame sequence and the constraint item at the current time for use in the next mapping process. Specifically, for the last mapping (i.e. the mth mapping), since it is not necessary to provide data support for the next mapping, whether to store the grid map, the sequence of laser key frames, and the constraint items at the end of mapping can be set according to practical situations.
In the embodiment of the present application, the grid map refers to a pixel map composed of three colors of black, white and gray, and fig. 2 is a schematic diagram of the grid map, where the pixels of the black grid represent obstacles, the pixels of the white grid represent a free space, and the pixels of the gray grid represent an unmapped area.
The laser key frame is laser data containing the pose of the robot, the robot can detect the surrounding environment through a preset laser, the working principle of the robot is to emit a detection signal (laser) to a target, then the received signal reflected from the target is compared with the detection signal, and after appropriate 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 time intervals. The specific data acquisition frequency may be set according to actual conditions, which is not specifically 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 a new laser data frame is subsequently acquired, the new laser data frame is compared with the current laser key frame, if the position difference between the two is greater than a preset position difference threshold value or the angle difference between the two is greater than a preset angle threshold value, the new laser data frame is judged to be a new laser key frame, otherwise, if the position difference between the two is less than or equal to the position difference threshold value and the angle difference between the two is less than or equal to the angle threshold value, the new laser data frame is judged not to be a new laser key frame. The specific values of the position difference threshold and the angle threshold may be set according to actual conditions, which is not specifically limited in the embodiment of the present application. Optionally, if a 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 an actual situation, which is not specifically limited in the embodiment of the present application. And continuously repeating the processes to sequentially obtain each laser key frame in the image building process. And arranging the collected laser key frames in sequence to obtain the laser key frame sequence.
The constraint term refers to the relative pose relationship between two laser key frames, namely the pose difference between the two laser key frames. The constraint items can comprise adjacent constraint items and loop constraint items, specifically, a pose difference between adjacent laser key frames is the adjacent constraint items, the robot returns to the original place by one circle around the annular map, the pose difference exists after the robot passes the place twice, the pose difference is the loop constraint item, the pose difference is 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 environment characteristics are identified.
And S102, performing map reconstruction 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 last 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:
and S301, acquiring the grid type of the target grid.
The target grid is any one grid in the grid map, and the grid types can include three types, namely a black grid, a white grid and a gray grid.
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 emitted by the laser, that is, the number of times the grid is considered to be an obstacle, the second count value is the number of times the target grid is located on a connection line between the laser hit grid and the laser (the connection line includes the laser hit grid), that is, the sum of the number of times the point is considered to be an obstacle and the number of times the point is considered not to be an obstacle, where the first count value is denoted as n, and the second count value is denoted as visit. It is easy to understand that when the laser hits the target grid, n and visit of the target grid will be added simultaneously, i.e. performing: n is n +1, visit is visit + 1; when the laser does not hit the target grid, and the target grid is located at the connecting line between the laser hit point and the laser, n is kept unchanged, visit is accumulated, namely only the following steps are carried out: visit ═ visit + 1.
In the embodiment of the present application, the first count value and the second count value of the target grid may 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, setting a first count value of the target grid to 0, and setting a second count value of the target grid to N, namely executing: n is 0, visit is N; if the grid type of the target grid is a gray grid, setting the first count value and the second count value of the target grid to be 0, namely executing: n is 0 and visit is 0. N is a positive integer, and a specific value thereof may be set according to an actual situation, for example, it may be set to 10 or 20 or other values, which is not specifically limited in this embodiment of the application.
Step S303, calculating an occupation probability value of the target grid in the probability map according to the first count value and the second count value.
Specifically, the probability value of occupancy of the target grid in the probability map may be calculated according to the following formula:
P(hit)=n/visit
wherein, p (hit) is the probability value of the occupancy of the target grid in the probability map.
It is easy to understand that the process shown in fig. 3 is only a calculation process of the occupancy probability value of one grid in the grid map in the probability map, and after all grids in the grid map are traversed, the occupancy probability values of all grids in the probability map can be obtained, so as to obtain the probability map corresponding to the grid map, that is, the initialized probability map.
After the initialized probability map is generated, in the subsequent mapping process, the robot can also continuously acquire the current laser key frame and update the probability map according to the current laser key frame.
It should be noted that the "current laser key frame" mentioned in this application refers to a laser key frame currently being processed by the robot, and refers to a dynamic object, rather than a specific laser key frame, for example, the robot processes the laser key frame acquired for the first time, and records it as the laser key frame 1, then the current laser key frame is the laser key frame 1, after the robot processes the laser key frame 1, the laser key frame acquired for the second time is continuously processed, and records it as the laser key frame 2, then the current laser key frame is the laser key frame 2, after the robot processes the laser key frame 2, the laser key frame acquired for the third time is continuously processed, and records it as the laser key frame 3, then the current laser key frame is the 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, a first count value and a second count value of each connection grid corresponding to the current laser key frame can be respectively updated, and the connection grid is a grid on a connection line between a grid hit by laser and a laser. Specifically, for a grid hit by the laser, n and visit of the grid are simultaneously accumulated, that is, the following steps are performed: n is n +1, visit is visit + 1; for the link grid not hit by the laser, keeping n unchanged, and performing visit accumulation, namely only performing: visit ═ visit + 1. After the updating of the count value is completed, the occupation probability values of the connection grids 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 is not described here again.
After loading the laser key frame sequence and the constraint item stored in the last mapping process, the robot may continuously acquire the current laser key frame in the subsequent mapping process, and update the grid map, the laser key frame sequence, and the constraint item according to the current laser key frame, and the specific process is as shown in fig. 4:
step S401, constructing a pose graph according to the laser key frame sequence and the constraint items.
The Graph (Graph) is composed of vertexes (Vertex) and edges (Edge), each laser key frame in the laser key frame sequence can be used as a Vertex in the process of constructing the robot pose Graph, a constraint item, namely a relative pose relation between two laser key frames, is used as an Edge between the two vertexes, and a Graph structure formed by the continuously accumulated vertexes and edges is the robot pose Graph.
And S402, acquiring a current laser key frame, and carrying out image optimization on the pose graph according to the current laser key frame.
The graph optimization is to represent the conventional loop optimization problem in the form of a graph, and the goal of the graph optimization is to satisfy the constraints between 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, subgraph division can be performed on the laser key frame sequence to obtain each subgraph, and graph optimization is performed on the pose graph according to the current laser key frame based on each subgraph.
The subgraph is a data structure used for quickly finding out laser key frames during loop back search, and can comprise a subgraph number, a subgraph position and the number of the laser key frames. When performing sub-dividing, sub-dividing may be performed according to the position and number of the laser key frame.
Specifically, if the sub-graph division is performed according to the position, the laser key frame acquired each time the robot travels a preset distance may be constructed as one sub-graph, for example, if the preset distance is 5 meters, when the robot travels a first 5-meter distance, the laser key frame acquired within the 5-meter distance is constructed as a first sub-graph, when the robot travels a second 5-meter distance, the laser key frame acquired within the 5-meter distance is constructed as a second sub-graph, and the above processes are repeated continuously, so that a third sub-graph, a fourth sub-graph, … …, and so on are constructed.
If the subgraph division is performed according to the number, a specified number of laser key frames acquired by the robot can be constructed into one subgraph, for example, if the specified number is 5, when the robot finishes acquiring a first group of 5 laser key frames, the 5 laser key frames are constructed into a first subgraph, when the robot finishes acquiring a second group of 5 laser key frames, the 5 laser key frames are constructed into a second subgraph, and the above processes are repeated continuously, so that a third subgraph, a fourth subgraph, … … and the like are constructed.
And S403, updating the constraint item according to the graph optimization result.
When the robot walks a repeated path, and the path exists in a map constructed before, a constraint relation is generated between a current laser key frame and a previous laser key frame, namely a new constraint item is generated, and map ghosting can be eliminated after map optimization calculation and global optimization.
And S404, updating the grid map and the laser key frame sequence according to the updated constraint items.
In the embodiment of the application, new and old constraint items can be screened, if the matching score of the old constraint item in a new map is low, the map at the position is changed greatly, the map generated by the old laser key frame is not applicable any more, the old laser key frame can be deleted through a screening strategy, the optimal pose of each laser key frame is optimized by using 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 the updating of the grid map, the sequence of laser keyframes and the constraint terms is a continuous process, i.e. the optimization and updating process is continuously performed as the laser keyframes collected by the robot are continuously accumulated.
When the map building is finished, the grid map, the laser key frame sequence and the constraint items at the moment can be stored for use in the next map building.
In summary, when a target area is subjected to map reconstruction, the grid map, the sequence of laser key frames and the constraint item stored in the last map construction process are loaded, wherein the constraint item is a pose difference between the laser key frames; and reconstructing the target area according to the grid map, the laser key frame sequence and the constraint items. By adopting the method for loading the grid map, the laser key frame sequence and the constraint items, the map can be built or updated in an expanding way in different time-division areas when the large map is built, and the constraint relation is built between the map to be built and the map built before, so that the map loop is realized, the accumulated error is eliminated, and the ghost phenomenon is avoided.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 5 shows a structure diagram of an embodiment of a mapping apparatus according to an embodiment of the present application, which corresponds to a mapping method according to the foregoing embodiment.
In this embodiment, an apparatus for creating a graph may include:
the data loading module 501 is configured to load a grid map, a sequence of laser key frames, and a constraint item stored in a previous map building process when a map is continuously built for a target area, where the constraint item is a pose difference between the laser key frames;
a map reconstruction module 502, configured to reconstruct the map of the target area according to the grid map, the sequence of laser key frames, and the constraint term.
Further, the map renewal module may include:
a probability map generating 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:
the grid type obtaining subunit is 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 that the target grid is hit by laser light emitted by a laser, and the second count value is a number of times that the target grid is located on a connection line between the laser-hit grid and the laser;
and the probability value calculation operator unit is used for calculating the occupation probability value of the target grid in the probability map according to the first count value and the second count value.
Further, the probabilistic map updating unit may include:
a count value updating subunit, configured to update a first count value and a second count value of each connection grid corresponding to the current laser key frame, where the connection grid is a grid on a connection line between a grid hit by a laser and the laser;
and the probability value updating subunit is used for respectively updating the occupation probability values of the connection grids 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 constructing unit is used for constructing a pose graph according to the laser key frame sequence and the constraint items;
the image optimization unit is used for acquiring a current laser key frame and carrying out image optimization on the pose image according to the current laser key frame;
the constraint item updating unit is used for updating the constraint item according to the 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 items.
Further, the graph optimizing unit may include:
a sub-graph dividing subunit, configured to perform sub-graph division on the laser key frame sequence to obtain each sub-graph;
and the graph optimization subunit is used for performing graph optimization on the pose graph according to the current laser key frame based on each sub graph.
Further, the map building apparatus may further include:
and the data storage module is used for storing the grid map, the laser key frame sequence and the constraint items when the map building is finished so as to be used in the next map building.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, modules and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Fig. 6 shows a schematic block diagram of a robot provided in an embodiment of the present application, and only a part 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 processor 60, when executing the computer program 62, implements the steps in the various mapping method embodiments described above, such as the steps S101 to S102 shown in fig. 1. Alternatively, the processor 60, when executing the computer program 62, implements the functions of each module/unit in the above-mentioned device embodiments, for example, the functions of the modules 501 to 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 accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the robot 6.
Those skilled in the art will appreciate that fig. 6 is merely an example of a robot 6, and does not constitute a limitation of the robot 6, and may include more or fewer components than shown, or some components in combination, 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 (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. 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 also be an external storage device of the robot 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the robot 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the robot 6. The memory 61 is used for storing the computer program and other programs and data required by the robot 6. The memory 61 may also be used to temporarily store 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-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
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 implementation. 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 above-described embodiments of the apparatus/robot are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an 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, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable storage medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable storage media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for creating a map, comprising:
loading a grid map, a laser key frame sequence and a constraint item stored in the last map building process when a target area is subjected to map rebuilding, wherein the constraint item is a pose difference between laser key frames;
and reconstructing the target area according to the grid map, the laser key frame sequence and the constraint items.
2. The mapping method of claim 1, wherein the reconstructing the target region from the grid map, the sequence of laser key frames, and the constraint term comprises:
generating a probability map corresponding to the grid map;
and acquiring a current laser key frame, and updating the probability map according to the current laser key frame.
3. The mapping method according to claim 2, wherein the generating a probability map corresponding to the grid map comprises:
acquiring a grid type of a target grid, wherein the target grid is any one grid in the grid map;
determining a first count value and a second count value of the target grid according to the grid type, wherein the first count value is the number of times that the target grid is hit by laser emitted by a laser, and the second count value is the number of times that the target grid is located on a connecting line between the laser hit grid and the laser;
and calculating an occupation probability value of the target grid in the probability map according to the first count value and the second count value.
4. The mapping method according to claim 3, wherein the updating the probability map according to the current laser key frame comprises:
updating a first count value and a second count value of each connection grid corresponding to the current laser key frame respectively, wherein the connection grids are grids on a connection line between a grid hit by laser and a laser;
and respectively updating the occupation probability values of the connection grids in the probability map according to the updated first count value and the updated second count value.
5. The mapping method of claim 1, wherein the reconstructing the target region from the grid map, the sequence of laser key frames, and the constraint term comprises:
constructing a pose graph according to the laser key frame sequence and the constraint items;
acquiring a current laser key frame, and carrying out 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 items.
6. The mapping method according to claim 5, wherein the map optimizing the pose map according to the current laser key frame comprises:
performing subgraph division on the laser key frame sequence to obtain each subgraph;
and based on each sub-graph, carrying out graph optimization on the pose graph according to the current laser key frame.
7. The mapping method according to any one of claims 1 to 6, further comprising:
and storing the grid map, the laser key frame sequence and the constraint items at the end of the map building for use in the next map building.
8. An apparatus for creating a map, comprising:
the data loading module is used for loading a grid map, a laser key frame sequence and a constraint item which are stored in the last map building process when a target area is subjected to map rebuilding, wherein the constraint item is a pose difference between laser key frames;
and the map reconstruction module is used for reconstructing the target area according to the grid map, the laser key frame sequence and the constraint items.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the mapping method according to any one of claims 1 to 7.
10. A robot comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the steps of the mapping method according to any of claims 1 to 7 are implemented by the processor when executing the computer program.
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 true CN112100298A (en) 2020-12-18
CN112100298B 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)

Cited By (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
CN117387639A (en) * 2023-09-22 2024-01-12 成都睿芯行科技有限公司 Map updating system and method based on laser SALM
CN117451035A (en) * 2023-12-25 2024-01-26 江苏中科重德智能科技有限公司 Method and system for self-adaptively and automatically updating map by laser slam

Citations (7)

* 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
US20200240794A1 (en) * 2019-01-28 2020-07-30 Uatc, Llc Scaffolds for globally consistent maps

Patent Citations (7)

* 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
US20200240794A1 (en) * 2019-01-28 2020-07-30 Uatc, Llc Scaffolds for globally consistent maps
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

Cited By (11)

* 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
WO2023005021A1 (en) * 2021-07-30 2023-02-02 深圳市优必选科技股份有限公司 Map updating method, robot, and readable storage medium
CN113787516A (en) * 2021-08-16 2021-12-14 深圳优地科技有限公司 Positioning method and device and robot
CN117387639A (en) * 2023-09-22 2024-01-12 成都睿芯行科技有限公司 Map updating system and method based on laser SALM
CN117387639B (en) * 2023-09-22 2024-06-14 成都睿芯行科技有限公司 Map updating system and method based on laser SALM
CN117451035A (en) * 2023-12-25 2024-01-26 江苏中科重德智能科技有限公司 Method and system for self-adaptively and automatically updating map by laser slam
CN117451035B (en) * 2023-12-25 2024-02-27 江苏中科重德智能科技有限公司 Method and system for self-adaptively and automatically updating map by laser slam

Also Published As

Publication number Publication date
CN112100298B (en) 2024-04-19

Similar Documents

Publication Publication Date Title
CN112100298A (en) Drawing establishing method and device, computer readable storage medium and robot
CN106997466B (en) Method and device for detecting road
CN111024100B (en) Navigation map updating method and device, readable storage medium and robot
JP6952165B2 (en) Obstacle detection method and equipment
CN108319655B (en) Method and device for generating grid map
CN111912417B (en) Map construction method, map construction device, map construction equipment and storage medium
CN111795687B (en) Robot map updating method and device, readable storage medium and robot
CN101996420B (en) Information processing device, information processing method and program
CN112462758B (en) Drawing establishing method and device, computer readable storage medium and robot
CN110457407B (en) Method and apparatus for processing point cloud data
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
CN112734918A (en) Dynamic updating method, device, equipment and medium for platform-side three-dimensional electronic map
CN113190538A (en) Road construction method and device based on track data, storage medium and terminal
CN112084853A (en) Footprint prediction method, footprint prediction device and humanoid robot
CN115375870A (en) Loop detection optimization method, electronic equipment and computer readable storage device
CN112630798B (en) Method and apparatus for estimating ground
CN116051777B (en) Super high-rise building extraction method, apparatus and readable storage medium
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
CN111767357B (en) Regional mining complete evaluation method and equipment, electronic equipment and storage medium
CN115731215A (en) Loop detection method and device, electronic equipment and storage medium
Kuder et al. Point-based rendering optimization with textured meshes for fast LiDAR visualization
CN113313099A (en) Real-time acquisition method, system and storage medium based on remote sensing image map

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