Map generation method and device, robot and storage medium
By detecting the closed-loop conditions of local map statistical information and point cloud data in the robot, and performing pose correction and map updates, the problem of large resource occupation in traditional map construction methods is solved, and the efficiency and accuracy of map construction are improved.
Patent Information
- Application Number
- CN202410695488.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-08-27
AI Technical Summary
When traditional map construction methods handle very large scenes, the robot needs to maintain a large number of filter states, which results in large computing resource usage, prone to downtime, and excessive map construction resource overhead.
When the local map statistical information in the memory meets the closed-loop detection conditions, the current point cloud data is obtained into the memory, and the position, distance and posture are corrected based on the point cloud data and the position information and pose information of the local map identification, and an updated local map is generated. , replace historical local maps and reduce redundant data usage.
It saves the cost of map construction resources, improves the accuracy and efficiency of the target global map, avoids excessive occupation of memory resources, and ensures the accuracy of robot positioning.
Smart Images

Figure CN118550979A
Abstract
Description
Technical Field
[0001] The present application relates to the field of robot control technology, and in particular to a map generation method, device, robot, storage medium and computer program product. Background Art
[0002] With the development of science and technology, the robot industry is becoming more and more mature, and the application scope of robots is becoming wider and wider. For example, food delivery robots and sweeping robots can be applied to the service industry. During the movement of robots, robots need to rely on maps to locate themselves. Therefore, accurate maps are the basis for robot movement.
[0003] Traditional map construction usually uses filters, such as recursive Bayesian filters, to process laser data and use the processed laser data to build maps in real time. However, when processing extremely large scenes, the robot needs to maintain a large number of filter states at the same time, which occupies a large amount of computing resources and is prone to downtime, resulting in high resource overhead for map construction. Summary of the invention
[0004] Based on this, it is necessary to provide a map generation method, device, robot, computer-readable storage medium and computer program product that can save resource overhead in map construction in order to address the above technical problems.
[0005] In a first aspect, the present application provides a map generation method, comprising:
[0006] When the local map statistical information in the memory meets the closed-loop detection condition, the current point cloud data is obtained and stored in the memory;
[0007] In the memory, based on the position distance between the position information included in the current point cloud data and the position information corresponding to each local map identifier, a target local map identifier is determined from each local map identifier, and a target local map corresponding to the target local map identifier is extracted from the memory and stored in the memory;
[0008] In the memory, based on the posture error between the posture information contained in the current point cloud data and the posture information corresponding to the target local map identifier, the initial point cloud data corresponding to each local map identifier in the memory are corrected in posture to obtain the target point cloud data corresponding to each local map identifier, and each target point cloud data is extracted from the memory into the memory;
[0009] In the memory, each updated local map is generated based on each target point cloud data, each updated local map replaces the historical local map corresponding to each local map identifier in the memory, and a target global map is generated based on each updated local map.
[0010] In a second aspect, the present application also provides a map generating device, comprising:
[0011] A condition detection module, used to obtain the current point cloud data and store it in the memory when the local map statistical information in the memory meets the closed-loop detection condition;
[0012] A map determination module is used to determine a target local map identifier from each local map identifier in the memory based on the position information contained in the current point cloud data and the position distance between the position information corresponding to each local map identifier, and extract the target local map corresponding to the target local map identifier from the memory to the memory;
[0013] A posture correction module is used to perform posture correction on the initial point cloud data corresponding to each local map identifier in the memory based on the posture error between the posture information contained in the current point cloud data and the posture information corresponding to the target local map identifier in the memory, obtain the target point cloud data corresponding to each local map identifier, and extract each target point cloud data from the memory to the memory;
[0014] The map generation module is used to generate each updated local map in the memory based on each target point cloud data, replace the historical local map corresponding to each local map identifier in the memory with each updated local map, and generate a target global map based on each updated local map.
[0015] In a third aspect, the present application further provides a robot comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of a map generating method when executing the computer program.
[0016] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the map generating method when executed by a processor.
[0017] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the map generation method when executed by a processor.
[0018] The map generation method, device, robot, storage medium and computer program product described above acquire the current point cloud data into the memory when detecting that the local statistical information in the memory satisfies the closed-loop detection condition, and calculates the position distance using the position information of the current point cloud data and the position information of each local map identifier; after determining the target local map identifier according to the position distance, acquire the target local map corresponding to the target local map identifier from the memory into the memory, thereby realizing the on-demand reading of the data in the memory when using memory calculation, and avoiding placing the currently unnecessary historical local maps in the memory to occupy memory resources. Then, the memory resources are used to calculate the posture error between the current point cloud data and the target local map, and the posture error is used to perform posture correction on the initial point cloud data corresponding to each local map identifier in the memory, thereby ensuring the posture accuracy of the target point cloud data corresponding to each local map identifier. Then, the corresponding updated local map is regenerated by using the target point cloud data after posture correction, and the updated local map replaces the historical local maps corresponding to each local map identifier in the memory, thereby deleting the redundant historical local maps, thereby saving memory resources.
[0019] Furthermore, the updated local map has a more accurate map pose than the historical local map, and the target global map is generated by using the updated local map, thereby improving the accuracy of the target global map. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] FIG1 is an application environment diagram of a map generation method in one embodiment;
[0022] FIG2 is a schematic diagram of a flow chart of a map generation method in one embodiment;
[0023] FIG3 is a schematic diagram of a flow chart of a map generation step in one embodiment;
[0024] FIG4 is a schematic diagram of a flow chart of a map generation method in another embodiment;
[0025] FIG5 is a schematic diagram of a flow chart of a map generation method in a specific embodiment;
[0026] FIG6 is a structural block diagram of a map generating device in one embodiment;
[0027] FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0029] The map generation method provided in the embodiment of the present application can be applied to the application environment shown in FIG. 1, including a robot 102 and a server 104. The robot 102 and the server 104 can be connected via a communication connection method such as Bluetooth, USB (Universal Serial Bus) or a network, and the present application does not limit this. In one embodiment, the robot 102 can receive a task instruction sent by the server 104, such as a map generation instruction sent by the server 104 to the robot 102, and the robot 102 moves in the target area in response to the map generation instruction and generates a map corresponding to the target area. Of course, the robot 102 can also receive a task instruction sent by a terminal, wherein the terminal can be a mobile phone, a computer, an intelligent wearable device, etc. The robot 102 can also receive a touch instruction or a voice instruction, etc., through a signal receiving device such as a touch screen and a microphone set on the robot 102, and no specific limitation is made here.
[0030] In one embodiment, when the robot 102 detects that the local map statistical information in the memory satisfies the closed-loop detection condition, the current point cloud data is obtained and stored in the memory; in the memory, based on the position distance between the position information contained in the current point cloud data and the position information corresponding to each local map identifier, the target local map identifier is determined from each local map identifier, and the target local map corresponding to the target local map identifier is extracted from the memory to the memory; in the memory, based on the pose error between the pose information contained in the current point cloud data and the pose information corresponding to the target local map identifier, the initial point cloud data corresponding to each local map identifier in the memory is corrected in pose to obtain the target point cloud data corresponding to each local map identifier, and each target point cloud data is extracted from the memory to the memory; in the memory, each updated local map is generated based on each target point cloud data, and each updated local map replaces the historical local map corresponding to each local map identifier in the memory, and a target global map is generated based on each updated local map.
[0031] In one embodiment, as shown in FIG. 2 , a map generation method is provided. The method is applied to the robot in FIG. 1 as an example for explanation. The robot includes a memory and a memory, and a local map is stored in the memory. The method includes the following steps:
[0032] Step 202: When the local map statistical information in the memory satisfies the closed-loop detection condition, the current point cloud data is obtained and stored in the memory.
[0033] Among them, the memory refers to a storage device with storage function set in the robot, which is used to store temporarily unused data. Local map statistical information refers to the statistical information of the local map stored in the memory. The closed-loop detection condition refers to the condition used to determine whether to perform closed-loop detection. Closed-loop detection refers to the function of the robot to identify historical scenes that have been reached and make the map overlap the closed loop. The current point cloud data refers to the point cloud data corresponding to the local scene currently collected by the robot. The point cloud data refers to the collection of sampling points that express the spatial distribution content in the same spatial reference system, and each sampling point carries its own spatial coordinates. The size of the local scene is determined by the collection range of the robot's point cloud collection device. Memory refers to the computing place inside the robot with calculation and storage functions.
[0034] Specifically, the robot moves in the current area, which refers to the movable area where the robot is currently located, which can be the robot's working area, information collection area, etc. During the robot's movement, point cloud data is collected by the installed point cloud collection device, which can be a laser radar device, an optical camera device, etc., and then the point cloud data is used to generate a corresponding local map, the generated local map is stored in a memory, and the stored local map is counted through the memory to obtain local map statistical information.
[0035] At the current moment, when the robot detects in the memory that the local map statistical information meets the closed detection condition, the robot performs closed-loop detection. Alternatively, a timer corresponding to the memory is set. When the timer reaches the target time point, the memory is triggered to send the statistical value in the local map statistical information to the robot. The robot detects the received statistical value, such as using the detection value to detect the statistical value. When it is detected that the statistical value meets the closed detection condition, the robot performs closed-loop detection. Then the robot receives the current point cloud data collected by the point cloud acquisition device and stores the current point cloud data in the memory. The current point cloud data can be the current frame point cloud data collected by the point cloud acquisition device.
[0036] Step 204, in the memory, based on the position distance between the position information contained in the current point cloud data and the position information corresponding to each local map identifier, determine the target local map identifier from each local map identifier, and extract the target local map corresponding to the target local map identifier from the memory to the memory.
[0037] Among them, the local map identifier refers to the identifier of the generated local map. The target local map identifier refers to the local map to be processed selected according to the position distance. The position information contained in the current point cloud data refers to the position coordinates in the world coordinate system when the robot collects the current point cloud data. The position information corresponding to the local map identifier refers to the position information of the specific point cloud data for generating the local map. The specific point cloud data can be the first frame of point cloud data used when generating the local map.
[0038] Specifically, the robot collects historical point cloud data within a historical time period, generates each historical local map and corresponding local map identifier in the memory using the historical point cloud data, and uses the location information of the specific point cloud data corresponding to each local map identifier as the location information corresponding to each local map identifier. Then, after the historical local map is completed, the robot associates and stores the historical local map, the local map identifier and the location information in the memory.
[0039] When the robot performs closed-loop detection, it obtains the location information corresponding to each local map marker from the memory, and extracts the location information contained in the current point cloud data. The robot calculates the location distance between the location information of the current point cloud data and the location information of each local map marker, and uses the local map marker that meets the location distance condition as the target local map marker. The robot obtains the target local map from the memory according to the target local map marker and stores it in the memory.
[0040] In one embodiment, the robot obtains the target local map from the storage to the memory, and uses the memory computing resources to scan and match the current point cloud data with the target local map. The memory computing resources refer to the computing power that the memory can provide. When the matching degree meets the preset matching conditions, it is determined that the scene content represented by the current point cloud data is similar to the scene content represented by the target local map, which means that the robot recognizes the current area as an area that has been reached, and the closed-loop detection ends. The robot establishes a constraint relationship between the current point cloud data and the target local map, indicating that the current point cloud data in the constraint relationship forms a closed loop with the target local map data. Then the robot performs the work of optimizing the position and posture of the point cloud data.
[0041] Step 206, in the memory, based on the posture error between the posture information contained in the current point cloud data and the posture information corresponding to the target local map, the initial point cloud data corresponding to each local map identifier in the memory are posture corrected to obtain the target point cloud data corresponding to each local map identifier, and each target point cloud data is extracted from the memory into the memory.
[0042] Among them, the initial pose information contained in the current point cloud data refers to the position coordinates and pose of the robot in the robot coordinate system when the robot collects the current point cloud data, and is the pose information that has not been optimized at present. The initial pose information corresponding to the local map identifier refers to the initial pose information of the specific point cloud data for generating the local map. The pose information corresponding to the target local map refers to the initial pose information corresponding to the target local map identifier. The robot coordinate system refers to the coordinate system with the initial position of the robot as the origin. The initial point cloud data refers to the set of initial point cloud data for constructing each historical local map, and is the point cloud data that has not been pose optimized at present.
[0043] Specifically, the robot is also equipped with motion sensors for collecting motion sensor data of the robot, such as odometer data, inertial measurement data, etc. After the robot collects the current point cloud data, it preprocesses the current point cloud data, which may be downsampling the current point cloud data, such as downsampling the current point cloud data using voxel filtering or adaptive voxel filtering, and then the robot uses the preprocessed current point cloud data and motion sensor data to estimate the current posture information of the robot, and obtains the posture information corresponding to the current point cloud data.
[0044] After determining the target local map identifier, the robot extracts the target local map corresponding to the target local map identifier from the memory to the memory. The robot calls the computing resources in the memory to calculate the pose error based on the pose information of the current point cloud data and the pose information corresponding to the target local map. The pose error refers to the offset between the poses. Then the robot obtains the pose errors corresponding to each local map identifier from the memory, such as the pose error between the specific point cloud data corresponding to the historical local map calculated in the historical time period and the previous historical local map.
[0045] The robot calculates the target pose error, such as the minimum pose error, based on the pose error corresponding to the current point cloud data and the pose errors corresponding to each local map marker. The robot uses the target pose error to perform pose correction on the pose information corresponding to the current point cloud data, and performs pose correction on the pose information of the initial point cloud data corresponding to each local map marker in the memory according to the target pose error to obtain the target point cloud data corresponding to each local map marker.
[0046] Step 208, in the memory, each updated local map is generated based on each target point cloud data, each updated local map replaces the historical local map corresponding to each local map identifier in the memory, and a target global map is generated based on each updated local map.
[0047] Specifically, after performing the pose optimization of the point cloud data, the robot performs the work of generating a global map. The robot obtains each target point cloud data after pose correction from the memory to the memory, and uses the computing resources of the memory to generate each updated local map according to each target point cloud data. Then, according to each local map identifier in the memory, the updated local map is used to replace the historical local map corresponding to the local map identifier, until all the historical local maps corresponding to each local map identifier in the memory are replaced. Then the robot deletes each updated local map in the memory.
[0048] In response to the instruction to generate the global map, the robot obtains each updated local map from the memory, selects a starting updated local map from each updated local map, and then determines a spliced local map adjacent to the starting updated local map based on the position information of each updated local map, splices the spliced local map with the starting updated local map to obtain a spliced map. The spliced map is used as the starting updated local map, and returns to the step of determining a spliced local map adjacent to the starting updated local map based on the position information of each updated local map, until each updated local map participates in the splicing to obtain the target global map.
[0049] In one embodiment, for the convenience of management, the memory may include a map information memory and a map management memory. The map information memory stores various historical local maps and corresponding posture information, and the storage addresses of the local maps and the corresponding position information in the map information memory and the number of local maps can be recorded in a table. The robot can obtain local map statistical information according to the table, and after the robot determines the target local map identifier from each local map identifier, it extracts the target local map corresponding to the target local map identifier from the map information memory to the memory. The map management memory is used to store target point cloud data, update local maps, and target global maps. The robot optimizes the posture of the point cloud data in the map management memory according to the posture error between the posture information contained in the current point cloud data and the posture information corresponding to the target local map, obtains the target point cloud data, uses the target point cloud data to generate an updated local map, stores the updated local map in the map management memory, and obtains the updated local map from the map management memory to generate the target global map.
[0050] In the above map generation method, when it is detected that the local statistical information in the memory meets the closed-loop detection condition, the current point cloud data is acquired into the memory, and the position distance is calculated using the position information of the current point cloud data and the position information of each local map mark; after the target local map mark is determined according to the position distance, the target local map corresponding to the target local map mark is acquired from the memory into the memory, so as to realize the on-demand reading of the data in the memory when using memory calculation, and avoid placing the currently unnecessary historical local map in the memory to occupy memory resources. Then, the memory resources are used to calculate the posture error between the current point cloud data and the target local map, and the posture error is used to correct the posture of the initial point cloud data corresponding to each local map mark in the memory, so as to ensure the posture accuracy of the target point cloud data corresponding to each local map mark. Then, the corresponding updated local map is regenerated by using the target point cloud data after posture correction, and the updated local map replaces the historical local maps corresponding to each local map mark in the memory, so as to delete the redundant historical local maps, thereby saving memory resources.
[0051] Furthermore, the updated local map has a more accurate map pose than the historical local map, and the target global map is generated by using the updated local map, thereby improving the accuracy of the target global map.
[0052] In one embodiment, in step 202, when the local map statistical information in the memory satisfies the closed-loop detection condition, before acquiring the current point cloud data and storing it in the memory, the map generation method further includes:
[0053] Acquire historical point cloud data and store them in memory, and generate historical local maps based on the historical point cloud data;
[0054] Downsampling the historical local map to obtain at least two subsidiary local maps corresponding to the historical local map; the resolution of the subsidiary local map is lower than the resolution of the historical local map;
[0055] The historical point cloud data, the historical local map, and the attached local map are associated and stored in a memory, and the historical point cloud data, the historical local map, and the attached local map are deleted in the memory.
[0056] Among them, the subsidiary local map refers to a local map with a resolution lower than that of the historical local map.
[0057] Specifically, during the movement of the robot within the historical time period, the point cloud acquisition device continuously acquires multiple frames of historical point cloud data according to the acquisition frequency, and the robot calls the computing resources in the memory to generate a historical local map based on the continuous multiple frames of historical point cloud data. Specifically, when the robot receives the first frame of point cloud data for generating a historical local map through the point cloud acquisition device, it generates an initial historical local map based on the first frame of point cloud data. Then the robot receives subsequent multiple frames of historical point cloud data sent by the point cloud acquisition device, and interpolates the subsequent multiple frames of historical point cloud data into the initial historical local map, until the preset number of frames of historical point cloud data are interpolated in the initial historical local map, and the historical local map is obtained.
[0058] The historical local map is a grid map, and each grid has a grid value representing an obstacle. For example, a grid with a grid value of 100 is an obstacle grid, and a grid with a grid value of 0 is an obstacle-free grid. The robot performs downsampling processing on the generated historical local map in memory, for example, setting sliding windows of different sizes to perform convolution calculations on the grid values in the historical local map to obtain an auxiliary local map corresponding to the historical local map, and the resolution of the auxiliary local map is lower than that of the historical local map.
[0059] Then the robot stores the historical point cloud data, the historical local map, and the attached local map in association in the memory, and deletes the historical point cloud data, the historical local map, and the attached local map in the memory.
[0060] In this embodiment, when the closed-loop detection work is not performed, whenever the historical local map and the corresponding subsidiary local map are generated, the temporarily unnecessary historical local map and the subsidiary local map are stored in the memory, and the historical local map and the subsidiary local map in the memory are deleted to realize the on-demand release of memory resources. This can avoid the currently unnecessary historical local maps and the subsidiary local maps occupying memory resources, which may cause machine crashes during subsequent large-scale memory calculations, thereby ensuring the reasonable allocation of memory resources and improving the efficiency of map construction.
[0061] In one embodiment, the map generation method further includes:
[0062] Acquire at least two subsidiary local maps corresponding to the target local map identifier from the memory and store them in the memory;
[0063] In the memory, the current point cloud data is matched with at least two attached local maps respectively to obtain the matching degree corresponding to the at least two attached local maps;
[0064] When the matching degree meets the matching condition, the step of performing posture correction on the initial point cloud data corresponding to each local map identifier in the memory based on the posture error between the posture information contained in the current point cloud data and the posture information corresponding to the target local map identifier is entered.
[0065] Specifically, the robot determines the target local map identifier among the local map identifiers based on the position distance, indicating that the target local map corresponding to the target local map identifier may be a candidate local map with a constraint relationship with the current point cloud data. It is also necessary to match the current point cloud data with the target local map to determine whether the target local map is closed-loop with the current point cloud data.
[0066] The robot obtains the target local map corresponding to the target local map identifier and at least two subsidiary local maps corresponding to the target local map from the memory. The robot determines the matching order of each subsidiary local map according to the resolution of each subsidiary local map. Generally, the matching order is the order of resolution from low to high. The robot matches the current point cloud data with each subsidiary local map according to the matching order, for example, the current point cloud data is projected to each subsidiary local map respectively, and the overlap degree of the current point cloud data in each subsidiary local map is counted to obtain the matching degree corresponding to each subsidiary local map. When the matching degree of each subsidiary local map is detected to increase one by one according to the matching order, it means that the matching degree of each subsidiary local map meets the matching condition, and it is determined that the current point cloud data has a constraint relationship with the target local map. Then the robot executes the step of performing posture correction on the initial point cloud data corresponding to each local map identifier in the memory based on the posture error between the posture information contained in the current point cloud data and the posture information corresponding to the target local map identifier.
[0067] In this embodiment, since the resolution of the target local map is higher than that of the attached local map, the attached local map is first used to match the current point cloud data to determine whether the target local map is in a closed loop with the current point cloud data, and then the pose error between the target local map and the current point cloud data is calculated, thereby avoiding unnecessary memory overhead when directly matching the current point cloud data with the high-resolution target local map, thereby saving memory resource overhead.
[0068] In one embodiment, based on the posture error between the posture information contained in the current point cloud data and the posture information corresponding to the target local map mark, the initial point cloud data corresponding to each local map mark in the memory are posture corrected to obtain the target point cloud data corresponding to each local map mark, including:
[0069] Based on the pose information contained in the current point cloud data and the pose information corresponding to the target local map mark, the current relative pose is obtained;
[0070] Obtaining the historical relative pose corresponding to each closed-loop local map marker from the memory;
[0071] Based on the current relative posture and the historical relative posture, error optimization is performed to obtain the error optimization values corresponding to each local map mark, and based on the error optimization values, the initial point cloud data corresponding to each local map mark is corrected to obtain the target point cloud data corresponding to each local map mark;
[0072] The target point cloud data corresponding to each local map mark are stored in the memory, and the target point cloud data corresponding to each local map mark are deleted from the memory.
[0073] Among them, the closed-loop local map identifier refers to the identifier corresponding to the historical local map with a constraint relationship. The historical relative pose refers to the pose error between the historical local map with a constraint relationship and the point cloud data. The error optimization value refers to the adjustment target value of the pose error.
[0074] Specifically, the robot calls the computing resources in the memory, calculates the pose difference between the pose information of the current point cloud data and the pose information of the target local map, and obtains the current relative pose. Specifically, the current point cloud data can be projected into the target local map, and the current point cloud data can be rotated successively according to the rotation angle, and the degree of overlap between the current point cloud data and the target local map is calculated, and the pose with the highest degree of overlap is determined as the current relative pose between the current point cloud data and the target local map. Then the robot obtains the historical relative pose corresponding to each constraint relationship from the memory, that is, the pose error between the historical local map in the constraint relationship and its closed-loop historical point cloud data.
[0075] The robot calls a preset posture optimization algorithm to optimize the error between the current relative posture and each historical relative posture. The preset posture algorithm is, for example, an optimizer. The robot calculates the minimum posture error based on the current relative posture and each historical relative posture through the preset optimization algorithm, and uses the minimum posture error to correct the posture information of the current point cloud data and the posture information of the historical point cloud data corresponding to each historical local map in the memory, and obtains the target point cloud data corresponding to each local map marker;
[0076] The robot stores the target point cloud data corresponding to each local map mark in the memory, and deletes the target point cloud data corresponding to each local map mark in the memory.
[0077] In this embodiment, by performing error optimization based on the current relative posture and the historical relative posture corresponding to each closed-loop local map marker, and using the error optimization value to correct the posture of each initial point cloud data, the posture error accumulated over a long period of movement of the robot is corrected, thereby ensuring the accuracy of the robot's positioning.
[0078] In one embodiment, as shown in FIG3 , in the memory, each updated local map is generated based on each target point cloud data, and each updated local map replaces the historical local map corresponding to each local map identifier in the memory, including:
[0079] Step 302, determining the current local map identifier from each local map identifier, obtaining the current target point cloud data corresponding to the current local map identifier from the memory and storing it in the memory;
[0080] Step 304, in the memory, determining the starting point cloud data from the current target point cloud data, and generating an initial local map corresponding to the current local map identifier based on the starting point cloud data;
[0081] Step 306, interpolating the initial local map based on the remaining point cloud data in the current target point cloud data to obtain an updated local map corresponding to the current local map identifier;
[0082] Step 308, replacing the historical local map corresponding to the current local map identifier in the memory with the updated local map corresponding to the current local map identifier, and deleting the updated local map corresponding to the current local map identifier in the memory;
[0083] Step 310, determine the current local map identifier from the remaining local map identifiers, and return to the step of obtaining the current target point cloud data corresponding to the current local map identifier from the memory and storing it in the memory, until the target point cloud data corresponding to each local map identifier in the memory are all involved in the calculation, and each updated local map is obtained.
[0084] Among them, the updated local map refers to the local map generated using the point cloud data after posture correction. The current local map identifier refers to the identifier of the local map that needs to be generated currently. The current target point cloud data refers to the point cloud data used to generate the current local map. The initial local map refers to the initial local map of the point cloud data to be filled.
[0085] Specifically, the robot traverses the attribute information corresponding to each local map in the memory, such as the generation time, number, etc., and determines the current local map identifier from each local map identifier, which can be randomly selected or the earliest generated local map identifier can be selected according to the time sequence as the current local map identifier. Then the robot obtains the current target point cloud data corresponding to the current local map identifier from the memory and stores it in the memory. The current target point cloud data includes multiple frames of point cloud data.
[0086] The robot calls the computing resources in the memory, and uses the point cloud data of the first frame in the current target point cloud data as the starting point cloud data, for example, it is determined according to the number or the acquisition time. The robot generates the initial local map corresponding to the current local map identifier according to the starting point cloud data. Then the robot performs difference processing on the initial local map according to the time sequence or number for the remaining multi-frame point cloud data in the current target point cloud data, obtains the updated local map corresponding to the current local map identifier, replaces the historical local map corresponding to the current local map identifier in the memory with the updated local map, and deletes the updated local map and the corresponding current target point cloud data in the memory. For example, the robot obtains the current local map identifier A from the memory, and obtains the corresponding target point cloud data, which includes 1-10 frames of point cloud data. The robot generates the initial local map according to the 1st frame of point cloud data, and then interpolates the subsequent 2-10 frames of point cloud data into the initial local map according to the number, and obtains the updated local map corresponding to the current local map identifier A.
[0087] The robot accesses the memory again, determines the current local map identifier from the remaining local map identifiers in the memory, and returns to the step of obtaining the current target point cloud data corresponding to the current local map identifier from the memory and storing it in the memory, until the target point cloud data corresponding to each local map identifier in the memory are all involved in the calculation, and each updated local map is obtained.
[0088] In a specific embodiment, after generating an initial local map, the robot scans and matches the point cloud data of the next frame with the initial local map, calculates the relative pose between the point cloud data of the next frame and the initial local map, adjusts the point cloud data of the next frame with the relative pose, and interpolates the point cloud data of the next frame into the initial local map, and executes this operation in sequence for the point cloud data of subsequent frames until the remaining point cloud data in the current target point cloud data is interpolated into the initial local map to obtain an updated local map.
[0089] In a specific embodiment, the robot counts the resource consumption information corresponding to the updated local map, determines the current map generation number according to the resource consumption information and the current memory computing resources, then determines each local map identifier corresponding to the current map generation number in the memory, uses each local map identifier as the current local map identifier, obtains the current target point cloud data corresponding to the current local map identifier and stores it in the memory, then enters the step of determining the starting point cloud data from the current target point cloud data, obtains the updated local map corresponding to the current map generation number, stores it in the memory, and deletes the updated local map corresponding to the current map generation number in the memory. Then the robot counts the resource consumption information corresponding to the remaining updated local maps, enters the step of determining the current map generation number according to the resource consumption information and the current memory computing resources, until the updated local maps corresponding to each local map identifier in the memory are obtained. .
[0090] In this embodiment, by storing all target point cloud data in the memory, when it is necessary to generate an updated local map, the current target point cloud data corresponding to the current local map identifier is obtained from the storage and stored in the memory to generate the updated local map, so as to avoid storing all target point cloud data in the memory to occupy memory resources when the memory resources are limited, and realize the reading of the current target point cloud data during memory calculation. Then, after the updated local map is generated and stored in the memory, the updated local map in the memory is deleted to execute the generation of the next updated local map, so as to realize the on-demand release of memory resources, ensure the reasonable allocation of memory resources, and save memory resources.
[0091] In one embodiment, as shown in FIG4 , generating a target global map based on each updated local map includes:
[0092] Step 402, in response to the global map generation instruction, extracting a target number of updated local maps from the memory into the memory;
[0093] Step 404, in the memory, map stitching is performed on the target number of updated local maps to obtain stitched local maps, the stitched local maps are stored in the memory, and the stitched local maps are deleted in the memory;
[0094] Step 406, extracting a target number of updated local maps from the remaining updated local maps in the memory to the memory, and returning them to the memory, and executing the step of map splicing for the target number of updated local maps until all updated local maps in the memory are updated to obtain spliced local maps;
[0095] Step 408, acquiring each spliced local map from the storage into the memory, merging each spliced local map in the memory to obtain the target global map.
[0096] Specifically, the robot associates each updated map with the corresponding target point cloud data and stores it in the memory, and releases the computing resources of the memory. The updated local map carries a number. When the robot responds to the global map generation instruction, the robot detects that the number of updated local maps in the memory is greater than the number of splicing, extracts the target number of consecutively numbered updated local maps from the memory into the memory, and then the robot splices each updated local map in the memory according to the number to obtain a spliced local map. The robot then stores the spliced local map in the memory and releases the spliced local map in the memory.
[0097] The robot extracts a target number of updated local maps from the remaining updated local maps in the memory to the memory, and returns them to the memory to perform the map splicing step on the target number of updated local maps until all updated local maps in the memory are updated to obtain spliced local maps.
[0098] Then the robot detects that the number of spliced local maps in the memory is less than or equal to the number of splicing, then obtains each spliced local map from the memory to the memory, merges each spliced local map in the memory, and obtains the target global map.
[0099] For example, there are 4 updated local maps A, B, C, and D stored in the memory, which exceeds the number of splicing 2. The robot extracts the updated local maps A and B into the memory for splicing to obtain the spliced local map a, then stores the spliced local map a into the memory, and releases the spliced local map a in the memory. The robot then extracts the updated local maps C and D into the memory for splicing to obtain the spliced local map b, then stores the spliced local map b into the memory, and releases the spliced local map b in the memory. The robot then detects that the number of spliced local maps is equal to the number of splicing, then extracts the spliced maps a and b into the memory for merging to obtain the target global map.
[0100] In this embodiment, the local maps are read and updated in batches for splicing, and the spliced local maps are stored in the memory, and the spliced local maps in the memory are deleted, so that the utilization rate of memory resources can be improved when the memory resources are limited.
[0101] In one embodiment, when the local map statistical information in the memory satisfies the closed-loop detection condition, obtaining the current point cloud data and storing it in the memory includes:
[0102] When the number of local maps based on the local map statistical information in the memory meets the quantity condition, the closed-loop detection state is entered, and the current point cloud data is obtained and stored in the memory.
[0103] Specifically, each time the robot generates a new local map, it stores the new local map in the memory, and then counts the number of local maps in the memory to obtain local map statistical information. When the robot detects that the number of local maps in the local map statistical information in the memory meets the quantity condition, it enters the closed loop detection state and starts to perform closed loop detection work, and returns to the step of obtaining the current point cloud data and storing it in the memory until the target global map is generated based on each updated local map.
[0104] In one embodiment, the robot can also obtain the robot's moving distance, such as odometer data, and when the robot's moving distance reaches a distance condition, it enters a closed-loop detection state and starts to perform closed-loop detection work.
[0105] In this embodiment, by judging whether the robot is currently performing closed-loop detection based on the number of local maps, the logic is simple, and the accumulated errors of the robot's long-term movement are prevented from affecting the robot's positioning, thereby ensuring the accuracy of the robot's positioning.
[0106] In a specific embodiment, as shown in FIG5 , a flowchart of map generation is provided. As shown in the figure, it includes a sensor data module, a preprocessing module, a front-end module, a back-end module, a map management module and a memory. Among them, the front-end module is used for local mapping, and also includes sub-modules such as scan matching, motion filter and local map; the back-end module is used for global optimization, and also includes sub-modules such as closed-loop detection, constraint calculation and posture optimization. The memory is, for example, a disk, and may include a map information memory and a map management memory corresponding to the map management module. The map information memory is used for map information storage, and stores various historical local maps and corresponding posture information. The map management memory is used to store point cloud data, local maps and global maps after posture optimization.
[0107] The sensor data module is used to receive sensor data, including point cloud data collected by point cloud acquisition devices (such as lidar devices), odometer data and inertial measurement data collected by motion sensors, etc.
[0108] The preprocessing module is used to preprocess the sensor data, including downsampling the point cloud data, such as processing the point cloud data using voxel filtering, adaptive voxel filtering, etc.
[0109] The front-end module is used to generate the corresponding local map according to the preprocessed point cloud data through sub-modules such as scan matching, motion filter and local map.
[0110] The back-end module is used to optimize the pose of point cloud data through sub-modules such as closed-loop detection, constraint calculation, and pose optimization.
[0111] The map management module is used to generate a global map based on a local map.
[0112] The steps to generate a global map are as follows:
[0113] The robot receives the current point cloud data collected by the point cloud acquisition device and stores it in the memory. In the memory, the current point cloud data is successively input into the voxel filter and the adaptive voxel filter for preprocessing such as downsampling to obtain the preprocessed current point cloud data, and the initial local map is generated using the preprocessed current point cloud data. The robot receives the odometer data and inertial measurement data collected by the motion sensor, and inputs the odometer data and inertial measurement data, as well as the pose completed in the last scan match, into the pose fusion device. The pose fusion device fuses the odometer data and inertial measurement data, as well as the pose completed in the last scan match, and outputs the initial pose of the current scan match.
[0114] The robot inputs the initial pose of the current scan matching output by the pose fusion device and the preprocessed current point cloud data into the front-end module for scan matching, and outputs the optimal pose of the scan matching, which indicates the optimal pose that should exist at the current moment relative to a period of time before. Then the optimal pose output by the scan matching is input into the motion filter, and the motion filter calculates the change between the current pose and the last input pose. If the change in pose is greater than the distance, angle or time threshold, the preprocessed current point cloud data is inserted into the initial local map to obtain the local map.
[0115] Then, a multi-resolution local map, i.e., an attached local map, is generated based on the local map. The robot stores the completed local map and multi-resolution local map in the map information memory, and releases the local map and multi-resolution local map in the memory. The map information memory stores a map record table, including a header, which is used to record the storage address of each local map, multi-resolution local map, and local map information in the map information memory. The local map information is, for example, the position information corresponding to the local map. The storage address corresponding to the local map and the local map information, as well as the storage address of the multi-resolution local map corresponding to the local map, can be searched according to the header of the map record table, so that the required data can be extracted from the map information memory according to the storage address recorded in the map record table, and the map record table can be updated according to the newly stored local map and local map information.
[0116] The robot inputs the local map into the back-end module to participate in the closed-loop detection to detect the local map and point cloud data of the closed loop. When it is detected that the local map statistical information in the map information memory meets the closed-loop detection conditions, the constraint calculation is performed, that is, each historical local map is obtained from the map information memory, the position distance between the current point cloud data and each historical local map is calculated, and the historical local map less than the position distance threshold is used as the target local map. The constraint relationship between the target local map and the current point cloud data is calculated, and the constraint relationship is stored in the map information memory until the position distance between the current point cloud data and each historical local map is greater than the position distance threshold, and the closed-loop detection work is ended. Then, the pose of each point cloud data in the map information memory is optimized according to the constraint relationship between the current point cloud data and the target local map.
[0117] The robot then runs the map management module to generate a global map for the local map processed by the backend module, obtains each point cloud data, traverses each point cloud data, and uses each point cloud data interpolation to generate each updated local map. When the robot generates each updated local map, the robot stores each completed updated local map and the corresponding point cloud data in the map management memory, and releases the updated local map and the corresponding point cloud data in the memory. When each updated local map is generated, each updated local map is read from the map management memory and merged to obtain the final target global map, which is stored in the map management memory. The robot can also use each updated local map in the map management memory to replace the corresponding local map in the map information memory to ensure that the map in the map information memory is updated in real time.
[0118] In this embodiment, when it is detected that the local map statistical information in the memory meets the closed-loop detection conditions, the current point cloud data is acquired into the memory, and the location information of the current point cloud data and the location information of each local map identifier are used to calculate the location distance; after the target local map identifier is determined according to the location distance, the target local map corresponding to the target local map identifier is acquired from the memory into the memory, thereby realizing the on-demand reading of the memory data during memory calculation, and avoiding placing the currently unnecessary historical local maps in the memory to occupy memory resources. Then, the memory resources are used to calculate the posture error between the current point cloud data and the target local map, and the posture error is used to perform posture correction on the initial point cloud data corresponding to each local map identifier in the memory, thereby ensuring the posture accuracy of the target point cloud data corresponding to each local map identifier. Then, the corresponding updated local map is regenerated by using the target point cloud data after posture correction, and the updated local map replaces the historical local maps corresponding to each local map identifier in the memory, thereby deleting the redundant historical local maps, thereby saving memory resources.
[0119] Furthermore, the updated local map has a more accurate map pose than the historical local map, and the target global map is generated by using the updated local map, thereby improving the accuracy of the target global map.
[0120] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0121] Based on the same inventive concept, the embodiment of the present application also provides a map generation device for implementing the map generation method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more map generation device embodiments provided below can refer to the limitations on the map generation method above, and will not be repeated here.
[0122] In an exemplary embodiment, as shown in FIG6 , a map generation device 600 is provided, comprising: a condition detection module 602 , a map determination module 604 , a posture correction module 606 and a map generation module 608 , wherein:
[0123] The condition detection module 602 is used to obtain the current point cloud data and store it in the memory when the local map statistical information in the memory meets the closed loop detection condition;
[0124] A map determination module 604 is used to determine a target local map identifier from each local map identifier based on the position information included in the current point cloud data and the position information corresponding to each local map identifier in the memory, and extract the target local map corresponding to the target local map identifier from the memory to the memory;
[0125] A posture correction module 606 is used to perform posture correction on the initial point cloud data corresponding to each local map identifier in the memory based on the posture error between the posture information included in the current point cloud data and the posture information corresponding to the target local map identifier in the memory, obtain the target point cloud data corresponding to each local map identifier, and extract each target point cloud data from the memory to the memory;
[0126] The map generation module 608 is used to generate each updated local map in the memory based on each target point cloud data, replace the historical local map corresponding to each local map identifier in the memory with each updated local map, and generate a target global map based on each updated local map.
[0127] In one embodiment, the map generating device 600 is further used to obtain historical point cloud data and store it in a memory, generate a historical local map based on the historical point cloud data; downsample the historical local map to obtain at least two subsidiary local maps corresponding to the historical local map; the resolution of the subsidiary local map is lower than the resolution of the historical local map; store the historical point cloud data, the historical local map, and the subsidiary local map in a memory in an associated manner, and delete the historical point cloud data, the historical local map, and the subsidiary local map in the memory.
[0128] In one embodiment, the map generating device 600 is further used to obtain at least two subsidiary local maps corresponding to the target local map identifier from the memory to the memory; in the memory, the current point cloud data is respectively matched with the at least two subsidiary local maps to obtain the matching degree corresponding to the at least two subsidiary local maps; when the matching degree meets the matching condition, the step of performing posture correction on the initial point cloud data corresponding to each local map identifier in the memory based on the posture error between the posture information contained in the current point cloud data and the posture information corresponding to the target local map identifier is entered.
[0129] In one embodiment, the posture correction module 606 is also used to obtain the current relative posture based on the posture information contained in the current point cloud data and the posture information corresponding to the target local map identifier; obtain the historical relative posture corresponding to each closed-loop local map identifier from the memory; perform error optimization based on the current relative posture and the historical relative posture to obtain the error optimization value corresponding to each local map identifier, perform posture correction on the initial point cloud data corresponding to each local map identifier based on the error optimization value to obtain the target point cloud data corresponding to each local map identifier; store the target point cloud data corresponding to each local map identifier in the memory, and delete the target point cloud data corresponding to each local map identifier in the memory.
[0130] In one embodiment, the map generation module 608 is further used to determine the current local map identifier from the local map identifiers, obtain the current target point cloud data corresponding to the current local map identifier from the memory to the memory; in the memory, determine the starting point cloud data from the current target point cloud data, and generate the initial local map corresponding to the current local map identifier based on the starting point cloud data; based on the remaining point cloud data in the current target point cloud data, interpolate the initial local map to obtain an updated local map corresponding to the current local map identifier; replace the historical local map corresponding to the current local map identifier in the memory with the updated local map corresponding to the current local map identifier, and delete the updated local map corresponding to the current local map identifier in the memory; determine the current local map identifier from the remaining local map identifiers, and return to the step of obtaining the current target point cloud data corresponding to the current local map identifier from the memory to the memory until the target point cloud data corresponding to each local map identifier in the memory are all involved in the calculation to obtain each updated local map.
[0131] In one embodiment, the map generation module 608 is also used to respond to the global map generation instruction, extract a target number of updated local maps from the memory to the memory; in the memory, perform map splicing on the target number of updated local maps to obtain spliced local maps, store the spliced local maps in the memory, and delete the spliced local maps in the memory; extract the target number of updated local maps from the remaining updated local maps in the memory to the memory, and return to the memory to perform the step of map splicing on the target number of updated local maps until all updated local maps in the memory are updated to obtain spliced local maps; obtain each spliced local map from the memory to the memory, merge each spliced local map in the memory to obtain the target global map.
[0132] In one embodiment, the condition detection module 602 is further used to enter a closed-loop detection state when the number of local maps based on the local map statistical information in the memory meets the quantity condition, and obtain the current point cloud data and store it in the memory.
[0133] Each module in the above-mentioned map generation device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0134] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a map generation method is implemented.
[0135] Those skilled in the art will understand that the structure shown in FIG. 7 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0136] In one embodiment, a robot is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program. The robot may be a cleaning robot, a delivery robot, a guide robot, a disinfection robot, a logistics robot, an inspection robot, a security robot, an industrial robot, or other autonomous mobile machine equipment.
[0137] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0138] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0139] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0140] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0141] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0142] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A map generation method, It is characterized in that The map generation method is applied to a robot, the robot includes a memory and a storage device, and the memory stores local map statistical information; the method includes: When the local map statistical information in the memory satisfies the closed-loop detection condition, obtaining current point cloud data and storing it in the memory; In the memory, based on the position distance between the position information included in the current point cloud data and the position information corresponding to each local map identifier, a target local map identifier is determined from each local map identifier, and a target local map corresponding to the target local map identifier is extracted from the memory and stored in the memory; In the memory, based on the posture error between the posture information included in the current point cloud data and the posture information corresponding to the target local map, the initial point cloud data corresponding to each local map identifier in the memory are subjected to posture correction to obtain the target point cloud data corresponding to each local map identifier, and each target point cloud data is extracted from the memory into the memory; In the memory, each updated local map is generated based on each target point cloud data, each updated local map replaces the historical local map corresponding to each local map identifier in the memory, and a target global map is generated based on the each updated local map.
2. The method according to claim 1, It is characterized in that When the local map statistical information in the memory satisfies the closed-loop detection condition, before acquiring the current point cloud data and storing it in the memory, the method further includes: Acquire historical point cloud data and store them in the memory, and generate a historical local map based on the historical point cloud data; Downsampling the historical local map to obtain at least two subsidiary local maps corresponding to the historical local map; the resolution of the subsidiary local map is lower than the resolution of the historical local map; The historical point cloud data, the historical local map, and the attached local map are associated and stored in the memory, and the historical point cloud data, the historical local map, and the attached local map are deleted from the memory.
3. The method according to claim 2, It is characterized in that The method further comprises: Acquire at least two subsidiary local maps corresponding to the target local map identifier from the memory and store them in the memory; In the memory, the current point cloud data is matched with the at least two subsidiary local maps respectively to obtain the matching degree corresponding to the at least two subsidiary local maps; When the matching degree satisfies the matching condition, the step of performing posture correction on the initial point cloud data corresponding to each local map identifier in the memory based on the posture error between the posture information contained in the current point cloud data and the posture information corresponding to the target local map identifier is entered.
4. The method according to claim 1, It is characterized in that The method of performing posture correction on the initial point cloud data corresponding to each local map identifier in the memory based on the posture error between the posture information included in the current point cloud data and the posture information corresponding to the target local map identifier to obtain the target point cloud data corresponding to each local map identifier, including: Obtaining a current relative pose based on the pose information contained in the current point cloud data and the pose information corresponding to the target local map marker; Acquire the historical relative positions corresponding to the respective closed-loop local map markers from the memory; Perform error optimization based on the current relative posture and the historical relative posture to obtain error optimization values corresponding to each local map marker, and perform posture correction on the initial point cloud data corresponding to each local map marker based on the error optimization value to obtain target point cloud data corresponding to each local map marker; The target point cloud data corresponding to each of the local map markers are stored in the memory, and the target point cloud data corresponding to each of the local map markers are deleted from the memory.
5. The method according to claim 1, It is characterized in that The step of generating updated local maps in the memory based on the target point cloud data and replacing the historical local maps corresponding to the local map identifiers in the memory with the updated local maps includes: Determine a current local map identifier from the local map identifiers, and acquire current target point cloud data corresponding to the current local map identifier from the memory and store it in the memory; In the memory, starting point cloud data is determined from the current target point cloud data, and an initial local map corresponding to the current local map identifier is generated based on the starting point cloud data; Based on the remaining point cloud data in the current target point cloud data, the initial local map is interpolated to obtain an updated local map corresponding to the current local map identifier; Replace the historical local map corresponding to the current local map identifier in the memory with the updated local map corresponding to the current local map identifier, and delete the updated local map corresponding to the current local map identifier in the memory; The current local map identifier is determined from the remaining local map identifiers, and the step of obtaining the current target point cloud data corresponding to the current local map identifier from the memory to the memory is returned to be executed until the target point cloud data corresponding to each local map identifier in the memory are all involved in the calculation to obtain each updated local map.
6. The method according to claim 1, It is characterized in that The generating a target global map based on the updated local maps comprises: In response to a global map generation instruction, extracting a target number of updated local maps from the memory into the internal memory; In the memory, map stitching is performed on the target number of updated local maps to obtain stitched local maps, the stitched local maps are stored in the memory, and the stitched local maps are deleted in the memory; Extracting the target number of updated local maps from the remaining updated local maps in the memory to the memory, and returning the step of performing map splicing on the target number of updated local maps in the memory until all updated local maps in the memory are updated to obtain spliced local maps; The various spliced local maps are acquired from the storage device and stored in the internal memory, and the various spliced local maps are merged in the internal memory to obtain a target global map.
7. The method according to claim 1, It is characterized in that When the local map statistical information in the memory satisfies the closed-loop detection condition, obtaining the current point cloud data and storing it in the memory includes: When the number of local maps based on the local map statistical information in the memory meets the quantity condition, a closed-loop detection state is entered, and current point cloud data is obtained and stored in the memory.
8. A robot map generating device, It is characterized in that The device comprises: A condition detection module, used to obtain the current point cloud data and store it in the memory when the local map statistical information in the memory meets the closed-loop detection condition; a map determination module, configured to determine a target local map identifier from each local map identifier in the memory based on a position distance between the position information included in the current point cloud data and the position information corresponding to each local map identifier, and extract a target local map corresponding to the target local map identifier from the memory and store it in the memory; A posture correction module is used to perform posture correction on the initial point cloud data corresponding to each local map identifier in the memory based on the posture error between the posture information included in the current point cloud data and the posture information corresponding to the target local map identifier in the memory, obtain the target point cloud data corresponding to each local map identifier, and extract each target point cloud data from the memory to the memory; A map generation module is used to generate each updated local map in the memory based on each target point cloud data, replace the historical local maps corresponding to each local map identifier in the memory with each updated local map, and generate a target global map based on each updated local map.
9. A robot comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Robot resource acquisition method and device, robot, medium and electronic equipment
CN114385208A
Map construction method, equipment and medium
CN114924287A
Map generation method based on semantic information and related equipment
CN115790568A
Extended mapping method and device, computer equipment and storage medium
CN116481517A
Positioning method, terminal device, server, and storage medium
WO2024103708A1
Cited By
Map construction method and device and electronic equipment
CN120371932A
Robot motion control method, device and equipment and storage medium
CN120869122A
Map generation method and apparatus, robot, and storage medium
WO2025246727A1
