Pose loss detection method, storage medium, electronic equipment and program product

By using keyframes in robot pose detection to generate local maps and match degree detection with the global map, the pose loss detection error problem caused by temporary obstacles is solved, and more accurate and robust pose detection is achieved.

CN119579930APending Publication Date: 2025-03-07ZHEJIANG ZHIDING ROBOT CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411508163.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

When the robot uses two-dimensional laser scanning and two-dimensional plan map matching technology to perform pose detection, temporary obstacles cause laser point matching to reduce, which in turn causes errors in the robot's pose loss detection.

Method used

By obtaining the keyframes collected by the target robot during the movement of the target area, generating a local map, and matching it with the pre-built global map, we judge whether the target robot is located in the travelable area in the global map to determine whether its position is lost.

Benefits of technology

This method can more accurately capture the characteristic information of the target robot's current environment, identify data mismatch caused by temporary obstacles, reduce false detection, and improve the accuracy and robustness of pose loss detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579930A_ABST
    Figure CN119579930A_ABST
Patent Text Reader

Abstract

The invention provides a pose loss detection method, a storage medium, electronic equipment and a program product, and relates to the technical field of positioning. The pose loss detection method comprises the following steps: acquiring a key frame in a target window collected by a target robot in a process of moving in a target area; generating a local map corresponding to the target area based on the key frame in the target window; determining a matching degree between the local map and a global map of a pre-constructed target area, and detecting whether the target robot is located in a drivable area in the global map; and determining whether the pose of the target robot is lost based on the matching degree and / or the detection result. According to the method, the accuracy and robustness of pose loss detection of the target robot are enhanced by constructing the local map.
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 posture loss detection method, storage medium, electronic device and program product. Background Art

[0002] Robots generally use 2D laser scanning and 2D plane map matching technology to determine their posture. Specifically, in actual operation, a matching threshold is set to determine whether the robot has lost its posture. If the matching degree is lower than the threshold, the robot's posture is considered incorrect. However, if there are a large number of temporary obstacles in the robot's driving area, this method may cause the matching degree of the laser points to be abnormally reduced, which in turn causes errors in the robot's posture loss detection. In order to reduce false detections, the threshold can be set lower, but doing so may result in the robot being unable to accurately detect when it actually loses its posture. Summary of the invention

[0003] In view of this, an embodiment of the present application provides a posture loss detection method, a storage medium, an electronic device and a program product.

[0004] In a first aspect, an embodiment of the present application provides a posture loss detection method, comprising: obtaining key frames in a target window collected when the target robot moves in a target area; generating a local map corresponding to the target area based on the key frames in the target window; determining the degree of match between the local map and a pre-constructed global map of the target area, and detecting whether the target robot is located in a drivable area in the global map; determining whether the posture of the target robot is lost based on the degree of match and / or the detection results.

[0005] In combination with the first aspect, in certain implementations of the first aspect, determining the degree of match between a local map and a pre-constructed global map of the target area includes: calculating a first degree of match between the local map and the global map; calculating a second degree of match between each key frame in the target window and the global map; using the first degree of match and the second degree of match as the degree of match between the local map and the pre-constructed global map of the target area; wherein, based on the degree of match and / or the detection result, determining whether the position and posture of the target robot is lost includes: determining whether the position and posture of the target robot is lost based on at least one of the first degree of match, the second degree of match and the detection result.

[0006] In combination with the first aspect, in certain implementations of the first aspect, based on at least one of the first matching degree, the second matching degree and the detection result, determining whether the position and posture of the target robot are lost includes: if the detection result is that the target robot is not in the drivable area in the global map, determining that the position and posture of the target robot are lost; if the detection result is that the target robot is in the drivable area in the global map, determining whether the maximum value of the second matching degree is greater than a first preset threshold value, if greater than the first preset threshold value, determining that the position and posture of the target robot are not lost; if less than or equal to the first preset threshold value, determining whether the first matching degree is greater than the second preset threshold value, if greater than the second preset threshold value, determining that the position and posture of the target robot are not lost; if less than or equal to the second preset threshold value, determining that the position and posture of the target robot are lost.

[0007] In combination with the first aspect, in some implementations of the first aspect, the global map and the local map are both represented in a rasterized manner, wherein the first color grids of the global map and the local map are drivable areas, the second color grids are unknown areas, and the third color grids are occupied areas; calculating a first matching degree between the local map and the global map includes: calculating a matching score between a point cloud in the local map and the global map; calculating a matching ratio between a first color grid of the local map and a first color grid of the global map; and multiplying the matching score and the matching ratio to obtain a first matching degree between the local map and the global map.

[0008] In combination with the first aspect, in certain implementations of the first aspect, calculating the matching ratio of the first color grid of the local map to the first color grid of the global map includes: mapping the first color grid of the local map to the global map; if the first color grid of the local map corresponds to the first color grid of the global map, determining that the first color grid of the local map matches the first color grid of the global map successfully; determining the ratio of the number of first color grids of the local map that match successfully to the total number of first color grids of the local map; and determining the matching ratio of the first color grid of the local map to the first color grid of the global map based on the ratio.

[0009] In combination with the first aspect, in certain implementations of the first aspect, calculating the second degree of match between each key frame in the target window and the global map includes: determining a first number of points in the point cloud of the key frame that successfully match the global map; determining a second number of points in the point cloud of the key frame that fall into a second color grid of the global map; using the second number as a penalty item to adjust the first number to obtain a corrected number; calculating the ratio of the corrected number to the total number of point clouds of the key frame, and determining the ratio as the second degree of match between the key frame and the global map.

[0010] In combination with the first aspect, in certain implementations of the first aspect, a local map corresponding to the target area is generated based on the key frames in the target window, including: using the key frames in the target window to generate a grid map with the current posture of the laser sensor of the target robot as the center point; determining the type of grids contained in the grid map, the type including at least one of unknown grids, idle grids and occupied grids; determining the target point cloud corresponding to the occupied grid, and using the target point cloud in the grid map to represent the occupied grid, thereby obtaining the local map corresponding to the target area.

[0011] In combination with the first aspect, in certain implementations of the first aspect, determining the type of grid contained in the grid map includes: determining the penetration grid between the laser center point and the detection point based on the data contained in each key frame; for each penetration grid, recording a third number of penetration grids hit by the laser beam and a fourth number of penetration grids not hit by the laser beam; if the third number is greater than or equal to the fourth number, determining that the penetration grid is an occupied grid; if the third number is less than the fourth number, determining that the penetration grid is an idle grid; if the third number and the fourth number are both zero, determining that the penetration grid is an unknown grid.

[0012] In combination with the first aspect, in certain implementations of the first aspect, determining the target point cloud corresponding to the occupied grid includes: for each occupied grid, determining the detection point corresponding to the laser beam that last hits the occupied grid as the target point cloud corresponding to the occupied grid.

[0013] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: determining the coordinate data of each penetration grid between the laser center point and the detection point. Wherein, determining the coordinate data of each penetration grid between the laser center point and the detection point includes: calculating the slope k of the straight line from the laser center point to the detection point; if the absolute value of the slope k is greater than 1, then determining that the ordinate of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of the resolution of the local map, and the abscissa of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of k times the resolution of the local map; if the absolute value of the slope k is less than 1, then determining that the abscissa of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of the resolution of the local map, and the ordinate of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of one-k times the resolution of the local map; based on the current posture of the laser sensor and the arithmetic relationship between the abscissa and the ordinate of the penetration grid, determining the coordinate data of each penetration grid between the laser center point and the detection point.

[0014] In the second aspect, an embodiment of the present application provides a posture loss detection device, including: an acquisition module, used to acquire key frames in a target window collected when the target robot moves in a target area; a generation module, used to generate a local map corresponding to the target area based on the key frames in the target window; a detection module, used to determine the degree of match between the local map and a pre-built global map of the target area, and detect whether the target robot is located in a drivable area in the global map; a determination module, used to determine whether the posture of the target robot is lost based on the matching degree and / or the detection result.

[0015] 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 posture loss detection method described in the first aspect.

[0016] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor; a memory for storing processor executable instructions; the processor is used to execute the posture loss detection method described in the first aspect.

[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed on an electronic device, the electronic device implements the posture loss detection method described in the first aspect.

[0018] In the present application, the keyframe can reflect the position and state of the surrounding environment of the target robot at a specific moment. Therefore, by generating a local map based on the keyframe in the target window, the characteristic information of the current environment of the target robot can be captured more accurately. In addition, the appearance or disappearance of temporary obstacles will cause the data collected by the laser sensor in the target robot to not match the data in the global map. The present application can identify this change by matching the local map with the global map, thereby reducing the false detection caused by the dynamic change of the target area. Next, it is detected whether the target robot is located in the drivable area in the global map, which can ensure that the current position of the target robot is consistent with the expected path, and the position judgment error caused by the dynamic change of the target area can be identified. For example, if the temporary obstacle causes the laser radar sensor data of the target robot to be inconsistent with the global map, the detection result can reveal this deviation. Finally, it is determined whether the position and posture of the target robot are lost based on the matching degree and / or the detection result. This comprehensive judgment mechanism can enhance the accuracy and robustness of the detection of the position and posture loss of the target robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] 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.

[0020] Figure 1 Shown is a schematic diagram of an original map provided in an embodiment of the present application.

[0021] Figure 2 The figure is a flow chart of a posture loss detection method provided in one embodiment of the present application.

[0022] Figure 3 The figure is a schematic diagram of a process for determining the matching degree between a local map and a global map provided in an embodiment of the present application.

[0023] Figure 4 The figure is a schematic diagram of a process of generating a local map provided in an embodiment of the present application.

[0024] Figure 5 Shown is a schematic diagram of the structure of a posture loss detection device provided in one embodiment of the present application.

[0025] Figure 6 Shown is a schematic structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0026] 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.

[0027] Figure 1 FIG. 1 is a schematic diagram of an original map provided by an embodiment of the present application. Figure 1 As shown in a in the figure, the original map is a grid map, in which the wall information is marked in black and the obstacle information is marked in red boundary points. When the robot posture is correct, the obstacle information and the wall information should mostly overlap. However, in a, some obstacle information does not overlap with the wall information. This is because a temporary obstacle appears at the work site of the target robot, causing the laser beam to be blocked by the temporary obstacle and unable to see the wall information.

[0028] In practical applications, a matching threshold is often set to determine whether the robot has lost its posture. If the matching degree between the obstacle information and the wall information is less than the threshold (such as 40%), the robot posture is considered incorrect, that is, the robot posture is lost. However, this method has defects when facing a large number of temporary obstacles, because temporary obstacles may cause the matching degree of obstacle information to be abnormally reduced, such as Figure 1 b in the figure, even if the robot's posture is not actually lost. To reduce false detection, the matching threshold can be set lower, such as 20%. However, this brings another problem: when the robot actually loses its posture, the posture loss may not be accurately detected due to the low threshold. For example, Figure 1 Even if the matching degree is slightly higher than the threshold, such as 25%, the robot has actually lost the pose.

[0029] Therefore, the traditional pose loss detection method does not fully consider the impact of environmental changes on the lidar sensor data. This method cannot provide sufficiently accurate pose loss detection results when facing complex and changing working environments.

[0030] Based on the above, this application is proposed. Figure 2 FIG. 2 is a flow chart of a posture loss detection method provided by an embodiment of the present application. Figure 2 As shown, the posture loss detection method includes the following steps.

[0031] Step S210, acquiring key frames in the target window collected during the movement of the target robot in the target area.

[0032] A keyframe refers to a data set at a specific moment selected according to specific conditions during the movement of the target robot. Exemplarily, the specific conditions are that the target robot moves a target distance (such as 0.15 meters) or rotates a target angle (such as 15°). Exemplarily, the data set includes the position data of the target robot; laser scanning data, such as the timestamps of laser beam emission and reception, the distance and angle of the laser beam hitting the obstacle, etc.; environmental feature points, such as corner points, straight lines, planes, etc. The target window is a data set defined according to the keyframe on the moving path of the target robot. It contains a certain number of keyframes, for example, 20 consecutive keyframes. In addition, the target window is dynamically updated as the target robot moves, and always contains the latest environmental information to generate a local map.

[0033] In some embodiments, the target area is an elevator area, and the target robot is an item delivery robot, a patrol robot, a guide robot, a cleaning robot, etc.

[0034] Step S220: Generate a local map corresponding to the target area based on the key frames in the target window.

[0035] Exemplarily, using the keyframes in the target window, the target robot can determine the spatial layout of its surroundings, including the location, size, and shape of obstacles. By integrating and mapping this information into a local frame, the target robot can construct a local map of the surroundings that reflects its current location. Exemplarily, the local map is generated with the current pose of the target robot's lidar sensor as the center, that is, the center point of the local map corresponds to the position of the lidar sensor at a specific moment.

[0036] Step S230, determining the matching degree between the local map and the pre-constructed global map of the target area, and detecting whether the target robot is located in the drivable area in the global map.

[0037] The global map of the target area refers to a comprehensive, static map created for the target area, which contains all important spatial information and features in the area. For example, if the target area is an elevator area, the global map will record in detail the exact location of the elevator shaft; the path that the target robot can safely travel, such as corridors, halls and other public areas; obstacles, such as the location of fixed structures such as walls and columns; navigation markers, etc. The global map is pre-built before the target robot is put into use and stored in the navigation system of the target robot, providing a reference frame for the target robot to help the target robot locate and plan paths when performing tasks.

[0038] Optionally, the features in the local map and the global map are identified and matched, and then the similarity between the positions and forms of these features in the local map and those in the global map is calculated to determine the matching degree between the local map and the global map.

[0039] Optionally, the current position and posture of the target robot is obtained through a sensor, such as a laser radar sensor, a camera or an inertial navigation unit, and then the current position and posture of the target robot is mapped to the global map. By comparing the current position and posture of the target robot with the position information of the drivable area marked in the global map, it is detected whether the target robot is located in the drivable area in the global map. Exemplarily, if the current position and posture of the target robot matches the position information of the drivable area in the global map, then the detection result is that the target robot is in the drivable area; if it does not match, then it may mean that the target robot has deviated from the predetermined path or encountered an obstacle. At this time, the detection result is that the target robot is not in the drivable area.

[0040] Step S240: Determine whether the position and posture of the target robot is lost based on the matching degree and / or the detection result.

[0041] Specifically, pose loss refers to the situation where the target robot loses its knowledge of its exact position and orientation in the target area during autonomous navigation or positioning. In other words, the target robot is no longer sure of its position or orientation on the map.

[0042] Optionally, if the detection result is that the target robot is not in the drivable area, the position of the target robot is determined to be lost; if the detection result is that the target robot is in the drivable area, the matching degree is further checked. If the matching degree indicates that the features in the local map are consistent with the global map, the position of the target robot is determined to be lost. Figure 1 If the matching degree indicates that the features in the local map are inconsistent with the global map, it is determined that the target robot’s position and posture are not lost; if the matching degree indicates that the features in the local map are inconsistent with the global map, it is determined that the target robot’s position and posture are lost.

[0043] In this embodiment, the key frame can reflect the position and state of the target robot at a specific moment and the surrounding environment. Therefore, the local map generated based on the key frame in the target window can more accurately capture the characteristic information of the target robot's current environment. In addition, the appearance or disappearance of temporary obstacles will cause the data collected by the laser sensor in the target robot to not match the data in the global map. This application can identify this change by performing a matching test between the local map and the global map, thereby reducing the false detection caused by the dynamic change of the target area. Next, it is detected whether the target robot is located in the drivable area in the global map, which can ensure that the current position of the target robot is consistent with the expected path, and the position judgment error caused by the dynamic change of the target area can be identified. For example, if the temporary obstacle causes the target robot's laser radar sensor data to be inconsistent with the global map, the detection result can reveal this deviation. Finally, based on the matching degree and / or the detection result, it is determined whether the position and posture of the target robot are lost. This comprehensive judgment mechanism can enhance the accuracy and robustness of the detection of the position and posture loss of the target robot.

[0044] Figure 3 FIG. 1 is a flow chart of determining the matching degree between a local map and a global map provided by an embodiment of the present application. Figure 2 Based on the embodiment shown, Figure 3 The embodiment shown is described below in detail. Figure 3 The embodiment shown and Figure 2 The differences and similarities of the illustrated embodiments are not described in detail.

[0045] like Figure 3 As shown, in this embodiment, determining the matching degree between the local map and the pre-built global map of the target area includes the following steps.

[0046] Step S310, calculating a first matching degree between the local map and the global map.

[0047] Specifically, the first matching degree is an evaluation of the matching degree between the local map as a whole and the global map.

[0048] In some embodiments, features in the local map are matched to corresponding features in the global map through a feature matching algorithm, such as a nearest neighbor search, an iterative closest point algorithm, or machine learning. During the matching process, the algorithm evaluates the distance or angle difference between each feature in the local map and the nearest feature in the global map. Then, a matching score is calculated based on these differences, which is the first matching degree between the local map and the global map. The matching score reflects the consistency between the local map and the global map.

[0049] In other embodiments, the global map and the local map are both represented by a gridded manner, wherein the first color grid of the global map and the local map is a drivable area, the second color grid is an unknown area, and the third color grid is an occupied area. That is to say, the drivable area is represented by the first color grid, which refers to the area where the target robot can enter and move safely, including corridors, open spaces, elevator interiors, and other places without obstacles. The unknown area is represented by the second color grid, which represents the area that has not been explored or identified on the map (including the local map and the global map), which may contain obstacles, ditches or other dangers, and the navigation of the target robot in these areas needs to be cautious. The occupied area is represented by the third color grid, which refers to the area on the map that has been determined to have fixed or mobile obstacles, such as walls or other permanent structures, and the target robot should avoid these areas when performing path planning to prevent collision. Exemplarily, the first color grid is a white grid, the second color grid is a gray grid, and the third color grid is a black grid. Through this color coding method, the target robot can more intuitively distinguish and understand the different areas in its environment, so as to make corresponding navigation decisions.

[0050] Furthermore, a matching score between the point cloud in the local map and the global map is calculated; a matching ratio between the first color grid of the local map and the first color grid of the global map is calculated; and the matching score and the matching ratio are multiplied to obtain a first matching degree between the local map and the global map.

[0051] Optionally, the point cloud in the local map refers to the target point cloud corresponding to the occupancy grid in the local map, which represents the position of the obstacle actually detected by the target robot through the lidar sensor. Then, the target point cloud is compared with the occupancy grid of the corresponding position in the global map. Exemplarily, the comparison process involves finding the best matching point of each point in the target point cloud in the global map.

[0052] Then, the matching score is calculated based on the number of all matching points, the accuracy of the matching, and the consistency between the matching points. For example, the cumulative value of the distance difference between all matching point pairs is calculated and then divided by the total number of matching points to obtain an average distance error. If this average distance error is small, it means that the target point cloud matches the occupancy grid of the global map very well, so the matching score will be high. Conversely, if the average distance error is large, the matching score will be low.

[0053] In some embodiments, calculating the matching ratio of the first color grid of the local map to the first color grid of the global map includes: mapping the first color grid of the local map to the global map; if the first color grid of the local map corresponds to the first color grid of the global map, determining that the first color grid of the local map matches the first color grid of the global map successfully; determining the ratio of the number of first color grids of the local map that match successfully to the total number of first color grids of the local map; and based on the ratio, determining the matching ratio of the first color grid of the local map to the first color grid of the global map.

[0054] For example, there are 100 first color grids in the local map, 80 of which also correspond to the first color grid in the global map, that is, the number of first color grids of the local map that are successfully matched is 80, and the matching ratio is 80%. This ratio reflects the consistency between the drivable area in the local map and the drivable area in the global map. If the matching ratio is very high, it means that the drivable area in the local map is mostly consistent with the drivable area in the global map, which indicates that the position and posture of the target robot are accurate. On the contrary, if the matching ratio is low, it may mean that there is a deviation in the position and posture estimation of the target robot. In this way, a quantitative evaluation index is provided for the detection of position and posture loss of the target robot.

[0055] Optionally, in this embodiment, the matching ratio is equal to the mth power of the ratio. Exemplarily, m can be 2 or 3, and the specific value can be selected according to the actual situation. It can be understood that the ratio in this embodiment is less than or equal to 1, that is, if the first color grid of the local map matches the first color grid of the global map very well, then the ratio will tend to 1, and after the calculation of the mth power, the result will not change much. However, if the match is not good, the ratio will be very low, and after the calculation of the mth power, the result will be even lower. It can be seen that the matching ratio is more sensitive to matching errors, because even a few first color grids that fail to match will cause the ratio to drop significantly, which in turn causes the matching ratio to drop more significantly.

[0056] In addition, it should be noted that when temporary obstacles appear in the target area, the matching ratio is still based on the first color grids of the local maps that are not affected by the temporary obstacles. This means that only when a first color grid in the local map is also a first color grid in the global map, we consider that the grid is matched successfully. At the same time, since these temporary obstacles are temporary and do not change the essential layout of the drivable area on the global map, in other words, even if temporary obstacles cause some drivable areas in the local map to be blocked, this will not affect the drivable properties of these areas on the established global map, so the appearance of temporary obstacles will not affect the matching ratio in this embodiment.

[0057] However, if a matching error occurs, for example, due to errors in the lidar sensor or other interference, some occupied areas or unknown areas in the local map are mistakenly identified as drivable areas. This will result in the area of ​​the local map being considered as drivable areas being larger than the actual area when calculating the ratio, that is, the number of first color grids increases, while the corresponding area in the global map is actually occupied or unknown. Such a mismatch will reduce the size of the ratio. Therefore, changes in the ratio can help detect whether the target robot's posture is accurate and whether the match between the local map and the global map is good enough. If the ratio decreases, it may indicate that the target robot's posture estimation has deviated.

[0058] Step S320, calculating a second matching degree between each key frame in the target window and the global map.

[0059] In some embodiments, the environmental data (such as point cloud data) in each key frame is first compared with the data of the corresponding position in the global map. Exemplarily, this comparison includes finding the correspondence between the features of the environmental data in the key frame and the features in the global map, and calculating the distance error between them. Then, for each key frame, a matching score is calculated based on the number of matched features, which is the second matching degree. If the second matching degree is high, it means that the key frame matches the global map well, indicating that the pose estimation of the target robot is accurate; if the second matching degree is low, it indicates that there is an error in the pose estimation, or some changes have occurred in the environment.

[0060] In other embodiments, a first number of points that successfully match the global map is determined in the point cloud of the key frame; a second number of points of the point cloud of the key frame that fall into a second color grid of the global map is determined; the first number is adjusted using the second number as a penalty item to obtain a corrected number; the ratio of the corrected number to the total number of point clouds of the key frame is calculated, and the ratio is determined as a second degree of match between the key frame and the global map.

[0061] Exemplarily, first, each point in the point cloud of the key frame is compared with its corresponding position in the global map to identify the first number of points that successfully match the global map. Next, the second number of points in the point cloud of the key frame that fall into the second color grid (i.e., the unknown area) of the global map is counted. It can be understood that the unknown area may contain obstacles or other unpredictable factors, which may affect the accuracy of the pose loss detection. Therefore, in this embodiment, the second number will be used as a penalty item. Then, the first number is adjusted using the second number to obtain a corrected number. Optionally, the first number is subtracted from the second number M times to obtain a corrected number, where M is a natural number greater than 1. Exemplarily, the corrected number is equal to num_match-2*num_gray, where num_gray represents the second number of points in the point cloud of the key frame that fall into the second color grid of the global map, and num_match represents the first number of points that successfully match the global map. In this embodiment, M is equal to 2.

[0062] This adjustment in the present embodiment reflects the actual proportion of points in the point cloud of the key frame that are successfully matched to the drivable area of ​​the global map, while taking into account the possible negative impact of those points falling into the unknown area. Finally, the second matching degree of each key frame with the global map is obtained by calculating the ratio of the number of corrections to the total number of point clouds of the key frame. This ratio reflects the degree of matching between the key frame and the global map after considering the uncertainty caused by the unknown area. In addition, by introducing M, the second matching degree can be evaluated more conservatively to ensure that the accuracy of the pose is not overestimated due to points in the unknown area. The larger the value of M, the heavier the penalty for the unknown area, which means that the existence of any unknown area will significantly reduce the matching degree. This method helps to improve the robustness of pose loss detection, especially in complex environments or in the presence of uncertainty, and can more accurately identify pose loss.

[0063] Step S330: Using the first matching degree and the second matching degree as matching degrees between the local map and the pre-constructed global map of the target area.

[0064] In this embodiment, by combining the two matching degrees, a comprehensive matching degree between the local map and the global map can be obtained, which not only reflects the matching degree between the local map as a whole and the global map, but also covers the matching details between each key frame within the local map and the global map. This comprehensive evaluation helps to more accurately determine whether the robot's posture is accurate and whether there is a risk of posture loss. Especially in the case of dynamic changes in the environment or the presence of temporary obstacles, by combining the first matching degree and the second matching degree, it is possible to reduce misjudgments caused by environmental changes and improve the accuracy and robustness of posture loss detection.

[0065] based on Figure 2 The embodiment, in other embodiments of the present application, determines whether the position and posture of the target robot is lost based on the matching degree and / or the detection result, including: determining whether the position and posture of the target robot is lost based on at least one of the first matching degree, the second matching degree and the detection result.

[0066] Optionally, if the detection result is that the target robot is not in a drivable area in the global map, it is determined that the position and posture of the target robot is lost.

[0067] Specifically, the drivable areas in the global map represent the safe and effective navigation paths that the target robot should be in. If the target robot is not in these areas, it means that it has deviated from the predetermined path, or encountered an obstacle, or the pose estimation has deviated, and the current pose of the target robot is no longer accurate, so the target robot will be judged as having lost its pose.

[0068] Optionally, in this embodiment, it is also possible to determine whether the target robot is located in the drivable area in the global map by calculating the type of grid occupied by the outline of the target robot. For example, the physical outline of the target robot is approximated as a polygon, and a number of points are evenly selected in the polygon, plus the center position point of the target robot, which together define the occupied points of the target robot, which represent the occupied space of the target robot on the map. Then, each occupied point is mapped to a grid in the global map, and it is checked whether these grids are first color grids. If so, it means that the target robot is completely located in the drivable area of ​​the global map. On the contrary, if the grid corresponding to any occupied point is not the first color grid, it means that the target robot has entered a non-drivable area or an obstacle area.

[0069] Optionally, if the detection result is a drivable area of ​​the target robot in the global map, it is determined whether the maximum value of the second matching degree is greater than a first preset threshold value. If it is greater than the first preset threshold value, it is determined that the position and posture of the target robot is not lost.

[0070] Specifically, even if the target robot is in the drivable area in the global map, this alone is not enough to completely determine that the target robot's position and posture are accurate, because the target robot may accidentally be in the drivable area, but its actual position and posture still deviate from the expected position and posture. For example, the target robot may slightly deviate from the correct path due to sensor errors or environmental changes, or rotate a certain angle in the drivable area, resulting in an inaccurate position and posture. In this case, the evaluation of the second matching degree is particularly important.

[0071] Each key frame in the target window corresponds to a second matching degree. This embodiment selects the maximum value of the second matching degree and compares it with the first preset threshold. It can be understood that the maximum value of the second matching degree represents the best match with the global map in the key frame. By selecting the maximum value of the second matching degree, it can be ensured that in the posture loss detection process, the most favorable situation is taken into account, that is, the posture of the target robot at least at one moment is highly consistent with the global map. In addition, this selection method is not affected by other key frames with lower matching degrees caused by sensor noise and dynamic changes in the environment, and has a certain robustness. Finally, because it is only necessary to check whether the maximum value of the second matching degree exceeds the first preset threshold, without comprehensively considering the second matching degrees of all key frames, this processing method can respond quickly and determine the posture of the target robot in time, so as to make fast and accurate decisions in the navigation and path planning of the target robot.

[0072] Optionally, the first preset threshold is 0.7. If the maximum value of the second matching degree is greater than the first preset threshold, it means that the position and posture estimation of the target robot is accurate, so it can be determined that the position and posture of the target robot is not lost. On the contrary, if it is less than or equal to the first preset threshold, it is further determined whether the first matching degree is greater than the second preset threshold. If it is greater than the second preset threshold, it is determined that the position and posture of the target robot is not lost; if it is less than or equal to the second preset threshold, it is determined that the position and posture of the target robot is lost.

[0073] Specifically, when the maximum value of the second matching degree is less than or equal to the first preset threshold, it indicates that the target robot may be at risk of posture loss. At this time, the posture loss will not be determined immediately, but the first matching degree will be further checked to see if it is greater than the second preset threshold. Exemplarily, the second preset threshold is 0.4. If the first matching degree is higher than the second preset threshold, it means that the overall matching degree between the local map and the global map is within an acceptable range, so it is determined that the posture of the target robot is not lost. On the contrary, if the first matching degree is also less than or equal to the second preset threshold, it means that the overall matching degree between the local map and the global map does not meet expectations, so it is determined that the posture of the target robot is lost.

[0074] This hierarchical judgment logic can distinguish the accuracy of the target robot's posture more finely, avoid misjudging the posture state due to the abnormality of a single indicator, and can also make a timely judgment of posture loss when there is a large deviation in the posture. This improves the robustness and accuracy of posture loss detection, allowing the target robot to navigate and plan paths more reliably in complex environments.

[0075] Figure 4 FIG. 1 is a schematic diagram of a process for generating a local map provided by an embodiment of the present application. Figure 2 Based on the embodiment shown, Figure 4 The embodiment shown is described below in detail. Figure 4 The embodiment shown and Figure 2 The differences and similarities of the illustrated embodiments are not described in detail.

[0076] like Figure 4 As shown, in this embodiment, generating a local map corresponding to the target area based on the key frames in the target window includes the following steps.

[0077] Step S410, using the key frame in the target window, with the current position of the laser sensor of the target robot as the center point, to generate a grid map.

[0078] Optionally, the length and width of the grid map are Q times the laser measurement distance of the lidar sensor, for example, Q is 2, that is, the length and width of the grid map are twice the laser measurement distance. This setting means that if the laser sensor can measure a distance of up to 10 meters, the generated grid map will be a square area with a side length of 20 meters, which ensures that the local map not only contains the current position of the target robot, but also covers sufficient spatial information around it, providing the target robot with a comprehensive view of the surrounding environment.

[0079] In some embodiments, a series of key frames are selected from the target window, and then the current position of the laser sensor of the target robot is used as a reference point, that is, the center point of the grid map, and the range and resolution of the grid map are determined according to the measurement data of the laser sensor. Exemplarily, the resolution is the same as the resolution of the global map. Next, obstacles, walls and other features in the target area are mapped to the grid map using the laser sensor data, and each grid corresponds to a small area in the actual environment.

[0080] Step S420: Determine the type of grids included in the grid map.

[0081] Specifically, the type includes at least one of an unknown grid, an idle grid, and an occupied grid.

[0082] In some embodiments, the penetration grid between the laser center point and the detection point is determined based on the data contained in each key frame; the coordinate data of each penetration grid between the laser center point and the detection point is determined; for each penetration grid, a third number of penetration grids hit by the laser beam and a fourth number of penetration grids not hit by the laser beam are recorded; if the third number is greater than or equal to the fourth number, the penetration grid is determined to be an occupied grid; if the third number is less than the fourth number, the penetration grid is determined to be an idle grid; if the third number and the fourth number are both zero, the penetration grid is determined to be an unknown grid.

[0083] Specifically, the penetration grid refers to the grid that the laser beam emitted by the laser sensor passes through on the path from the laser center point to the detection point. When using laser sensors for environmental scanning and local map construction, the laser beam will be emitted at a certain scanning angle and distance. When the laser beam encounters an obstacle, the laser sensor will receive the reflected signal and calculate the distance from the laser beam to the obstacle based on the time difference between emission and reception. The path of the laser beam can be viewed as a series of penetration grids on the grid map, and each grid represents a unit on the laser beam path.

[0084] Assume that the penetration grids on the laser beam path include grid A, grid B, grid C, grid D, and grid E, and record the number of laser beam hits and misses for each penetration grid: the first number corresponding to grid A is 7, and the second number is 0; the first number corresponding to grid B is 2, and the second number is 5; the first number corresponding to grid C is 6, and the second number is 0. The first number corresponding to grid D is 1, and the second number is 4. The first number corresponding to grid E is 0, and the second number is 0. Therefore, grid A is an occupied grid, grid B is an idle grid, grid C is an occupied grid, grid D is an idle grid, and grid E is an unknown grid.

[0085] This scheme not only considers the case where the laser beam actually hits the penetration grid, but also considers the case where the laser beam does not hit the penetration grid, which helps to more accurately identify obstacles and open spaces in the target area. In addition, the state of the penetration grid is determined by comparing the first number with the second number, which increases the robustness of the posture loss detection.

[0086] Step S430, determining the target point cloud corresponding to the occupied grid, and using the target point cloud to represent the occupied grid in the grid map, thereby obtaining a local map corresponding to the target area.

[0087] In the grid map, each occupancy grid corresponds to one or more point cloud data points, which describe the precise location and shape of the obstacle in detail.

[0088] In some embodiments, for each occupancy grid, the detection point corresponding to the laser beam that last hits the occupancy grid is determined as the target point cloud corresponding to the occupancy grid.

[0089] It is understandable that obstacles may be moved or added because the environment of the target area may change over time. By recording the location of each laser sensor's last hit on the occupied grid, the target point cloud can be updated in real time to ensure the validity and accuracy of the local map information. This method not only improves the resolution of the local map, but also enhances the target robot's ability to perceive the environment, enabling it to avoid obstacles more accurately and navigate effectively in complex environments.

[0090] In this embodiment, by using the key frame in the target window and the current position of the laser sensor as the center point to generate a grid map, it is ensured that the generation of the local map is based on the latest environmental data and the position information of the target robot itself, and the local map can closely follow the movement of the target robot and reflect the changes in the surrounding environment of the target robot in real time. Then, by determining the grid type contained in the grid map, including unknown grids, idle grids and occupied grids, the information content of the local map is further enriched. Finally, the target point cloud corresponding to the occupied grid is determined, and these target point clouds are used in the grid map to represent the occupied grid. This representation method not only records the existence of obstacles, but also describes the shape and size of the obstacles in detail, so that the target robot can avoid obstacles more accurately and optimize path planning.

[0091] Combination Figure 4 In the illustrated embodiment, in other embodiments of the present application, the posture loss detection method further includes: determining the coordinate data of each penetration grid between the laser center point and the detection point.

[0092] In some embodiments, the posture of the laser sensor is first used as a reference point. Then, for each measured distance value (indicating the distance from the laser sensor to the obstacle), a trigonometric function is used to determine the angle of the detection point relative to the laser sensor posture. Through this angle and distance value, the coordinates of the detection point can be calculated. Next, these detection points are mapped to the grid map according to the scanning resolution of the laser sensor and the resolution of the grid map. Each grid has a corresponding index on the grid map, which is usually determined by the row and column numbers. This index can regard the grid map as a two-dimensional array in which each element (grid) has a corresponding position. By calculating the straight-line path from the center point of the laser to each detection point, and determining the coordinates of each grid passed through on this path according to the resolution of the grid map, the coordinate data of the penetration grid can be obtained.

[0093] In other embodiments, determining the coordinate data of each penetration grid between the laser center point and the detection point includes: calculating the slope k of the straight line from the laser center point to the detection point; if the absolute value of the slope k is greater than 1, determining that the ordinate of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of the resolution of the local map, and the abscissa of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of k times the resolution of the local map; if the absolute value of the slope k is less than 1, determining that the abscissa of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of the resolution of the local map, and the ordinate of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of one-k times the resolution of the local map, based on the current posture of the laser sensor and the arithmetic relationship between the abscissa and the ordinate of the penetration grid, determining the coordinate data of each penetration grid between the laser center point and the detection point.

[0094] It can be understood that when the absolute value of the slope k is greater than 1, it means that the longitudinal change of the laser beam is greater than the lateral change, and at this time, the longitudinal direction is used as the traversal dimension. On the contrary, if the absolute value of the slope k is less than 1, it means that the lateral change of the laser beam is greater than the longitudinal change, and at this time, the traversal dimension is used.

[0095] In an example, assume that the current position of the laser sensor is the coordinate origin (0, 0), the resolution of the local map is P, and an obstacle is detected at point (4, 3). First, calculate the slope k = 0.75 of the straight line from the center point of the laser to the detection point. Because the absolute value of the slope k is less than 1, the lateral change of the laser beam is greater than the longitudinal change, and the lateral direction is selected as the traversal dimension. According to the slope k, the horizontal coordinates of the penetration grid form an arithmetic sequence with an interval of P, that is, x = 0, P, 2P, 3P, 4P. The vertical coordinate forms an arithmetic sequence with an interval of k times P based on the slope k and the resolution, that is, y = 0, 0.75P, 1.5P, 2.25P, 3P. Therefore, the coordinates of the penetration grid on the laser beam path are (0, 0), (P, 0.75P), (2P, 1.5P),

[0096] (3P, 2.25P), (4P, 3P).

[0097] In another example, assume that the laser sensor is located at the coordinate origin (0, 0) and detects an obstacle at point (2, 4). First, calculate the slope k=2 of the straight line from the center point of the laser to the detection point. Because the absolute value of the slope k is greater than 1, the longitudinal change of the laser beam is greater than the lateral change, and the longitudinal direction is selected as the traversal dimension. According to the slope k, the ordinate of the penetrating grid forms an arithmetic sequence with an interval of P, that is, y=0, P, 2P, 3P, 4P. The abscissa forms an arithmetic sequence with an interval of one k times P, that is, x=0, 0.5P, P, 1.5P, 2P, based on the slope k and the resolution. Therefore, the coordinates of the penetrating grid on the laser beam path are (0, 0), (0.5P, P), (P, 2P), (1.5P, 3P) (2P, 4P).

[0098] In this embodiment, by calculating the coordinate data of each penetration grid, the target robot can accurately map the path of the laser beam, thereby clearly identifying which areas are detected by the laser beam. In addition, when the target robot moves in a dynamic environment, temporary obstacles may affect the laser sensor data. By analyzing the coordinate data of the penetration grid, the impact of these interferences on the pose estimation can be better understood, thereby reducing the possibility of misjudgment. Finally, this method of calculating the penetration grid coordinates in this embodiment can adapt to the inclination of the laser beam path, whether it is steep or gentle, and can accurately determine the penetration grid passed by the laser beam, which is crucial for subsequent local map construction.

[0099] Combination of the above Figures 2 to 4 , describes in detail the embodiment of the posture loss detection method of the present application, and the following is combined with Figure 5 , the embodiment of the posture loss detection device of the present application is described in detail. It should be understood that the description of the posture loss detection method embodiment corresponds to the description of the posture loss detection device embodiment, so the part not described in detail can refer to the previous method embodiment.

[0100] Figure 5 FIG. 1 is a schematic diagram of the structure of a posture loss detection device provided by an embodiment of the present application. Figure 5 As shown, the posture loss detection device 50 provided in the embodiment of the present application includes:

[0101] An acquisition module 510 is used to acquire key frames in a target window collected during the movement of the target robot in the target area;

[0102] A generating module 520, configured to generate a local map corresponding to a target area based on key frames in a target window;

[0103] A detection module 530 is used to determine the matching degree between the local map and the pre-built global map of the target area, and to detect whether the target robot is located in a drivable area in the global map;

[0104] The determination module 540 is used to determine whether the position and posture of the target robot is lost based on the matching degree and / or the detection result.

[0105] In one embodiment of the present application, the detection module 530 is also used to calculate a first matching degree between the local map and the global map; calculate a second matching degree between each key frame in the target window and the global map; use the first matching degree and the second matching degree as the matching degree between the local map and the pre-constructed global map of the target area; and determine whether the position and posture of the target robot is lost based on at least one of the first matching degree, the second matching degree and the detection result.

[0106] In one embodiment of the present application, the detection module 530 is also used to, if the detection result is that the target robot is not in the drivable area in the global map, determine that the position and posture of the target robot is lost; if the detection result is that the target robot is in the drivable area in the global map, determine whether the maximum value of the second matching degree is greater than the first preset threshold, if it is greater than the first preset threshold, determine that the position and posture of the target robot is not lost; if it is less than or equal to the first preset threshold, determine whether the first matching degree is greater than the second preset threshold, if it is greater than the second preset threshold, determine that the position and posture of the target robot is not lost; if it is less than or equal to the second preset threshold, determine that the position and posture of the target robot is lost

[0107] In one embodiment of the present application, the detection module 530 is also used to calculate the matching score between the point cloud in the local map and the global map; calculate the matching ratio between the first color grid of the local map and the first color grid of the global map; multiply the matching score and the matching ratio to obtain a first matching degree between the local map and the global map.

[0108] In one embodiment of the present application, the detection module 530 is also used to map the first color grid of the local map to the global map; if the first color grid of the local map corresponds to the first color grid of the global map, determine that the first color grid of the local map matches the first color grid of the global map successfully; determine the ratio of the number of first color grids of the local map that match successfully to the total number of first color grids of the local map; based on the ratio, determine the matching ratio of the first color grid of the local map to the first color grid of the global map.

[0109] In one embodiment of the present application, the detection module 530 is also used to determine a first number of points in the point cloud of the key frame that successfully match the global map; determine a second number of points in the point cloud of the key frame that fall into a second color grid of the global map; use the second number as a penalty item to adjust the first number to obtain a corrected number; calculate the ratio of the corrected number to the total number of point clouds of the key frame, and determine the ratio as a second degree of match between the key frame and the global map.

[0110] In one embodiment of the present application, the generation module 520 is also used to generate a grid map using the key frames in the target window and the current posture of the laser sensor of the target robot as the center point; determine the type of grids contained in the grid map, which includes at least one of unknown grids, idle grids and occupied grids; determine the target point cloud corresponding to the occupied grid, and use the target point cloud in the grid map to represent the occupied grid, thereby obtaining a local map corresponding to the target area.

[0111] In one embodiment of the present application, the generation module 520 is also used to determine the penetration grid between the laser center point and the detection point based on the data contained in each key frame; for each penetration grid, record the third number of penetration grids hit by the laser beam and the fourth number of penetration grids not hit by the laser beam; if the third number is greater than or equal to the fourth number, determine that the penetration grid is an occupied grid; if the third number is less than the fourth number, determine that the penetration grid is an idle grid; if the third number and the fourth number are both zero, determine that the penetration grid is an unknown grid.

[0112] In an embodiment of the present application, the generation module 520 is further used to, for each occupied grid, determine the detection point corresponding to the laser beam that last hits the occupied grid as the target point cloud corresponding to the occupied grid.

[0113] In one embodiment of the present application, the generation module 520 is also used to calculate the slope k of the straight line from the laser center point to the detection point; if the absolute value of the slope k is greater than 1, it is determined that the ordinate of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of the resolution of the local map, and the abscissa of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of k times the resolution of the local map; if the absolute value of the slope k is less than 1, it is determined that the abscissa of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of the resolution of the local map, and the ordinate of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of one-k times the resolution of the local map; based on the current posture of the laser sensor and the arithmetic relationship between the abscissa and ordinate of the penetration grid, the coordinate data of each penetration grid between the laser center point and the detection point is determined.

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

[0115] like Figure 6 As shown, the electronic device 60 includes one or more processors 601 and a memory 602 .

[0116] The processor 601 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 60 to perform desired functions.

[0117] The memory 602 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 601 may run the program instructions to implement the posture detection loss method of each embodiment of the present application described above and / or other desired functions. Various contents such as target windows, key frames, matching degrees, detection results, etc. may also be stored in the computer-readable storage medium.

[0118] In one example, the electronic device 60 may further include: an input device 603 and an output device 604, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0119] The input device 603 may include, for example, a keyboard, a mouse, etc.

[0120] The output device 604 can output various information to the outside, including target window, key frame, matching degree, detection result, etc. The output device 604 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0121] Of course, to simplify, Figure 6 Only some of the components related to the present application in the electronic device 60 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 60 may also include any other appropriate components.

[0122] 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 posture loss detection method according to various embodiments of the present application described above in this specification.

[0123] 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.

[0124] 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 posture loss detection method according to various embodiments of the present application described above in this specification.

[0125] 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.

[0126] 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.

[0127] 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.

[0128] 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.

[0129] 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.

[0130] 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 posture loss detection method, characterized in that: include: Obtain key frames within the target window collected during the movement of the target robot in the target area; Generate a local map corresponding to the target area based on the key frames in the target window; Determine the matching degree between the local map and a pre-built global map of the target area, and detect whether the target robot is located in a drivable area in the global map; Based on the matching degree and / or the detection result, it is determined whether the position and posture of the target robot is lost.

2. The posture loss detection method according to claim 1, characterized in that: Determining the matching degree between the local map and the pre-built global map of the target area includes: Calculating a first matching degree between the local map and the global map; Calculating a second matching degree between each key frame in the target window and the global map; Using the first matching degree and the second matching degree as matching degrees between the local map and a pre-constructed global map of the target area; Wherein, determining whether the position and posture of the target robot is lost based on the matching degree and / or the detection result includes: determining whether the position and posture of the target robot is lost based on at least one of the first matching degree, the second matching degree and the detection result.

3. The posture loss detection method according to claim 2, characterized in that: The determining whether the position and posture of the target robot is lost based on at least one of the first matching degree, the second matching degree, and the detection result includes: If the detection result is that the target robot is not in the drivable area of ​​the global map, determining that the position and posture of the target robot is lost; If the detection result is a drivable area of ​​the target robot in the global map, determining whether the maximum value of the second matching degree is greater than a first preset threshold value, and if it is greater than the first preset threshold value, determining that the position and posture of the target robot is not lost; If it is less than or equal to the first preset threshold, determining whether the first matching degree is greater than a second preset threshold; if it is greater than the second preset threshold, determining that the position and posture of the target robot is not lost; If it is less than or equal to the second preset threshold, it is determined that the position and posture of the target robot is lost.

4. The posture loss detection method according to claim 2, characterized in that: The global map and the local map are both represented by a rasterized manner, wherein the first color grid of the global map and the local map is a drivable area, the second color grid is an unknown area, and the third color grid is an occupied area; the calculating the first matching degree between the local map and the global map includes: Calculating a matching score between the point cloud in the local map and the global map; Calculating a matching ratio between a first color grid of the local map and a first color grid of the global map; The matching score and the matching ratio are multiplied to obtain a first matching degree between the local map and the global map.

5. The posture loss detection method according to claim 4, characterized in that: The calculating the matching ratio between the first color grid of the local map and the first color grid of the global map comprises: Mapping a first color grid of the local map to the global map; If the first color grid of the local map corresponds to the first color grid of the global map, determining that the first color grid of the local map matches the first color grid of the global map successfully; Determine a ratio of the number of first color grids of the local map that are successfully matched to the total number of first color grids of the local map; Based on the ratio, a matching ratio between the first color grid of the local map and the first color grid of the global map is determined.

6. The posture loss detection method according to claim 2, characterized in that: The calculating a second matching degree between each key frame in the target window and the global map includes: Determining, in the point cloud of the key frame, a first number of points that successfully match the global map; determining a second number of points of the point cloud of the keyframe that fall within a second color grid of the global map; Using the second amount as a penalty item, adjusting the first amount to obtain a corrected amount; A ratio of the correction quantity to the total number of point clouds of the key frame is calculated, and the ratio is determined as a second matching degree between the key frame and the global map.

7. The posture loss detection method according to any one of claims 1 to 6, characterized in that: The generating a local map corresponding to the target area based on the key frames in the target window includes: Using the key frames in the target window, a grid map is generated with the current position of the laser sensor of the target robot as the center point; Determine the type of grids included in the grid map, wherein the type includes at least one of unknown grids, idle grids, and occupied grids; A target point cloud corresponding to the occupancy grid is determined, and the occupancy grid is represented by the target point cloud in the grid map, thereby obtaining a local map corresponding to the target area.

8. The posture loss detection method according to claim 7, characterized in that: The step of determining the grid type contained in the grid map comprises: Determine the penetration grid between the laser center point and the detection point based on the data contained in each of the key frames; For each of the penetration grids, recording a third number of times the laser beam hits the penetration grid and a fourth number of times the laser beam does not hit the penetration grid; If the third number is greater than or equal to the fourth number, determining that the penetration grid is an occupied grid; If the third number is less than the fourth number, determining that the penetration grid is an idle grid; If the third number and the fourth number are both zero, it is determined that the penetration grid is an unknown grid.

9. The posture loss detection method according to claim 8, characterized in that: Determining a target point cloud corresponding to the occupancy grid includes: For each of the occupied grids, the detection point corresponding to the laser beam that hits the occupied grid for the last time is determined as the target point cloud corresponding to the occupied grid.

10. The posture loss detection method according to claim 8, characterized in that: Also includes: Determine the coordinate data of each penetration grid between the laser center point and the detection point; Wherein, the determining of the coordinate data of each penetration grid between the laser center point and the detection point includes: Calculate the slope k of the straight line from the laser center point to the detection point; If the absolute value of the slope k is greater than 1, it is determined that the ordinate of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of the resolution of the local map, and the abscissa of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of k multiplied by the resolution of the local map; If the absolute value of the slope k is less than 1, it is determined that the horizontal coordinate of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of the resolution of the local map, and the vertical coordinate of the penetration grid between the laser center point and the detection point is an arithmetic progression with an interval of one k times the resolution of the local map; Based on the current position of the laser sensor and the arithmetic relationship between the horizontal coordinate and the vertical coordinate of the penetration grid, the coordinate data of each penetration grid between the laser center point and the detection point are determined.

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 posture loss detection method described in 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 posture loss detection 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 posture loss detection method according to any one of claims 1 to 10.

Citation Information

Cited By

  • Location loss detection method and device, self-moving equipment and computer program product

    CN120779422A