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

By updating the raster map in real time on mobile devices and using the scanning data collected by lidar, the problem of reduced positioning accuracy caused by temporary obstacles and environmental changes is solved, achieving higher positioning accuracy and reliability, while reducing costs.

CN119509519AActive Publication Date: 2025-02-25ZHEJIANG ZHIDING ROBOT CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When mobile devices use lidar for positioning, map inconsistencies caused by temporary obstacles and environmental changes lead to reduced positioning accuracy.

Method used

By deploying lidar on a mobile device, collecting scan data in real time and mapping it to a raster map, the raster state of the raster map is updated to maintain consistency between the map and the actual environment.

Benefits of technology

Improves positioning accuracy and reliability of self-mobile devices in dynamic environments, reduces hardware costs and map maintenance costs, and eliminates the need for additional sensors or periodic reconstruction of maps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119509519A_ABST
    Figure CN119509519A_ABST
Patent Text Reader

Abstract

The invention provides a map updating method, a storage medium, electronic equipment and a program product, and relates to the technical field of positioning. The map updating method comprises the following steps: in the moving process of the self-moving equipment, determining a first pose of the self-moving equipment; first scanning data collected by the laser radar in the first pose are obtained, laser information contained in the first scanning data is mapped to a first grid map, and the laser information comprises a laser emission point and a laser point; and 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 a second grid map. According to the method and the device, the problem of inaccurate matching and positioning of the first grid map caused by temporary obstacle shielding or environment change is solved, and the positioning precision and reliability of the self-moving equipment in a dynamic environment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of positioning technology, and in particular to a map updating method, a storage medium, an electronic device and a program product. Background Art

[0002] Self-driving devices generally rely on matching 2D laser scanning with 2D plane maps to determine their position when positioning. However, when temporary obstacles appear in the working environment, the laser radar may be blocked, resulting in an inability to accurately detect obstacle information. In addition, if the working environment changes significantly, the original map is no longer accurate, resulting in poor matching results and an inability to determine whether the position of the self-driving device is correct.

[0003] Currently, in order to solve these problems, the common practice is to introduce additional sensors, such as cameras, to improve positioning accuracy, or to periodically reconstruct maps to reduce positioning differences. Although these methods are effective, they also increase hardware costs and map maintenance costs. Summary of the invention

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

[0005] In a first aspect, an embodiment of the present application provides a map updating method, which is applied to a self-moving device deployed with a laser radar, the method comprising: determining a first posture of the self-moving device during movement of the self-moving device; obtaining first scanning data collected by the laser radar in the first posture, and mapping the laser information contained in the first scanning data to a first grid map, the laser information including a laser emission point and a laser point; based on the positions of the laser emission point and the laser point in the first grid map, updating the grid state of the first grid map to obtain a second grid map.

[0006] In combination with the first aspect, in some implementations of the first aspect, each grid in the first grid map is preset with a target number of times hit by the laser beam; based on the positions of the laser emission point and 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: for each grid in the first grid map, each time the grid is crossed by the straight line where the laser emission point and the laser point are located, the target number of times corresponding to the grid is reduced by one; each time the grid contains a laser point, the target number of times corresponding to the grid is increased by one, and finally an actual number of times after the grid is updated is obtained; if the actual number of times after the grid is updated is greater than a first preset threshold, the grid is determined to be an occupied grid; if the actual number of times after the grid is updated is less than a second preset threshold, the grid is determined to be an idle grid; if the actual number of times after the grid is updated is between the first preset threshold and the second preset threshold, the grid is determined to be an unknown grid; based on the re-determined grid state, the current grid state of the grid in the first grid map is updated to obtain the second grid map.

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

[0008] In combination with the first aspect, in certain implementations of the first aspect, determining a first posture of the self-moving device includes: determining a second posture of the self-moving device before moving; determining a third posture of the self-moving device based on the second posture and odometer data of the self-moving device during the movement; performing reliability verification on the third posture, and determining the first posture of the self-moving device based on the verification result and the third posture.

[0009] In combination with the first aspect, in certain implementations of the first aspect, the third posture is reliability checked, and based on the check result and the third posture, the first posture of the self-mobile device is determined, including: obtaining second scanning data collected by the laser radar in the third posture; matching the second scanning data with the first grid map to perform reliability checking on the third posture; if the check result indicates that the second scanning data matches the first grid map successfully, then calibrating the third posture based on the transformation parameters when the match is successful to obtain the first posture of the self-mobile device.

[0010] In combination with the first aspect, in certain implementations of the first aspect, matching the second scan data with the first raster map includes: matching the point cloud in the second scan data with the first raster map to obtain a first number of successfully matched point clouds and a second number of point clouds falling into the unknown grid in the first raster map; using the second number as a penalty item and adjusting 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 a degree of matching between the second scan data and the first raster map; and determining whether the second scan data and the first raster map are successfully matched based on the degree of matching between the second scan data and the first raster map.

[0011] In combination with the first aspect, in certain implementations of the first aspect, based on the degree of match between the second scan data and the first raster map, determining whether the second scan data and the first raster map are successfully matched includes: if the degree of match between the second scan data and the first raster map is greater than a third preset threshold, obtaining multiple scan data that are temporally related to the second scan data in a third posture; if the degree of match between the multiple temporally related scan data and the first raster map is greater than the third preset threshold, determining that the second scan data and the first raster map are successfully matched.

[0012] In combination with the first aspect, in certain implementations of the first aspect, determining a second posture of the self-moving device before it moves includes: determining a fourth posture of the self-moving device before it moves, the fourth posture representing an initial estimated posture of the self-moving device before it moves; searching within a first target range with the fourth posture as the center to obtain multiple fifth postures; for each fifth posture, calculating a posture score of the fifth posture; and calibrating the fifth posture with the highest posture score to obtain the second posture of the self-moving device before it moves.

[0013] In combination with the first aspect, in certain implementations of the first aspect, the posture score of the fifth posture is calculated, including: determining a gradient grid map corresponding to the first grid map; obtaining third scanning data collected by a lidar in the fifth posture, and mapping the point cloud in the third scanning data to the gradient grid map to obtain the target distance value of the point cloud in the third scanning data in the gradient grid map; determining the score of each point cloud in the third scanning 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 clouds in the third scanning data as the posture score of the fifth posture.

[0014] In combination with the first aspect, in some implementations of the first aspect, determining the gradient grid map corresponding to the first grid map includes: placing occupied grids in the first grid map into a queue to be traversed, and setting the distance value of the occupied grid to zero; when the queue to be traversed is not empty, performing the following traversal operations: taking the head grid from the queue to be traversed, calculating the distance value between the adjacent grids of the head grid and the source grid of the head grid, the source grid representing 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, the current distance value of the adjacent grid is updated to the distance value, the source point grid of the head grid is set as the source point grid of the adjacent grid, and the adjacent grid is placed in the queue to be traversed; otherwise, the head 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.

[0015] In a second aspect, an embodiment of the present application provides a map updating device, which is applied to a self-moving device deployed with a laser radar, and the device includes: a determination module, which is used to determine the first posture of the self-moving device during the movement of the self-moving device; a mapping module, which is used to obtain first scanning data collected by the laser radar in the first posture, and map the laser information contained in the first scanning data to a first grid map, where the laser information includes a laser emission point and a laser point; an updating module, which is used to update the 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.

[0016] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is used to execute the map updating method described in the first aspect.

[0017] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; and the processor is used to execute the map updating method described in the first aspect.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions, and when the instructions are executed on an electronic device, the electronic device implements the map updating method described in the first aspect.

[0019] In the application, by determining the first posture during the movement of the self-mobile device and using the first scanning data collected by the laser radar to update the first grid map, the consistency of the second grid map with the actual environment can be maintained, solving the problem of inaccurate matching and positioning of the first grid map caused by temporary obstacles or environmental changes, and improving the positioning accuracy and reliability of the self-mobile device in a dynamic environment, so that the self-mobile device has better adaptability and robustness in complex or changing environments. In addition, the solution in this embodiment does not require additional sensors or regular reconstruction of maps, which also reduces hardware costs and map maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0021] Figure 1 Shown is a flowchart of a map updating method provided in one embodiment of the present application.

[0022] Figure 2 The figure shows a flow chart of updating the grid state of a first grid map to obtain a second grid map according to an embodiment of the present application.

[0023] Figure 3 Shown is a comparison diagram of a map before and after updating provided by an embodiment of the present application.

[0024] Figure 4 Shown is a schematic diagram of a map after update provided by an embodiment of the present application.

[0025] Figure 5 The above is a schematic diagram of a process for determining a first position of a mobile device provided by an embodiment of the present application.

[0026] Figure 6 The figure is a schematic diagram of a process of determining a first position of a mobile device provided by another embodiment of the present application.

[0027] Figure 7 The figure is a schematic diagram of a process of matching the second scan data with the first grid map provided in an embodiment of the present application.

[0028] Figure 8 The figure is a schematic diagram of a flow chart of determining a second posture of a mobile device before movement provided by an embodiment of the present application.

[0029] Fig. 9The figure is a schematic diagram of a flow chart of calculating the posture score of the fifth posture provided by an embodiment of the present application.

[0030] Fig.10 Shown is a schematic diagram of a gradient grid map provided in an embodiment of the present application.

[0031] Fig.11 Shown is a schematic diagram of the structure of a map updating device provided in one embodiment of the present application.

[0032] Fig.12 Shown is a schematic structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0034] Figure 1 FIG. 1 is a flow chart of a map updating method provided by an embodiment of the present application. For example, the method is applied to a self-moving device equipped with a laser radar. Figure 1 As shown, the method includes the following steps.

[0035] Step S110, during the movement of the self-moving device, determining the first position of the self-moving device.

[0036] Specifically, the first pose refers to a pose that meets the target accuracy threshold at a specific position. 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, and further affects the effect of the first grid map repair. In other words, if the first pose is inaccurate, then the second scan data may not be correctly mapped to the existing first grid map, resulting in deviations in the update of the first grid map, thereby failing to accurately reflect changes in the actual environment.

[0037] In some embodiments, when the self-mobile device is moving, the sensor carried by it is used to obtain the initial posture, and then the environment is scanned by laser radar, and the scanned point cloud data is matched with a pre-built environment map, which can be local or global. When the deviation between the point cloud data and the corresponding feature point on the environment map is within a preset range, it is considered that the initial posture of the self-mobile device has met the target accuracy threshold, and the initial posture at this time is the first posture. In addition, if the initial posture does not meet the target accuracy threshold, it is adjusted to obtain the first posture.

[0038] Step S120, obtaining first scanning data collected by the laser radar in the first posture, and mapping the laser information contained in the first scanning data to a first grid map.

[0039] The first grid map is a map to be updated, and each grid records the information of obstacles scanned by the laser radar. These obstacles constitute the non-drivable area in the first grid map.

[0040] Laser information includes laser emission point and laser point. The laser emission point refers to the starting position where the laser radar emits the laser beam, and 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 laser radar, the coordinates of each laser emission point and laser point are converted to coordinates in the coordinate system of the self-mobile device, and then based on the grid size, the coordinates in the coordinate system of the self-mobile device are converted to grid indexes in the first grid map, thereby mapping the laser information contained in the first scanning data to the first grid map.

[0042] Step S130, based on the positions of the laser emission points and the laser points in the first grid map, updating the grid state of the first grid map to obtain a second grid map.

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

[0044] For example, if the laser radar detects an obstacle, and the corresponding grid of the obstacle in the first grid map was originally marked as an empty grid, then in the second grid map, this position will be updated to an occupied grid, indicating the presence of an obstacle. This update process will traverse all laser emission points and laser points, and for each location where an obstacle is detected, the corresponding grid in the first grid map will be marked, thereby obtaining an updated second grid map.

[0045] After obtaining the second grid map, the map is saved in the self-mobile device so that the self-mobile device can be loaded into the second grid map in time after starting up, thereby ensuring long-term stable and reliable positioning.

[0046] In this embodiment, by determining the first posture during the movement of the self-mobile device and updating the first grid map using the first scanning data collected by the laser radar, the consistency of the second grid map with the actual environment can be maintained, solving 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-mobile device in a dynamic environment, and making the self-mobile device more adaptable and robust in a complex or changing environment. In addition, the solution in this embodiment does not require additional sensors or regular reconstruction of maps, which also reduces hardware costs and map maintenance costs.

[0047] Figure 2 The figure shows a flow chart of updating the grid state of a first grid map to obtain a second grid map according to an embodiment of the present application. Figure 1 Based on the embodiment shown, Figure 2 The embodiment shown is described below in detail. Figure 2 The embodiment shown and Figure 1 The differences and similarities of the illustrated embodiments are not described in detail.

[0048] First, in this embodiment, the grid states of the first grid map include occupied grids, idle grids, and unknown grids. Among them, the occupied grids represent obstacle areas, that is, non-drivable areas; the idle grids represent drivable areas, and the unknown grids represent unknown areas. In addition, each grid in the first grid map is preset with a target number of times hit by the laser beam, and the target number of times is an initial value used for judgment in the subsequent grid state update process.

[0049] like Figure 2 As shown, based on the positions of the laser emission points and the laser points 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, each time the grid is crossed by the laser emission point and the straight line where the laser point is located, the target frequency value corresponding to the grid is reduced by one; each time the grid contains a laser point, the target frequency value corresponding to the grid is increased by one, and finally the actual frequency value of the grid after update is obtained.

[0051] It is understood that the grids that are crossed by the laser emission point and the straight line where the laser spot is located are not expected to be hit by the laser beam, so the target number value of such grids is reduced by 1. On the contrary, if a grid is actually hit by the laser point, that is, the grid contains the laser spot, it means that the laser beam has indeed detected an obstacle at this position, so the target number value of the grid is increased by 1.

[0052] It is understandable that the first scanning data collected by the laser radar in this embodiment includes multiple sets of scanning data, so the same grid may be hit by multiple laser beams or may be penetrated by multiple laser beams. Finally, for each grid, all laser beams (i.e., the straight line where the laser emission point and the laser point are located) and laser points are traversed, and the target time value is added and subtracted, and finally the actual time value corresponding to each grid is obtained.

[0053] Step S220: If the actual number of times the grid is updated is greater than a first preset threshold, 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 a second preset threshold, 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, 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] Exemplarily, it is assumed that there are grids A, B, and C in the first grid map. Among them, grid A is an occupied grid, and the preset target number value is a; grid B is an idle grid, and the preset target number value is b; grid C is an unknown grid, and the preset target number value is c. Further, it is assumed that grid A is crossed by the laser emission point and the straight line where the laser point is located 3 times, then according to step S220, the target number value of grid A is reduced by 3, that is, the actual number value of grid A becomes a-3. Assuming that grid B and grid C both contain 4 laser points, then according to steps S230 and S240, the target number values ​​of grids B and C are both increased by 4, that is, the actual number value of grid B becomes b+4, and the actual number value of grid C becomes c+4.

[0058] Step S250: based on the re-determined grid state, update the current grid state of the grid in the first grid map to obtain a second grid map.

[0059] Continuing with the above example, assume that in the first grid map, grid B was originally marked as an idle 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 value exceeds the first preset threshold, so it is re-determined 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 value is lower than the second preset threshold, so it is re-determined as an idle grid. The final actual number value of grid C is between the first preset threshold and the second preset threshold, so the state of grid C has not changed.

[0060] Further, grid B is updated from an idle grid to an occupied grid, grid A is updated from an occupied grid to an idle grid, and 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 scanning data and the threshold (including the first preset threshold and the second preset threshold), and a second grid map reflecting the current environmental status is generated.

[0061] Figure 3 FIG. 1 is a schematic diagram showing a comparison of a map before and after updating provided by an embodiment of the present application. Figure 3 As shown, the left part is the first grid map before the update, and the right part is the second grid map after the update. The red color of the second grid map indicates the occupied grid. By observation, it can be seen that obstacles that do not exist in the first grid map appear in the second grid map, and obstacles that exist in the first grid map disappear in the second grid map, that is, the current environment state has changed.

[0062] Figure 4 FIG. 1 is a schematic diagram of a map after updating provided by an embodiment of the present application. Figure 4 As shown in the figure, green is the part of the occupied grid in the second grid map that has changed. It can be seen that the current environment has changed dramatically. At this time, the matching degree of the red laser point in the first grid map is 0.6, and the matching degree in the second grid map is 0.97, which also shows that the map update ensures the positioning stability of the self-moving device.

[0063] In this embodiment, the updated actual number 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 respond quickly in a changing environment.

[0064] exist Figure 2 On the basis of the illustrated embodiment, in other embodiments of the present application, the target number value corresponding to the occupied grid in the first grid map is greater than the target number value corresponding to the unknown grid in the first grid map, and the target number value corresponding to the unknown grid in the first grid map is greater than the target number value corresponding to the idle grid in the first grid map. Exemplarily, the target number value corresponding to the occupied grid is 10, the target number value corresponding to the unknown grid is 0, and the target number value corresponding to the idle grid is -10.

[0065] Specifically, occupied cells represent obstacle areas, so their target count values ​​will be high, reflecting the frequent detection of obstacles by the lidar. Unknown cells represent areas on the first grid map whose status has not yet been determined. These areas may be hit by the laser beam occasionally or not at all, so their target count values ​​are between occupied cells and idle cells. Idle cells represent drivable areas, that is, these areas have no obstacles, so these cells are rarely or never hit by the laser beam, so idle cells have the lowest target count values.

[0066] In addition, in this embodiment, the first preset threshold is less than the target number value corresponding to the occupied grid in the first grid map. For example, the first preset threshold is 8, which can ensure that even when there is some noise or error in the first scan data, the occupied grid can still be accurately identified, avoiding the mistaken classification of the obstacle area as a drivable area due to occasional scanning errors. Similarly, the second preset threshold is less than or equal to the target number 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, which can ensure that the idle grid will not be mistakenly classified as an unknown grid due to accidental changes in the first scan data, or determine that the unknown grid will not be mistakenly classified as an idle grid due to accidental changes in the first scan data.

[0067] It can be seen that the setting of the first preset threshold and the second preset threshold in this embodiment provides a buffer area, so that the mobile device can still 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 schematic diagram of a process for determining the first position of a mobile device provided by an embodiment of the present application. Figure 1 Based on the embodiment shown, Figure 5 The embodiment shown is described below in detail. Figure 5 The embodiment shown and Figure 1 The differences and similarities of the illustrated embodiments are not described in detail.

[0069] like Figure 5 As shown, in this embodiment, determining the first position of the mobile device includes the following steps.

[0070] Step S510, determining a second posture of the mobile device before the movement.

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

[0072] For example, a sensor deployed from a mobile device is used to determine its posture before it starts moving, and then the posture is calibrated through algorithm optimization to reduce measurement errors and improve positioning accuracy. If it is determined that the accuracy of the posture meets the target accuracy threshold, the calibrated posture is determined as the second posture.

[0073] Step S520: Determine a third posture of the mobile device based on the second posture and the odometer data of the mobile device during movement.

[0074] Odometer data refers to measurement data about the motion state of a mobile device provided by an odometer. For example, these measurement data include: a straight-line distance moved by the mobile device within a specific time, a rotation angle during movement, and a moving speed.

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

[0076] Step S530, performing reliability verification on the third posture, and determining the first posture of the mobile device based on the verification result and the third posture.

[0077] Optionally, the reliability of the third posture is verified by using third-party positioning information, which refers to information collected by sensors that are not directly deployed or carried by the mobile device itself. For example, the third-party positioning information is a laser positioning system installed in the target scene, which can provide the precise posture of the mobile device relative to the fixed point. The reference posture of the mobile device can be calculated through the position of the fixed point and the precise posture. Then, the calculated third posture is compared with the reference posture. If the two are consistent or the difference is within an acceptable error range, the third posture can be considered reliable. At this time, the third posture is directly determined as the first posture of the mobile device. On the contrary, if there is a significant difference between the two, the reference posture can be used to correct the third posture in order to obtain the first posture.

[0078] In this embodiment, the second posture of the self-moving device before moving provides a reference point for subsequent posture calculation. Then, the second posture and odometer data are used to predict the third posture of the self-moving device at the subsequent position, so that the third posture can reflect the dynamic changes of the self-moving device in real time. Then, the third posture is corrected through reliability verification to further ensure the accuracy of the first posture. This posture meets the target accuracy threshold and can be used for subsequent navigation and map repair. At the same time, it can improve the accuracy of navigation and map updates.

[0079] For step S530, except Figure 5 In addition to the embodiments described in the present application, another embodiment is provided. Specifically, Figure 6 FIG. 2 is a flow chart of determining the first position of a mobile device according to another embodiment of the present application. Figure 6 As shown, the reliability of the third posture is verified, and based on the verification result and the third posture, the first posture of the self-moving device is determined, including the following steps.

[0080] Step S610, obtaining second scanning data collected by the laser radar in the third posture.

[0081] Exemplarily, in the third posture, a lidar is used to emit laser beams, and the time it takes for these laser beams to be reflected back after encountering surrounding obstacles is measured, so as to calculate the distance between the mobile device and the obstacles. These measurement results form a set of point cloud data, namely, the second scanning data, which represents the outline and layout of the surrounding environment of the mobile device when it is in the third posture.

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

[0083] Exemplarily, 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 coincides with 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 matches the first grid map successfully, the third posture is calibrated based on the transformation parameters when the matching is successful to obtain the first posture of the mobile device.

[0085] Exemplarily, the transformation parameters include a translation vector and a rotation matrix. The translation vector is a three-dimensional vector, which indicates 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] Assume that the transformation parameters indicate that the third pose is offset by 1 meter to the north and 0.5 meter to the west relative to the actual environment, and needs to be rotated 5° counterclockwise. The process of calibrating the third pose using these transformation parameters is: move the third pose of the self-mobile device 1 meter to the north, 0.5 meter to the west, and then rotate 5° counterclockwise. In this way, the calibrated pose is the first pose.

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

[0088] Figure 7 FIG. 1 is a flow chart of matching the second scan data with the first grid map provided by an embodiment of the present application. Figure 6 Based on the embodiment shown, Figure 7 The embodiment shown is described below in detail. Figure 7 The embodiment shown and Figure 6 The differences and similarities of the illustrated embodiments are not described in detail.

[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, 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.

[0091] The successfully matched point cloud refers to the part of the point cloud that can successfully correspond to the known obstacle position on the first grid map when matching the second scan data with the first grid map, and the position of this part of the point cloud in space is consistent with or very close to the obstacle position marked on the first grid map. It can be understood that the first number indicates how many proportions of points in the second scan data are correctly identified and matched with the obstacles on the first grid map. The larger this number is, the more successful the matching process is, and the more accurate the pose estimation of the self-moving device is.

[0092] Point clouds falling into the unknown grids in the first grid map indicate that there is insufficient information to determine that they match the obstacles in the first grid map. The second quantity serves as a reference indicator to evaluate 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 item to adjust the first quantity to obtain a third quantity.

[0094] The penalty term refers to a negative adjustment made to the point clouds that fall on the unknown grids in the first grid map to reflect that these point clouds contribute less or are uncertain to the successful matching. This adjustment is equivalent to deducting points or penalizing the first quantity.

[0095] Exemplarily, the third number is obtained by subtracting M times the second number from the first number, where M is a natural number greater than 1. Exemplarily, the third number is equal to num_match-2*num_gray, where num_gray represents the second number of point clouds falling into the unknown grid of the first grid map, and num_match represents the first number of successfully matched point clouds. Optionally, in this embodiment, M is equal to 2.

[0096] Step S730, calculating the ratio of the third number to the total number of point clouds included in the second scan data, and obtaining a matching degree between the second scan data and the first grid map.

[0097] Exemplarily, the second scan data contains a total of 500 point clouds. After matching with the first grid map, it is determined that 300 of the point clouds are successfully matched to the first grid map, while 50 point clouds fall on the unknown grid. Therefore, the second number 50 is subtracted from the 300 successfully matched point clouds as a penalty term to obtain 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, and a matching degree of 0.4 is obtained.

[0098] Step S740: determining whether the second scan data matches the first grid map successfully based on the matching degree between the second scan data and the first grid map.

[0099] Optionally, a threshold is set, and if the matching degree between the second scan data and the first grid map is greater than the threshold, it is determined that the second scan data and the first grid map are successfully matched. Exemplarily, the threshold is set to 0.7, then, according to the example in step S630, 0.4 is less than 0.7, and therefore, it is determined that the second scan data and the first grid map are not successfully matched.

[0100] In this embodiment, it is more desirable that the second scan data can match the occupied grids on the first grid map rather than the unknown grids. Therefore, when calculating the matching degree, those point clouds that match the unknown grids are considered less reliable, and the number of successfully matched point clouds (i.e., the first number) needs to be adjusted by subtracting the corresponding penalty term, thereby obtaining an adjusted matching degree index (i.e., the third number). This adjusted matching degree index can more accurately reflect the matching degree between the second scan data and the first grid map. In this way, the accuracy of the pose estimation can be more reasonably evaluated, and it can be judged whether the second scan data matches the first grid map successfully.

[0101] For step S740, except Figure 7 In addition to the embodiment described in, in another implementation method, the relationship between the matching degree between the second scan data and the first grid map and the third preset threshold value can be first determined; if the matching degree between the second scan data and the first grid map is greater than the third preset threshold value, multiple scan data that are temporally related to the second scan data in the third posture are obtained; if the matching degrees of the multiple temporally related scan data and the first grid map are all greater than the third preset threshold value, it is determined that the second scan data matches the first grid map successfully.

[0102] Specifically, the multiple scan data that are temporally related to the second scan data refer to the multiple scan data collected immediately before and after the second scan data in the time sequence during the environmental scanning process of the self-mobile device, mainly including the preceding scan data and the following scan data. Among them, the preceding scan data represents the position and environmental state of the self-mobile device in the environment before the second scan data; the following scan data represents the position and environmental state of the self-mobile device in the environment after the second scan data. Exemplarily, the multiple scan data that are temporally related include 5 preceding scan data and 5 following scan data.

[0103] In this embodiment, if the matching degree between the second scan data and the first grid map exceeds the third preset threshold, it means that the matching quality between the single scan data and the first grid map is high. However, in order to ensure the stability and reliability of the matching result, it is not only dependent on the matching result of the single scan data, but further obtains multiple scan data adjacent to the second scan data in time series, which include scan data collected under the third posture before and after the second scan data. Then, the matching degree of these front and back related scan data is evaluated with the first grid map respectively. If the matching degree of these continuous scan data with the first grid map also exceeds the third preset threshold, it indicates that a continuous and stable matching relationship is maintained between the scan data of the self-mobile device and the first grid map for a period of time, which also indirectly verifies that the second scan data is successfully matched with the first grid map. By considering a series of time-series related scan data, the judgment criteria for successful matching are improved, the calibration of the third posture is more robust, and the mismatch caused by accidental errors or instantaneous environmental changes is reduced.

[0104] Figure 8 FIG. 1 is a flow chart of determining a second posture of a mobile device before moving provided by an embodiment of the present application. Figure 5 Based on the embodiment shown, Figure 8 The embodiment shown is described below in detail. Figure 8 The embodiment shown and Figure 5The differences and similarities of the illustrated embodiments are not described in detail.

[0105] like Figure 8 As shown, in this embodiment, determining the second posture of the mobile device before moving includes the following steps.

[0106] Step S810, determining a fourth posture of the mobile device before the movement.

[0107] Specifically, the fourth posture is an initial estimated posture of the mobile device before it moves.

[0108] Exemplarily, there is a preset posture in the self-moving device, which is obtained by identifying a QR code or a fixed device such as a charging pile. Then, with the preset posture as the center, a rough search is performed within the second target range of the preset posture to determine an approximate position and direction of the self-moving device before moving, that is, the fourth posture. 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 to the left or right in the y-axis direction, and an angle of 1 unit rotated clockwise or counterclockwise by the self-moving device. Optionally, during the rough search process, each parameter (x, y and rotation angle) of the posture of the self-moving device is adjusted and searched in steps of 0.5 units.

[0109] Step S820, searching within the first target range with the fourth posture as the center, to obtain multiple fifth postures.

[0110] Specifically, searching within the first target range refers to performing a precise search within the first target range. Optionally, the first target range is: the distance can be adjusted forward or backward, left or right by a maximum of 1 unit in the x-axis and y-axis directions, and the self-moving device can be rotated clockwise or counterclockwise by a maximum of 0.3 units. Optionally, the adjustment of the self-moving device in the x-axis and y-axis directions is performed in steps of 0.1 units, which is finer than the 0.5 unit step of the coarse search, and enables more detailed position adjustment. In addition, the adjustment of the self-moving device during rotation is performed in steps of 0.05 units, which is also finer than the angular resolution of the coarse search, thereby achieving more detailed orientation adjustment.

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

[0112] The posture score characterizes the positioning accuracy and reliability of the mobile device in the posture. For example, for each fifth posture, the sensor data (such as the scan data in the fifth posture) is compared with the known first grid map to calculate the posture score of the fifth posture.

[0113] Step S840, calibrating the fifth posture with the highest posture score to obtain the second posture of the mobile device before moving.

[0114] In some embodiments, the scanning data collected by the laser radar in the fifth posture with the highest posture score is obtained; the scanning data is matched with the first grid map, and if the match is successful, the fifth posture with the highest posture score is calibrated based on the transformation parameters when the match is successful, so as to obtain the second posture of the mobile device before the operation. The specific implementation method of this part can be referred to Figure 5 The embodiments shown will not be described in detail here.

[0115] In this embodiment, the initial estimated posture of the self-moving device before the operation is first determined, and then, with the initial estimated posture as the center, a search is performed within the first target range to obtain multiple fifth postures, which improves the accuracy of posture estimation. Next, the posture score is calculated for each fifth posture, and the fifth posture with the highest score is calibrated to obtain the second posture of the self-moving device before moving, which ensures that even when the self-moving device is moving, high-precision posture information can be maintained, providing a guarantee for the stable operation and precise navigation of the self-moving device.

[0116] Fig. 9 FIG. 1 is a flow chart of calculating the posture score of the fifth posture provided by an embodiment of the present application. Figure 8 Based on the embodiment shown, Fig. 9 The embodiment shown is described below in detail. Fig. 9 The embodiment shown and Figure 8 The differences and similarities of the illustrated embodiments are not described in detail.

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

[0118] Step S910: determining a gradient grid map corresponding to the first grid map.

[0119] Specifically, the gradient grid map is also a form of map representation, which not only contains the information about the location of obstacles in the traditional grid map, but also provides the distance information from each grid to the nearest obstacle.

[0120] Optionally, the gradient grid map is generated by calculating the distance from each grid to the nearest obstacle, and this distance can be the actual physical distance or the relative distance converted by some function.

[0121] Step S920, obtain the third scanning data collected by the laser radar in the fifth posture, and map the point cloud in the third scanning data to the gradient grid map to obtain the target distance value of the point cloud in the third scanning data in the gradient grid map.

[0122] Exemplarily, the coordinates of the point cloud in the third scanning data are converted into coordinates in the corresponding gradient grid map, and then the target distance value corresponding to each point cloud in the gradient grid map is queried, that is, the distance from each point cloud to the nearest obstacle.

[0123] Exemplarily, the query process is completed by searching for the corresponding grid of the point cloud in the gradient grid map and reading the pre-stored distance value in the grid. 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 of converting the target distance value of the point cloud in the gradient grid map into a score value, which is used to evaluate the matching degree between each point cloud and the obstacle position.

[0126] Optionally, the mapping relationship between the distance value and the score includes: if the target distance value of the point cloud in the gradient grid map is greater than the fifth preset threshold, the score of the point cloud is recorded as zero, and exemplarily, 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, the score of the point cloud is determined based on the target distance value corresponding to the point cloud and the nth power of the specified value. Exemplarily, the score of the point cloud = -d*d / 2*sigma*sigma, sigma represents the specified value, and d represents the target distance value of the point cloud in the gradient grid map. Exemplarily, sigma is equal to 0.4, and n is equal to 2.

[0127] Step S940: Determine the sum of the scores of the point cloud in the third scan data as the posture score of the fifth posture.

[0128] Assume that the third scan data contains 100 point clouds, and each point cloud is mapped to the gradient grid map through the previous steps to obtain its own target distance value. Then, based on these target distance values ​​and the mapping relationship between the predefined distance value and the score, a score is calculated for each point cloud.

[0129] In the actual calculation, there are 60 point clouds with target distance values ​​less than 0.3 meters, and 30 point clouds with distance values ​​greater than 0.3 meters, and 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, and then the scores of these 60 point clouds are added together to obtain the posture score of the fifth posture.

[0130] In this embodiment, the gradient grid map provides a reference framework containing environmental obstacle distance information for the subsequent calculation of the posture score. The third scan data collected by the laser radar is used, and the third scan data is mapped to the gradient grid map to obtain the target distance value of each point cloud in the gradient grid map, thereby realizing the quantification of the distance between each point cloud and the obstacle position. Then, through the mapping relationship between the distance value and the score, the target distance value of the point cloud is converted into a score. The higher the score, the better the matching degree. Finally, the scores of all point clouds are added to obtain the posture score of the fifth posture. This posture score comprehensively reflects the overall matching of the third scan data and the first grid map under the fifth posture.

[0131] Next, we will analyze in detail how to determine the gradient grid map corresponding to the first grid map. Specifically, the occupied grids in the first grid map are placed in the queue to be traversed, and the distance value of the occupied grids is set to zero; when the queue to be traversed is not empty, the following traversal operation is performed: the head grid is taken out from the queue to be traversed, and the distance value between the adjacent grid of the head grid and the source grid of the head grid is calculated, and the source grid represents the occupied grid closest to the head grid; if the distance value is less than a fourth preset threshold value, 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 head grid is set as the source grid of the adjacent grid, and the adjacent grid is placed in the queue to be traversed; otherwise, the head 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 queue to be traversed as the starting point of the traversal. Then, a head grid is taken out from the queue to be traversed, and then all its adjacent grids (usually in four directions of up, down, left and right) are checked. For each adjacent grid, the distance value between it and the source grid of the head grid (i.e., the nearest occupied grid) is calculated. If this distance value is less than the fourth preset threshold and is smaller than the current distance value recorded by the adjacent grid, this indicates that a closer path to the obstacle is found for the adjacent grid, so the distance value of the adjacent grid is updated, and its source grid is set to the source grid of the head grid, and then this adjacent grid is added to the queue to be traversed for subsequent processing. If the distance value of the adjacent grid does not meet the update condition, the head grid is removed from the queue to be traversed, indicating that the diffusion from the source grid of the head grid has been completed.

[0133] This process is repeated until the queue to be traversed is empty, that is, all reachable grids have been processed. Finally, each grid is assigned a distance value, which represents its distance to the nearest obstacle. Based on these distance values, a gradient grid map is generated. Fig.10 FIG. 1 is a schematic diagram of a gradient grid map provided by an embodiment of the present application. Fig.10 As shown, the left part is the map grid map corresponding to area 1 on the right side.

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

[0135] Combination of the above Figures 1 to 10 , describes in detail the map updating method embodiment of the present application, and the following is combined with Fig.11 , describes in detail the map updating device embodiment of the present application. It should be understood that the description of the map updating method embodiment corresponds to the description of the map updating device embodiment, so the parts not described in detail can refer to the previous method embodiment.

[0136] Fig.11 FIG. 1 is a schematic diagram of the structure of a map updating device provided by an embodiment of the present application. Fig.11 As shown, the map updating device 110 provided in the embodiment of the present application includes:

[0137] The determination module 1110 is used to determine the first position of the self-mobile device during the movement of the self-mobile device;

[0138] A mapping module 1120 is used to obtain first scanning data collected by the laser radar in the first posture, and map laser information contained in the first scanning data to a first grid map, where the laser information includes a laser emission point and a laser point;

[0139] The updating module 1130 is used to update the grid state of the first grid map based on the positions of the laser emission points and the laser points in the first grid map to obtain a second grid map.

[0140] In this embodiment, each grid in the first grid map is preset with a target number of times hit by the laser beam. The updating module 1130 is also used to, for each grid in the first grid map, reduce the target number of times corresponding to the grid by one each time the grid is crossed by the laser emission point and the straight line where the laser point is located; increase the target number of times corresponding to the grid by one each time the grid contains a laser point, and finally obtain the actual number of times after the grid is updated; if the actual number of times after the grid is updated is greater than the first preset threshold, the grid is determined to be an occupied grid; if the actual number of times after the grid is updated is less than the second preset threshold, the grid is determined to be an idle grid; if the actual number of times after the grid is updated is between the first preset threshold and the second preset threshold, the grid is determined to be an unknown grid; based on the re-determined grid state, the current grid state of the grid in the first grid map is updated to obtain the second grid map.

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

[0142] In this embodiment, the determination module 1110 is also used to determine the second posture of the self-moving device before moving; determine the third posture of the self-moving device based on the second posture and the odometer data of the self-moving device during the movement; perform reliability verification on the third posture, and determine the first posture of the self-moving device based on the verification result and the third posture.

[0143] In this embodiment, the determination module 1110 is also used to obtain second scanning data collected by the laser radar in the third posture; match the second scanning data with the first grid map to verify the reliability of the third posture; if the verification result indicates that the second scanning data matches the first grid map successfully, the third posture is calibrated based on the transformation parameters when the match is successful to obtain the first posture of the self-mobile device.

[0144] In this embodiment, the determination module 1110 is also used 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 the unknown grid in the first grid map; using the second number as a penalty item, adjusting 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 degree of matching 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 degree of matching between the second scan data and the first grid map.

[0145] In this embodiment, the determination module 1110 is also used to obtain multiple scan data that are temporally related to the second scan data in the third posture if the matching degree between the second scan data and the first grid map is greater than a third preset threshold; if the matching degree between the multiple temporally related scan data and the first grid map is greater than the third preset threshold, it is determined that the second scan data matches the first grid map successfully.

[0146] In this embodiment, the determination module 1110 is also used to determine the fourth posture of the self-moving device before it moves, the fourth posture representing the initial estimated posture of the self-moving device before it moves; searching within the first target range with the fourth posture as the center to obtain multiple fifth postures; for each fifth posture, calculating the posture score of the fifth posture; calibrating the fifth posture with the highest posture score to obtain the second posture of the self-moving device before it moves.

[0147] In this embodiment, the determination module 1110 is also used to determine the gradient grid map corresponding to the first grid map; obtain the third scanning data collected by the laser radar in the fifth posture, and map the point cloud in the third scanning data to the gradient grid map to obtain the target distance value of the point cloud in the third scanning data in the gradient grid map; determine the score of each point cloud in the third scanning 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 clouds in the third scanning data as the posture score of the fifth posture.

[0148] In this embodiment, the determination module 1110 is also used to put the occupied grids in the first grid map into the queue to be traversed, and set the distance value of the occupied grid to zero; when the queue to be traversed is not empty, perform the following traversal operations: take the head grid from the queue to be traversed, calculate the distance value between the adjacent grid of the head grid and the source grid of the head grid, the source grid represents the occupied grid closest to the head grid; if the distance value is less than the fourth preset threshold value, and the distance value is less than the current value 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 point grid of the head grid is set as the source point grid of the adjacent grid, and the adjacent grid is placed in the queue to be traversed; otherwise, the head 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.

[0149] Below, reference Fig.12 To describe an electronic device according to an embodiment of the present application. Fig.12 Shown is a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application.

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

[0151] The processor 1201 may be a central processing unit (CPU) or other forms of processing units having 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, and the computer program product 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 (cache), etc. 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 run the program instructions to implement the map update method of each embodiment of the present application described above and / or other desired functions. Various contents such as the first pose of the mobile device, the first scan data, the first grid map, and the second grid map may also be stored in the computer-readable storage medium.

[0153] In one example, the electronic device 120 may further include: an input device 1203 and an output device 1204 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (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 posture of the mobile device, the first scan data, the first grid map and the second grid map, etc. The output device 1204 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.

[0156] Of course, to simplify, Fig.12 Only some of the components related to the present application in the electronic device 120 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 120 may also include any other appropriate components.

[0157] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the map updating method according to various embodiments of the present application described above in this specification.

[0158] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0159] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the map updating method according to various embodiments of the present application described above in this specification.

[0160] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0161] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0162] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0163] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

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

[0165] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A map updating method, characterized in that: Applied to a self-propelled device equipped with a laser radar, the method comprises: During the movement of the self-moving device, determining a first pose of the self-moving device; Acquire first scanning data collected by the laser radar in the first posture, and map laser information contained in the first scanning data to a first grid map, wherein the laser information includes a laser emission point and a laser point; Based on the positions of the laser emission points and the laser points in the first grid map, the grid state of the first grid map is updated to obtain a second grid map.

2. The map updating method according to claim 1, characterized in that: Each grid in the first grid map is preset with a target number value hit by the laser beam; and based on the positions of the laser emission point and 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 where the laser point is located, the target number value corresponding to the grid is reduced by one; each time the grid contains one laser point, the target number value corresponding to the grid is increased by one, and finally the actual number value of the grid after update is obtained; If the actual number of times the grid is updated is greater than a first preset threshold, 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, 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, the grid is determined to be an unknown grid; Based on the re-determined grid state, the current grid state of the grid 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 target frequency value corresponding to the occupied grid in the first grid map is greater than the target frequency value corresponding to the unknown grid in the first grid map; The target number value corresponding to the unknown grid in the first grid map is greater than the target number value corresponding to the idle grid in the first grid map; The first preset threshold is less than a target number value corresponding to an occupied grid in the first grid map, and the second preset threshold is less than or equal to a target number value corresponding to an unknown grid in the first grid map.

4. The map updating method according to any one of claims 1 to 3, characterized in that: The determining of the first posture of the self-moving device comprises: Determining a second posture of the self-moving device before moving; Determine a third posture of the self-moving device based on the second posture and odometer data of the self-moving device during movement; A reliability check is performed on the third posture, and based on the check result and the third posture, a first posture of the self-moving device is determined.

5. The map updating method according to claim 4, characterized in that: The reliability check of the third posture and determining the first posture of the self-moving device based on the check result and the third posture include: Acquire second scanning data collected by the laser radar in the third posture; Matching the second scan data with the first grid map to verify the reliability of the third posture; If the verification result indicates that the second scan data matches the first grid map successfully, the third posture is calibrated based on the transformation parameters when the matching is successful to obtain the first posture of the self-moving device.

6. The map updating method according to claim 5, characterized in that: The 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 amount as a penalty item, adjusting the first amount to obtain a third amount; Calculating a ratio of the third number to the total number of point clouds included in the second scan data to obtain a matching degree between the second scan data and the first grid map; Based on the matching degree between the second scan data and the first grid map, it is determined whether the second scan data matches the first grid map successfully.

7. The map updating method according to claim 6, characterized in that: The determining whether the second scan data successfully matches the first grid map 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, acquiring a plurality of scan data in the third posture that are temporally related to the second scan data; If the matching degrees between the plurality of previously related scan data and the first grid map are all greater than the third preset threshold, it is determined that the second scan data is successfully matched with the first grid map.

8. The map updating method according to claim 4, characterized in that: The determining of the second posture of the self-moving device before the movement includes: Determining a fourth position pose of the self-moving device before the movement, the fourth position pose representing an initial estimated position pose of the self-moving device before the movement; Taking the fourth posture as the center, searching within the first target range to obtain multiple fifth postures; For each fifth posture, calculating a posture score of the fifth posture; The fifth posture with the highest posture score is calibrated to obtain the second posture of the self-moving device before moving.

9. The map updating method according to claim 8, characterized in that: The calculating the posture score of the fifth posture comprises: Determine a gradient grid map corresponding to the first grid map; Acquire the third scanning data collected by the laser radar in the fifth posture, and map the point cloud in the third scanning data to the gradient grid map to obtain the target distance value of the point cloud in the third scanning data in the gradient grid map; Determining scores of respective point clouds in the third scan data based on the target distance value and the target mapping relationship between the distance value and the score; The sum of the scores of the point clouds in the third scan data is determined as the pose score of the fifth pose.

10. The map updating method according to claim 9, characterized in that: The determining the gradient grid map corresponding to the first grid map includes: Put the occupied grids in the first grid map into a queue to be traversed, and set the distance value of the occupied grid to zero; In the case that the queue to be traversed is not empty, the following traversal operation is performed: the head grid is taken out from the queue to be traversed, and the distance value between the adjacent grid of the head grid and the source grid of the head grid is calculated, and the source grid represents the occupied grid closest to the head grid; if the distance value is less than a fourth preset threshold value, 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 head grid is set as the source grid of the adjacent grid, and the adjacent grid is placed in the queue to be traversed; otherwise, the head grid is removed 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; A gradient grid map corresponding to the first grid map is generated based on the distance value between each grid in the first grid map and the respective source grid.

11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the map updating method according to any one of claims 1 to 10 above.

12. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to execute the map updating method described in any one of claims 1 to 10 above.

13. A computer program product, characterized in that The computer program product comprises instructions, which, when executed on an electronic device, enable the electronic device to implement the map updating method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Robot positioning method and device

    CN110530368A

  • Laser map updating method based on grid detection, terminal and computer equipment

    CN112380312A

  • Map construction method and device, terminal equipment and storage medium

    CN114219905A

  • Map construction method and device, electronic equipment and storage medium

    CN114241146A

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

    CN114326699A