Laser mapping method, device, system, electronic device and readable storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG OUNITECH ROBOTICS CO LTD
- Filing Date
- 2023-10-26
- Publication Date
- 2026-06-23
AI Technical Summary
The existing robot-based laser mapping scheme is inefficient in building large-scene maps, which easily leads to failure in mapping construction due to interruption, and cumulative errors affect map accuracy when the scene scale is large.
By dividing the area to be built into a base area and a sub-region to be built, and using the base map and real-time point cloud data for loop optimization, a sub-region map is generated, and finally spliced into a complete map.
It improves the work efficiency of large-scenario map construction, reduces the risk of map failure, enhances the accuracy of the final map, and reduces the calculation cost.
Smart Images

Figure CN122270775A_ABST
Abstract
Description
Laser mapping method, device, system, electronic device and readable storage medium Technical Field
[0001] The present invention relates to the field of positioning and mapping technology, and in particular to a laser mapping method, device, system, electronic device, and computer-readable storage medium. Background Art
[0002] Robots performing various tasks, such as navigation, delivery, search, and cleaning, generally need to construct a map of their working environment and determine their own position in the environment. This requires simultaneous localization and mapping (SLAM) technology. Among them, LiDAR-based SLAM technology has many advantages and has become one of the most popular SLAM directions. Currently, there are many open source laser mapping solutions on the market, such as Gmapping, Hector, Karto, Cartographer, etc., which can be divided into filter-based and graph optimization-based solutions.
[0003] When implementing the present invention, the inventors found that the existing robot-based laser mapping solutions have the following deficiencies: (1) For large-scale (large-area) map construction, a single robot is used to map the entire scene once, which takes a very long time and has extremely low work efficiency; if the mapping process is interrupted, the mapping may fail and require re-mapping; and the larger the scale of the scene, the greater the accumulated error, which affects the accuracy of the final complete map. (2) The use of a single robot can only be performed by a SLAM robot, and requires powerful computing power, which is not only costly but also requires a huge amount of local computing power; (3) The existing technology also has a method of mapping different areas of the entire scene by using multiple robots to generate maps of different areas, and then finally splicing (fusion) the maps of different areas to obtain a complete map of the entire scene. However, since multiple robots map different areas independently, each map constructed is independent and unrelated, which not only brings certain difficulties to map fusion, but also the errors in each map will affect the complete map after fusion, thereby affecting the accuracy of the final complete map.
[0004] Summary of the Invention
[0005] The object of the present invention is to provide a laser mapping method, device, system, electronic device and computer-readable storage medium, which can effectively solve the above-mentioned technical problems existing in the prior art.
[0006] In one aspect, embodiments of the present application disclose a laser mapping method, which is suitable for mapping an area to be mapped using a robot, wherein the area to be mapped includes a reference area and at least one sub-area to be mapped, and the sub-area to be mapped has a common area with the reference area. The laser mapping method comprises the following steps:
[0007] S1. Mapping the reference area to obtain a reference map; the reference map includes a plurality of reference submaps, each of which includes reference point cloud data of a preset frame;
[0008] S2. Mapping the sub-region to be mapped in real time, performing loop optimization on the real-time point cloud data collected for the sub-region to be mapped and the real-time sub-map created based on the point cloud data collected for the preset frame, the benchmark point cloud data and the benchmark sub-map, thereby obtaining the poses of all optimized historical sub-maps and all point cloud data of the sub-region to be mapped, until mapping of the sub-region to be mapped is completed to generate a sub-region map;
[0009] S3. Splicing the reference map and the sub-region map to obtain a complete map of the area to be mapped.
[0010] As an improvement to the above solution, in step S2, the loop optimization specifically includes:
[0011] S21, matching the real-time point cloud data collected from the sub-area to be mapped with the reference sub-map to perform loop detection;
[0012] S22. When the matching degree is greater than the preset threshold, it is determined that a loop exists and the process goes to S23; otherwise, the process returns to step S21.
[0013] S23. Using the reference point cloud data and the reference submap as a reference, perform nonlinear least squares optimization processing on all historical submaps and all point cloud data of the subregion to be mapped, so as to optimize the positions and poses of all historical submaps and all point cloud data of the subregion to be mapped.
[0014] As an improvement to the above solution, in step S2, the loop optimization is specifically
[0015] include:
[0016] S21, matching the real-time submap of the sub-area to be mapped with the reference point cloud data to perform loop detection;
[0017] S22. When the matching degree is greater than the preset threshold, it is determined that a loop exists and the process goes to S23; otherwise, the process returns to step S21.
[0018] S23. Using the reference point cloud data and the reference submap as a reference, perform nonlinear least squares optimization processing on all historical submaps and all point cloud data of the subregion to be mapped, so as to optimize the positions and poses of all historical submaps and all point cloud data of the subregion to be mapped.
[0019] As an improvement to the above solution, the area to be mapped is a first area to be mapped, and the laser mapping method is further applicable to mapping an Nth area to be mapped, wherein the Nth area to be mapped includes an N-1th area to be mapped and at least one Nth sub-area to be mapped, and the Nth sub-area to be mapped and the N-1th area to be mapped have a common area; wherein N is an integer greater than or equal to 2; and the laser mapping method further comprises the steps of:
[0020] The obtained complete map of the N-1th area to be mapped is used as a new reference map, and the N-1th area to be mapped constitutes the new reference area;
[0021] Performing real-time mapping of the Nth sub-region to be mapped, performing loop optimization on the real-time point cloud data collected for the Nth sub-region to be mapped and the real-time sub-map created based on the point cloud data collected for the preset frame, and the reference point cloud data and the reference sub-map in the new reference map, thereby obtaining the poses of all optimized historical sub-maps and all point cloud data of the Nth sub-region to be mapped, until the mapping of the Nth sub-region to be mapped is completed to generate a map of the Nth sub-region;
[0022] The new reference map and the Nth sub-area map are spliced together to obtain a complete map of the Nth area to be mapped.
[0023] As an improvement to the above solution, in step S2, the loop optimization is a first loop optimization, and before completing the mapping of the sub-region to be mapped and generating the sub-region map, the following steps are further included:
[0024] S201: performing a second loop closure optimization on all historical submaps and all point cloud data of the subregion to be mapped, the reference point cloud data, and the reference submap, thereby obtaining the poses of all historical submaps and all point cloud data of the subregion to be mapped after the second optimization;
[0025] S202: Generate a map of the sub-region based on the poses of all historical sub-maps after secondary optimization of the sub-region to be mapped and the poses of all point cloud data.
[0026] As an improvement to the above solution, the second loop optimization specifically includes:
[0027] S2011, matching all point cloud data of the sub-area to be mapped with the reference sub-map to perform loop closure detection;
[0028] S2012: When the matching degree is greater than the preset threshold, it is determined that a loop exists and S2013 is executed; otherwise, the process returns to step S2011;
[0029] S2013. Using the reference point cloud data and reference submap as a reference, perform nonlinear least squares optimization processing on all historical submaps and all point cloud data of the sub-area to be mapped, so as to optimize the positions and poses of all historical submaps and all point cloud data of the sub-area to be mapped.
[0030] As an improvement to the above solution, the second loop optimization specifically includes:
[0031] S2011, matching all historical submaps of the sub-area to be mapped with the reference point cloud data to perform loop closure detection;
[0032] S2012: When the matching degree is greater than the preset threshold, it is determined that a loop exists and S2013 is executed; otherwise, the process returns to step S2011;
[0033] S2013. Using the reference point cloud data and reference submap as a reference, perform nonlinear least squares optimization processing on all historical submaps and all point cloud data of the sub-area to be mapped, so as to optimize the positions and poses of all historical submaps and all point cloud data of the sub-area to be mapped.
[0034] As an improvement to the above solution, the status of the submap includes creation in progress and creation completed, the number of frames of point cloud data in the submap in creation in progress is less than the preset frame, and the number of frames of point cloud data in the submap that has been created is equal to the preset frame; the historical submap is a submap that has been created.
[0035] As an improvement to the above scheme, a virtual wall is set in the area to be mapped, so that the area to be mapped is divided into the base area and at least one sub-area to be mapped, and each sub-area to be mapped has as much common area as possible with the base area; a plurality of QR code / color block labels are arranged on the common area, the length and width of each QR code / color block label are known values, and the distance between two adjacent QR code / color block labels is less than the body width of the robot; during the mapping process of the base area and the sub-area to be mapped, the position of each QR code / color block label relative to the camera is obtained and calculated by a camera set on the robot, and the coordinates of each QR code / color block label on the base map / sub-area map and the marked corresponding virtual wall grid are calculated according to the position of each QR code / color block label relative to the camera, and the marked virtual wall grids are connected in sequence on the base map / sub-area map to form a complete virtual wall on the common area.
[0036] As an improvement to the above solution, the robot is a cleaning robot, and the posture includes XY axis coordinates and orientation θ in a two-dimensional space.
[0037] As an improvement to the above solution, in an optional embodiment, the robot includes a master robot and a slave robot, and the data collected by each robot has an independent tag ID; the steps S1 to S3 are specifically as follows:
[0038] S1. Mapping the reference area by a master robot to obtain a reference map; the reference map includes a plurality of reference submaps, each of which includes reference point cloud data of a preset frame;
[0039] S21, mapping the sub-area to be mapped in real time by a slave robot, wherein the slave robot sends the real-time point cloud data collected for the sub-area to be mapped and a real-time sub-map created based on the point cloud data collected in a preset frame to the master robot;
[0040] S22, the master robot performs loop optimization on the received real-time point cloud data and real-time submap collected in the sub-region to be mapped, and the reference point cloud data and reference submap, thereby obtaining the poses of all optimized historical sub-maps and all point cloud data of the sub-region to be mapped, and returns them to the slave robot until the slave robot completes mapping of the sub-region to be mapped to generate a sub-region map;
[0041] S3. The master robot splices the reference map and the sub-area map to obtain a complete map of the area to be mapped, and modifies all data IDs in the complete map to the same ID.
[0042] As an improvement to the above solution, the sub-areas to be mapped include at least two, and each sub-area to be mapped corresponds to a slave robot; in step S21, each slave robot simultaneously performs real-time mapping on the sub-area to be mapped for which it is responsible; in step S22, the master robot performs loop optimization on the data sent by different slave robots based on the tag ID and returns the optimized data to the corresponding slave robot.
[0043] As an improvement to the above solution, the area to be mapped is a first area to be mapped, and the laser mapping method is further applicable to mapping an Nth area to be mapped, wherein the Nth area to be mapped includes an N-1th area to be mapped and at least one Nth sub-area to be mapped, and the Nth sub-area to be mapped and the N-1th area to be mapped have a common area; wherein N is an integer greater than or equal to 2; and the laser mapping method further comprises the steps of:
[0044] The master robot uses the obtained complete map of the N-1th area to be mapped as a new reference map, and the N-1th area to be mapped constitutes the new reference area;
[0045] The slave robot performs real-time mapping of the Nth sub-area to be mapped, and the slave robot sends the real-time point cloud data collected for the Nth sub-area to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame to the master robot;
[0046] The master robot performs loop optimization on the received real-time point cloud data and real-time submap collected from the Nth sub-region to be mapped and the reference point cloud data and reference submap in the new reference map, thereby obtaining the poses of all historical sub-maps and all point cloud data of the Nth sub-region to be mapped after optimization, and returns the poses to the slave robot accordingly, until the slave robot completes mapping of the Nth sub-region to be mapped to generate a map of the Nth sub-region;
[0047] The master robot splices the new reference map and the Nth sub-area map to obtain a complete map of the Nth area to be mapped, and modifies all data IDs in the complete map of the Nth area to be mapped to the same ID.
[0048] As an improvement to the above solution, in another optional embodiment, robots are respectively set up in the reference area and the sub-area to be mapped, and the data collected by the robots from different areas are marked with independent IDs; the steps S1 to S3 are specifically as follows:
[0049] S11, mapping the reference area by a robot in the reference area, wherein the robot in the reference area sends real-time point cloud data collected for the reference area and a real-time sub-map created based on the point cloud data collected in a preset frame to a cloud or server;
[0050] S12. The cloud or server constructs and optimizes a map based on the real-time point cloud data collected by the robot in the reference area and the real-time submap created based on the point cloud data collected for the preset frame, thereby obtaining a reference map; the reference map includes a plurality of reference submaps, each of which includes reference point cloud data for the preset frame;
[0051] S21: Mapping the corresponding sub-area to be mapped in real time by the robot in the sub-area to be mapped, and sending the real-time point cloud data collected for the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame to the cloud or server.
[0052] S22, the cloud or server performs loop optimization on the received real-time point cloud data collected for the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected for the preset frame, together with the reference point cloud data and the reference sub-map, thereby obtaining the poses of all historical sub-maps and all point cloud data of the sub-area to be mapped after optimization, and returns the poses to the robot in the sub-area to be mapped, until the robot in the sub-area to be mapped completes mapping of the sub-area to be mapped to generate a sub-area map;
[0053] S3. The reference map and the sub-area map are spliced together through the cloud or the server to obtain a complete map of the area to be mapped, and all data IDs in the complete map are modified to the same ID.
[0054] As an improvement to the above solution, the sub-areas to be mapped include at least two, and each sub-area to be mapped corresponds to a robot; in step S21, each robot in the sub-area to be mapped simultaneously performs real-time mapping on the sub-area to be mapped for which it is responsible; in step S22, the cloud or server performs loopback optimization on the data sent by different robots based on the tag ID and returns the optimized data to the corresponding robot.
[0055] As an improvement to the above solution, the area to be mapped is a first area to be mapped, and the laser mapping method is further applicable to mapping an Nth area to be mapped, wherein the Nth area to be mapped includes an N-1th area to be mapped and at least one Nth sub-area to be mapped, and the Nth sub-area to be mapped and the N-1th area to be mapped have a common area; wherein N is an integer greater than or equal to 2; and the laser mapping method further comprises the steps of:
[0056] The complete map of the N-1th area to be mapped is obtained through the cloud or server as a new reference map, and the N-1th area to be mapped constitutes the new reference area;
[0057] The robot performs real-time mapping of the Nth sub-region to be mapped, and the robot sends the real-time point cloud data collected for the Nth sub-region to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame to the cloud or server;
[0058] The cloud or server performs loop optimization on the received real-time point cloud data and real-time submap collected for the Nth sub-region to be mapped and the benchmark point cloud data and benchmark submap in the new benchmark map, thereby obtaining the poses of all historical sub-maps and all point cloud data of the Nth sub-region to be mapped after optimization and returning them to the robot accordingly, until the robot completes mapping the Nth sub-region to be mapped to generate a map of the Nth sub-region;
[0059] The new reference map and the Nth sub-area map are spliced together through the cloud or the server to obtain a complete map of the Nth area to be mapped, and all data IDs in the complete map of the Nth area to be mapped are modified to the same ID.
[0060] As an improvement to the above solution, in another optional embodiment, the robot is a single robot, and the single robot maps the reference area and the sub-area to be mapped at different time periods; the steps S1 to S3 are specifically as follows:
[0061] S1. Mapping the reference area by the single robot in a first time period to obtain a reference map; the reference map includes a plurality of reference submaps, each of the reference submaps including reference point cloud data of a preset frame;
[0062] S2. Performing real-time mapping of the sub-region to be mapped by the single robot in different time periods other than the first time period, performing loop optimization on the real-time point cloud data collected by the single robot for the sub-region to be mapped and the real-time submap created based on the point cloud data collected in the preset frame, and the reference point cloud data and the reference submap, thereby obtaining the poses of all optimized historical submaps of the sub-region to be mapped and the poses of all point cloud data, until the mapping of the sub-region to be mapped is completed to generate a sub-region map;
[0063] S3. Splicing the reference map and the sub-region map to obtain a complete map of the area to be mapped.
[0064] As an improvement to the above solution, the data processing involved in the laser mapping method is performed in the local computing unit of a single robot;
[0065] The step S1 specifically includes:
[0066] S11, real-time scanning data of the reference area obtained by scanning with a laser radar device of a single robot during the first period;
[0067] S12, converting the real-time scan data of the reference area into real-time point cloud data to insert into corresponding positions of the sub-map being created, and obtaining a completed real-time sub-map when the point cloud data of a preset frame is reached;
[0068] S13, performing loop optimization based on the real-time point cloud data and real-time submap of the reference area and all historical submaps and all point cloud data of the reference area to obtain the poses of all optimized historical submaps and all point cloud data of the reference area, until the reference area is mapped and the reference map is obtained based on all optimized historical submaps;
[0069] The step S2 specifically includes:
[0070] S21, real-time scanning data of the sub-area to be mapped obtained by scanning with a laser radar device of a single robot during different time periods other than the first time period;
[0071] S22, converting the real-time scan data of the sub-region to be mapped into real-time point cloud data and inserting it into the corresponding position of the sub-map being created, and obtaining a completed real-time sub-map when the point cloud data of a preset frame is reached;
[0072] S23. Perform loop optimization on the real-time point cloud data and real-time submap of the sub-area to be mapped, and the reference point cloud data and reference submap, so as to obtain the poses of all optimized historical submaps and the poses of all point cloud data of the sub-area to be mapped, until mapping of the sub-area to be mapped is completed, and a sub-area map is generated by obtaining a reference map based on all optimized historical submaps.
[0073] As an improvement to the above solution, the data processing involved in the laser mapping method is completed jointly by the local computing unit of a single robot and the cloud or server;
[0074] The step S1 specifically includes:
[0075] S11, real-time scanning data of the reference area obtained by scanning with a laser radar device of a single robot during the first period;
[0076] S12, converting the real-time scan data of the reference area into real-time point cloud data to insert into corresponding positions of the sub-map being created, and obtaining a completed real-time sub-map when the point cloud data of a preset frame is reached;
[0077] S13, sending the real-time point cloud data and the real-time submap of the reference area to a cloud or server in real time, causing the cloud or server to perform loop optimization based on the real-time point cloud data and the real-time submap of the reference area and all historical submaps and all point cloud data of the reference area, thereby obtaining the poses of all optimized historical submaps and all point cloud data of the reference area, until mapping of the reference area is completed, and obtaining a reference map based on all optimized historical submaps;
[0078] The step S2 specifically includes:
[0079] S21, real-time scanning data of the sub-area to be mapped obtained by scanning with a laser radar device of a single robot during different time periods other than the first time period;
[0080] S22, converting the real-time scan data of the sub-region to be mapped into real-time point cloud data and inserting it into the corresponding position of the sub-map being created, and obtaining a completed real-time sub-map when the point cloud data of a preset frame is reached;
[0081] S23, sending the real-time point cloud data and real-time submap of the reference area to a cloud or server in real time, so that the cloud or server performs loop optimization based on the real-time point cloud data and real-time submap of the sub-area to be mapped and the reference point cloud data and reference submap, thereby obtaining the poses of all optimized historical submaps and the poses of all point cloud data of the sub-area to be mapped, until mapping of the sub-area to be mapped is completed, and generating a sub-area map by obtaining a reference map based on all optimized historical submaps;
[0082] Wherein, the step S3 is completed by the cloud or server.
[0083] As an improvement to the above solution, the sub-area to be mapped includes one, and in the step S2, the sub-area to be mapped is mapped in real time by the single robot in the second time period; wherein the tag IDs of the data collected by the single robot from the reference area and the sub-area to be mapped at different time periods are different; or, the tag IDs of the data collected by the single robot from the reference area and the sub-area to be mapped at different time periods are the same, and all data IDs of the reference map are changed to other different tag IDs after generation.
[0084] As an improvement to the above solution, the sub-areas to be mapped include at least two. In step S2, the single robot performs real-time mapping on different sub-areas to be mapped in different time periods other than the first time period; wherein the label IDs of the data collected by the single robot from the reference area and the sub-areas to be mapped in different time periods are different.
[0085] As an improvement to the above solution, the area to be mapped is a first area to be mapped, and the laser mapping method is further applicable to mapping an Nth area to be mapped, wherein the Nth area to be mapped includes an N-1th area to be mapped and at least one Nth sub-area to be mapped, and the Nth sub-area to be mapped and the N-1th area to be mapped have a common area; wherein N is an integer greater than or equal to 2; and the laser mapping method further comprises the steps of:
[0086] S4. Using the obtained complete map of the N-1th area to be mapped as a new reference map, wherein the N-1th area to be mapped constitutes the new reference area;
[0087] S5. Performing real-time mapping of the Nth sub-region to be mapped by the single robot at different time periods, loop-back optimization is performed on the real-time point cloud data collected for the Nth sub-region to be mapped and the real-time sub-map created based on the point cloud data collected for the preset frame, and the reference point cloud data and the reference sub-map in the new reference map, thereby obtaining the poses of all optimized historical sub-maps and all point cloud data of the Nth sub-region to be mapped, until the robot completes mapping of the Nth sub-region to be mapped to generate a map of the Nth sub-region;
[0088] S6. Splice the new reference map and the Nth sub-area map to obtain a complete map of the Nth area to be mapped, and modify all data IDs in the complete map of the Nth area to be mapped to the same ID.
[0089] In another aspect, an embodiment of the present invention provides a laser mapping device adapted to map an area to be mapped using a robot, wherein the area to be mapped includes a reference area and at least one sub-area to be mapped, wherein the sub-area to be mapped has a common area with the reference area; the laser mapping device comprises:
[0090] A reference map construction module is used to construct a map of the reference area to obtain a reference map; the reference map includes a plurality of reference submaps, each of which includes reference point cloud data of a preset frame;
[0091] A sub-region map construction module is used to perform real-time mapping of the sub-region to be mapped, and perform loop optimization on the real-time point cloud data collected for the sub-region to be mapped and the real-time sub-map created based on the point cloud data collected for the preset frame, the reference point cloud data and the reference sub-map, so as to obtain the poses of all optimized historical sub-maps and all point cloud data of the sub-region to be mapped, until the mapping of the sub-region to be mapped is completed to generate a sub-region map;
[0092] The complete map generation module is used to splice the reference map and the sub-area map to obtain a complete map of the area to be mapped.
[0093] In another aspect, an embodiment of the present invention provides a laser mapping system suitable for mapping an area to be mapped, wherein the area to be mapped includes a reference area and at least one sub-area to be mapped, wherein the sub-area to be mapped and the reference area have a common area; the laser mapping system includes a master robot and a slave robot, wherein data collected by each robot is independently labeled with an ID; wherein:
[0094] The master robot is used to map the reference area to obtain a reference map; the reference map includes a plurality of reference sub-maps, each of which includes a preset number of frames of reference point cloud data;
[0095] The slave robot is used to map the sub-area to be mapped in real time, and the slave robot sends the real-time point cloud data collected from the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected for a preset number of frames to the master robot;
[0096] The master robot is further configured to perform loop optimization on the received real-time point cloud data and real-time submap collected from the sub-region to be mapped, and the reference point cloud data and reference submap, thereby obtaining the poses of all optimized historical sub-maps and all point cloud data of the sub-region to be mapped and returning them to the slave robot until the slave robot completes mapping of the sub-region to be mapped to generate a sub-region map;
[0097] The master robot is further configured to splice the reference map and the sub-area map to obtain a complete map of the area to be mapped, and to modify all data IDs in the complete map to the same ID.
[0098] In another aspect, embodiments of the present invention provide a laser mapping system suitable for mapping an area to be mapped, wherein the area to be mapped includes a reference area and at least one sub-area to be mapped, wherein the sub-area to be mapped and the reference area have common areas. The mapping system includes at least two robots and a cloud or server, wherein data collected by the robots for different areas is independently labeled with IDs.
[0099] The robot placed on the reference area is used to map the reference area. The robot on the reference area sends the real-time point cloud data collected for the reference area and the real-time sub-map created based on the point cloud data collected in the preset frame to the cloud or server.
[0100] The cloud or server constructs and optimizes a map based on the real-time point cloud data collected by the robot in the reference area and the real-time submap created based on the point cloud data collected for the preset frame, thereby obtaining a reference map; the reference map includes a plurality of reference submaps, each of which includes reference point cloud data for the preset frame;
[0101] The robot placed in the sub-area to be mapped is used to map the corresponding sub-area to be mapped in real time. The robot in the sub-area to be mapped sends the real-time point cloud data collected for the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame to the cloud or server.
[0102] The cloud or server is used to perform loop optimization on the received real-time point cloud data collected in the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame, and the reference point cloud data and the reference sub-map, so as to obtain the poses of all historical sub-maps and all point cloud data after optimization in the sub-area to be mapped, and return them to the robot in the sub-area to be mapped, until the robot in the sub-area to be mapped completes mapping of the sub-area to be mapped to generate a sub-area map;
[0103] The cloud or server is further configured to splice the reference map and the sub-area map to obtain a complete map of the area to be mapped, and modify all data IDs in the complete map to the same ID.
[0104] In another aspect, embodiments of the present invention provide a laser mapping system suitable for mapping an area to be mapped, wherein the area to be mapped includes a reference area and at least one sub-area to be mapped, wherein the sub-area to be mapped and the reference area have a common area. The laser mapping system includes a single robot and a cloud / server, wherein data collected by the single robot for different areas is independently labeled with an ID.
[0105] The single robot is used to map the reference area during a first period, and send the real-time point cloud data collected for the reference area and a real-time sub-map created based on the point cloud data collected for a preset frame to a cloud or server;
[0106] The cloud or server constructs and optimizes the map based on the real-time point cloud data and real-time submap collected in the reference area to obtain a reference map; the reference map includes a plurality of reference submaps, each of which includes reference point cloud data of a preset frame;
[0107] The single robot is further configured to perform real-time mapping of the sub-area to be mapped during different time periods other than the first time period, and to send the real-time point cloud data collected for the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected during the preset frame to the cloud or server end;
[0108] The cloud or server is used to perform loop optimization on the received real-time point cloud data and real-time submap collected in the sub-region to be mapped, and the reference point cloud data and reference submap, so as to obtain the poses of all historical sub-maps and all point cloud data after optimization of the sub-region to be mapped, and return them to the single robot accordingly, until the single robot completes mapping of the sub-region to be mapped to generate a sub-region map;
[0109] The cloud or server is further configured to splice the reference map and the sub-area map to obtain a complete map of the area to be mapped, and modify all data IDs in the complete map to the same ID.
[0110] On the other hand, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the laser mapping method described in any of the above embodiments.
[0111] On the other hand, an embodiment of the present invention provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the laser mapping method described in any of the above embodiments.
[0112] Compared with the prior art, the laser mapping method and device provided by the embodiment of the present invention has the following technical effects: (1) By using robots to construct maps of the area to be mapped in different time periods or by different robots in collaboration, the work efficiency of environmental map construction in large scenes can be effectively improved, time-sharing / division of labor mapping can be realized, and the risk of interruption and failure of mapping in the process of mapping large scenes requiring re-mapping is reduced. (2) The baseline map obtained by the robot mapping the baseline area is used as the optimization baseline, and the real-time point cloud data collected by the robot in real-time mapping of other sub-areas to be mapped and the created real-time sub-map are loop-optimized with the baseline point cloud data and the baseline sub-map in the baseline map, so that the maps of other areas and the baseline area can be effectively associated, and the accumulated errors of the map data between other areas and the baseline area are effectively eliminated, thereby facilitating the final map fusion and improving the accuracy of the complete fused map. (3) By introducing the cloud / server side, the local robot is only responsible for data collection and sub-map creation, and data optimization is calculated through the cloud or local area network server side. It can be achieved by using a robot with general computing power (no computing unit with powerful computing power is required), which can effectively reduce the cost of the robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0113] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the implementation. Obviously, the drawings described below are only some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0114] FIG1 is a flow chart of a laser mapping method provided by an embodiment of the present invention.
[0115] FIG2 is a flow chart of a specific embodiment 1 of the laser mapping method provided by the present invention.
[0116] FIG3 a is a schematic diagram of a map of an area to be mapped after being constructed using the laser mapping method provided by a preferred embodiment of the present invention.
[0117] FIG3 b is a schematic diagram of constructing a virtual wall in the area to be mapped using the laser mapping method provided by a preferred embodiment of the present invention.
[0118] FIG3 c is a schematic diagram of a grid map of the virtual wall shown in FIG3 b .
[0119] FIG3 d is a schematic diagram of another embodiment of setting a virtual wall in the area to be mapped using the laser mapping method provided by the preferred embodiment of the present invention.
[0120] FIG3e is a schematic diagram of a grid map of the virtual wall shown in FIG3d.
[0121] FIG4 is a schematic diagram of a map of an area to be mapped after being constructed using a laser mapping method provided by another preferred embodiment of the present invention.
[0122] FIG5 is a schematic diagram of a map of an area to be mapped after being constructed using a laser mapping method provided by another preferred embodiment of the present invention.
[0123] FIG6 is a schematic diagram of a map of an area to be mapped after being constructed using a laser mapping method provided by another preferred embodiment of the present invention.
[0124] FIG7 is a structural block diagram of a laser mapping system provided by an embodiment of the present invention.
[0125] FIG8 is a structural block diagram of a laser mapping system provided by another embodiment of the present invention.
[0126] FIG9 is a flow chart of a second specific embodiment of the laser mapping method provided by the present invention.
[0127] FIG10 is a schematic diagram of a map of an area to be mapped after being constructed using the laser mapping method provided by a preferred embodiment of the present invention.
[0128] FIG11 is a structural block diagram of a laser mapping system provided by an embodiment of the present invention.
[0129] FIG12 is a structural block diagram of a laser mapping system provided by another embodiment of the present invention.
[0130] FIG13 is a flow chart of a third specific embodiment of the laser mapping method provided by the present invention.
[0131] FIG14 is a schematic diagram of a map of the area to be mapped after being constructed using the laser mapping method provided by a preferred embodiment of the present invention.
[0132] FIG15 is a schematic diagram of a map of an area to be mapped after being constructed using a laser mapping method provided by another preferred embodiment of the present invention.
[0133] FIG16 is a schematic diagram of a map of an area to be mapped after being constructed using a laser mapping method provided by another preferred embodiment of the present invention.
[0134] FIG17 is a schematic diagram of a map of the area to be mapped after being constructed using the laser mapping method provided by another preferred embodiment of the present invention.
[0135] FIG18 is a structural block diagram of a laser mapping system provided by an embodiment of the present invention.
[0136] FIG19 is a structural block diagram of a laser mapping device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0137] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0138] Referring to FIG1 , an embodiment of the present invention provides a laser mapping method suitable for mapping an area to be mapped using a robot, wherein the area to be mapped includes a reference area and at least one sub-area to be mapped, wherein the sub-area to be mapped has a common area with the reference area. The laser mapping method comprises the following steps:
[0139] S1. Mapping the reference area to obtain a reference map; the reference map includes a plurality of reference submaps, each of which includes reference point cloud data of a preset frame;
[0140] S2. Mapping the sub-region to be mapped in real time, performing loop optimization on the real-time point cloud data collected for the sub-region to be mapped and the real-time sub-map created based on the point cloud data collected for the preset frame, the benchmark point cloud data and the benchmark sub-map, thereby obtaining the poses of all optimized historical sub-maps and all point cloud data of the sub-region to be mapped, until mapping of the sub-region to be mapped is completed to generate a sub-region map;
[0141] S3. Splicing the reference map and the sub-region map to obtain a complete map of the area to be mapped.
[0142] The robot is a cleaning robot, and the posture includes XY axis coordinates and orientation θ in a two-dimensional space.
[0143] It can be understood that the reference map is a grid map formed by converting a plurality of reference sub-maps, and the sub-region map is a grid map formed by converting a plurality of optimized sub-maps.
[0144] Optionally, in step S2, the loop optimization may be performed in a method 1 including the following steps:
[0145] S21, matching the real-time point cloud data collected from the sub-area to be mapped with the reference sub-map to perform loop detection;
[0146] S22. When the matching degree is greater than the preset threshold, it is determined that a loop exists and the process goes to S23; otherwise, the process returns to step S21.
[0147] S23. Using the reference point cloud data and the reference submap as a reference, perform nonlinear least squares optimization processing on all historical submaps and all point cloud data of the subregion to be mapped, so as to optimize the positions and poses of all historical submaps and all point cloud data of the subregion to be mapped.
[0148] Optionally, in step S2, the loop optimization may also be performed in a second manner including the following steps:
[0149] S21, matching the real-time submap of the sub-area to be mapped with the reference point cloud data to perform loop detection;
[0150] S22. When the matching degree is greater than the preset threshold, it is determined that a loop exists and the process goes to S23; otherwise, the process returns to step S21.
[0151] S23. Using the reference point cloud data and the reference submap as a reference, perform nonlinear least squares optimization processing on all historical submaps and all point cloud data of the subregion to be mapped, so as to optimize the positions and poses of all historical submaps and all point cloud data of the subregion to be mapped.
[0152] As an improvement to the above solution, the area to be mapped is a first area to be mapped, and the laser mapping method is further applicable to mapping an Nth area to be mapped, wherein the Nth area to be mapped includes an N-1th area to be mapped and at least one Nth sub-area to be mapped, and the Nth sub-area to be mapped and the N-1th area to be mapped have a common area; wherein N is an integer greater than or equal to 2; and the laser mapping method further comprises the steps of:
[0153] The obtained complete map of the N-1th area to be mapped is used as a new reference map, and the N-1th area to be mapped constitutes the new reference area;
[0154] Performing real-time mapping of the Nth sub-region to be mapped, performing loop optimization on the real-time point cloud data collected for the Nth sub-region to be mapped and the real-time sub-map created based on the point cloud data collected for the preset frame, and the reference point cloud data and the reference sub-map in the new reference map, thereby obtaining the poses of all optimized historical sub-maps and all point cloud data of the Nth sub-region to be mapped, until the mapping of the Nth sub-region to be mapped is completed to generate a map of the Nth sub-region;
[0155] The new reference map and the Nth sub-area map are spliced together to obtain a complete map of the Nth area to be mapped.
[0156] As an improvement to the above solution, in step S2, the loop optimization is a first loop optimization, and before completing the mapping of the sub-region to be mapped and generating the sub-region map, the following steps are further included:
[0157] S201: performing a second loop closure optimization on all historical submaps and all point cloud data of the subregion to be mapped, the reference point cloud data, and the reference submap, thereby obtaining the poses of all historical submaps and all point cloud data of the subregion to be mapped after the second optimization;
[0158] S202: Generate a map of the sub-region based on the poses of all historical sub-maps after secondary optimization of the sub-region to be mapped and the poses of all point cloud data.
[0159] Optionally, in step S201, the second loop optimization may be performed in a method 1 including the following steps:
[0160] S2011, matching all point cloud data of the sub-area to be mapped with the reference sub-map to perform loop closure detection;
[0161] S2012: When the matching degree is greater than the preset threshold, it is determined that a loop exists and S2013 is executed; otherwise, the process returns to step S2011;
[0162] S2013. Using the reference point cloud data and reference submap as a reference, perform nonlinear least squares optimization processing on all historical submaps and all point cloud data of the sub-area to be mapped, so as to optimize the positions and poses of all historical submaps and all point cloud data of the sub-area to be mapped.
[0163] Optionally, in step S201, the second loop optimization may also be performed using a second method including the following steps:
[0164] S2011, matching all historical submaps of the sub-area to be mapped with the reference point cloud data to perform loop closure detection;
[0165] S2012: When the matching degree is greater than the preset threshold, it is determined that a loop exists and S2013 is executed; otherwise, the process returns to step S2011;
[0166] S2013. Using the reference point cloud data and reference submap as a reference, perform nonlinear least squares optimization processing on all historical submaps and all point cloud data of the sub-area to be mapped, so as to optimize the positions and poses of all historical submaps and all point cloud data of the sub-area to be mapped.
[0167] It will be understood that in this embodiment, the submap states include "in progress" and "completed." A submap in progress has fewer frames of point cloud data than the preset frame count, while a completed submap has the same number of frames as the preset frame count. The historical submap is a completed submap. Furthermore, during implementation, virtual walls are set within the area to be mapped, thereby dividing the area into the base area and at least one sub-area to be mapped. Each sub-area to be mapped shares as much common area with the base area as possible.
[0168] 19 , an embodiment of the present invention provides a laser SLAM device suitable for mapping an area to be mapped using a robot, wherein the area to be mapped includes a reference area and at least one sub-area to be mapped, wherein the sub-area to be mapped has a common area with the reference area; the laser mapping device includes:
[0169] A reference map construction module 901 is configured to construct a map of the reference area to obtain a reference map; the reference map includes a plurality of reference submaps, each of which includes reference point cloud data of a preset frame;
[0170] The sub-region map construction module 902 is configured to perform real-time mapping of the sub-region to be mapped, and perform loop optimization on the real-time point cloud data collected for the sub-region to be mapped and the real-time sub-map created based on the point cloud data collected for the preset frame, the reference point cloud data and the reference sub-map, thereby obtaining the poses of all optimized historical sub-maps and all point cloud data of the sub-region to be mapped, until the mapping of the sub-region to be mapped is completed to generate a sub-region map;
[0171] The complete map generation module 903 is configured to combine the reference map and the sub-region map to obtain a complete map of the area to be mapped.
[0172] It can be understood that the laser mapping device provided in an embodiment of the present invention corresponds to the mobile robot-based laser mapping method disclosed in the aforementioned embodiment. Its specific working process can refer to the corresponding content of the laser mapping method described above, and its detailed description is omitted here.
[0173] An embodiment of the present invention further provides an electronic device comprising a processor and a memory, wherein the memory is used to store a computer program, the computer program comprising program instructions, and the processor is configured to call the program instructions to execute the laser mapping method described in any of the above embodiments.
[0174] An embodiment of the present invention further provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the laser mapping method described in any of the above embodiments.
[0175] The following will further describe the detailed implementation process of the above laser mapping method through multiple specific embodiments.
[0176] Specific embodiment 1
[0177] Referring to Figure 2, an embodiment of the present invention provides a laser mapping method based on the collaborative division of labor between a master robot and a slave robot. The method is suitable for mapping an area to be mapped, wherein the area to be mapped includes a reference area and at least one sub-area to be mapped, and the sub-area to be mapped shares a common area with the reference area. The multi-robot system includes a master robot and slave robots, and the data collected by each robot is independently labeled with an ID. The laser mapping method includes steps S1 to S4:
[0178] S1. Mapping the reference area by a master robot to obtain a reference map; the reference map includes a plurality of reference submaps, each of which includes a preset number of frames of reference point cloud data;
[0179] S2. Mapping the sub-area to be mapped in real time by a slave robot, wherein the slave robot sends the real-time point cloud data collected for the sub-area to be mapped and a real-time sub-map created based on collecting a preset number of frames of point cloud data to the master robot;
[0180] S3, the master robot performs loop optimization on the received real-time point cloud data and real-time submap collected in the sub-region to be mapped, and the reference point cloud data and reference submap, thereby obtaining the poses of all optimized historical sub-maps and all point cloud data of the sub-region to be mapped, and returns them to the slave robot until the slave robot completes mapping the sub-region to be mapped to generate a sub-region map;
[0181] S4. The master robot splices the reference map and the sub-area map to obtain a complete map of the area to be mapped, and modifies all data IDs in the complete map to the same ID.
[0182] Wherein, the step S1 in FIG2 specifically includes steps S11 to S13:
[0183] S11. Mapping the reference area by the master robot, and sending real-time scanning data of the reference area obtained by scanning with a laser radar device of the master robot to a local computing unit;
[0184] S12, the local computing unit converts the received real-time scanning data of the reference area into real-time point cloud data to insert into corresponding positions of the sub-map being created, and obtains a completed real-time sub-map when a preset number of frames of point cloud data are received;
[0185] S13. The local computing unit performs loop optimization based on the real-time point cloud data and real-time submap of the benchmark area and all historical submaps and all point cloud data of the benchmark area to obtain the poses of all optimized historical submaps and all point cloud data of the benchmark area, until mapping of the benchmark area is completed and a benchmark map is obtained based on all optimized historical submaps; the benchmark map includes multiple benchmark submaps, each of which includes a preset number of frames of benchmark point cloud data.
[0186] The laser mapping method of FIG2 is further described below in conjunction with FIG3a.
[0187] For ease of description, the following description assumes that the area to be mapped 100 includes a reference area 10 and a sub-area 20 to be mapped. Specifically, the area to be mapped 100 (scene) is divided into the reference area 10 and the sub-area 20 to be mapped, with the reference area 10 and the sub-area 20 to be mapped having a common area 30 (i.e., an overlapping area). The master robot 40 is responsible for mapping the reference area 10, while the slave robot 50 is responsible for mapping the sub-area 20 to be mapped. Map block 1 shown in FIG3a corresponds to the reference map generated after the master robot 40 maps the reference area 10, and map block 3 shown in FIG3a corresponds to the sub-area map generated after the slave robot 50 maps the sub-area 20 to be mapped. It will be appreciated that both the reference map and the sub-area map are grid maps. In the grid map, the complete virtual wall constructed on the common area 30 is black (indicating an area where the robot cannot move / traverse), while the white areas in the grid map represent areas where the robot can move / traverse. However, to clarify the construction of the sub-map, this distinction is not shown in FIG3a.
[0188] Preferably, in a specific implementation, the base area 10 and the sub-area to be mapped 20 can be divided by setting virtual walls. For example, different virtual walls (such as color block labels, QR codes, etc.) are set on the boundary line of the base area 10 and the sub-area to be mapped 20 to limit the working areas of the master robot 40 and the slave robot 50.
[0189] Next, the construction process of the virtual wall will be described in detail.
[0190] A plurality of QR code / color block labels are arranged on the common area, the length and width of each QR code / color block label are known values, and the distance between two adjacent QR code / color block labels is smaller than the body width of the robot.
[0191] When mapping the reference area / sub-area to be mapped, the camera provided on the robot is used to obtain and calculate the position of each QR code / color block label relative to the camera, and the coordinates of each QR code / color block label on the reference map / sub-area map and the virtual wall grid corresponding to the mark are calculated based on the position of each QR code / color block label relative to the camera. The marked virtual wall grids on the reference map / sub-area map are connected in sequence to form a complete virtual wall on the public area, thereby effectively solving the problems of inconvenience in placement and large number of physical obstacles required when using physical obstacles to construct physical boundaries of each area.
[0192] In one embodiment, as shown in Figure 3b, a row (a group) of QR code / color block labels is arranged in a common area, with the spacing between adjacent QR code / color block labels being less than a preset spacing value hm, where the preset spacing value hm is less than the robot's body width. In this way, the marked virtual wall grids on the baseline map / sub-area map that have a spacing less than the preset spacing value hm between adjacent virtual wall grids are sequentially connected, resulting in a complete virtual wall in the resulting grid map as a black line, as shown in Figure 3c.
[0193] In another embodiment, as shown in FIG3d , at least two rows (two groups) of QR code / color block labels are arranged in a common area. For example, FIG3d shows three rows (three groups) of QR code / color block labels. The spacing between adjacent QR code / color block labels in the same row (same group) is less than a preset spacing value hm, while the spacing between adjacent QR code / color block labels in different rows (different groups) is greater than the preset spacing value hm and less than the robot's body width. That is, the spacing between adjacent rows of QR code / color block labels is greater than the preset spacing value hm and less than the robot's body width, thereby preventing the robot from crossing the common area to reach another area. In this way, on the reference map / sub-area map, the marked virtual wall grids whose spacing between adjacent virtual wall grids is less than the preset spacing value hm are sequentially connected, and the complete virtual wall in the resulting grid map is represented by multiple black lines, as shown in FIG3e .
[0194] It is understandable that when there are multiple sub-areas to be mapped, multiple QR codes / color block labels can be arranged between the boundaries of the multiple sub-areas to be mapped using the above-mentioned method of constructing a complete virtual wall.
[0195] Specifically, when autonomously mapping the reference area / sub-area to be mapped, the pose of each QR code / color block label relative to the camera is calculated by the following steps:
[0196] After the camera captures and recognizes the QR code / color block label, the rotation matrix and translation matrix are calculated by calling OpenCV's solvePnP function through the four corner points of the QR code / color block label.
[0197] Let p o is the coordinate of the center point of the QR code / color block label in the QR code / color block label coordinate system (0 0 0), let p c is the coordinate of the camera center point in the QR code / color block label coordinate system, then p o and p c The relative relationship is shown in formula 1: o =R1*p c +t1 Formula 1
[0198] Where R1 is the rotation matrix and t1 is the translation matrix;
[0199] Let the transformation matrix be Then p O =T1*p C Formula 1'
[0200] Let p′ c is the coordinate of the camera center point in the camera coordinate system, p′ o is the coordinate of the center point of the QR code / color block label in the camera coordinate system, which can be obtained from formula 1':
[0201] The position of each QR code / color block label relative to the camera is obtained according to Formula 2.
[0202] After obtaining the position of each QR code / color block label relative to the camera, the following steps are further performed to calculate the coordinates of each QR code / color block label on the reference map / sub-area map and the virtual wall grid corresponding to the mark:
[0203] Let T2 be camera p′ C To the robot center point p in the robot base coordinate system R The transformation matrix of p′ C =T2*p RFormula 3. From Formula 3 and Formula 2, the coordinates of the center point of the QR code / color block label in the robot base coordinate system pR are:
[0204] Let T3 be robot p R The center point p of the robot in the map coordinate system during map construction W The transformation matrix under p R =T3*p W Formula 5; derived from Formula 4 and Formula 5
[0205] According to formula 6, the coordinates of the center point of each QR code / color block label in the reference map / sub-area map are obtained, and the corresponding virtual wall grid is obtained based on the coordinates of the center point of each QR code / color block label in the reference map / sub-area map and the length and width of each QR code / color block label.
[0206] In this embodiment, the length and width of each of the two-dimensional code / color block labels are known values (eg, 80 mm*80 mm, or a rectangle).
[0207] Specifically, the QR code / color patch label is identified by pre-storing an image of each QR code / color patch label arranged in the common area, and matching the image features of each pre-stored QR code / color patch label image with an image captured in real time by a camera, thereby identifying the QR code / color patch label; wherein each QR code / color patch label image arranged in the common area may be completely identical, partially identical, or completely different. It is understood that the more different the QR code / color patch label images arranged in the common area are, the higher the recognition accuracy.
[0208] It is understandable that the process of calling the solvePnP function of OpenCV to calculate the rotation matrix and the translation matrix is familiar to those skilled in the art and will not be described in detail here.
[0209] Furthermore, in this embodiment, the QR code / color block label coordinate system is a right-handed coordinate system with the Z axis perpendicular to the plane and pointing inward, using the QR code center point as the origin. The map coordinate system is the world coordinate system used by the robot base for mapping, constructed using the robot chassis as the reference plane. The laser equipment used in this embodiment for mapping is mounted on the robot chassis, and the camera's position relative to the robot's center point is known (i.e., the transformation matrix T2 is known). Therefore, the position of the QR code relative to the robot can be determined. The robot's position within the map is also known during the mapping process (i.e., the transformation matrix T3 is known), so the coordinates of the QR code within the map can be determined.
[0210] Among them, the master robot 40 is a SLAM robot, which has greater computing power than the slave robot and can execute the entire SLAM process, including the processing of point cloud data, the creation and optimization of sub-maps, the generation of baseline maps, and the fusion of maps, etc. The slave robot 50 is only responsible for the collection of point cloud data of the sub-area to be mapped and the creation of real-time sub-maps, and sends the real-time point cloud data and real-time sub-maps of the sub-area to be mapped to the master robot 40 for optimization.
[0211] Specifically, in steps S11 and S12, the master robot 40 first maps the reference area to obtain a reference map. During the process of the master robot 40 moving and mapping, the master robot 40 sends real-time scanning data obtained by scanning with a lidar device to a local computing unit (installed inside the master robot 40). The local computing unit converts the real-time scanning data of the reference area into real-time point cloud data to be inserted (matched) into the corresponding (optimal) position of the sub-map being created. When a preset number of frames (e.g., 50 frames) of point cloud data are reached, a completed real-time sub-map is obtained (such as sub-map 1-1, sub-map 1-2, sub-map 1-3, etc. in map block 1 as shown in FIG3 a).
[0212] It is understood that in this embodiment, the submap states include "in progress" and "completed." A submap in progress has a point cloud data frame count that is less than the preset number of frames, while a completed submap has a point cloud data frame count that is equal to the preset number of frames. All subsequent historical submaps are completed submaps.
[0213] It can be understood that in order to improve the accuracy of matching real-time point cloud data to the sub-map being created, in this embodiment, the master robot 40 / slave robot 50 can obtain data such as the position or posture of the master robot 40 / slave robot by additionally setting up devices such as odometers, IMUs and / or cameras to assist in more accurate matching of each frame of lidar with the sub-map.
[0214] Furthermore, in step S13, the local computing unit of the master robot 40 performs loop closure optimization based on the real-time point cloud data and real-time submap of the reference area 10 and all historical submaps and all point cloud data of the reference area 10, thereby obtaining the poses of all optimized historical submaps and all point cloud data of the reference area 10. It will be appreciated that since the map obtained by mapping the reference area 10 by the master robot 40 serves as the reference map (reference), loop closure optimization is required for all historical submaps and all point cloud data of the region to eliminate accumulated errors in order to ensure the accuracy of the data of the reference map itself.
[0215] Specifically, the loop optimization in step S13 can be performed in the following two ways:
[0216] Method 1: Perform loop closure detection on the currently added real-time point cloud data and all historical sub-maps of the reference area 10;
[0217] Method 2: Perform loop closure detection on the currently created real-time sub-map and all point cloud data of the reference area 10 .
[0218] In a specific implementation, taking method 1 as an example, the currently added real-time point cloud data is matched with all historical sub-maps of the reference area 10. When the matching degree between the currently added real-time point cloud data and any sub-map of all historical sub-maps is higher than a set threshold (which can be set in advance), it is determined that a loop is formed (for example, referring to the overlapping part between sub-maps in the map block 1 shown in FIG3a). After it is determined that a loop is formed, all historical sub-maps and all point cloud data of the reference area 10 are optimized (for example, nonlinear least squares optimization) to correct the position and posture of all historical sub-maps and all point cloud data of the reference area 10, that is, to correct the X-axis and Y-axis coordinates and orientation θ of all historical sub-maps of the reference area 10 in the map coordinate system and the X-axis and Y-axis coordinates and orientation θ of all point cloud data in the map coordinate system.
[0219] Furthermore, in step S13, after completing the mapping of the reference area 10 (for example, detecting that the reference map is closed, that is, all posture data are detected), the local computing unit of the master robot 40 obtains the reference map based on all optimized historical sub-maps (specifically through fusion means such as splicing).
[0220] Wherein, step S2 shown in FIG2 specifically includes steps S21 to S23:
[0221] S21, mapping the sub-region to be mapped in real time by the slave robot, and sending real-time scanning data of the sub-region to be mapped obtained by scanning the laser radar device of the slave robot to a local computing unit of the slave robot;
[0222] S22: The local computing unit of the slave robot converts the received real-time scan data of the sub-area to be mapped into real-time point cloud data for insertion into corresponding positions of the sub-map being created. When a preset number of frames of point cloud data are received, a completed real-time sub-map is obtained.
[0223] S23. The slave robot sends the real-time point cloud data and the real-time sub-map of the sub-area to be mapped to the master robot in real time.
[0224] It can be understood that the process of using the slave robot to perform real-time mapping of the sub-area 20 to be mapped to obtain real-time point cloud data and a real-time sub-map can refer to the above-mentioned process of using the master robot 40 to perform real-time mapping of the reference area to obtain real-time point cloud data and a real-time sub-map, and will not be repeated here.
[0225] Unlike the real-time mapping of the reference area 10 by the master robot 40, after the slave robot 50 performs real-time mapping of the sub-area 20 to be mapped to obtain real-time point cloud data and real-time submap, it does not optimize the data in the local computing unit, nor does it use all historical submaps and all point cloud data of the sub-area 20 to be mapped for loop optimization. Instead, the real-time point cloud data and real-time submap of the sub-area 20 to be mapped are sent to the master robot 40 in real time, and the computing unit of the master robot 40 performs loop optimization based on the reference point cloud data and reference submap in the constructed reference map.
[0226] Specifically, in step S3 shown in FIG2 , the loop optimization can be performed in the following two ways:
[0227] Method 1: Perform loop closure detection on the currently received real-time point cloud data of the sub-area to be mapped and all the reference sub-maps of the reference map;
[0228] Method 2: Perform loop closure detection on the currently received real-time sub-map of the sub-area to be mapped and all the reference point cloud data of the reference map.
[0229] The specific implementation process of the two loop optimization methods can be referred to the previous related description content, and the details are omitted here.
[0230] It can be understood that in order to distinguish the data collected by the master robot 40 and the slave robot 50 respectively, the data collected by the master robot 40 and the slave robot 50 are marked with independent IDs. For example, all data collected by the master robot 40 for the reference area 10 are marked with ID1, while all data collected by the slave robot 50 for the sub-area to be mapped 20 are marked with ID2.
[0231] Furthermore, in step S4, after mapping of the sub-region to be mapped is complete (for example, the sub-region map is detected to be closed, i.e., all pose data is detected), the computing unit of the master robot 40 generates a sub-region map based on all optimized historical sub-maps of the sub-region to be mapped 20 (specifically, by splicing or other fusion methods). The master robot 40 then splices the baseline map and the sub-region map to obtain a complete map of the region to be mapped, and modifies all data IDs in the complete map to the same ID, for example, all data IDs can be modified to ID3.
[0232] It can be seen that in this embodiment, in addition to using self-loop optimization (using all its own historical submaps or all point cloud data) in the mapping process of the reference area 10, self-loop optimization is not used in the mapping process of the sub-region to be mapped 20. Instead, the baseline map constructed in the reference area (using all baseline submaps or all baseline point cloud data) is used as a baseline (reference) to perform loop optimization on all historical submaps and all point cloud data of the sub-region to be mapped 20, so that the maps of the sub-region to be mapped 20 and the reference area 10 can be effectively associated, effectively reducing / eliminating the accumulated error of the map data between the sub-region to be mapped 20 and the reference area 10, thereby facilitating the final map fusion and improving the accuracy of the fused complete map.
[0233] Specifically, with continued reference to FIG3a , submaps 1-10, 1-11, and 1-12 included in map block 1 (corresponding to the base map of base area 10) overlap in the common area with submaps 2-10, 2-11, and 2-12 included in map block 2 (corresponding to the sub-area base map of the sub-area to be mapped 20). This embodiment utilizes this overlapping portion as a connection point between the sub-area to be mapped 20 and the base area 10 to optimize the data of the sub-area to be mapped, thereby reducing / eliminating the accumulated error in the map data between the sub-area to be mapped 20 and the base area 10.
[0234] It will be appreciated that the larger the common area 30 between the sub-region to be mapped 20 and the reference region 10, the higher the accuracy of loop closure optimization performed on all historical sub-maps and all point cloud data of the sub-region to be mapped 20 using the reference map of this embodiment, thereby better reducing the cumulative error in the map data between the sub-region to be mapped 20 and the reference region 10. Therefore, by setting up virtual walls in the sub-region to be mapped, the sub-region to be mapped is divided into the reference region and at least one sub-region to be mapped, and each sub-region to be mapped has as much common area as possible with the reference region.
[0235] For example, as shown in FIG4 , as an improvement to the solution shown in FIG3 a , the area to be mapped 100 is divided as follows: the reference area 10 (map block 1) is located at the center of the area to be mapped 100 , and then the sub-area to be mapped 20 (map block 2) surrounds the reference area 10 , and there is a common area 30 (the shaded area in FIG2 ) between the sub-area to be mapped 20 and the reference area 10 . This setting enables the sub-area to be mapped 20 and the reference area 10 to have a common (overlapping) area around them, which can effectively improve the accuracy of loop closure optimization of all historical sub-maps and all point cloud data of the sub-area to be mapped 20 using the reference map.
[0236] In another preferred embodiment, the sub-areas to be mapped include at least two, and each sub-area to be mapped corresponds to a slave robot; in step S2, each slave robot simultaneously performs real-time mapping on the sub-area to be mapped for which it is responsible; in step S3, the master robot performs loop optimization on the data sent by different slave robots based on the tag ID and returns the optimized data to the corresponding slave robot.
[0237] Specifically, referring to Figure 5 , for example, the area to be mapped 100 is divided into a reference area 10 and three sub-areas to be mapped (including a first sub-area to be mapped 21, a second sub-area to be mapped 22, and a third sub-area to be mapped 23). The first sub-area to be mapped 21 and the reference area 10 share a first common area 31, the second sub-area to be mapped 22 and the reference area 10 share a second common area 32, and the third sub-area to be mapped 23 and the reference area 10 share a third common area 33. The master robot 40 is responsible for mapping the reference area 10, the first slave robot 51 is responsible for mapping the first sub-area to be mapped 21, the second slave robot 52 is responsible for mapping the second sub-area to be mapped 22, and the third slave robot 53 is responsible for mapping the third sub-area to be mapped 23. The map block 1 shown in Figure 4 corresponds to the reference map generated after the master robot 40 maps the reference area 10, the map block 2 shown in Figure 4 corresponds to the first sub-area map generated after the first slave robot 51 maps the first sub-area to be mapped 21, the map block 3 shown in Figure 4 corresponds to the second sub-area map generated after the second slave robot 52 maps the second sub-area to be mapped 22, and the map block 4 shown in Figure 5 corresponds to the third sub-area map generated after the third slave robot 53 maps the third sub-area 23 to be mapped.
[0238] In this way, after the master robot 40 maps the reference area 10 and generates a reference map, the first slave robot 51, the second slave robot 52 and the third slave robot 53 can simultaneously perform real-time mapping on the first sub-area 21 to be mapped, the second sub-area 22 to be mapped and the third sub-area 23 to be mapped, respectively, and send the collected real-time point cloud data and real-time sub-maps to the master robot 40 for loop optimization.
[0239] In addition, to distinguish the data collected by the master robot 40 and the first, second, and third slave robots 51, 52, and 53, the data collected by the master robot 40 and the first, second, and third slave robots 51, 52, and 53 are each labeled with a unique ID. For example, all data collected by the master robot 40 for the reference area 10 is labeled with ID 1, all data collected by the first slave robot 51 for the first sub-area to be mapped 21 is labeled with ID 2, all data collected by the second slave robot 52 for the second sub-area to be mapped 22 is labeled with ID 3, and all data collected by the third slave robot 53 for the third sub-area to be mapped 23 is labeled with ID 4. In this way, the master robot 40 performs loopback optimization on the data sent by different slave robots based on the different IDs and returns the optimized data to the corresponding slave robots.
[0240] In another preferred embodiment, the area to be mapped is a first area to be mapped, and the laser mapping method is further applicable to mapping an Nth area to be mapped, wherein the Nth area to be mapped includes an N-1th area to be mapped and at least one Nth sub-area to be mapped, and the Nth sub-area to be mapped and the N-1th area to be mapped have a common area; wherein N is an integer greater than or equal to 2; and the laser mapping method further comprises the steps of:
[0241] S5. The master robot uses the obtained complete map of the N-1th area to be mapped as a new reference map, where the N-1th area to be mapped constitutes the new reference area.
[0242] S6. Mapping the Nth sub-region to be mapped in real time by the slave robot, and sending the real-time point cloud data collected for the Nth sub-region to be mapped and the real-time sub-map created based on the point cloud data collected for a preset number of frames to the master robot;
[0243] S7, the master robot performs loop optimization on the received real-time point cloud data and real-time submap collected from the Nth sub-region to be mapped and the reference point cloud data and reference submap in the new reference map, thereby obtaining the poses of all historical sub-maps and all point cloud data of the Nth sub-region to be mapped after optimization, and returns the poses to the slave robot accordingly, until the slave robot completes mapping of the Nth sub-region to be mapped to generate a map of the Nth sub-region;
[0244] S8. The master robot splices the new reference map and the Nth sub-area map to obtain a complete map of the Nth area to be mapped, and modifies all data IDs in the complete map of the Nth area to be mapped to the same ID.
[0245] The above preferred embodiment will be described in detail below with reference to FIG. 6 .
[0246] For the convenience of description, taking the embodiment shown in FIG. 4 as an example, the above-mentioned iterative solution is executed on the basis of FIG. 4 , thereby obtaining the map shown in FIG. 6 (N=2).
[0247] Specifically, the master robot uses the complete map constructed based on the area to be mapped 100 (collectively referred to as the first area to be mapped 100 in this embodiment) shown in FIG4 as a new reference map (corresponding to map block 1 in FIG6 ). Accordingly, the first area to be mapped 100 becomes the new reference area 10'. Using the new reference area 10' as a reference (reference), the new area to be mapped can be mapped and optimized. In order to distinguish it from the previous embodiment, the new area to be mapped in this embodiment is collectively referred to as the second area to be mapped 200 (when N=2). The second area to be mapped 200 includes the new reference area 10' and the second sub-area to be mapped 20', and there is a common area 30' between the new reference area 10' and the second sub-area to be mapped 20'. The slave robot 50 is placed in the second sub-region to be mapped 20', and the second sub-region to be mapped 20' is mapped in real time by the slave robot 50. The slave robot 50 sends the real-time point cloud data collected for the second sub-region to be mapped 20' and the real-time sub-map created based on the point cloud data collected for a preset number of frames (for example, 50 frames) to the master robot 40. The master robot 40 compares the received real-time point cloud data and real-time sub-map collected for the second sub-region to be mapped 20' with the reference point cloud data and reference sub-map in the new reference map. Loop optimization is performed to obtain the poses of all optimized historical submaps of the second sub-region 20' to be mapped and the poses of all point cloud data, and the poses are returned to the slave robot 50 accordingly, until the slave robot 50 completes mapping of the second sub-region 20' to be mapped to generate a second sub-region map (corresponding to map block 2 in Figure 6). Finally, the master robot 40 splices the new baseline map and the second sub-region map to obtain a complete map of the second sub-region 200 to be mapped, and modifies all data IDs in the complete map of the second sub-region 200 to be mapped to the same ID.
[0248] It can be understood that after obtaining the complete map of the second area to be mapped 200 shown in Figure 6, the complete map of the second area to be mapped 200 can be used as another new reference map. The second area to be mapped 200 becomes another new reference area. With this new reference area as a reference (reference), the new area to be mapped (i.e., the third area to be mapped, N=3) can be mapped and optimized to obtain a complete map of the third area to be mapped. Then, the complete map of the third area to be mapped can be used as another new reference map. The third area to be mapped becomes another new reference area. With this new reference area as a reference (reference), the new area to be mapped (i.e., the fourth area to be mapped, N=4) can be mapped and optimized to obtain a complete map of the fourth area to be mapped. The following loop is repeated to obtain mapping of more areas.
[0249] It can be seen that, unlike the embodiment shown in FIG5 , by adopting the above-mentioned iterative scheme (for example, FIG6 ), it is possible to realize mapping of the area to be mapped by time periods while reducing the number of robots (for example, FIG6 shows a master robot and a slave robot). That is, mapping of the area to be mapped can be completed by division of labor and time sharing among multiple robots, thereby improving mapping efficiency while saving robot costs, and is very suitable for mapping large scenes.
[0250] In addition, by adopting the above-mentioned iterative scheme (such as Figure 6), the working environment can be freely expanded at any time according to actual task requirements (such as cleaning requirements) to build a corresponding map, thereby meeting the needs of the working environment in a larger scenario.
[0251] Furthermore, as an improvement to the above solution, in step S3 shown in FIG2 , the loop optimization is the first loop optimization, and before completing the mapping of the sub-region to be mapped and generating the sub-region map, the following steps may be further included:
[0252] S31, performing a second loop closure optimization on all historical submaps and all point cloud data of the subregion to be mapped, the reference point cloud data and the reference submap, thereby obtaining the poses of all historical submaps and all point cloud data of the subregion to be mapped after the second optimization;
[0253] S32: Generate the sub-region map based on the poses of all historical sub-maps after secondary optimization of the sub-region to be mapped and the poses of all point cloud data.
[0254] Similarly, the second loop optimization in step S31 can be performed in two ways. The specific implementation process of the two ways of the second loop optimization can refer to the relevant description above, and detailed description is omitted here.
[0255] In specific implementation, in all the above embodiments, the master robot and the slave robot are cleaning robots for performing cleaning tasks, and a map of the working environment of the cleaning task is first constructed through any of the above embodiments.
[0256] Referring to FIG7 , an embodiment of the present invention provides a laser mapping system suitable for mapping an area to be mapped, wherein the area to be mapped includes a reference area and at least one sub-area to be mapped, wherein the sub-area to be mapped and the reference area have a common area. The laser mapping system includes a master robot 40 and a slave robot 50, and data collected by each robot is independently labeled with an ID.
[0257] The master robot 40 is used to map the reference area to obtain a reference map; the reference map includes a plurality of reference sub-maps, each of which includes a preset number of frames of reference point cloud data;
[0258] The slave robot 50 is used to map the sub-area to be mapped in real time. The slave robot sends the real-time point cloud data collected from the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected for a preset number of frames to the master robot 40;
[0259] The master robot 40 is further configured to perform loop optimization on the received real-time point cloud data and real-time submap collected from the sub-region to be mapped, and the reference point cloud data and reference submap, thereby obtaining the poses of all optimized historical sub-maps and all point cloud data of the sub-region to be mapped and returning them to the slave robot 80 until the slave robot 80 completes mapping of the sub-region to be mapped to generate a sub-region map.
[0260] The master robot 40 is further configured to splice the reference map and the sub-area map to obtain a complete map of the area to be mapped, and modify all data IDs in the complete map to the same ID.
[0261] It can be understood that the laser mapping system based on multi-robot collaboration shown in FIG7 includes a master robot 40 and a slave robot 50 .
[0262] In another preferred embodiment, as shown in FIG8 , the laser mapping system includes a master robot 40 and at least two slave robots (for example, FIG8 shows three slave robots, namely slave robot 51, slave robot 52, and slave robot 53). Correspondingly, there are at least two sub-areas to be mapped, and each sub-area to be mapped corresponds to a slave robot; each slave robot simultaneously performs real-time mapping on the sub-area to be mapped for which it is responsible; and the master robot 40 performs loop optimization on the data sent by different slave robots based on the tag ID and returns the optimized data to the corresponding slave robot.
[0263] It can be understood that the specific working process of a laser mapping system provided by an embodiment of the present invention can refer to the corresponding content of the laser mapping method described above, and detailed description is omitted here.
[0264] Specific embodiment 2
[0265] Referring to FIG9 , an embodiment of the present invention provides a laser mapping method suitable for mapping an area to be mapped, wherein the area to be mapped includes a reference area and at least one sub-area to be mapped, wherein the sub-area to be mapped and the reference area have a common area; robots are set up in the reference area and the sub-area to be mapped, and data collected by the robots from different areas are independently labeled with IDs; the laser mapping method includes steps S1 to S5:
[0266] S1. Mapping the reference area by a robot in the reference area. The robot in the reference area sends real-time point cloud data collected for the reference area and a real-time sub-map created based on the point cloud data collected in a preset frame to a cloud or server.
[0267] S2. The cloud or server constructs and optimizes a real-time submap based on the real-time point cloud data collected by the robot in the reference area and the point cloud data collected for the preset frame, thereby obtaining a reference map; the reference map includes a plurality of reference submaps, each of which includes reference point cloud data for the preset frame;
[0268] S3. Mapping the corresponding sub-area to be mapped in real time by the robot in the sub-area to be mapped. The robot in the sub-area to be mapped sends the real-time point cloud data collected for the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame to the cloud or server.
[0269] S4. The cloud or server performs loop optimization on the received real-time point cloud data collected in the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame, and the reference point cloud data and the reference sub-map, thereby obtaining the poses of all historical sub-maps and all point cloud data after optimization in the sub-area to be mapped, and returns them to the robot in the sub-area to be mapped, until the robot in the sub-area to be mapped completes mapping of the sub-area to be mapped to generate a sub-area map;
[0270] S5. The reference map and the sub-area map are spliced together through the cloud or the server to obtain a complete map of the area to be mapped, and all data IDs in the complete map are modified to the same ID.
[0271] Wherein, step S1 shown in FIG9 specifically includes steps S11 to S13:
[0272] S11, mapping the reference area by a robot on the reference area, and sending real-time scanning data of the reference area obtained by scanning with a laser radar device of the robot to a local computing unit;
[0273] S12, the local computing unit converts the received real-time scanning data of the reference area into real-time point cloud data to insert into corresponding positions of the sub-map being created, and obtains a completed real-time sub-map when a preset number of frames of point cloud data are received;
[0274] S13. The robot sends the real-time point cloud data and the real-time sub-map of the reference area to the cloud or server.
[0275] Accordingly, the specific execution process of step S2 shown in FIG9 is as follows:
[0276] The cloud or server performs loop optimization on the received real-time point cloud data and real-time submap of the benchmark area with all historical submaps and all point cloud data of the benchmark area to obtain the poses of all optimized historical submaps and all point cloud data of the benchmark area, until the mapping of the benchmark area is completed and a benchmark map is obtained based on all optimized historical submaps; the benchmark map includes multiple benchmark submaps, each of which includes a preset number of frames of benchmark point cloud data.
[0277] Below, in conjunction with FIG3 a , the robot-based large-scene laser mapping method provided by this embodiment is further described.
[0278] For the sake of convenience, the description is based on the case where the area to be mapped 100 includes a reference area 10 and a sub-area to be mapped 20. That is, the area to be mapped 100 (scene) is divided into the reference area 10 and the sub-area to be mapped 20, and there is a common area 30 (i.e., an overlapping area) between the reference area 10 and the sub-area to be mapped 20. Among them, the robot 40 set on the reference area 10 is responsible for mapping the reference area 10, and the other robot 50 set on the sub-area to be mapped 20 is responsible for mapping the sub-area to be mapped 20. The map block 1 shown in Figure 3a corresponds to the reference map generated after the robot 40 maps the reference area 10, and the map block 2 shown in Figure 3a corresponds to the sub-area map generated after the other robot 50 maps the sub-area to be mapped 20.
[0279] It is understandable that, in specific implementation, the area can be divided into a reference area 10 and a sub-area to be mapped 20 by setting virtual walls. For example, different virtual walls (such as color block labels, QR codes, etc.) are set on the boundary lines of the reference area 10 and the sub-area to be mapped 20 to limit the respective working areas of the robots 40 and 50. Among them, the robots 40 and 50 can be SLAM robots with general computing capabilities, which can perform point cloud data processing and sub-map creation. As for point cloud data, sub-map optimization, reference map generation, and map fusion operations, they can be performed by the cloud or server, and the robots 40 and 50 are only responsible for the collection of point cloud data and the creation of real-time sub-maps in the corresponding areas, and send the real-time point cloud data and real-time sub-maps of the reference area and the sub-area to be mapped to the cloud or server for optimization.
[0280] Specifically, in steps S11 and S12, the robot 40 first maps the reference area to obtain a reference map. During the process of the robot 40 moving and mapping, the robot 40 sends real-time scanning data obtained by scanning with the lidar device to a local computing unit (installed inside the robot 40). The local computing unit converts the real-time scanning data of the reference area into real-time point cloud data to be inserted (matched) into the corresponding (optimal) position of the sub-map being created. When a preset number of frames (e.g., 50 frames) of point cloud data are reached, a completed real-time sub-map is obtained (such as sub-map 1-1, sub-map 1-2, sub-map 1-3, etc. in map block 1 as shown in FIG3 a).
[0281] It is understood that in this embodiment, the submap states include "in progress" and "completed." A submap in progress has a point cloud data frame count that is less than the preset number of frames, while a completed submap has a point cloud data frame count that is equal to the preset number of frames. All subsequent historical submaps are completed submaps.
[0282] It can be understood that in order to improve the accuracy of matching real-time point cloud data to the sub-map being created, in this embodiment, robot 40 / robot 50 can obtain data such as the position or posture of robot 40 / robot 50 by additionally setting up devices such as odometers, IMUs and / or cameras to assist in more accurate matching of each frame of lidar with the sub-map.
[0283] Next, in step S13 , the local computing unit of the robot 40 sends the real-time point cloud data and the real-time sub-map of the reference area 10 to the cloud or the server.
[0284] Furthermore, in step S2 shown in FIG9 , the cloud or server performs loop closure optimization on the received real-time point cloud data and real-time submap of the reference area 10, along with all historical submaps and all point cloud data of the reference area 10, to obtain the poses of all optimized historical submaps and all point cloud data of the reference area. It will be appreciated that since the map obtained by mapping the reference area 10 by the robot 40 serves as the reference map (reference), loop closure optimization is required for all historical submaps and all point cloud data of the area to eliminate accumulated errors in order to ensure the accuracy of the data of the reference map itself.
[0285] Similarly, the loop optimization in step S2 shown in FIG9 can be performed in two ways. The specific execution process can refer to the previous related description, and detailed description is omitted here.
[0286] Furthermore, in step S2, after completing the mapping of the reference area 10 (for example, detecting that the reference map is closed, that is, all posture data are detected), the cloud or server obtains a reference map based on all optimized historical sub-maps (specifically through splicing or other fusion methods).
[0287] Specifically, step S3 shown in FIG9 specifically includes steps S31 to S33:
[0288] S31, using the robot 50 in the sub-area to be mapped to perform real-time mapping of the sub-area to be mapped, and sending real-time scanning data of the sub-area to be mapped obtained by scanning with the robot's lidar device to the robot's local computing unit;
[0289] S32: The local computing unit of the robot 50 converts the received real-time scan data of the sub-area to be mapped into real-time point cloud data for insertion into corresponding positions of the sub-map being created. When a preset number of frames of point cloud data are received, a completed real-time sub-map is obtained.
[0290] S33: The robot 50 sends the real-time point cloud data and the real-time sub-map of the sub-area to be mapped to the cloud or server in real time.
[0291] It can be understood that the process of using the robot 50 to perform real-time mapping of the sub-area to be mapped 20 to obtain real-time point cloud data and a real-time sub-map can refer to the above-mentioned process of using the robot 40 to perform real-time mapping of the reference area to obtain real-time point cloud data and a real-time sub-map, and will not be repeated here.
[0292] Furthermore, in step S4 shown in FIG9 , the loop optimization can be performed in the following two ways:
[0293] Method 1: Perform loop closure detection on the currently received real-time point cloud data of the sub-area to be mapped and all the reference sub-maps of the reference map;
[0294] Method 2: Perform loop closure detection on the currently received real-time sub-map of the sub-area to be mapped and all the reference point cloud data of the reference map.
[0295] The specific implementation process of the two methods of loop optimization in this step can be referred to the previous related description content, and repeated description is omitted here.
[0296] It is understandable that in order to distinguish the data collected by robot 40 and robot 50 respectively, the data collected by robot 40 and robot 50 are marked with independent IDs. For example, all data collected by robot 40 for the reference area 10 are marked with ID1, while all data collected by robot 50 for the mapping sub-area 20 are marked with ID2.
[0297] Furthermore, in step S5, after mapping of the sub-region to be mapped is completed (for example, the sub-region map is detected to be closed, i.e., all pose data is detected), a sub-region map is obtained by the cloud or server based on all optimized historical sub-maps of the sub-region to be mapped 20 (specifically, by splicing or other fusion methods). Then, the cloud or server splices the baseline map and the sub-region map to obtain a complete map of the region to be mapped, and all data IDs in the complete map are modified to the same ID, for example, all data IDs can be modified to ID3.
[0298] It can be seen that in this embodiment, in addition to using self-loop optimization (using all its own historical submaps or all point cloud data) in the mapping process of the reference area 10, self-loop optimization is not used in the mapping process of the sub-region to be mapped 20. Instead, the baseline map constructed in the reference area (using all baseline submaps or all baseline point cloud data) is used as a baseline (reference) to perform loop optimization on all historical submaps and all point cloud data of the sub-region to be mapped 20, so that the maps of the sub-region to be mapped 20 and the reference area 10 can be effectively associated, effectively reducing / eliminating the accumulated error of the map data between the sub-region to be mapped 20 and the reference area 10, thereby facilitating the final map fusion and improving the accuracy of the fused complete map.
[0299] It is understandable that in the case where the area to be mapped is divided into a reference area 10 and a sub-area to be mapped 20 as shown in Figures 3a and 4, only one robot can be used to map the reference area 10 and the sub-area to be mapped 20 in sequence, that is, robots 40 and 50 are the same robot. As shown in Figure 10, the robot 40 first maps the reference area 10 in time period one to obtain a reference map (for the specific process, refer to steps S1 to S2 in Figure 9), and then the robot 40 maps the sub-area to be mapped 20 in time period two to obtain a sub-area map (for the specific process, refer to steps S3 to S4 in Figure 9), thereby reducing the number of robots used and saving costs. In addition, it is understandable that in this case, in order to distinguish the data of the robot 40 in the reference area 10 and the sub-area to be mapped 20, the following means can be used:
[0300] Method 1: The tag IDs of the data collected by the same robot 40 in the reference area 10 and the sub-area to be mapped 20 are different. For example, the tag ID of the data collected by the robot 40 in the reference area 10 is ID1, and the tag ID of the data collected by the robot 40 in the reference area 10 is ID2 (in specific implementation, this can be changed by setting the internal part of the robot 40).
[0301] Method 2: If the data collected by the same robot 40 in the base area 10 and the sub-area 20 to be mapped have the same tag ID, then all data IDs in the base map are changed. For example, if the tag ID of the data collected by the robot 40 in the base area 10 is ID1, when the base map is finally processed through the cloud or server, the cloud or server can change all data IDs in the base map from ID1 to ID2. The robot 40 will then continue to treat the tag ID of the data collected in the sub-area 20 to be mapped as ID1, thus distinguishing it from all data IDs in the base map.
[0302] In another preferred embodiment, the sub-areas to be mapped include at least two, and each sub-area to be mapped corresponds to a robot; in step S3, each robot simultaneously performs real-time mapping on the sub-area to be mapped for which it is responsible; in step S4, the cloud or server performs loop optimization on the data sent by different robots based on the tag ID and returns the optimized data to the corresponding robot.
[0303] Specifically, referring to Figure 5 , for example, the area to be mapped 100 is divided into a reference area 10 and three sub-areas to be mapped (including a first sub-area to be mapped 21, a second sub-area to be mapped 22, and a third sub-area to be mapped 23). The first sub-area to be mapped 21 shares a first common area 31 with the reference area 10, the second sub-area to be mapped 22 shares a second common area 32 with the reference area 10, and the third sub-area to be mapped 23 shares a third common area 33 with the reference area 10. Robot 40 is responsible for mapping the reference area 10, robot 51 is responsible for mapping the first sub-area to be mapped 21, robot 52 is responsible for mapping the second sub-area to be mapped 22, and robot 53 is responsible for mapping the third sub-area to be mapped 23. The map block 1 shown in Figure 5 corresponds to the reference map generated after the robot 40 maps the reference area 10, the map block 2 shown in Figure 5 corresponds to the first sub-area map generated after the robot 51 maps the first sub-area to be mapped 21, the map block 3 shown in Figure 5 corresponds to the second sub-area map generated after the robot 52 maps the second sub-area to be mapped 22, and the map block 4 shown in Figure 5 corresponds to the third sub-area map generated after the robot 53 maps the third sub-area 23 to be mapped.
[0304] In this way, after the robot 40 maps the reference area 10 and generates a reference map, the robots 51, 52 and 53 can simultaneously perform real-time mapping on the first sub-area 21 to be mapped, the second sub-area 22 to be mapped and the third sub-area 23 to be mapped, respectively, and send the collected real-time point cloud data and real-time sub-maps to the cloud or server for loop optimization.
[0305] In addition, to distinguish the data collected by robot 40 from that of robots 51, 52, and 53, the data collected by robot 40, robot 51, robot 52, and robot 53 for their respective areas are tagged with independent IDs. For example, all data collected by robot 40 for reference area 10 is tagged with ID 1, all data collected by robot 51 for the first sub-area to be mapped 21 is tagged with ID 2, all data collected by robot 52 for the second sub-area to be mapped 22 is tagged with ID 3, and all data collected by robot 53 for the third sub-area to be mapped 23 is tagged with ID 4. In this way, the cloud or server performs loopback optimization on the data sent by different robots based on the different tag IDs and returns the optimized data to the corresponding robots.
[0306] In another preferred embodiment, the area to be mapped is a first area to be mapped, and the laser mapping method is further applicable to mapping an Nth area to be mapped, wherein the Nth area to be mapped includes an N-1th area to be mapped and at least one Nth sub-area to be mapped, and the Nth sub-area to be mapped and the N-1th area to be mapped have a common area; wherein N is an integer greater than or equal to 2; and the laser mapping method further comprises the steps of:
[0307] S6. Using the obtained complete map of the N-1th area to be mapped as a new reference map through the cloud or the server, the N-1th area to be mapped constitutes the new reference area;
[0308] S7. Mapping the Nth sub-region to be mapped in real time by the robot, and sending the real-time point cloud data collected for the Nth sub-region to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame to the cloud or server;
[0309] S8. The cloud or server performs loop optimization on the received real-time point cloud data and real-time submap collected for the Nth sub-region to be mapped and the benchmark point cloud data and benchmark submap in the new benchmark map, thereby obtaining the poses of all historical sub-maps and all point cloud data of the Nth sub-region to be mapped after optimization, and returns the poses to the robot accordingly, until the robot completes mapping of the Nth sub-region to be mapped to generate a map of the Nth sub-region;
[0310] S9. Splicing the new reference map and the Nth sub-area map through the cloud or server to obtain a complete map of the Nth area to be mapped, and modifying all data IDs in the complete map of the Nth area to be mapped to the same ID.
[0311] The above preferred embodiment will be described in detail below with reference to FIG. 6 .
[0312] Specifically, the complete map constructed based on the area to be mapped 100 (collectively referred to as the first area to be mapped 100 in this embodiment) shown in FIG3a is used as a new reference map (corresponding to map block 1 in FIG6 ) through the cloud or server. Accordingly, the first area to be mapped 100 becomes the new reference area 10'. Using the new reference area 10' as a reference (reference), the new area to be mapped can be mapped and optimized. In order to distinguish it from the previous embodiment, the new area to be mapped in this embodiment is collectively referred to as the second area to be mapped 200 (when N=2). The second area to be mapped 200 includes the new reference area 10' and the second sub-area to be mapped 20', and there is a common area 30' between the new reference area 10' and the second sub-area to be mapped 20'. The mobile robot 50 is placed in the second sub-region to be mapped 20', and the second sub-region to be mapped 20' is mapped in real time by the robot 50. The robot 50 sends the real-time point cloud data collected for the second sub-region to be mapped 20' and the real-time sub-map created based on the point cloud data collected for a preset number of frames (for example, 50 frames) to the cloud or server. The cloud or server compares the received real-time point cloud data and real-time sub-map collected for the second sub-region to be mapped 20' with the reference point cloud data and reference sub-map in the new reference map. The loop is optimized to obtain the poses of all historical submaps and all point cloud data of the second sub-region to be mapped 20' after optimization, and return them to the robot 50 accordingly, until the robot 50 completes mapping of the second sub-region to be mapped 20' to generate a second sub-region map (corresponding to map block 2 in Figure 6). Finally, the new baseline map and the second sub-region map are spliced together through the cloud or server to obtain a complete map of the second sub-region to be mapped 200, and all data IDs in the complete map of the second sub-region to be mapped 200 are modified to the same ID.
[0313] It can be understood that after obtaining the complete map of the second area to be mapped 200 shown in Figure 6, the complete map of the second area to be mapped 200 can be used as another new reference map through the cloud or server. The second area to be mapped 200 becomes another new reference area. Using this new reference area as a reference (reference), the new area to be mapped (i.e., the third area to be mapped, N=3) can be mapped and optimized to obtain a complete map of the third area to be mapped. Then, the complete map of the third area to be mapped can be used as another new reference map through the cloud or server. The third area to be mapped becomes another new reference area. Using this new reference area as a reference (reference), the new area to be mapped (i.e., the fourth area to be mapped, N=4) can be mapped and optimized to obtain a complete map of the fourth area to be mapped. The following loop iterates to obtain mapping of more areas.
[0314] It can be seen that, unlike the embodiment shown in FIG5 , by adopting the above-mentioned iterative scheme (for example, FIG6 ), it is possible to realize mapping of the area to be mapped by time division while reducing the number of robots (for example, FIG6 shows two robots), that is, to complete mapping of the area to be mapped by division of labor and time division among robots, thereby improving mapping efficiency while saving robot costs, and being very suitable for mapping of large scenes.
[0315] In addition, by adopting the above-mentioned iterative scheme (such as Figure 6), the working environment can be freely expanded at any time according to actual task requirements (such as cleaning requirements) to build a corresponding map, thereby meeting the needs of the working environment in a larger scenario.
[0316] Furthermore, as an improvement to the above scheme, in step S4 shown in FIG9 , the loop optimization is the first loop optimization, and a second loop optimization is also included before completing the mapping of the sub-area to be mapped and generating the sub-area map. The specific implementation process of the two methods of the second loop optimization can refer to the relevant description content above, and the details are omitted here.
[0317] Referring to FIG11 , an embodiment of the present invention provides a robot-based large-scene map construction system suitable for mapping an area to be mapped, wherein the area to be mapped includes a base area and at least one sub-area to be mapped, wherein the sub-area to be mapped and the base area have common areas. The map construction system includes at least two robots 40 and 50 and a cloud or server 60. The data collected by the robots for different areas are independently labeled with IDs.
[0318] The robot 40 placed on the reference area is used to map the reference area. The robot 40 on the reference area sends the real-time point cloud data collected for the reference area and the real-time sub-map created based on the point cloud data collected in the preset frame to the cloud or server.
[0319] The cloud or server 60 constructs and optimizes a map based on the real-time point cloud data collected by the robot 40 in the reference area and the real-time submap created based on the point cloud data collected for the preset frame, thereby obtaining a reference map; the reference map includes a plurality of reference submaps, each of which includes reference point cloud data for the preset frame;
[0320] The robot 50 placed in the sub-area to be mapped is used to map the corresponding sub-area to be mapped in real time. The robot 50 in the sub-area to be mapped sends the real-time point cloud data collected for the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame to the cloud or server.
[0321] The cloud or server 60 is used to perform loop optimization on the received real-time point cloud data collected in the sub-region to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame, and the reference point cloud data and the reference sub-map, so as to obtain the poses of all historical sub-maps and all point cloud data of the sub-region to be mapped after optimization, and return them to the robot 50 in the sub-region to be mapped, until the robot in the sub-region to be mapped completes mapping of the sub-region to be mapped to generate a sub-region map;
[0322] The cloud or server 60 is further configured to splice the reference map and the sub-region map to obtain a complete map of the area to be mapped, and modify all data IDs in the complete map to the same ID.
[0323] It can be understood that the robot-based large-scene map construction system shown in Figure 11 is applicable to the situation where the area to be mapped includes a base area and a sub-area to be mapped, and correspondingly two slave robots 40 and 50 are used to map the base area and the sub-area to be mapped.
[0324] In another preferred embodiment, as shown in FIG12 , the map construction system includes a cloud or server 60 and at least three robots (for example, FIG12 includes four robots, namely robot 40, robot 51, robot 52, and robot 53). Correspondingly, there is one reference area, corresponding to one robot 40, and at least two sub-areas to be mapped, each corresponding to one robot (51, 52, 53). Each robot (51, 52, 53) simultaneously performs real-time mapping of the area it is responsible for; and the cloud or server 60 performs loop optimization on the data sent by different robots based on the tag ID and returns the optimized data to the corresponding robot.
[0325] Specific embodiment three
[0326] Referring to FIG13 , an embodiment of the present invention provides a laser mapping method suitable for mapping an area to be mapped using a single robot. The area to be mapped includes a reference area and at least one sub-area to be mapped, wherein the sub-area to be mapped and the reference area have a common area. The single robot maps the reference area and the sub-area to be mapped at different time periods. The laser mapping method includes steps S1 to S3:
[0327] S1. Mapping the reference area by the single robot in a first time period to obtain a reference map; the reference map includes a plurality of reference submaps, each of the reference submaps including reference point cloud data of a preset frame;
[0328] S2. Performing real-time mapping of the sub-region to be mapped by the single robot during different time periods other than the first time period, performing loop optimization on the real-time point cloud data collected for the sub-region to be mapped and a real-time submap created based on the point cloud data collected for the preset frame, the reference point cloud data and the reference submap, thereby obtaining the poses of all optimized historical submaps of the sub-region to be mapped and the poses of all point cloud data, until the mapping of the sub-region to be mapped is completed to generate a sub-region map;
[0329] S3. Splicing the reference map and the sub-region map to obtain a complete map of the area to be mapped.
[0330] In a preferred embodiment, the data processing involved in the laser mapping method shown in FIG13 is performed in the local computing unit of the mobile single robot;
[0331] Step S1 shown in FIG13 specifically includes:
[0332] S11, receiving real-time scanning data of a reference area obtained by scanning with a laser radar device of a single robot during a first period;
[0333] S12, converting the received real-time scan data of the reference area into real-time point cloud data to be inserted into the corresponding position of the sub-map being created, and obtaining the completed real-time sub-map when the point cloud data of the preset frame is reached;
[0334] S13, performing loop optimization based on the real-time point cloud data and real-time submap of the reference area and all historical submaps and all point cloud data of the reference area to obtain the poses of all optimized historical submaps and all point cloud data of the reference area, until the reference area is mapped and the reference map is obtained based on all optimized historical submaps;
[0335] Step S2 shown in FIG13 specifically includes:
[0336] S21. Receive real-time scan data of the sub-area to be mapped obtained by scanning a laser radar device of a single robot during different time periods other than the first time period;
[0337] S22: Convert the received real-time scan data of the sub-region to be mapped into real-time point cloud data for insertion into the corresponding position of the sub-map being created, and obtain the completed real-time sub-map when the point cloud data of the preset frame is reached;
[0338] S23. Perform loop optimization on the real-time point cloud data and real-time submap of the sub-area to be mapped, and the reference point cloud data and reference submap, so as to obtain the poses of all optimized historical submaps and the poses of all point cloud data of the sub-area to be mapped, until mapping of the sub-area to be mapped is completed, and a sub-area map is generated by obtaining a reference map based on all optimized historical submaps.
[0339] In another preferred embodiment, the data processing involved in the laser mapping method is performed jointly by the local computing unit of the mobile single robot and the cloud or server;
[0340] Step S1 shown in FIG13 specifically includes:
[0341] S11, receiving real-time scanning data of a reference area obtained by scanning with a laser radar device of a single robot during a first period;
[0342] S12, converting the received real-time scan data of the reference area into real-time point cloud data to be inserted into the corresponding position of the sub-map being created, and obtaining the completed real-time sub-map when the point cloud data of the preset frame is reached;
[0343] S13, sending the real-time point cloud data and the real-time submap of the reference area to a cloud or server in real time, causing the cloud or server to perform loop optimization based on the real-time point cloud data and the real-time submap of the reference area and all historical submaps and all point cloud data of the reference area, thereby obtaining the poses of all optimized historical submaps and all point cloud data of the reference area, until mapping of the reference area is completed, and obtaining a reference map based on all optimized historical submaps;
[0344] Step S2 shown in FIG13 specifically includes:
[0345] S21. Receive real-time scan data of the sub-area to be mapped obtained by scanning a laser radar device of a single robot during different time periods other than the first time period;
[0346] S22: Convert the received real-time scan data of the sub-region to be mapped into real-time point cloud data for insertion into the corresponding position of the sub-map being created, and obtain the completed real-time sub-map when the point cloud data of the preset frame is reached;
[0347] S23, sending the real-time point cloud data and real-time submap of the reference area to a cloud or server in real time, so that the cloud or server performs loop optimization based on the real-time point cloud data and real-time submap of the sub-area to be mapped and the reference point cloud data and reference submap, thereby obtaining the poses of all optimized historical submaps and the poses of all point cloud data of the sub-area to be mapped, until mapping of the sub-area to be mapped is completed, and generating a sub-area map by obtaining a reference map based on all optimized historical submaps;
[0348] Among them, step S3 shown in Figure 13 is completed by the cloud or server.
[0349] In the above embodiment, optionally, the sub-area to be mapped includes one, and in step S2 shown in Figure 13, the sub-area to be mapped is mapped in real time in the second time period; wherein, the tag IDs of the data collected by the single robot for the reference area and the sub-area to be mapped at different time periods are different; or, the tag IDs of the data collected by the single robot for the reference area and the sub-area to be mapped at different time periods are the same, and all data IDs of the reference map are changed to other different tag IDs after generation.
[0350] The laser mapping methods provided by the above embodiments are described in further detail below with reference to FIG. 14 .
[0351] For ease of description, the following description assumes that the area to be mapped 100 includes a reference area 10 and a sub-area 20 to be mapped. Specifically, the area to be mapped 100 (scene) is divided into the reference area 10 and the sub-area 20 to be mapped, with the reference area 10 and the sub-area 20 to be mapped having a common area 30 (i.e., an overlapping area). Map block 1 shown in FIG14 corresponds to the reference map generated by a single robot 40 after mapping the reference area 10 in time period 1. Map block 2 shown in FIG14 corresponds to the sub-area map generated by a single robot 40 after mapping the sub-area 20 to be mapped in time period 2.
[0352] It is understandable that, in specific implementation, the base area 10 and the sub-area to be mapped 20 can be divided by setting virtual walls. For example, different virtual walls (such as color block labels, QR codes, etc.) can be set on the boundary line of the base area 10 and the sub-area to be mapped 20 to limit the area where the single robot 40 works at different time periods.
[0353] In the embodiment where the data processing involved in the laser mapping method is performed by the local computing unit of a single mobile robot 40 (hereinafter referred to as the local computing solution), the single robot 40 is a SLAM robot with sufficient computing power to perform the entire SLAM process, including point cloud data processing, sub-map creation and optimization, baseline map generation, and map fusion. In the embodiment where the data processing involved in the laser mapping method is performed jointly by the local computing unit of the single mobile robot and the cloud or server (hereinafter referred to as the cloud computing solution), the single robot 40 can be a single SLAM robot with general computing power, capable of performing point cloud data processing and sub-map creation. Operations such as point cloud data, sub-map optimization, baseline map generation, and map fusion can be performed by the cloud or server, while the single robot 40 is only responsible for collecting point cloud data and creating real-time sub-maps for the corresponding area, and sending the real-time point cloud data and real-time sub-maps of the baseline area and the sub-area to be mapped to the cloud or server for optimization.
[0354] Specifically, in steps S11 and S12 (including local computing solutions and cloud computing solutions), a single robot 40 first maps the reference area in a first period of time to obtain a reference map. During the process of the single robot 40 moving and mapping, the single robot 40 sends real-time scanning data obtained by scanning with a lidar device to a local computing unit (set inside the single robot 40). The local computing unit converts the real-time scanning data of the reference area into real-time point cloud data to be inserted (matched) into the corresponding (optimal) position of the sub-map being created. When a preset number of frames (for example, 50 frames) of point cloud data are reached, a completed real-time sub-map is obtained (such as sub-map 1-1, sub-map 1-2, sub-map 1-3, etc. in map block 1 as shown in FIG14 ).
[0355] Then, in step S13 (including local computing solutions and cloud computing solutions), the real-time point cloud data and real-time submap of the reference area 10 are loop-optimized with all historical submaps and all point cloud data of the reference area 10 through the local computing unit of the single robot 40 or the cloud / server, so as to obtain the poses of all historical submaps and all point cloud data of the reference area after optimization. It can be understood that since the map obtained by mapping the reference area 10 by the single robot 40 is used as the reference map (reference), in order to ensure the accuracy of the data of the reference map itself, it is necessary to perform loop optimization on all historical submaps and all point cloud data of the area to eliminate the accumulated error. Specifically, the loop optimization in step S13 can be performed in two ways. The specific execution process can refer to the relevant description above and is omitted here.
[0356] Furthermore, in step S13, after the mapping of the reference area 10 is completed (for example, the reference map is detected to be closed, that is, all posture data are detected), the reference map is obtained by the local computing unit of the single robot 40 or the cloud / server based on all optimized historical sub-maps (specifically through fusion means such as splicing).
[0357] It can be understood that in steps S21 to S22 (including local computing solutions and cloud computing solutions), the process of using the single robot 40 to perform real-time mapping of the sub-area to be mapped 20 in different time periods other than the first time period to obtain real-time point cloud data and real-time sub-maps is basically the same as the above-mentioned process of using the single robot 40 to perform real-time mapping of the reference area in the first time period to obtain real-time point cloud data and real-time sub-maps, and will not be repeated here.
[0358] Different from the real-time mapping of the reference area 10 by the single robot 40 during the first time period, after the single robot 40 performs real-time mapping of the sub-area 20 to be mapped in different time periods outside the first time period to obtain real-time point cloud data and real-time submap, loop closure optimization is not performed using all historical submaps and all point cloud data of the sub-area 20 to be mapped. Instead, loop closure optimization is performed on the real-time point cloud data and real-time submap of the sub-area 20 to be mapped and the reference point cloud data and reference submap in the constructed reference map.
[0359] Similarly, in step S23 (including local computing solutions and cloud computing solutions), the loop optimization can be performed in the following two ways:
[0360] Method 1: Perform loop closure detection on the currently received real-time point cloud data of the sub-area to be mapped and all the reference sub-maps of the reference map;
[0361] Method 2: Perform loop closure detection on the currently received real-time sub-map of the sub-area to be mapped and all the reference point cloud data of the reference map.
[0362] The specific implementation process of the two methods of loop optimization in this step can be referred to the previous related description content, and repeated description is omitted here.
[0363] It can be understood that in order to distinguish the data collected by the single robot 40 in different areas at different time periods, the data collected by the single robot 40 in different areas at different time periods are marked with independent IDs. For example, all data collected by the single robot 40 in the reference area 10 in the first time period are marked with ID1, while all data collected by the single robot 40 in the sub-area 20 to be mapped in the second time period are marked with ID2.
[0364] Furthermore, in step S23, after the mapping of the sub-region to be mapped is completed (for example, it is detected that the sub-region map is closed, that is, all the posture data are detected), the sub-region map is obtained based on all the historical sub-maps optimized based on the sub-region to be constructed 20 (specifically through splicing or other fusion methods).
[0365] Then, in step S3 shown in FIG13 , the local computing unit of the mobile single robot 40 or the cloud / server is used to splice the baseline map and the sub-area map to obtain a complete map of the area to be mapped, and all data IDs in the complete map are modified to the same ID, for example, all can be modified to ID3.
[0366] It can be seen that in this embodiment, in addition to using self-loop optimization (using all its own historical submaps or all point cloud data) in the mapping process of the reference area 10, self-loop optimization is not used in the mapping process of the sub-region to be mapped 20. Instead, the baseline map constructed in the reference area (using all baseline submaps or all baseline point cloud data) is used as a baseline (reference) to perform loop optimization on all historical submaps and all point cloud data of the sub-region to be mapped 20, so that the maps of the sub-region to be mapped 20 and the reference area 10 can be effectively associated, effectively reducing / eliminating the accumulated error of the map data between the sub-region to be mapped 20 and the reference area 10, thereby facilitating the final map fusion and improving the accuracy of the fused complete map.
[0367] Specifically, with continued reference to FIG14 , submaps 1-10, 1-11, and 1-12 included in map block 1 (corresponding to the base map of base area 10) overlap in the common area with submaps 2-10, 2-11, and 2-12 included in map block 2 (corresponding to the sub-area base map of the sub-area to be mapped 20). This embodiment utilizes this overlapping portion as a connection point between the sub-area to be mapped 20 and the base area 10 to optimize the data of the sub-area to be mapped, thereby reducing / eliminating the accumulated error in the map data between the sub-area to be mapped 20 and the base area 10.
[0368] It will be appreciated that the larger the common area 30 between the sub-region to be mapped 20 and the reference region 10, the higher the accuracy of loop closure optimization performed on all historical sub-maps and all point cloud data of the sub-region to be mapped 20 using the reference map of this embodiment, thereby better reducing the cumulative error in the map data between the sub-region to be mapped 20 and the reference region 10. Therefore, by setting up virtual walls in the sub-region to be mapped, the sub-region to be mapped is divided into the reference region and at least one sub-region to be mapped, and each sub-region to be mapped has as much common area as possible with the reference region.
[0369] For example, as shown in FIG15 , as an improvement to the solution shown in FIG14 , the area to be mapped 100 is divided as follows: the reference area 10 (map block 1) is located at the center of the area to be mapped 100, and then the sub-area to be mapped 20 (map block 2) surrounds the reference area 10, and there is a common area 30 (the shaded part in FIG15 ) between the sub-area to be mapped 20 and the reference area 10. By setting it in this way, there can be a common (overlapping) area around the sub-area to be mapped 20 and the reference area 10, which can effectively improve the accuracy of loop optimization of all historical sub-maps and all point cloud data of the sub-area to be mapped 20 using the reference map.
[0370] It can be understood that Figures 14 and 15 show that the area to be mapped is divided into a reference area 10 and a sub-area to be mapped 20, and correspondingly, a single robot 40 is used to map the reference area 10 and the sub-area to be mapped 20 at different time periods. However, the present invention is not limited to dividing the area to be mapped into a reference area 10 and a sub-area to be mapped 20. The sub-area to be mapped 20 can include at least one. Figures 14 and 15 only show an embodiment of one case.
[0371] As shown in FIG15 , a single robot 40 first maps the reference area 10 in time period 1 to obtain a reference map, and then the single robot 40 maps the sub-area 20 to be mapped in time period 2 to obtain a sub-area map. Furthermore, it is understood that in this case, in order to distinguish the data of the single robot 40 in the reference area 10 and the sub-area 20 to be mapped, the following means can be used:
[0372] Method 1: The tag IDs of the data collected by the single robot 40 in the reference area 10 and the sub-area to be mapped 20 are different. For example, the tag ID of the data collected by the single robot 40 in the reference area 10 is ID1, and the tag ID of the data collected by the single robot 40 in the reference area 10 is ID2 (in specific implementation, this can be changed by setting the internal part of the single robot 40).
[0373] Method 2: If the tag IDs of the data collected by the single robot 40 in the reference area 10 and the sub-area 20 to be mapped are identical, change all data IDs in the reference map. For example, if the tag ID of the data collected by the single robot 40 in the reference area 10 during time period 1 is ID1, when the reference map is finally obtained by moving the local computing unit of the single robot 40 or the cloud / server, the local computing unit of the single robot 40 or the cloud / server can be used to change all data IDs in the reference map from ID1 to ID2. The single robot 40 then continues to treat the tag ID of the data collected in the sub-area 20 to be mapped as ID1 during time period 2, thereby distinguishing it from all data IDs in the reference map.
[0374] In the above embodiment, optionally, the sub-areas to be mapped include at least two; in step S2 shown in Figure 13, the single robot performs real-time mapping on different sub-areas to be mapped in different time periods other than the first time period; wherein, the label IDs of the data collected by the single robot from the reference area and the sub-areas to be mapped in different time periods are different.
[0375] Specifically, referring to Figure 16 , for example, the area to be mapped 100 is divided into a reference area 10 and three sub-areas to be mapped (including a first sub-area to be mapped 21, a second sub-area to be mapped 22, and a third sub-area to be mapped 23). The first sub-area to be mapped 21 and the reference area 10 share a first common area 31, the second sub-area to be mapped 22 and the reference area 10 share a second common area 32, and the third sub-area to be mapped 23 and the reference area 10 share a third common area 33. A single robot 40 is responsible for mapping the reference area 10 during time period one, the first sub-area to be mapped 21 during time period two, the second sub-area to be mapped 22 during time period three, and the third sub-area to be mapped 23 during time period four. The map block 1 shown in Figure 16 corresponds to the baseline map generated by the single robot 40 after mapping the baseline area 10 in time period one, the map block 2 shown in Figure 16 corresponds to the first sub-area map generated by the single robot 40 after mapping the first sub-area to be mapped 21 in time period two, the map block 3 shown in Figure 16 corresponds to the second sub-area map generated by the single robot 40 after mapping the second sub-area to be mapped 22 in time period three, and the map block 4 shown in Figure 16 corresponds to the third sub-area map generated by the single robot 40 after mapping the third sub-area to be mapped 23 in time period four.
[0376] In this way, after the single robot 40 maps the reference area 10 in time period one to generate a reference map, the single robot 40 can perform real-time mapping of the first sub-area 21 to be mapped, the second sub-area 22 to be mapped, and the third sub-area 23 to be mapped for which it is responsible in time period two, time period three, and time period four, respectively, and send the collected real-time point cloud data and real-time sub-maps to the local computing unit or the cloud or server for loop optimization.
[0377] In addition, in order to distinguish the data collected by the single robot 40 at different time periods for the reference area 10 and the three sub-areas to be mapped (including the first sub-area to be mapped 21, the second sub-area to be mapped 22, and the third sub-area to be mapped 23), the data collected by the single robot 40 at different time periods for different areas are marked with independent tag IDs. For example, all data collected by the single robot 40 from the reference area 10 in time period 1 is marked with ID 1, all data collected by the single robot 40 from the first sub-area to be mapped 21 in time period 2 is marked with ID 2, all data collected by the single robot 40 from the second sub-area to be mapped 22 in time period 3 is marked with ID 3, and all data collected by the single robot 40 from the third sub-area to be mapped 23 in time period 4 is marked with ID 4. In this way, the local computing unit or the cloud / server can perform loop optimization on the data sent by the single robot at different time periods based on the different tag IDs.
[0378] In another preferred embodiment, the area to be mapped is a first area to be mapped, and the laser mapping method is further applicable to mapping an Nth area to be mapped, wherein the Nth area to be mapped includes an N-1th area to be mapped and at least one Nth sub-area to be mapped, and the Nth sub-area to be mapped and the N-1th area to be mapped have a common area; wherein N is an integer greater than or equal to 2; and the laser mapping method further comprises the steps of:
[0379] S4. Using the obtained complete map of the N-1th area to be mapped as a new reference map, wherein the N-1th area to be mapped constitutes the new reference area;
[0380] S5. Real-time mapping of the Nth sub-region to be mapped is performed at different time periods. The real-time point cloud data collected for the Nth sub-region to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame are loop-optimized with the reference point cloud data and the reference sub-map in the new reference map, thereby obtaining the poses of all optimized historical sub-maps and all point cloud data of the Nth sub-region to be mapped, until the single robot completes mapping of the Nth sub-region to be mapped to generate a map of the Nth sub-region.
[0381] S6. Splice the new reference map and the Nth sub-area map to obtain a complete map of the Nth area to be mapped, and modify all data IDs in the complete map of the Nth area to be mapped to the same ID.
[0382] The above preferred embodiment will be described in detail below with reference to FIG17 .
[0383] For the convenience of description, taking the embodiment shown in FIG. 15 as an example, the above-mentioned iterative scheme is executed on the basis of FIG. 15 , thereby obtaining the map shown in FIG. 17 (N=2).
[0384] Specifically, the complete map constructed based on the area to be mapped 100 (collectively referred to as the first area to be mapped 100 in this embodiment) shown in FIG15 is used as a new reference map (corresponding to map block 1 in FIG17 ). Accordingly, the first area to be mapped 100 becomes a new reference area 10'. Using the new reference area 10' as a reference (reference), the new area to be mapped can be mapped and optimized. In order to distinguish it from the previous embodiment, the new area to be mapped in this embodiment is collectively referred to as the second area to be mapped 200 (when N=2). The second area to be mapped 200 includes the new reference area 10' and the second sub-area to be mapped 20', and there is a common area 30' between the new reference area 10' and the second sub-area to be mapped 20'. The mobile robot 40 is placed in the second sub-area 20' to be mapped at different time periods, and the second sub-area 20' to be mapped is mapped in real time by the single robot 40. The local computing unit of the single robot 40 performs loop optimization on the real-time point cloud data collected from the second sub-area 20' to be mapped and the real-time sub-map created based on the point cloud data collected for a preset number of frames (for example, 50 frames) (if a cloud computing solution is adopted, it is sent to the cloud or server, the cloud or server) and the reference point cloud data and reference sub-map in the new reference map, so as to obtain the real-time point cloud data of the second sub-area 20' to be mapped. The poses of all historical submaps and all point cloud data of the second sub-area 20' to be mapped are obtained after optimization, until the single robot 40 completes mapping of the second sub-area 20' to be mapped to generate a second sub-area map (corresponding to map block 2 in Figure 17). Finally, the new baseline map and the second sub-area map are spliced together by the local computing unit of the single robot 40 or the cloud / server to obtain a complete map of the second area 200 to be mapped, and all data IDs in the complete map of the second area 200 to be mapped are modified to the same ID.
[0385] It can be understood that after obtaining the complete map of the second area to be mapped 200 shown in Figure 17, the complete map of the second area to be mapped 200 can be used as another new reference map. The second area to be mapped 200 becomes another new reference area. With this new reference area as a reference (reference), the new area to be mapped (i.e., the third area to be mapped, N=3) can be mapped and optimized to obtain a complete map of the third area to be mapped. Then, the complete map of the third area to be mapped can be used as another new reference map. The third area to be mapped becomes another new reference area. With this new reference area as a reference (reference), the new area to be mapped (i.e., the fourth area to be mapped, N=4) can be mapped and optimized to obtain a complete map of the fourth area to be mapped. The following loop iterates to obtain mapping of more areas.
[0386] It can be seen that, unlike the embodiment shown in FIG16 , by adopting the above-mentioned iterative scheme (e.g., FIG17 ), mapping of the area to be mapped is achieved by dividing the time periods, and after completing the mapping of the corresponding area to be mapped in different time periods, the obtained complete map is used as the new reference map for mapping in the next time period. This can continuously expand the scope of the reference area, thereby effectively improving the association between other areas and the reference area (the common area can be increased), and effectively eliminating the accumulated error of the map data between other areas and the reference area, thereby facilitating the final map fusion and improving the accuracy of the fused complete map.
[0387] In addition, by adopting the above-mentioned iterative scheme (such as Figure 17), the working environment can be freely expanded at any time according to actual task requirements (such as cleaning requirements) to build a corresponding map, thereby meeting the needs of the working environment in a larger scenario.
[0388] Furthermore, as an improvement to the above scheme, in step S3 shown in Figure 13, the loop optimization is the first loop optimization, and a second loop optimization is also included before completing the mapping of the sub-area to be mapped and generating the sub-area map. The second loop optimization can be performed in two ways. The specific implementation process of the two methods of the second loop optimization can refer to the previous related description content, and repeated description is omitted here.
[0389] Referring to FIG18 , an embodiment of the present invention provides a laser mapping system suitable for mapping an area to be mapped, wherein the area to be mapped includes a reference area and at least one sub-area to be mapped, wherein the sub-area to be mapped and the reference area have common areas. The laser mapping system includes a single robot 40 and a cloud / server 60 . The data collected by the single robot 40 for different areas are independently labeled with IDs.
[0390] The single robot 40 is used to map the reference area in a first period, and send the real-time point cloud data collected for the reference area and the real-time sub-map created based on the point cloud data collected in the preset frame to the cloud / server 60;
[0391] The cloud / server 60 constructs and optimizes the map based on the real-time point cloud data and real-time submap collected in the reference area to obtain a reference map; the reference map includes a plurality of reference submaps, each of which includes reference point cloud data of a preset frame;
[0392] The single robot 40 is further configured to perform real-time mapping of the sub-area to be mapped during different time periods other than the first time period, and to send the real-time point cloud data collected for the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected during the preset frame to the cloud / server 60;
[0393] The cloud or server 60 is configured to perform loop optimization on the received real-time point cloud data and real-time submap collected in the sub-region to be mapped, and the reference point cloud data and reference submap, thereby obtaining the poses of all historical sub-maps and all point cloud data of the sub-region to be mapped after optimization, and returning the poses to the single robot 40 accordingly, until the single robot completes mapping of the sub-region to be mapped to generate a sub-region map;
[0394] The cloud / server 60 is further configured to splice the reference map and the sub-region map to obtain a complete map of the area to be mapped, and modify all data IDs in the complete map to the same ID.
[0395] It can be understood that the specific working process of a laser mapping system provided by an embodiment of the present invention can refer to the corresponding content of the laser mapping method described above, and detailed description is omitted here.
[0396] The above disclosures are merely some preferred embodiments of the present invention, and certainly cannot be used to limit the scope of the present invention. A person skilled in the art will understand that all or part of the processes of the above embodiments and equivalent changes made in accordance with the claims of the present invention are still within the scope of the invention.
Claims
1. A laser mapping method, characterized in that: The method is suitable for mapping a region to be mapped by a robot, wherein the region to be mapped includes a reference region and at least one sub-region to be mapped, and there is a common area between the sub-region to be mapped and the reference region; the laser mapping method comprises the steps of: S1. Mapping the reference area to obtain a reference map; The reference map includes a plurality of reference sub-maps, each of which includes reference point cloud data of a preset frame; S2, mapping the sub-region to be mapped in real time, performing loop optimization on the real-time point cloud data collected for the sub-region to be mapped and the real-time sub-map created based on the point cloud data collected for the preset frame, the reference point cloud data and the reference sub-map, so as to obtain the poses of all historical sub-maps and the poses of all point cloud data of the sub-region to be mapped after optimization, until the mapping of the sub-region to be mapped is completed to generate a sub-region map; S3. Joining the reference map and the sub-region map to obtain a complete map of the area to be mapped.
2. The laser mapping method according to claim 1, characterized in that: In step S2, the loop optimization specifically includes: S21, matching the real-time point cloud data collected in the sub-region to be mapped with the reference sub-map to perform loop detection; S22, when the matching degree is greater than the preset threshold, it is determined that there is a loop and S23 is executed; otherwise, it returns to step S21; S23. Using the reference point cloud data and the reference submap as references, perform nonlinear least squares optimization processing on all historical submaps and all point cloud data of the sub-area to be mapped, so as to optimize the positions and poses of all historical submaps and all point cloud data of the sub-area to be mapped.
3. The laser mapping method according to claim 1, characterized in that: In step S2, the loop optimization specifically includes: S21, matching the real-time sub-map of the sub-area to be mapped with the reference point cloud data to perform loop detection; S22, when the matching degree is greater than the preset threshold, it is determined that there is a loop and S23 is executed; otherwise, it returns to step S21; S23. Using the reference point cloud data and the reference submap as references, perform nonlinear least squares optimization processing on all historical submaps and all point cloud data of the sub-area to be mapped, so as to optimize the positions and poses of all historical submaps and all point cloud data of the sub-area to be mapped.
4. The laser mapping method according to claim 1, characterized in that: The area to be mapped is a first area to be mapped, and the laser mapping method is also applicable to mapping an Nth area to be mapped, wherein the Nth area to be mapped includes an N-1th area to be mapped and at least one Nth sub-area to be mapped, and the Nth sub-area to be mapped has a common area with the N-1th area to be mapped; wherein N is an integer greater than or equal to 2; and the laser mapping method further comprises the steps of: The obtained complete map of the N-1th area to be mapped is used as a new reference map, and the N-1th area to be mapped constitutes a new reference area; Performing real-time mapping of the Nth sub-region to be mapped, loop-back optimization of the real-time point cloud data collected for the Nth sub-region to be mapped and the real-time sub-map created based on the point cloud data collected for the preset frame with the reference point cloud data and the reference sub-map in the new reference map, thereby obtaining the poses of all historical sub-maps and the poses of all point cloud data of the Nth sub-region to be mapped after optimization, until the mapping of the Nth sub-region to be mapped is completed to generate a map of the Nth sub-region; The new reference map and the Nth sub-area map are spliced together to obtain a complete map of the Nth area to be mapped.
5. The laser mapping method according to claim 1, characterized in that: In the step S2, the loop optimization is the first loop optimization, and before completing the mapping of the sub-region to be mapped and generating the sub-region map, it also includes: S201, performing a second loop closure optimization on all historical submaps and all point cloud data of the sub-region to be mapped, the reference point cloud data and the reference submap, so as to obtain the poses of all historical submaps and all point cloud data of the sub-region to be mapped after the second optimization; S202: Generate a map of the sub-region based on the positions and poses of all historical sub-maps after secondary optimization of the sub-region to be mapped and the positions and poses of all point cloud data.
6. The laser mapping method according to claim 5, characterized in that: The second loop optimization specifically includes: S2011, matching all point cloud data of the sub-area to be mapped with the reference sub-map to perform loop detection; S2012, when the matching degree is greater than the preset threshold, it is determined that a loop exists and S2013 is executed; otherwise, the process returns to step S2011; S2013. Using the reference point cloud data and reference submap as references, perform nonlinear least squares optimization processing on all historical submaps and all point cloud data of the sub-area to be mapped, so as to optimize the positions and poses of all historical submaps and all point cloud data of the sub-area to be mapped.
7. The laser mapping method according to claim 5, characterized in that: The second loop optimization specifically includes: S2011, matching all historical sub-maps of the sub-area to be mapped with the reference point cloud data to perform loop detection; S2012, when the matching degree is greater than the preset threshold, it is determined that a loop exists and S2013 is executed; otherwise, the process returns to step S2011; S2013. Using the reference point cloud data and reference submap as references, perform nonlinear least squares optimization processing on all historical submaps and all point cloud data of the sub-area to be mapped, so as to optimize the positions and poses of all historical submaps and all point cloud data of the sub-area to be mapped.
8. The laser mapping method according to claim 1, characterized in that: The status of the submap includes being created and being created. The number of frames of point cloud data in the submap being created is less than the preset frame, and the number of frames of point cloud data in the submap being created is equal to the preset frame; the historical submap is a submap being created.
9. The laser mapping method according to claim 1, characterized in that: By setting a virtual wall in the area to be mapped, the area to be mapped is divided into the reference area and at least one sub-area to be mapped, and each sub-area to be mapped has as many common areas as possible with the reference area; Arrange multiple QR code / color block labels on the public area, the length and width of each QR code / color block label are known values, and the distance between two adjacent QR code / color block labels is smaller than the body width of the robot. In the mapping process of the reference area and the sub-area to be mapped, obtain and calculate the pose of each QR code / color block label relative to the camera through the camera arranged on the robot, and calculate the coordinates of each QR code / color block label on the reference map / sub-area map and the marked corresponding virtual wall grid according to the pose of each QR code / color block label relative to the camera, and connect the marked virtual wall grids in sequence on the reference map / sub-area map to form a complete virtual wall on the public area.
10. The laser mapping method according to claim 1, characterized in that: The robot is a cleaning robot, and the posture includes XY axis coordinates and a direction θ in a two-dimensional space.
11. The laser mapping method according to claim 1, characterized in that: The robot includes a master robot and a slave robot, and the data collected by each robot has an independent tag ID; the steps S1 to S3 are specifically as follows: S1. Mapping the reference area by a master robot to obtain a reference map; the reference map includes a plurality of reference sub-maps, each of which includes reference point cloud data of a preset frame; S21, mapping the sub-area to be mapped in real time by the slave robot, and the slave robot sends the real-time point cloud data collected for the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame to the master robot; S22, the master robot performs loop optimization on the received real-time point cloud data and real-time submap collected in the sub-region to be mapped and the reference point cloud data and reference sub-map, so as to obtain the poses of all historical sub-maps and the poses of all point cloud data of the sub-region to be mapped after optimization and return them to the slave robot until the slave robot completes mapping of the sub-region to be mapped to generate a sub-region map; S3. The master robot splices the reference map and the sub-area map to obtain a complete map of the area to be mapped, and modifies all data IDs in the complete map to the same ID.
12. The laser mapping method according to claim 11, characterized in that: The sub-areas to be mapped include at least two, and each sub-area to be mapped corresponds to a slave robot; in the step S21, each of the slave robots simultaneously performs real-time mapping on the sub-areas to be mapped that it is responsible for; in the step S22, the master robot performs loop optimization on the data sent by different slave robots based on the tag ID and returns the optimized data to the corresponding slave robot.
13. The laser mapping method according to claim 11, characterized in that: The area to be mapped is a first area to be mapped, and the laser mapping method is also applicable to mapping an Nth area to be mapped, wherein the Nth area to be mapped includes an N-1th area to be mapped and at least one Nth sub-area to be mapped, and the Nth sub-area to be mapped has a common area with the N-1th area to be mapped; wherein N is an integer greater than or equal to 2; and the laser mapping method further comprises the steps of: The master robot uses the obtained complete map of the N-1th area to be mapped as a new reference map, and the N-1th area to be mapped constitutes a new reference area; The slave robot performs real-time mapping of the Nth sub-region to be mapped, and the slave robot sends the real-time point cloud data collected for the Nth sub-region to be mapped and the real-time sub-map created based on the point cloud data collected for the preset frame to the master robot; The master robot performs loop optimization on the received real-time point cloud data and real-time submap collected in the Nth sub-region to be mapped and the reference point cloud data and reference submap in the new reference map, so as to obtain the poses of all historical sub-maps and the poses of all point cloud data after optimization in the Nth sub-region to be mapped, and returns them to the slave robot accordingly, until the slave robot completes mapping of the Nth sub-region to be mapped to generate a map of the Nth sub-region; The master robot splices the new reference map and the Nth sub-area map to obtain a complete map of the Nth area to be mapped, and modifies all data IDs in the complete map of the Nth area to be mapped to the same ID.
14. The laser mapping method according to claim 1, characterized in that: The reference area and the sub-area to be mapped are correspondingly provided with robots, and the data collected by the robots from different areas are marked with independent IDs; the steps S1 to S3 are specifically as follows: S11, mapping the reference area by the robot on the reference area, and sending the real-time point cloud data collected for the reference area and the real-time sub-map created based on the point cloud data collected for the preset frame to the cloud end or the server; S12, the cloud or server constructs and optimizes a real-time sub-map based on the real-time point cloud data collected in the reference area and sent by the robot on the reference area and the point cloud data collected in the preset frame, thereby obtaining a reference map; the reference map includes a plurality of reference sub-maps, each of which includes reference point cloud data of the preset frame; S21, mapping the corresponding sub-area to be mapped in real time by the robot on the sub-area to be mapped, and the robot on the sub-area to be mapped sends the real-time point cloud data collected for the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame to the cloud end or the server end; S22, the cloud or server performs loop optimization on the received real-time point cloud data collected in the sub-region to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame, and the reference point cloud data and the reference sub-map, so as to obtain the poses of all historical sub-maps and all point cloud data after optimization in the sub-region to be mapped, and return them to the robot in the sub-region to be mapped accordingly, until the robot in the sub-region to be mapped completes the mapping of the sub-region to be mapped to generate a sub-region map; S3. The reference map and the sub-area map are spliced together through the cloud or the server to obtain a complete map of the area to be mapped, and all data IDs in the complete map are modified to the same ID.
15. The laser mapping method according to claim 14, characterized in that: The sub-areas to be mapped include at least two, and each sub-area to be mapped corresponds to a robot; in the step S21, each robot on the sub-area to be mapped simultaneously performs real-time mapping on the sub-area to be mapped that it is responsible for; in the step S22, the cloud or server performs loop optimization on the data sent by different robots based on the tag ID and returns the optimized data to the corresponding robot.
16. The laser mapping method according to claim 14 or 15, characterized in that: The area to be mapped is a first area to be mapped, and the laser mapping method is also applicable to mapping an Nth area to be mapped, wherein the Nth area to be mapped includes an N-1th area to be mapped and at least one Nth sub-area to be mapped, and the Nth sub-area to be mapped has a common area with the N-1th area to be mapped; wherein N is an integer greater than or equal to 2; and the laser mapping method further comprises the steps of: The obtained complete map of the N-1th area to be mapped is used as a new reference map through the cloud or the server, and the N-1th area to be mapped constitutes a new reference area; The robot performs real-time mapping of the Nth sub-region to be mapped, and the robot sends the real-time point cloud data collected for the Nth sub-region to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame to the cloud end or the server end; The cloud or server performs loop optimization on the received real-time point cloud data and real-time submap collected in the Nth sub-region to be mapped and the reference point cloud data and reference submap in the new reference map, so as to obtain the poses of all historical sub-maps and the poses of all point cloud data after optimization in the Nth sub-region to be mapped and return them to the robot accordingly, until the robot completes mapping of the Nth sub-region to be mapped to generate a map of the Nth sub-region; The new reference map and the Nth sub-area map are spliced together through the cloud or the server to obtain a complete map of the Nth area to be mapped, and all data IDs in the complete map of the Nth area to be mapped are modified to the same ID.
17. The laser mapping method according to claim 1, characterized in that: The robot is a single robot, and the single robot maps the reference area and the sub-area to be mapped at different time periods; the steps S1 to S3 are specifically as follows: S1. Mapping the reference area in a first period of time by the single robot to obtain a reference map; the reference map includes a plurality of reference sub-maps, each of which includes reference point cloud data of a preset frame; S2, performing real-time mapping of the sub-region to be mapped by the single robot in other different time periods outside the first time period, performing loop optimization on the real-time point cloud data collected by the single robot for the sub-region to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame, the reference point cloud data and the reference sub-map, so as to obtain the poses of all optimized historical sub-maps of the sub-region to be mapped and the poses of all point cloud data, until the mapping of the sub-region to be mapped is completed to generate a sub-region map; S3. Joining the reference map and the sub-region map to obtain a complete map of the area to be mapped.
18. The laser mapping method according to claim 17, characterized in that: The data processing involved in the laser mapping method is performed in the local computing unit of the single robot; The step S1 specifically includes: S11, real-time scanning data of the reference area obtained by scanning with a laser radar device of a single robot during the first period; S12, converting the real-time scanning data of the reference area into real-time point cloud data to insert into the corresponding position of the sub-map being created, and obtaining the created real-time sub-map when the point cloud data of the preset frame is reached; S13, performing loop optimization based on the real-time point cloud data and real-time submap of the reference area and all historical submaps and all point cloud data of the reference area to obtain the poses of all optimized historical submaps and all point cloud data of the reference area, until the reference area is mapped and the reference map is obtained based on all optimized historical submaps; The step S2 specifically includes: S21, real-time scanning data of the sub-area to be mapped obtained by scanning with a laser radar device of a single robot in different time periods other than the first time period; S22, converting the real-time scan data of the sub-region to be mapped into real-time point cloud data to insert into the corresponding position of the sub-map being created, and obtaining a completed real-time sub-map when the point cloud data of a preset frame is reached; S23, loop-back optimization is performed on the real-time point cloud data and the real-time submap of the sub-area to be mapped and the benchmark point cloud data and the benchmark sub-map, so as to obtain the poses of all optimized historical sub-maps of the sub-area to be mapped and the poses of all point cloud data, until the mapping of the sub-area to be mapped is completed and the benchmark map is obtained based on all optimized historical sub-maps to generate the sub-area map.
19. The laser mapping method according to claim 17, characterized in that: The data processing involved in the laser mapping method is completed jointly by the local computing unit of a single robot and the cloud or server; The step S1 specifically includes: S11, real-time scanning data of the reference area obtained by scanning with a laser radar device of a single robot during the first period; S12, converting the real-time scanning data of the reference area into real-time point cloud data to insert into the corresponding position of the sub-map being created, and obtaining the created real-time sub-map when the point cloud data of the preset frame is reached; S13, sending the real-time point cloud data and the real-time submap of the reference area to the cloud or server in real time, so that the cloud or server performs loop optimization based on the real-time point cloud data and the real-time submap of the reference area and all historical submaps and all point cloud data of the reference area, and obtains the poses of all optimized historical submaps and all point cloud data of the reference area, until the reference area is mapped and the reference map is obtained based on all optimized historical submaps; The step S2 specifically includes: S21, real-time scanning data of the sub-area to be mapped obtained by scanning with a laser radar device of a single robot in different time periods other than the first time period; S22, converting the real-time scan data of the sub-region to be mapped into real-time point cloud data to insert into the corresponding position of the sub-map being created, and obtaining a completed real-time sub-map when the point cloud data of a preset frame is reached; S23, sending the real-time point cloud data and the real-time submap of the reference area to the cloud or server in real time, so that the cloud or server performs loop optimization based on the real-time point cloud data and the real-time submap of the sub-area to be mapped and the reference point cloud data and the reference sub-map, so as to obtain the poses of all optimized historical sub-maps of the sub-area to be mapped and the poses of all point cloud data, until the sub-area map is generated by obtaining the reference map based on all optimized historical sub-maps after the mapping of the sub-area to be mapped is completed; Wherein, the step S3 is completed by the cloud or server.
20. The laser mapping method according to any one of claims 17 to 19, characterized in that: The sub-area to be mapped includes one, and in the step S2, the sub-area to be mapped is mapped in real time by the single robot in a second time period; wherein the marking IDs of the data collected by the single robot from the reference area and the sub-area to be mapped at different time periods are different; or, the marking IDs of the data collected by the single robot from the reference area and the sub-area to be mapped at different time periods are the same, and all data IDs of the reference map after generation are changed to other different marking IDs.
21. The laser mapping method according to any one of claims 17 to 19, characterized in that: The sub-areas to be mapped include at least two. In the step S2, the single robot performs real-time mapping on different sub-areas to be mapped in different time periods other than the first time period; wherein the marking IDs of the data collected by the single robot from the reference area and the sub-areas to be mapped in different time periods are different.
22. The laser mapping method according to claim 17, characterized in that: The area to be mapped is a first area to be mapped, and the laser mapping method is also applicable to mapping an Nth area to be mapped, wherein the Nth area to be mapped includes an N-1th area to be mapped and at least one Nth sub-area to be mapped, and the Nth sub-area to be mapped has a common area with the N-1th area to be mapped; wherein N is an integer greater than or equal to 2; and the laser mapping method further comprises the steps of: S4, taking the obtained complete map of the N-1th area to be mapped as a new reference map, wherein the N-1th area to be mapped constitutes a new reference area; S5, using the single robot to perform real-time mapping of the Nth sub-region to be mapped at different time periods, and performing loop optimization on the real-time point cloud data collected for the Nth sub-region to be mapped and the real-time sub-map created based on the point cloud data collected for the preset frame and the reference point cloud data and the reference sub-map in the new reference map, so as to obtain the poses of all historical sub-maps and the poses of all point cloud data of the Nth sub-region to be mapped after optimization, until the robot completes the mapping of the Nth sub-region to be mapped to generate a map of the Nth sub-region; S6. Splice the new reference map and the Nth sub-area map to obtain a complete map of the Nth area to be mapped, and modify all data IDs in the complete map of the Nth area to be mapped to the same ID.
23. A laser mapping device, characterized in that: Suitable for mapping a region to be mapped by a robot, the region to be mapped comprising a reference region and at least one sub-region to be mapped, wherein the sub-region to be mapped has a common area with the reference region; The laser mapping device comprises: A reference map construction module, used to construct a map of the reference area to obtain a reference map; the reference map includes a plurality of reference sub-maps, each of which includes reference point cloud data of a preset frame; A sub-region map construction module is used to perform real-time mapping of the sub-region to be mapped, and loop-optimize the real-time point cloud data collected for the sub-region to be mapped and the real-time sub-map created based on the point cloud data collected for the preset frame with the reference point cloud data and the reference sub-map, so as to obtain the poses of all historical sub-maps and all point cloud data of the sub-region to be mapped after optimization, until the mapping of the sub-region to be mapped is completed to generate a sub-region map; The complete map generation module is used to splice the reference map and the sub-area map to obtain a complete map of the area to be mapped.
24. A laser mapping system, characterized in that: It is suitable for mapping a region to be mapped, wherein the region to be mapped includes a reference region and at least one sub-region to be mapped, and there is a common area between the sub-region to be mapped and the reference region; the laser mapping system includes a master robot and a slave robot, and the data collected by each robot has an independent tag ID; wherein: The master robot is used to map the reference area to obtain a reference map; the reference map includes a plurality of reference sub-maps, each of which includes reference point cloud data of a preset number of frames; The slave robot is used to map the sub-area to be mapped in real time, and the slave robot sends the real-time point cloud data collected for the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected for a preset number of frames to the master robot; The master robot is further used to perform loop optimization on the received real-time point cloud data and real-time submap collected in the sub-region to be mapped and the reference point cloud data and reference sub-map, so as to obtain the poses of all historical sub-maps and the poses of all point cloud data of the sub-region to be mapped after optimization and return them to the slave robot until the slave robot completes mapping of the sub-region to be mapped to generate a sub-region map; The master robot is further used to splice the reference map and the sub-area map to obtain a complete map of the area to be mapped, and to modify all data IDs in the complete map to the same ID.
25. A laser mapping system, characterized in that: Applicable to mapping an area to be mapped, the area to be mapped includes a base area and at least one sub-area to be mapped, and the sub-area to be mapped has a common area with the base area; the map construction system includes at least two robots and a cloud or server, and the data collected by the robots from different areas are marked with independent IDs; wherein: The robot placed on the reference area is used to map the reference area. The robot on the reference area sends the real-time point cloud data collected for the reference area and the real-time sub-map created based on the point cloud data collected for the preset frame to the cloud or server. The cloud or server constructs and optimizes a map based on the real-time point cloud data collected by the robot on the reference area and the real-time sub-map created based on the point cloud data collected for the preset frame, thereby obtaining a reference map; the reference map includes a plurality of reference sub-maps, each of which includes reference point cloud data for the preset frame; The robot placed on the sub-area to be mapped is used to map the corresponding sub-area to be mapped in real time. The robot on the sub-area to be mapped sends the real-time point cloud data collected for the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame to the cloud end or the server end; The cloud or server is used to perform loop optimization on the received real-time point cloud data collected in the sub-region to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame with the reference point cloud data and the reference sub-map, so as to obtain the poses of all historical sub-maps and the poses of all point cloud data after optimization in the sub-region to be mapped, and return them to the robot on the sub-region to be mapped accordingly, until the robot on the sub-region to be mapped completes the mapping of the sub-region to be mapped to generate a sub-region map; The cloud or server is further used to splice the reference map and the sub-area map to obtain a complete map of the area to be mapped, and to modify all data IDs in the complete map to the same ID.
26. A laser mapping system, characterized in that: It is suitable for mapping the area to be mapped, the area to be mapped includes a reference area and at least one sub-area to be mapped, and there is a common area between the sub-area to be mapped and the reference area; the laser mapping system includes a single robot and a cloud / server, and the data collected by the single robot for different areas are marked with independent IDs; wherein: The single robot is used to map the reference area in a first period of time, and send the real-time point cloud data collected for the reference area and the real-time sub-map created based on the point cloud data collected for the preset frame to the cloud or server; The cloud or server constructs and optimizes the map based on the real-time point cloud data and the real-time submap collected in the reference area to obtain a reference map; the reference map includes a plurality of reference submaps, each of which includes reference point cloud data of a preset frame; The single robot is further used to perform real-time mapping of the sub-area to be mapped in different time periods other than the first time period, and send the real-time point cloud data collected for the sub-area to be mapped and the real-time sub-map created based on the point cloud data collected in the preset frame to the cloud end or the server end; The cloud or server is used to perform loop optimization on the received real-time point cloud data and real-time submap collected in the sub-region to be mapped and the reference point cloud data and reference submap, so as to obtain the poses of all historical sub-maps and the poses of all point cloud data after optimization in the sub-region to be mapped and return them to the single robot accordingly, until the single robot completes mapping of the sub-region to be mapped to generate a sub-region map; The cloud or server is further used to splice the reference map and the sub-area map to obtain a complete map of the area to be mapped, and to modify all data IDs in the complete map to the same ID.
27. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the laser mapping method as claimed in any one of claims 1 to 10.
28. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the laser mapping method according to any one of claims 1 to 10.