Map update method, storage medium, electronic device, and program product

By using LiDAR to update the grid map on self-moving devices, the problem of inaccurate positioning caused by temporary obstacles and environmental changes is solved, improving positioning accuracy and robustness, and reducing hardware and maintenance costs.

CN119509519BActive Publication Date: 2025-12-16ZHEJIANG ZHIDING ROBOT CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411692369.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-12-16
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

Existing technologies for positioning mobile devices suffer from inaccurate map matching due to temporary obstacles or environmental changes, and the introduction of additional sensors or periodic map reconstruction increases hardware and maintenance costs.

Method used

By updating the grid map using scanning data collected by LiDAR during the movement of the self-moving device, the pose is determined, and the occupied, idle and unknown areas of the grid map are dynamically updated based on the laser emission point and the grid state mapped by the point cloud, thereby improving the positioning accuracy and robustness.

Benefits of technology

Maintaining map consistency with the actual environment improves positioning accuracy and reliability, reduces hardware and maintenance costs, and adapts to complex or changing environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119509519B_ABST
    Figure CN119509519B_ABST
Patent Text Reader

Abstract

The application provides a map updating method, a storage medium, an electronic device and a program product, and relates to the technical field of positioning. The map updating method comprises the following steps: determining a first pose of a self-moving device in the process of moving of the self-moving device; acquiring first scanning data collected by a laser radar under the first pose, and mapping laser information contained in the first scanning data to a first grid map, the laser information comprising a laser emission point and a laser point; and updating a grid state of the first grid map based on the positions of the laser emission point and the laser point in the first grid map, to obtain a second grid map. The application solves the problem of inaccurate first grid map matching positioning caused by temporary obstacle shielding or environmental changes, and improves the positioning accuracy and reliability of the self-moving device in a dynamic environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of positioning technology, specifically to a map update method, storage medium, electronic device, and program product. Background Technology

[0002] Self-moving devices typically rely on matching 2D laser scanning with a 2D planar map to determine their pose. However, when temporary obstacles appear in the working environment, the LiDAR may be obstructed, making it impossible to accurately detect obstacle information. In addition, if the working environment changes significantly, the original map may no longer be accurate, resulting in poor matching and making it impossible to determine whether the self-moving device's position is correct.

[0003] Currently, the common approach to solving these problems is to introduce additional sensors, such as cameras, to improve positioning accuracy, or to periodically reconstruct the map to reduce positioning discrepancies. While these methods are effective, they also increase hardware and map maintenance costs. Summary of the Invention

[0004] In view of this, embodiments of this application provide a map updating method, a storage medium, an electronic device, and a program product.

[0005] In a first aspect, one embodiment of this application provides a map updating method applied to a self-moving device equipped with a lidar. The method includes: determining a first pose of the self-moving device during its movement; acquiring first scan data collected by the lidar in the first pose, and mapping the laser information contained in the first scan data to a first grid map, wherein the laser information includes a laser emission point and a laser point; and updating the grid state of the first grid map based on the position of the laser emission point and the laser point in the first grid map to obtain a second grid map.

[0006] In conjunction with the first aspect, in some implementations of the first aspect, each grid in the first grid map is preset with a target hit count value by a laser beam; based on the laser emission point and the position of the laser point in the first grid map, the grid state of the first grid map is updated to obtain a second grid map, including: for each grid in the first grid map, each time the grid is crossed by the laser emission point and the straight line containing the laser point, the target hit count value corresponding to the grid is decremented by one; each time the grid contains a laser point, the target hit count value corresponding to the grid is incremented by one, finally obtaining the actual hit count value of the grid after the update; if the actual hit count value of the grid after the update is greater than a first preset threshold, the grid is determined to be an occupied grid; if the actual hit count value of the grid after the update is less than a second preset threshold, the grid is determined to be an idle grid; if the actual hit count value of the grid after the update is between the first preset threshold and the second preset threshold, the grid is determined to be an unknown grid; based on the redefined grid state, the current grid state of the grids in the first grid map is updated to obtain the second grid map.

[0007] In conjunction with the first aspect, in some implementations of the first aspect, the target count value corresponding to the occupied grid in the first grid map is greater than the target count value corresponding to the unknown grid in the first grid map; the target count value corresponding to the unknown grid in the first grid map is greater than the target count value corresponding to the free grid in the first grid map; the first preset threshold is less than the target count value corresponding to the occupied grid in the first grid map, and the second preset threshold is less than or equal to the target count value corresponding to the unknown grid in the first grid map.

[0008] In conjunction with the first aspect, in some implementations of the first aspect, determining the first pose of the self-moving device includes: determining the second pose of the self-moving device before it moves; determining the third pose of the self-moving device based on the second pose and odometer data of the self-moving device during the movement; performing a reliability check on the third pose, and determining the first pose of the self-moving device based on the check result and the third pose.

[0009] In conjunction with the first aspect, in some implementations of the first aspect, the reliability of the third pose is verified, and the first pose of the self-moving device is determined based on the verification result and the third pose. This includes: acquiring the second scanning data collected by the LiDAR in the third pose; matching the second scanning data with the first grid map to verify the reliability of the third pose; if the verification result indicates that the second scanning data and the first grid map are successfully matched, then the third pose is calibrated based on the transformation parameters when the matching is successful to obtain the first pose of the self-moving device.

[0010] In conjunction with the first aspect, in some implementations of the first aspect, matching the second scan data with the first grid map includes: matching the point cloud in the second scan data with the first grid map to obtain a first number of successfully matched point clouds and a second number of point clouds falling into unknown grids in the first grid map; using the second number as a penalty term to adjust the first number to obtain a third number; calculating the ratio of the third number to the total number of point clouds contained in the second scan data to obtain the matching degree between the second scan data and the first grid map; and determining whether the second scan data and the first grid map are successfully matched based on the matching degree between the second scan data and the first grid map.

[0011] In conjunction with the first aspect, in some implementations of the first aspect, determining whether the second scan data and the first grid map are successfully matched based on the matching degree between the second scan data and the first grid map includes: if the matching degree between the second scan data and the first grid map is greater than a third preset threshold, then acquiring multiple scan data that are sequentially related to the second scan data in the third pose; if the matching degree between the multiple sequentially related scan data and the first grid map is greater than the third preset threshold, then determining that the second scan data and the first grid map are successfully matched.

[0012] In conjunction with the first aspect, in some implementations of the first aspect, determining the second pose of the self-moving device before movement includes: determining the fourth pose of the self-moving device before movement, where the fourth pose represents the initial estimated pose of the self-moving device before movement; searching within a first target range centered on the fourth pose to obtain multiple fifth poses; calculating the pose score of each fifth pose for each fifth pose; and calibrating the fifth pose with the highest pose score to obtain the second pose of the self-moving device before movement.

[0013] In conjunction with the first aspect, in some implementations of the first aspect, calculating the pose score of the fifth pose includes: determining the gradient grid map corresponding to the first grid map; acquiring the third scan data collected by the LiDAR in the fifth pose, and mapping the point cloud in the third scan data to the gradient grid map to obtain the target distance value of the point cloud in the third scan data in the gradient grid map; determining the score of each point cloud in the third scan data based on the target distance value and the target mapping relationship between the distance value and the score; and determining the sum of the scores of the point cloud in the third scan data as the pose score of the fifth pose.

[0014] In conjunction with the first aspect, in some implementations of the first aspect, determining the gradient grid map corresponding to the first grid map includes: adding occupied grids in the first grid map to a queue to be traversed, and setting the distance value of the occupied grids to zero; if the queue to be traversed is not empty, performing the following traversal operation: retrieving the head grid from the queue to be traversed, calculating the distance values ​​between the adjacent grids of the head grid and the source grid of the head grid, where the source grid represents the occupied grid closest to the head grid; if the distance value is less than a fourth preset threshold, and the distance... If the distance value is less than the current distance value of the adjacent grid, then update the current distance value of the adjacent grid to the distance value, set the source grid of the first grid as the source grid of the adjacent grid, and add the adjacent grid to the queue to be traversed; otherwise, remove the first grid from the queue to be traversed; repeat the traversal operation until the queue to be traversed is empty, and obtain the distance value between each grid in the first grid map and its respective source grid; based on the distance value between each grid in the first grid map and its respective source grid, generate the gradient grid map corresponding to the first grid map.

[0015] Secondly, one embodiment of this application provides a map updating device applied to a self-moving device equipped with a lidar. The device includes: a determining module for determining a first pose of the self-moving device during its movement; a mapping module for acquiring first scan data collected by the lidar in the first pose and mapping the laser information contained in the first scan data to a first grid map, wherein the laser information includes a laser emission point and a laser point; and an updating module for updating the grid state of the first grid map based on the position of the laser emission point and the laser point in the first grid map to obtain a second grid map.

[0016] Thirdly, one embodiment of this application provides a computer-readable storage medium storing a computer program for performing the map updating method described in the first aspect.

[0017] Fourthly, one embodiment of this application provides an electronic device, the electronic device comprising: a processor; a memory for storing processor-executable instructions; the processor being configured to perform the map update method described in the first aspect.

[0018] Fifthly, one embodiment of this application provides a computer program product including instructions that, when executed on an electronic device, cause the electronic device to implement the map update method described in the first aspect.

[0019] In this application, by determining the first pose during the movement of the self-moving device and updating the first grid map using the first scan data collected by the LiDAR, the consistency between the second grid map and the actual environment can be maintained. This solves the problem of inaccurate matching and positioning of the first grid map caused by temporary obstacle occlusion or environmental changes, improving the positioning accuracy and reliability of the self-moving device in dynamic environments. This results in better adaptability and robustness of the self-moving device in complex or changing environments. Furthermore, the solution in this embodiment does not require additional sensors or periodic map reconstruction, thus reducing hardware and map maintenance costs. Attached Figure Description

[0020] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0021] Figure 1 The diagram shown is a schematic flowchart of a map update method provided in an embodiment of this application.

[0022] Figure 2 The diagram shown is a schematic representation of the process of updating the grid state of the first grid map to obtain the second grid map according to an embodiment of this application.

[0023] Figure 3 The diagram shown is a comparison of the map before and after the update according to an embodiment of this application.

[0024] Figure 4 The image shown is a schematic diagram of the updated map provided in one embodiment of this application.

[0025] Figure 5 The above is a flowchart illustrating the process of determining the first pose of a self-moving device according to an embodiment of this application.

[0026] Figure 6 The diagram shown is a flowchart illustrating the process of determining the first pose of a self-moving device according to another embodiment of this application.

[0027] Figure 7 The diagram shown is a schematic representation of a process for matching second scan data with a first grid map according to an embodiment of this application.

[0028] Figure 8 The diagram shown is a flowchart illustrating the process of determining the second pose of a self-moving device before movement, according to an embodiment of this application.

[0029] Figure 9The diagram shown is a flowchart illustrating the calculation of the pose score of the fifth pose according to an embodiment of this application.

[0030] Figure 10 The image shown is a schematic diagram of a gradient grid map provided in an embodiment of this application.

[0031] Figure 11 The diagram shown is a schematic diagram of the structure of a map updating device provided in an embodiment of this application.

[0032] Figure 12 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application. Detailed Implementation

[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] Figure 1 The diagram shown is a schematic flowchart of a map update method provided in an embodiment of this application. Exemplarily, this method is applied to a self-moving device deployed with LiDAR. Figure 1 As shown, the method includes the following steps.

[0035] Step S110: During the movement of the self-moving device, determine the first pose of the self-moving device.

[0036] Specifically, the first pose refers to the pose at a specific location that meets the target accuracy threshold. It is understandable that the accuracy of the first pose directly affects the matching degree between the first scan data and the first grid map, thus affecting the effectiveness of the first grid map restoration. In other words, if the first pose is inaccurate, the second scan data may not be correctly mapped onto the existing first grid map, causing a deviation in the first grid map update and thus failing to accurately reflect changes in the actual environment.

[0037] In some embodiments, when the self-moving device is in motion, it acquires an initial pose using its onboard sensors, then performs an environmental scan using LiDAR, matching the scanned point cloud data with a pre-built environmental map. This environmental map can be local or global. When the deviation between the point cloud data and the corresponding feature points on the environmental map is within a preset range, the initial pose of the self-moving device is considered to have met the target accuracy threshold, and this initial pose is considered the first pose. Alternatively, if the initial pose does not meet the target accuracy threshold, it is adjusted to obtain the first pose.

[0038] Step S120: Obtain the first scan data collected by the lidar in the first pose, and map the laser information contained in the first scan data onto the first grid map.

[0039] The first grid map is a map to be updated. Each grid records information about obstacles scanned by the LiDAR, and these obstacles constitute the drivable areas in the first grid map.

[0040] Laser information includes the laser emission point and the laser point. The laser emission point refers to the starting position of the laser beam emitted by the lidar, while the laser point refers to the measurement point formed after the laser beam encounters an obstacle.

[0041] In some embodiments, based on the first pose and scanning angle of the lidar, the coordinates of each laser emission point and laser point are transformed into coordinates in the coordinate system of the self-moving device. Then, based on the grid size, the coordinates in the coordinate system of the self-moving device are transformed into grid indices in the first grid map, thus realizing the mapping of the laser information contained in the first scan data to the first grid map.

[0042] Step S130: Based on the laser emission point and the position of the laser point in the first grid map, update the grid state of the first grid map to obtain the second grid map.

[0043] Raster status refers to the attribute of each raster in the first raster map, which describes the spatial characteristics of the raster, such as occupied, free, or unknown.

[0044] For example, if the LiDAR detects an obstacle, and the corresponding grid cell in the first grid map was originally marked as an empty grid cell, then in the second grid map, this location will be updated to an occupied grid cell, indicating the presence of an obstacle. This update process iterates through all LiDAR emission points and LiDAR points, marking the corresponding grid cell in the first grid map for each detected obstacle location, thus obtaining the updated second grid map.

[0045] After obtaining the second grid map, the map is saved in the self-moving device so that the self-moving device can load the second grid map in a timely manner after powering on, ensuring long-term stable and reliable positioning.

[0046] In this embodiment, by determining the first pose during the movement of the self-moving device and updating the first grid map using the first scan data collected by the LiDAR, the consistency between the second grid map and the actual environment can be maintained. This solves the problem of inaccurate matching and positioning of the first grid map caused by temporary obstacle occlusion or environmental changes, improving the positioning accuracy and reliability of the self-moving device in dynamic environments. This results in better adaptability and robustness of the self-moving device in complex or changing environments. Furthermore, the solution in this embodiment does not require additional sensors or periodic map reconstruction, thus reducing hardware and map maintenance costs.

[0047] Figure 2 The diagram illustrates a process for updating the raster state of a first raster map to obtain a second raster map, according to an embodiment of this application. Figure 1 Extending from the illustrated embodiment Figure 2 The illustrated embodiment will be described in detail below. Figure 2 The illustrated embodiments and Figure 1 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.

[0048] First, in this embodiment, the grid state of the first grid map includes occupied grids, idle grids, and unknown grids. Occupied grids represent obstacle areas, i.e., drivable areas; idle grids represent drivable areas; and unknown grids represent unknown areas. Additionally, each grid in the first grid map has a preset target hit count value. This target hit count value is an initial value used for judgment during subsequent grid state updates.

[0049] like Figure 2 As shown, based on the laser emission point and the position of the laser point in the first grid map, the grid state of the first grid map is updated to obtain the second grid map, including the following steps.

[0050] Step S210: For each grid in the first grid map, the target count value corresponding to the grid is decremented by one each time the grid is crossed by the laser emission point and the straight line containing the laser point; the target count value corresponding to the grid is incremented by one each time the grid contains a laser point, and finally the actual count value of the grid after the update is obtained.

[0051] Understandably, grids traversed by the laser emission point and the line containing the laser point are not expected to be hit by the laser beam; therefore, the target count value for such grids is decremented by one. Conversely, if a grid is actually hit by the laser, meaning the grid contains a laser point, it indicates that the laser beam has indeed detected an obstacle at that location, and therefore, the target count value for that grid is incremented by one.

[0052] It is understood that the first scan data collected by the lidar in this embodiment contains multiple sets of scan data. Therefore, the same grid may be hit by multiple laser beams or penetrated by multiple laser beams. Finally, for each grid, all laser beams (i.e., the laser emission point and the line where the laser point is located) and laser points are traversed, and the target count value is added or subtracted to obtain the actual count value corresponding to each grid.

[0053] Step S220: If the actual number of times the grid is updated is greater than the first preset threshold, then the grid is determined to be an occupied grid.

[0054] Step S230: If the actual number of times the grid is updated is less than the second preset threshold, then the grid is determined to be an idle grid.

[0055] Step S240: If the actual number of times the grid is updated is between the first preset threshold and the second preset threshold, then the grid is determined to be an unknown grid.

[0056] In this embodiment, the first preset threshold is greater than the second preset threshold.

[0057] For example, assume that the first grid map contains grids A, B, and C. Grid A is an occupied grid with a preset target count value of 'a'; grid B is an idle grid with a preset target count value of 'b'; and grid C is an unknown grid with a preset target count value of 'c'. Further, assume that grid A is crossed 3 times by the laser emission point and the line containing the laser point. Then, according to step S220, the target count value of grid A is reduced by 3, meaning the actual count value of grid A becomes a-3. Assuming that both grids B and C contain 4 laser points, then according to steps S230 and S240, the target count values ​​of both grids B and C are increased by 4. That is, the actual count value of grid B becomes b+4, and the actual count value of grid C becomes c+4.

[0058] Step S250: Based on the redefined grid state, update the current grid state of the grid in the first grid map to obtain the second grid map.

[0059] Continuing with the previous example, suppose that in the first grid map, grid B was originally marked as an empty grid, but in the latest first scan data, grid B was hit by the laser beam multiple times. That is, grid B contains multiple laser points, and its final actual number of hits exceeds the first preset threshold, so it is reclassified as an occupied grid. Similarly, grid A was originally marked as an occupied grid, but due to environmental changes, the first scan data shows that it was not hit by the laser beam, and its final actual number of hits is lower than the second preset threshold, so it is reclassified as an empty grid. The final actual number of hits for grid C is between the first and second preset thresholds, therefore, the state of grid C remains unchanged.

[0060] Furthermore, grid B is updated from an idle grid to an occupied grid, and grid A is updated from an occupied grid to an idle grid, while similar status updates are performed on all other grids. In this way, the grid status of all grids in the first grid map is updated according to the first scan data and thresholds (including a first preset threshold and a second preset threshold), generating a second grid map that reflects the current environmental status.

[0061] Figure 3 The diagram shown is a comparison of the map before and after an update according to an embodiment of this application. Figure 3 As shown, the left side is the first grid map before the update, and the right side is the second grid map after the update. In the second grid map, red indicates occupied grids. Observation reveals that obstacles that were not present in the first grid map appear in the second grid map, while obstacles present in the first grid map have disappeared in the second grid map. In other words, the current environmental state has changed.

[0062] Figure 4 The image shown is a schematic diagram of a map update provided in one embodiment of this application. Figure 4 As shown, green represents the portion of the second grid map where the occupied grid has changed. It is evident that the current environment has undergone significant changes. At this point, the matching accuracy of the red laser point is 0.6 in the first grid map and 0.97 in the second grid map, demonstrating that map updates ensure the positioning stability of the mobile device.

[0063] In this embodiment, the updated actual count value is compared with a preset threshold to determine the grid state of the grid, and based on this, the grid state in the first grid map is updated, ensuring the real-time and accuracy of the information in the second grid map, so that the mobile device can react quickly in changing environments.

[0064] exist Figure 2 Based on the illustrated embodiments, in other embodiments of this application, the target count value corresponding to the occupied grid in the first grid map is greater than the target count value corresponding to the unknown grid in the first grid map, and the target count value corresponding to the unknown grid in the first grid map is greater than the target count value corresponding to the free grid in the first grid map. For example, the target count value corresponding to the occupied grid is 10, the target count value corresponding to the unknown grid is 0, and the target count value corresponding to the free grid is -10.

[0065] Specifically, occupied grids represent obstacle areas, therefore their target count values ​​are higher, reflecting the frequent detection of obstacles by the lidar. Unknown grids represent areas on the first grid map whose status is not yet determined. These areas may be hit by the laser beam occasionally, or they may not be hit at all, so their target count values ​​are between those of occupied and idle grids. Idle grids represent drivable areas, i.e., areas without obstacles. These grids are rarely or never hit by the laser beam, therefore, idle grids have the lowest target count values.

[0066] Furthermore, in this embodiment, the first preset threshold is less than the target count value corresponding to the occupied grid in the first grid map. For example, the first preset threshold is 8, which ensures that even if there is some noise or error in the first scan data, the occupied grid can still be accurately identified, avoiding the misclassification of obstacle areas as drivable areas due to occasional scanning errors. Similarly, the second preset threshold is less than or equal to the target count value corresponding to the unknown grid in the first grid map. For example, the second preset threshold is 0, or the second preset threshold is -1. This ensures that idle grids will not be incorrectly classified as unknown grids due to accidental changes in the first scan data, or determines that unknown grids will not be incorrectly classified as idle grids due to accidental changes in the first scan data.

[0067] As can be seen, the setting of the first preset threshold and the second preset threshold in this embodiment provides a buffer zone, enabling the self-moving device to maintain high robustness and accuracy when facing environmental changes and scanning errors, thereby effectively updating and maintaining the map.

[0068] Figure 5 The above is a flowchart illustrating the process of determining the first pose of a self-moving device according to an embodiment of this application. Figure 1 Extending from the illustrated embodiment Figure 5 The illustrated embodiment will be described in detail below. Figure 5 The illustrated embodiments and Figure 1 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.

[0069] like Figure 5 As shown, in this embodiment, determining the first pose of the self-moving device includes the following steps.

[0070] Step S510: Determine the second pose of the self-moving device before it moves.

[0071] The second pose of the self-moving device before moving refers to the pose of the self-moving device when it is stationary, and the second pose must also meet the target accuracy threshold.

[0072] For example, sensors deployed on a self-moving device are used to determine its pose before it begins to move. Then, the pose is calibrated through algorithmic optimization to reduce measurement errors and improve positioning accuracy. If the accuracy of the pose meets a target accuracy threshold, the calibrated pose is determined as the second pose.

[0073] Step S520: Based on the second pose and the odometer data of the self-moving device during the movement, determine the third pose of the self-moving device.

[0074] Odometry data refers to measurement data about the motion status of a self-moving device provided by an odometer. For example, this measurement data includes: the straight-line distance traveled by the self-moving device in a specific time period, the rotation angle during the movement, and the speed of movement.

[0075] In this embodiment, the second pose of the self-moving device is known. Assuming that the self-moving device moves forward by 2 meters and turns 45° to the right, these data are used to update the second pose of the self-moving device and predict the third pose of the self-moving device after these movements.

[0076] Step S530: Perform reliability verification on the third pose, and determine the first pose of the self-moving device based on the verification result and the third pose.

[0077] Optionally, the reliability of the third pose can be verified using third-party positioning information. This third-party positioning information refers to information not collected by sensors directly deployed or carried by the self-moving device itself. For example, the third-party positioning information could be a laser positioning system installed in the target scene. This system can provide the precise pose of the self-moving device relative to a fixed point. Using the position of the fixed point and this precise pose, a reference pose of the self-moving device can be calculated. Then, the calculated third pose is compared with the reference pose. If they are consistent or the difference is within an acceptable error range, the third pose can be considered reliable. In this case, the third pose is directly determined as the first pose of the self-moving device. Conversely, if there is a significant difference between the two, the reference pose can be used to correct the third pose in order to obtain the first pose.

[0078] In this embodiment, the second pose of the self-moving device before movement provides a reference point for subsequent pose estimation. Then, the second pose and odometry data are used to predict the third pose of the self-moving device at its subsequent location, ensuring that the third pose reflects the dynamic changes of the self-moving device in real time. Next, a reliability check is performed to correct the third pose, further ensuring the accuracy of the first pose. This pose meets the target accuracy threshold and can be used for subsequent navigation and map repair, thereby improving the accuracy of navigation and map updates.

[0079] Regarding step S530, except Figure 5 In addition to the embodiments described herein, this application also provides another implementation method. Specifically, Figure 6 The diagram shown is a flowchart illustrating the process of determining the first pose of a self-moving device according to another embodiment of this application. Figure 6 As shown, the reliability of the third pose is verified, and the first pose of the self-moving device is determined based on the verification result and the third pose, including the following steps.

[0080] Step S610: Obtain the second scan data acquired by the lidar in the third pose.

[0081] For example, in the third pose, laser beams are emitted using a lidar and the time it takes for these laser beams to reflect back after encountering surrounding obstacles is measured, thereby calculating the distance between the self-moving device and the obstacles. These measurements form a set of point cloud data, namely the second scan data, which represents the outline and layout of the self-moving device and the surrounding environment in the third pose.

[0082] Step S620: Match the second scan data with the first raster map.

[0083] For example, each point in the second scan data is compared with the corresponding grid in the first grid map, including detecting whether the peak in the second scan data matches the obstacle position in the first grid map, and evaluating whether the overall shape of the second scan data is consistent with the structural features in the first grid map.

[0084] Step S630: If the verification result indicates that the second scan data and the first grid map are successfully matched, then the third pose is calibrated based on the transformation parameters when the match is successful, so as to obtain the first pose of the self-moving device.

[0085] For example, the transformation parameters include a translation vector and a rotation matrix. The translation vector is a three-dimensional vector that represents how far the second scan data needs to be moved in three-dimensional space to accurately align with the corresponding point on the first grid map; the rotation matrix is ​​used to represent the rotation in three-dimensional space to ensure that the direction of the second scan data is consistent with the direction on the first grid map.

[0086] Suppose the transformation parameters indicate that the third pose is offset by 1 meter north and 0.5 meters west relative to the actual environment, and requires a 5° counterclockwise rotation. The process of calibrating the third pose using these transformation parameters is as follows: move the third pose of the self-moving device 1 meter north, 0.5 meters west, and then rotate it 5° counterclockwise. The calibrated pose is then the first pose.

[0087] In this embodiment, by acquiring second scan data in the third pose, the latest information about the environment surrounding the self-moving device can be collected, reflecting the actual obstacle distribution around the current location of the self-moving device. Next, the second scan data is matched with a first grid map. If the match is successful, the third pose can be calibrated based on transformation parameters; that is, the third pose can be adjusted to a pose closer to the actual environment. This calibration process not only improves the accuracy of positioning but also enables the self-moving device to maintain reliable positioning performance under environmental changes or the presence of sensor noise.

[0088] Figure 7 The diagram shown is a schematic representation of a process for matching second scan data with a first raster map, according to an embodiment of this application. Figure 6 Extending from the illustrated embodiment Figure 7 The illustrated embodiment will be described in detail below. Figure 7 The illustrated embodiments and Figure 6 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.

[0089] like Figure 7 As shown, in this embodiment, matching the second scan data with the first grid map includes the following steps.

[0090] Step S710: Match the point cloud in the second scan data with the first grid map to obtain the first number of successfully matched point clouds and the second number of point clouds that fall into unknown grids in the first grid map.

[0091] A successfully matched point cloud refers to the portion of the point cloud that, when matching the second scan data with the first grid map, successfully corresponds to the location of a known obstacle on the first grid map. The spatial position of this portion of the point cloud is consistent with or very close to the marked obstacle location on the first grid map. In essence, the first quantity indicates what percentage of points in the second scan data are correctly identified and matched with obstacles on the first grid map; the higher this quantity, the more successful the matching process, and the more accurate the pose estimation of the self-moving device.

[0092] The point cloud of unknown grid cells falling into the first grid map indicates that there is not enough information to determine whether they match obstacles in the first grid map. The second quantity serves as a reference indicator to assess the integrity of the first grid map and the reliability of the second scan data.

[0093] Step S720: Use the second quantity as a penalty to adjust the first quantity to obtain the third quantity.

[0094] The penalty refers to a negative adjustment made to point clouds that fall on unknown grids in the first grid map, to reflect that these point clouds contribute little or are uncertain to the success of the match. This adjustment is equivalent to deducting points or penalizing the first number.

[0095] For example, the first quantity is subtracted by M times the second quantity to obtain the third quantity. Here, M is a natural number greater than 1. For example, the third quantity is equal to num_match - 2 * num_gray, where num_gray represents the second quantity of point clouds falling into unknown grids of the first grid map, and num_match represents the first quantity of point clouds that successfully matched. Optionally, in this embodiment, M equals 2.

[0096] Step S730: Calculate the ratio of the third quantity to the total number of point clouds contained in the second scan data to obtain the matching degree between the second scan data and the first raster map.

[0097] For example, the second scan data contains a total of 500 point clouds. After matching with the first raster map, it was determined that 300 point clouds successfully matched the first raster map, while 50 point clouds fell on unknown raster cells. Therefore, the second number of 50 is subtracted from the 300 successfully matched point clouds as a penalty, resulting in 300 - 50 * 2 point clouds (i.e., the third number). Then, the ratio of the third number to the total number of point clouds contained in the second scan data is calculated, i.e., 200 / 500, resulting in a matching degree of 0.4.

[0098] Step S740: Based on the matching degree between the second scan data and the first raster map, determine whether the second scan data and the first raster map are successfully matched.

[0099] Optionally, a threshold is set. If the matching degree between the second scan data and the first raster map is greater than the threshold, it is determined that the second scan data and the first raster map are successfully matched. For example, the threshold is set to 0.7. Then, according to the example in step S630, 0.4 is less than 0.7. Therefore, it is determined that the second scan data and the first raster map are not successfully matched.

[0100] In this embodiment, it is desirable for the second scan data to match occupied graticules on the first grid map, rather than unknown graticules. Therefore, when calculating the matching degree, point clouds that match unknown graticules are considered less reliable and need to be adjusted by subtracting a corresponding penalty term to obtain an adjusted matching degree index (i.e., a third quantity). This adjusted matching degree index can more accurately reflect the degree of matching between the second scan data and the first grid map. In this way, the accuracy of pose estimation can be more reasonably evaluated, and the success of the matching between the second scan data and the first grid map can be determined accordingly.

[0101] For step S740, except Figure 7 In addition to the embodiments described herein, another implementation method can first determine the relationship between the matching degree of the second scan data and the first grid map and the third preset threshold; if the matching degree of the second scan data and the first grid map is greater than the third preset threshold, then multiple scan data that are sequentially related to the second scan data in the third pose are obtained; if the matching degree of the multiple sequentially related scan data and the first grid map is greater than the third preset threshold, then it is determined that the second scan data and the first grid map are successfully matched.

[0102] Specifically, the multiple scan data that are sequentially related to the second scan data refer to multiple scan data collected in chronological order before and after the second scan data during the environmental scanning process of the self-mobile device. These mainly include preceding scan data and subsequent scan data. The preceding scan data represents the location and environmental state of the self-mobile device in the environment before the second scan data; the subsequent scan data represents the location and environmental state of the self-mobile device in the environment after the second scan data. For example, the multiple sequentially related scan data include 5 preceding scan data and 5 subsequent scan data.

[0103] In this embodiment, if the matching degree between the second scan data and the first grid map exceeds a third preset threshold, it indicates that the matching quality between the single scan data and the first grid map is high. However, to ensure the stability and reliability of the matching results, it is not only based on the matching result of a single scan data, but also to further acquire multiple scan data that are adjacent to the second scan data in time series. These data include scan data collected in the third pose before and after the second scan data. Then, the matching degree of these consecutive scan data is evaluated with the first grid map. If the matching degree of these consecutive scan data with the first grid map also exceeds the third preset threshold, it indicates that the scan data of the self-moving device and the first grid map have maintained a continuous and stable matching relationship over a period of time, which also indirectly verifies that the second scan data and the first grid map have been successfully matched. By considering a series of time-related scan data, the judgment standard for successful matching is improved, making the calibration of the third pose more robust and reducing mismatches caused by accidental errors or instantaneous environmental changes.

[0104] Figure 8 The diagram shown is a flowchart illustrating the process of determining the second pose of a self-moving device before movement, according to an embodiment of this application. Figure 5 Extending from the illustrated embodiment Figure 8 The illustrated embodiment will be described in detail below. Figure 8 The illustrated embodiments and Figure 5The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.

[0105] like Figure 8 As shown, in this embodiment, determining the second pose of the self-moving device before movement includes the following steps.

[0106] Step S810: Determine the fourth pose of the self-moving device before it moves.

[0107] Specifically, the fourth pose is an initial estimated pose of the self-moving device before it moves.

[0108] For example, the self-moving device has a preset pose, which is obtained by recognizing a QR code or a fixed device such as a charging station. Then, a coarse search is performed within a second target range centered on the preset pose to determine an approximate position and orientation of the self-moving device before movement, i.e., a fourth pose. Optionally, the second target range is: a distance of up to 3 units forward or backward in the x-axis direction, a distance of up to 3 units left or right in the y-axis direction, and an angle of 1 unit clockwise or counterclockwise rotation of the self-moving device. Optionally, during the coarse search, each parameter of the self-moving device's pose (x, y, and rotation angle) is adjusted and searched in steps of 0.5 units.

[0109] Step S820: Using the fourth pose as the center, search within the first target range to obtain multiple fifth poses.

[0110] Specifically, searching within the first target range refers to performing a fine search within that range. Optionally, the first target range is defined as: being able to adjust forward or backward, left or right by a maximum of 1 unit in the x-axis and y-axis directions, and rotating the self-moving device clockwise or counterclockwise by a maximum of 0.3 units. Optionally, the self-moving device's adjustments in the x-axis and y-axis directions are made in 0.1-unit increments, which is finer than the 0.5-unit increments of a coarse search, enabling more precise positional adjustments. Furthermore, the self-moving device's rotational adjustments are made in 0.05-unit increments, which is also finer than the angular resolution of a coarse search, thus enabling more precise orientation adjustments.

[0111] Step S830: For each fifth pose, calculate the pose score of the fifth pose.

[0112] Pose score characterizes the localization accuracy and reliability of the self-moving device in that pose. For example, for each fifth pose, sensor data (such as scan data in the fifth pose) is compared with a known first grid map to calculate the pose score for the fifth pose.

[0113] Step S840: The fifth pose with the highest pose score is calibrated to obtain the second pose of the self-moving device before movement.

[0114] In some embodiments, the scanning data acquired by the LiDAR in the fifth pose with the highest pose score is obtained; this scanning data is matched with the first grid map; if the match is successful, the fifth pose with the highest pose score is calibrated based on the transformation parameters at the time of successful matching, to obtain the second pose of the self-moving device before operation. For details on the implementation of this part, please refer to... Figure 5 The embodiments shown are not described in detail here.

[0115] In this embodiment, the initial estimated pose of the self-moving device before operation is first determined. Then, a search is performed within a first target range centered on the initial estimated pose to obtain multiple fifth poses, which improves the accuracy of pose estimation. Next, a pose score is calculated for each fifth pose, and the fifth pose with the highest score is calibrated to obtain the second pose of the self-moving device before movement. This ensures that high-precision pose information can be maintained even during the movement of the self-moving device, providing a guarantee for the stable operation and accurate navigation of the self-moving device.

[0116] Figure 9 The diagram shown is a flowchart illustrating the calculation of the pose score for the fifth pose according to an embodiment of this application. Figure 8 Extending from the illustrated embodiment Figure 9 The illustrated embodiment will be described in detail below. Figure 9 The illustrated embodiments and Figure 8 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.

[0117] like Figure 9 As shown, in this embodiment, calculating the pose score of the fifth pose includes the following steps.

[0118] Step S910: Determine the gradient raster map corresponding to the first raster map.

[0119] Specifically, gradient grid maps are also a form of map representation. They not only contain information about the location of obstacles found in traditional grid maps, but also provide distance information from each grid cell to the nearest obstacle.

[0120] Optionally, the gradient grid map is generated by calculating the distance of each grid cell to the nearest obstacle. This distance can be the actual physical distance or a relative distance transformed by some function.

[0121] Step S920: Obtain the third scan data collected by the lidar in the fifth pose, and map the point cloud in the third scan data to the gradient grid map to obtain the target distance value of the point cloud in the third scan data in the gradient grid map.

[0122] For example, the coordinates of the point cloud in the third scan data are converted into the corresponding coordinates in the gradient grid map. Then, the target distance value corresponding to each point cloud in the gradient grid map is queried, that is, the distance of each point cloud to the nearest obstacle.

[0123] For example, the above query process is accomplished by finding the corresponding grid cell in the gradient grid map for the point cloud and reading the pre-stored distance value in that grid cell. In this way, each point cloud in the third scan data will have a corresponding target distance value.

[0124] Step S930: Based on the target distance value and the target mapping relationship between the distance value and the score, determine the score of each point cloud in the third scan data.

[0125] The mapping relationship between distance value and score refers to the rule or function that converts the target distance value of the point cloud in the gradient grid map into a score value, which is used to evaluate the degree of matching between each point cloud and the obstacle position.

[0126] Optionally, the mapping relationship between distance value and score includes: if the target distance value of the point cloud in the gradient grid map is greater than a fifth preset threshold, then the score of the point cloud is recorded as zero. For example, the fifth preset threshold is 0.3 meters. If the target distance value of the point cloud in the gradient grid map is not greater than the fifth preset threshold, then the score of the point cloud is determined based on the target distance value corresponding to the point cloud and the nth power of a specified value. For example, the score of the point cloud = -d*d / 2*sigma*sigma, where sigma represents the specified value and d represents the target distance value of the point cloud in the gradient grid map. For example, sigma equals 0.4, and n equals 2.

[0127] Step S940: The sum of the point cloud scores in the third scan data is determined as the pose score of the fifth pose.

[0128] Suppose the third scan data contains 100 point clouds, each of which has been mapped onto a gradient grid map through previous steps, yielding its own target distance value. Then, based on these target distance values ​​and a predefined mapping between distance values ​​and scores, a score is calculated for each point cloud.

[0129] In the actual calculation, the target distance values ​​of 60 point clouds are less than 0.3 meters, and the distance values ​​of 30 point clouds are greater than 0.3 meters. The scores of these 30 point cloud pairs are all zero. The scores of the other 60 point clouds are calculated based on the implementation method of step S930. Then, the scores of these 60 point clouds are summed to obtain the pose score of the fifth pose.

[0130] In this embodiment, the gradient grid map provides a reference framework containing environmental obstacle distance information for subsequent pose score calculation. Using the third scan data acquired by the LiDAR, and mapping this data onto the gradient grid map, the target distance value of each point cloud in the gradient grid map is obtained, quantifying the distance between each point cloud and the obstacle location. Then, through the mapping relationship between distance values ​​and scores, the target distance values ​​of the point clouds are converted into scores; a higher score indicates a better matching degree. Finally, the scores of all point clouds are summed to obtain the pose score for the fifth pose. This pose score comprehensively reflects the overall matching situation between the third scan data and the first grid map in the fifth pose.

[0131] Next, we will analyze in detail how to determine the gradient grid map corresponding to the first grid map. Specifically, occupying grids in the first grid map are added to the queue to be traversed, and the distance value of the occupying grids is set to zero. If the queue to be traversed is not empty, the following traversal operations are performed: the first grid is taken out from the queue to be traversed, and the distance value between the adjacent grids of the first grid and the source grid of the first grid is calculated. The source grid represents the occupied grid that is closest to the first grid. If the distance value is less than a fourth preset threshold and the distance value is less than the current distance value of the adjacent grid, the current distance value of the adjacent grid is updated to the distance value, the source grid of the first grid is set as the source grid of the adjacent grid, and the adjacent grid is added to the queue to be traversed. Otherwise, the first grid is removed from the queue to be traversed. The traversal operation is repeated until the queue to be traversed is empty, and the distance value between each grid in the first grid map and its respective source grid is obtained. Based on the distance value between each grid in the first grid map and its respective source grid, a gradient grid map corresponding to the first grid map is generated.

[0132] Specifically, the distance values ​​of all occupied grids representing obstacles in the first grid map are initialized to zero and placed in the traversal queue as the starting point for traversal. Then, a first grid is taken from the traversal queue, and all its adjacent grids (typically in the four directions: up, down, left, and right) are checked. For each adjacent grid, the distance value between it and the source grid of the first grid (i.e., the nearest occupied grid) is calculated. If this distance value is less than a fourth preset threshold and smaller than the current distance value recorded by the adjacent grid, it indicates that a closer path to the obstacle has been found for the adjacent grid. Therefore, the distance value of the adjacent grid is updated, its source grid is set as the source grid of the first grid, and this adjacent grid is added to the traversal queue for subsequent processing. If the distance value of the adjacent grid does not meet the update condition, the first grid is removed from the traversal queue, indicating that the diffusion from the source grid of the first grid has been completed.

[0133] This process is repeated until the queue to be traversed is empty, meaning all reachable grids have been processed. Finally, each grid is assigned a distance value representing its distance to the nearest obstacle. Based on these distance values, a gradient grid map is generated. Figure 10 The image shown is a schematic diagram of a gradient grid map provided in an embodiment of this application. Figure 10 As shown, the left part is the map raster map corresponding to area 1 on the right.

[0134] In this embodiment, the gradient grid map provides precise information about the relative positions of obstacles, enabling the self-moving device to better understand its surroundings and make accurate navigation decisions accordingly. In this way, the gradient grid map not only improves positioning accuracy but also enhances the stability of the self-moving device operating in complex environments.

[0135] The above text combined Figures 1 to 10 The following describes in detail the embodiments of the map update method of this application, in conjunction with... Figure 11 This application provides a detailed description of embodiments of the map updating apparatus. It should be understood that the descriptions of the map updating method embodiments correspond to the descriptions of the map updating apparatus embodiments; therefore, any parts not described in detail can be found in the preceding method embodiments.

[0136] Figure 11 The diagram shown is a structural schematic of a map updating device provided in an embodiment of this application. Figure 11 As shown, the map updating device 110 provided in this application embodiment includes:

[0137] The determining module 1110 is used to determine the first pose of the self-moving device during the movement of the self-moving device;

[0138] The mapping module 1120 is used to acquire the first scan data collected by the lidar in the first pose and map the laser information contained in the first scan data to the first grid map. The laser information includes the laser emission point and the laser point.

[0139] The update module 1130 is used to update the grid state of the first grid map based on the laser emission point and the position of the laser point in the first grid map, so as to obtain the second grid map.

[0140] In this embodiment, each grid in the first grid map is preset with a target hit count value. The update module 1130 is further configured to: for each grid in the first grid map, decrement the target hit count value of the grid by one each time the grid is crossed by the laser emission point and the straight line containing the laser point; increment the target hit count value of the grid by one each time the grid contains a laser point, and finally obtain the actual hit count value of the grid after the update; if the actual hit count value of the grid after the update is greater than a first preset threshold, the grid is determined to be an occupied grid; if the actual hit count value of the grid after the update is less than a second preset threshold, the grid is determined to be an idle grid; if the actual hit count value of the grid after the update is between the first preset threshold and the second preset threshold, the grid is determined to be an unknown grid; based on the redefined grid state, update the current grid state of the grids in the first grid map to obtain the second grid map.

[0141] In this embodiment, the target count value corresponding to the occupied grid in the first grid map is greater than the target count value corresponding to the unknown grid in the first grid map; the target count value corresponding to the unknown grid in the first grid map is greater than the target count value corresponding to the free grid in the first grid map; the first preset threshold is less than the target count value corresponding to the occupied grid in the first grid map, and the second preset threshold is less than or equal to the target count value corresponding to the unknown grid in the first grid map.

[0142] In this embodiment, the determining module 1110 is further configured to: determine the second pose of the self-moving device before it moves; determine the third pose of the self-moving device based on the second pose and the odometer data of the self-moving device during the movement; perform a reliability check on the third pose; and determine the first pose of the self-moving device based on the check result and the third pose.

[0143] In this embodiment, the determining module 1110 is further configured to: acquire the second scanning data collected by the lidar in the third pose; match the second scanning data with the first grid map to verify the reliability of the third pose; if the verification result indicates that the second scanning data and the first grid map are successfully matched, then calibrate the third pose based on the transformation parameters when the match is successful to obtain the first pose of the self-moving device.

[0144] In this embodiment, the determining module 1110 is further configured to: match the point cloud in the second scan data with the first grid map to obtain a first number of successfully matched point clouds and a second number of point clouds falling into unknown grids in the first grid map; use the second number as a penalty term to adjust the first number to obtain a third number; calculate the ratio of the third number to the total number of point clouds contained in the second scan data to obtain the matching degree between the second scan data and the first grid map; and determine whether the second scan data and the first grid map are successfully matched based on the matching degree between the second scan data and the first grid map.

[0145] In this embodiment, the determining module 1110 is further configured to: if the matching degree between the second scan data and the first grid map is greater than a third preset threshold, then acquire multiple scan data that are sequentially related to the second scan data in the third pose; if the matching degree between the multiple sequentially related scan data and the first grid map is greater than the third preset threshold, then determine that the second scan data and the first grid map are successfully matched.

[0146] In this embodiment, the determining module 1110 is further configured to: determine the fourth pose of the self-moving device before moving, the fourth pose representing the initial estimated pose of the self-moving device before moving; search within a first target range centered on the fourth pose to obtain multiple fifth poses; calculate the pose score of each fifth pose for each fifth pose; calibrate the fifth pose with the highest pose score to obtain the second pose of the self-moving device before moving.

[0147] In this embodiment, the determining module 1110 is further configured to: determine the gradient grid map corresponding to the first grid map; acquire the third scan data collected by the lidar in the fifth pose, and map the point cloud in the third scan data to the gradient grid map to obtain the target distance value of the point cloud in the third scan data in the gradient grid map; determine the score of each point cloud in the third scan data based on the target distance value and the target mapping relationship between the distance value and the score; and determine the sum of the scores of the point cloud in the third scan data as the pose score of the fifth pose.

[0148] In this embodiment, the determining module 1110 is further configured to: add occupied grids in the first grid map to the queue to be traversed, and set the distance value of the occupied grids to zero; if the queue to be traversed is not empty, perform the following traversal operation: take out the head grid from the queue to be traversed, calculate the distance value between the adjacent grids of the head grid and the source grid of the head grid, where the source grid represents the occupied grid closest to the head grid; if the distance value is less than a fourth preset threshold, and the distance value is less than the current distance of the adjacent grid... If the distance value is obtained, the current distance value of the adjacent grid is updated to the distance value, the source grid of the first grid is set as the source grid of the adjacent grid, and the adjacent grid is added to the queue to be traversed; otherwise, the first grid is removed from the queue to be traversed; the traversal operation is repeated until the queue to be traversed is empty, and the distance value between each grid in the first grid map and its respective source grid is obtained; based on the distance value between each grid in the first grid map and its respective source grid, the gradient grid map corresponding to the first grid map is generated.

[0149] Below, for reference Figure 12 This describes an electronic device according to embodiments of the present application. Figure 12 The diagram shown is a structural schematic of an electronic device provided in an exemplary embodiment of this application.

[0150] like Figure 12 As shown, the electronic device 120 includes one or more processors 1201 and memory 1202.

[0151] The processor 1201 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 120 to perform desired functions.

[0152] The memory 1202 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1201 may execute the program instructions to implement the map update methods of the various embodiments of this application described above and / or other desired functions. The computer-readable storage medium may also store various content such as a first pose of the self-moving device, first scan data, a first raster map, and a second raster map.

[0153] In one example, the electronic device 120 may also include an input device 1203 and an output device 1204, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0154] The input device 1203 may include, for example, a keyboard, a mouse, etc.

[0155] The output device 1204 can output various information to the outside, including the first pose of the self-moving device, the first scan data, the first grid map, and the second grid map. The output device 1204 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0156] Of course, for the sake of simplicity, Figure 12 Only some of the components of the electronic device 120 relevant to this application are shown in this illustration; components such as buses, input / output interfaces, etc., are omitted. In addition, the electronic device 120 may include any other suitable components depending on the specific application.

[0157] In addition to the methods and apparatus described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the map update methods according to various embodiments of this application described above.

[0158] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this application. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0159] Furthermore, embodiments of this application may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the map update methods according to various embodiments of this application described above.

[0160] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0161] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.

[0162] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0163] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.

[0164] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0165] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A map updating method, characterized in that, The method, applied to a self-moving device equipped with lidar, includes: During the movement of the self-moving device, the first pose of the self-moving device is determined; Acquire the first scan data collected by the lidar under the first pose, and map the laser information contained in the first scan data onto the first grid map, wherein the laser information includes laser emission point and laser point; Based on the laser emission point and the position of the laser point in the first grid map, the grid state of the first grid map is updated to obtain the second grid map; Determining the first pose of the self-moving device includes: determining the fourth pose of the self-moving device before movement, the fourth pose representing the initial estimated pose of the self-moving device before movement; searching within a first target range centered on the fourth pose to obtain multiple fifth poses; calculating the pose score for each fifth pose; calibrating the fifth pose with the highest pose score to obtain the second pose of the self-moving device before movement; determining the third pose of the self-moving device based on the second pose and odometer data of the self-moving device during movement; performing reliability verification on the third pose, and determining the first pose of the self-moving device based on the verification result and the third pose.

2. The map updating method according to claim 1, characterized in that, Each grid cell in the first grid map is pre-set with a target hit count value by the laser beam; the step of updating the grid state of the first grid map based on the laser emission point and the position of the laser point in the first grid map to obtain the second grid map includes: For each grid in the first grid map, the target count value corresponding to the grid is decremented by one each time the grid is crossed by the laser emission point and the straight line containing the laser point; the target count value corresponding to the grid is incremented by one each time the grid contains the laser point, and finally the actual count value of the grid after the update is obtained. If the actual number of times the grid is updated is greater than the first preset threshold, then the grid is determined to be an occupied grid. If the actual number of times the grid is updated is less than the second preset threshold, then the grid is determined to be an idle grid. If the actual number of times the grid is updated is between the first preset threshold and the second preset threshold, then the grid is determined to be an unknown grid. Based on the redefined grid state, the current grid state of the grid cells in the first grid map is updated to obtain the second grid map.

3. The map updating method according to claim 2, characterized in that, The number of times a target is occupied in the first grid map is greater than the number of times a target is unknown in the first grid map. The number of times a target is counted in an unknown grid cell in the first grid map is greater than the number of times a target is counted in an empty grid cell in the first grid map. The first preset threshold is less than the target count value corresponding to the occupied grid in the first grid map, and the second preset threshold is less than or equal to the target count value corresponding to the unknown grid in the first grid map.

4. The map updating method according to claim 1, characterized in that, The step of performing reliability verification on the third pose and determining the first pose of the self-moving device based on the verification result and the third pose includes: Acquire the second scanning data collected by the lidar in the third pose; The second scan data is matched with the first grid map in order to verify the reliability of the third pose; If the verification result indicates that the second scan data and the first grid map are successfully matched, then the third pose is calibrated based on the transformation parameters when the match is successful, to obtain the first pose of the self-moving device.

5. The map updating method according to claim 4, characterized in that, The step of matching the second scan data with the first raster map includes: The point cloud in the second scan data is matched with the first grid map to obtain a first number of successfully matched point clouds and a second number of point clouds that fall into unknown grids in the first grid map. The second quantity is used as a penalty to adjust the first quantity, resulting in the third quantity; Calculate the ratio of the third quantity to the total number of point clouds contained in the second scan data to obtain the matching degree between the second scan data and the first raster map; Based on the matching degree between the second scan data and the first raster map, it is determined whether the second scan data and the first raster map are successfully matched.

6. The map updating method according to claim 5, characterized in that, The step of determining whether the second scan data and the first grid map are successfully matched based on the matching degree between the second scan data and the first grid map includes: If the matching degree between the second scan data and the first grid map is greater than the third preset threshold, then multiple scan data that are sequentially related to the second scan data in the third pose are obtained. If the matching degree between the multiple related scan data and the first grid map is greater than the third preset threshold, then it is determined that the second scan data and the first grid map are successfully matched.

7. The map updating method according to claim 1, characterized in that, The calculation of the pose score of the fifth pose includes: Determine the gradient raster map corresponding to the first raster map; The third scan data collected by the lidar in the fifth pose is obtained, and the point cloud in the third scan data is mapped to the gradient grid map to obtain the target distance value of the point cloud in the third scan data in the gradient grid map. Based on the target distance value and the target mapping relationship between the distance value and the score, the scores of each point cloud in the third scan data are determined; The sum of the point cloud scores in the third scan data is determined as the pose score of the fifth pose.

8. The map updating method according to claim 7, characterized in that, Determining the gradient raster map corresponding to the first raster map includes: Add the occupied grid cells in the first grid map to the queue to be traversed, and set the distance value of the occupied grid cells to zero; If the queue to be traversed is not empty, perform the following traversal operations: remove the first grid cell from the queue to be traversed, calculate the distance between the adjacent grid cells of the first grid cell and the source grid cell of the first grid cell, where the source grid cell represents the occupied grid cell closest to the first grid cell; if the distance value is less than a fourth preset threshold, and the distance value is less than the current distance value of the adjacent grid cell, then update the current distance value of the adjacent grid cell to the distance value, set the source grid cell of the first grid cell as the source grid cell of the adjacent grid cell, and add the adjacent grid cell to the queue to be traversed; otherwise, remove the first grid cell from the queue to be traversed. Repeat the traversal operation until the queue to be traversed is empty, and obtain the distance value between each grid in the first grid map and its respective source grid. Based on the distance values ​​between each grid cell in the first grid map and its respective source grid cell, a gradient grid map corresponding to the first grid map is generated.

9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the map updating method according to any one of claims 1 to 8.

10. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the map update method according to any one of claims 1 to 8.

11. A computer program product, characterized in that, The computer program product includes instructions that, when executed on an electronic device, cause the electronic device to implement the map update method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Mobile robot extension mapping method and device based on grid map and medium

    CN114326699A

  • Grid map updating method and device based on point cloud detection and storage medium

    CN117213463A

  • Laser slam self-adaptive automatic map updating method and system

    CN117451035A

  • Grid map updating apparatus and method, and computer device and storage medium

    WO2023231545A1