Method, device and equipment for updating local grid map and storage medium
By acquiring target point clouds and maps, and combining overhead obstacle and vertical wall processing strategies to update the grid map, the problem of insufficient feedback of complex obstacle information in existing technologies is solved, thereby improving the accuracy and usability of the map.
Patent Information
- Application Number
- CN202210828306.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-07-13
AI Technical Summary
Existing map building methods cannot quickly provide feedback on the height of complex obstacles and whether they obstruct the robot's state, resulting in reduced map accuracy and usability.
By acquiring the target point cloud, the first map, and the second map, the retained raster map of the overlapping area is extracted, the existence of the target raster is determined, and the raster is updated according to the preset first and second update strategies. The second update strategy is based on the processing strategy for overhead obstacles and vertical walls.
It enables rapid feedback of the height of complex obstacles and the status information of the robot, improving the accuracy and practicality of local grid maps.
Smart Images

Figure CN117433544B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot navigation technology, and in particular to a method, apparatus, device and storage medium for updating a local grid map. Background Technology
[0002] Mobile robots use sensors to perceive their environment and build maps. During robot movement or task execution, they often encounter complex obstacles, such as overhead obstacles or vertical walls. Because existing map-building methods cannot quickly feed back information such as the height of complex obstacles and whether they obstruct the robot, the accuracy and usability of the constructed maps are reduced. Summary of the Invention
[0003] The main objective of this application is to provide a method, apparatus, device, and storage medium for updating local grid maps, aiming to solve the technical problem that existing map building methods cannot quickly feed back information such as the height of complex obstacles and whether they hinder the robot into the map, thereby reducing the accuracy and practicality of the constructed map.
[0004] To achieve the above-mentioned objectives, this application proposes a method for updating a local raster map, the method comprising:
[0005] Acquire a target point cloud, a first map, and a second map, wherein the target point cloud is the point cloud in the local grid map coordinate system at time i, the first map is the target local grid map at time i-1, and the second map is the initial local grid map at time i.
[0006] Extract the map regions that overlap with the second map from the first map to obtain a retained raster map, and determine whether the target raster exists in the retained raster map, wherein the target raster is any raster in the second map;
[0007] If not, the target grid in the second map is updated according to the target point cloud and a preset first update strategy;
[0008] If so, the target grid in the second map is updated according to the preserved grid map and the target point cloud according to the preset second update strategy, wherein the second update strategy is an update strategy obtained based on the overhead obstacle processing strategy and the vertical wall processing strategy;
[0009] The updated second map is used as the target local raster map at time i.
[0010] This application also proposes a local raster map updating apparatus, the apparatus comprising:
[0011] The data acquisition module is used to acquire a target point cloud, a first map, and a second map. The target point cloud is the point cloud in the local grid map coordinate system at time i, the first map is the target local grid map at time i-1, and the second map is the initial local grid map at time i.
[0012] The analysis module is used to extract the map area that overlaps with the second map from the first map to obtain a retained raster map, and to determine whether the target raster exists in the retained raster map, wherein the target raster is any raster in the second map;
[0013] The first update module is used to update the target grid in the second map according to the target point cloud and a preset first update strategy if the target grid does not exist in the reserved grid map.
[0014] The second update module is used to update the target grid in the second map according to the retained grid map and the target point cloud according to a preset second update strategy if the target grid exists in the retained grid map. The second update strategy is an update strategy obtained based on the overhead obstacle processing strategy and the vertical wall processing strategy.
[0015] A target local raster map determination module is used to use the updated second map as the target local raster map at time i.
[0016] This application also proposes a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described above.
[0017] This application also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0018] This application discloses a method, apparatus, device, and storage medium for updating a local raster map. The method involves extracting a map region overlapping with a second map from a first map to obtain a retained raster map, and determining whether a target raster exists in the retained raster map, wherein the target raster is any raster in the second map. If not, the target raster in the second map is updated according to a preset first update strategy based on the target point cloud. If yes, the target raster in the second map is updated according to a preset second update strategy based on the retained raster map and the target point cloud, wherein the second update strategy is an update strategy obtained based on overhead obstacle processing strategies and vertical wall processing strategies. The updated second map is used as the target local raster map at time i. This allows for updating grids that exist in two adjacent time intervals using the data from the previous time interval's retained grid map and the target point cloud at the current time interval according to a preset second update strategy. Since the second update strategy is based on the handling strategies for overhead obstacles and vertical walls, the entire update process fully considers the influence of overhead obstacles and vertical walls. This enables the rapid feedback of information such as the height of complex obstacles and whether they hinder the robot to the map, thereby improving the accuracy and practicality of the constructed target local grid map. Attached Figure Description
[0019] Figure 1 This is a schematic flowchart illustrating a method for updating a local raster map according to an embodiment of this application;
[0020] Figure 2 This is a schematic block diagram of a local raster map updating device according to an embodiment of this application;
[0021] Figure 3 This is a schematic block diagram of the structure of a computer device according to an embodiment of this application.
[0022] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0024] Reference Figure 1 This application provides a method for updating a local raster map, the method comprising:
[0025] S1: Obtain the target point cloud, the first map, and the second map, wherein the target point cloud is the point cloud in the local grid map coordinate system at time i, the first map is the target local grid map at time i-1, and the second map is the initial local grid map at time i.
[0026] Specifically, the target point cloud, the first map, and the second map can be obtained from local storage space.
[0027] Specifically, a point cloud is generated based on data collected by sensors on the robot at time i, resulting in an initial point cloud. The robot's pose at time i is then obtained. Based on the robot's pose at time i, the coordinate system of the initial point cloud is transformed to a preset local grid map coordinate system. The initial point cloud after coordinate system transformation is then used as the point cloud at time i in the local grid map coordinate system. In other words, both the first map and the second map are maps in the preset local grid map coordinate system.
[0028] The target point cloud includes observation data from multiple points, which are the coordinate data of each point observation. The coordinate data of each point observation includes x-axis coordinates, y-axis coordinates, and z-axis coordinates, with the z-axis coordinate representing the altitude.
[0029] The target local raster map at time i-1 is a local raster map generated based on the point cloud in the local raster map coordinate system at time i-1. In other words, the target local raster map is a map whose raster attribute values have already been updated.
[0030] The initial local grid map at time i is a local grid map generated based on the sensor positions of the sensors on the robot at time i. In other words, the initial local grid map is a frame map whose attribute values have not been updated.
[0031] Outdoor robots (fied autonomous robots) typically operate in complex outdoor terrain, requiring frequent real-time map building and updates. 2.5D maps are commonly used to represent the surrounding environment and obstacle information. A 2.5D map is a type of grid map, storing the 2D coordinates of each grid cell and the attribute value of a specific location, such as altitude or whether it is obstructed by obstacles. In other words, each grid cell in existing 2.5D maps has only one attribute value. It is understood that the target local grid map and the initial local grid map of this application are both grid maps. However, unlike existing grid maps, each grid cell in the target local grid map and the initial local grid map of this application has multiple attribute values.
[0032] Each grid cell in both the target local raster map and the initial local raster map includes: an altitude attribute value, a variance attribute value, a validity attribute value, and a time attribute value. The altitude attribute value represents the altitude. The variance attribute value represents the variance, reflecting uncertainty. The validity attribute value represents the validity of the data. The time attribute value represents the time at which the raster data was updated.
[0033] It is understandable that if time i is the first time, the first map is null.
[0034] S2: Extract the map area that overlaps with the second map from the first map to obtain a retained grid map, and determine whether the target grid exists in the retained grid map, wherein the target grid is any grid in the second map;
[0035] Specifically, the map regions that overlap with the second map are extracted from the first map, and the identified map regions are used as the retained raster map. In other words, the retained raster map is a portion of the first map.
[0036] Determine whether the target raster exists in the reserved raster map, that is, determine whether the target raster is a newly added raster.
[0037] S3: If not, then update the target grid in the second map according to the target point cloud and the preset first update strategy;
[0038] Specifically, if not, meaning the target grid does not exist in the reserved grid map, then the target grid is a newly added grid. Therefore, based on the observation data of each point in the target point cloud that falls into the target grid, the attribute values of the target grid in the second map are updated according to the preset first update strategy.
[0039] The first update strategy is the strategy for building the grid.
[0040] S4: If so, the target grid in the second map is updated according to the preserved grid map and the target point cloud according to the preset second update strategy, wherein the second update strategy is an update strategy obtained based on the overhead obstacle processing strategy and the vertical wall processing strategy;
[0041] Specifically, if the target grid exists in the reserved grid map, and the target grid is not a newly added grid, then based on the observation data of each point falling into the target grid in the reserved grid map and the target point cloud, the attribute values of the target grid in the second map are updated according to the preset second update strategy.
[0042] The second update strategy is based on the processing strategies for overhead obstacles and vertical walls, thus fully considering the influence of overhead obstacles and vertical walls. This allows information such as the height of complex obstacles and whether they hinder the robot to be quickly fed back to the various attribute values of the map grid.
[0043] It is understood that by repeatedly executing the step of determining whether the target grid exists in the reserved grid map, wherein the target grid is any grid in the second map, up to step S4, the update of each grid of the second map can be completed. At this time, the second map is the second map with completed grid updates.
[0044] S5: Use the updated second map as the target local raster map at time i.
[0045] Specifically, the second map that has completed the raster update is directly used as the target local raster map at time i.
[0046] Optionally, the second map after the raster update is completed is subjected to dynamic obstacle ghosting removal, and the second map after ghosting removal is used as the target local raster map at time i.
[0047] This embodiment implements a second update strategy for grids that exist in two adjacent time intervals. It uses the data of the grid map retained from the previous time interval and the target point cloud from the current time interval to update the grid. Since the second update strategy is based on the processing strategy for overhead obstacles and the processing strategy for vertical walls, the entire update process fully considers the influence of overhead obstacles and vertical walls. This allows information such as the height of complex obstacles and whether they hinder the robot to be quickly fed back into the map, improving the accuracy and practicality of the constructed target local grid map.
[0048] In one embodiment, the step of updating the target grid in the second map according to the target point cloud and a preset first update strategy includes:
[0049] S31: Find the observation data of each point that falls into the target grid from the target point cloud, and use it as the first point observation dataset;
[0050] Specifically, the observation data of each point falling into the target grid is searched from the target point cloud, and all the found point observation data is used as the first point observation dataset.
[0051] S32: Calculate the altitude based on the first point observation dataset to obtain the first altitude;
[0052] Specifically, an interpolation method is used to calculate the altitude based on the first point observation dataset, and the calculated altitude is taken as the first altitude.
[0053] Specifically, an interpolation method is used to calculate the altitude based on the first point observation dataset, and the calculated altitude is taken as the first altitude. This includes: if the first point observation dataset is empty, then each grid cell surrounding the target grid cell is taken as the grid cell to be extracted, and the altitude is calculated based on the observation data of all points in the target point cloud that fall into each grid cell to be extracted, and the calculated altitude is taken as the first altitude; if the first point observation dataset is not empty, then the altitude is calculated based on each altitude cell (altitude, i.e., z-axis coordinate) in the first point observation dataset, and the calculated altitude is taken as the first altitude.
[0054] It is understandable that the altitude calculation based on the various altitudes in the first observation dataset can be the maximum value, the average value, or the minimum value; no limitation is made here.
[0055] S33: Update the first altitude to the altitude attribute value of the target grid in the second map;
[0056] Specifically, the first altitude is updated to the altitude attribute value of the target grid in the second map, thereby realizing the construction of the altitude attribute value of the target grid.
[0057] S34: Update the variance attribute value of the target grid in the second map to the preset variance value;
[0058] Specifically, the variance attribute value of the target grid in the second map is updated with a preset variance value, thereby realizing the construction of the variance attribute value of the target grid.
[0059] It is understandable that the preset variance value is set to a relatively large value, so that the weight is relatively small during subsequent updates.
[0060] S35: Update the preset first valid value to the validity attribute value of the target grid in the second map;
[0061] Specifically, the preset first valid value is updated to the validity attribute value of the target grid in the second map, thereby realizing the construction of the validity attribute value of the target grid.
[0062] Optionally, the first valid value is set to 1, which means it is valid.
[0063] S36: Update the time attribute value of the target grid in the second map at time i.
[0064] Specifically, the time attribute value of the target grid in the second map is updated at time i, thereby realizing the construction of the time attribute value of the target grid.
[0065] In this embodiment, based on the observation data of each point falling into the target grid in the target point cloud, the elevation, variance, validity, and time attributes of the target grid in the second map are updated according to a preset first update strategy, thereby constructing a grid with multiple attribute values. This results in the constructed target local grid map storing richer information and improving the accuracy and practicality of the target local grid map.
[0066] In one embodiment, the step of updating the target grid in the second map according to the preserved grid map and the target point cloud in accordance with a preset second update strategy includes:
[0067] S41: Find the observation data of each point that falls into the target grid from the target point cloud, and use it as the second point observation dataset;
[0068] Specifically, the observation data of each point falling into the target grid is searched from the target point cloud, and all the found point observation data are used as the second point observation dataset.
[0069] S42: Determine whether the object corresponding to the second observation dataset is a passable overhead obstacle;
[0070] Specifically, based on the judgment strategy of the preset overhead obstacle processing strategy, it is determined whether the object corresponding to the second observation dataset is an overhead obstacle that can be passed.
[0071] S43: If not, update the validity attribute value of the target grid in the second map with the preset second valid value, and update the time attribute value of the target grid in the second map at the i-th time.
[0072] Specifically, if not, meaning the object corresponding to the second observation dataset is an impassable overhead obstacle, then there is no need to determine whether the current target grid is a vertical wall, nor is it necessary to use the Kalman filter algorithm for updating. Therefore, the preset second valid value is updated to the validity attribute value of the target grid in the second map, and the time attribute value of the target grid in the second map is updated at time i, thereby completing the update of the validity attribute value and time attribute value of the target grid.
[0073] Optionally, the second valid value is set to 0 by default.
[0074] S44: If so, update the preset first valid value to the validity attribute value of the target grid in the second map, and determine whether the object corresponding to the second point observation dataset is a vertical wall.
[0075] Specifically, if the object corresponding to the second observation dataset is a passable overhead obstacle, then it is necessary to determine whether the current target grid is a vertical wall. It may even be necessary to use the Kalman filter algorithm for updating. Therefore, the preset first valid value is updated to the validity attribute value of the target grid in the second map, and the object corresponding to the second observation dataset is determined to be a vertical wall according to the preset vertical wall processing strategy.
[0076] S45: If it is a vertical wall, find the maximum value from each altitude in the second point observation dataset and the altitude attribute value of the target grid in the preserved grid map, and use it as the altitude to be updated. Update the altitude attribute value of the target grid in the second map with the altitude to be updated, and update the time attribute value of the target grid in the second map at time i.
[0077] Specifically, if the wall is vertical, meaning the object corresponding to the second observation dataset is a vertical wall, then the Kalman filter algorithm is not needed to update the current target grid. Therefore, the maximum value is found from the various elevations in the second observation dataset and the elevation attribute value of the target grid in the preserved grid map, and the found maximum value is used as the height to be updated. In other words, the height to be updated can be the elevation in the second observation dataset or the elevation attribute value of the target grid.
[0078] The altitude to be updated is updated to the altitude attribute value of the target grid in the second map, and the time attribute value of the target grid in the second map is updated at the i-th time, thereby completing the update of the altitude attribute value and time attribute value of the target grid in the second map.
[0079] S46: If it is not a vertical wall, then update the altitude attribute value and variance attribute value of the target grid in the second map according to the preset Kalman filter algorithm, the preserved grid map and the second point observation dataset, and update the time attribute value of the target grid in the second map at time i.
[0080] Specifically, if the object in the second observation dataset is not a vertical wall, then the current target grid needs to be updated using a Kalman filter algorithm. Therefore, based on the preset Kalman filter algorithm, the altitude and variance attribute values of the target grid in the preserved grid map, and the second observation dataset, the altitude is calculated. The altitude attribute value of the target grid in the second map is updated based on the calculated altitude. Similarly, the variance is calculated based on the preset Kalman filter algorithm, the variance attribute value of the target grid in the preserved grid map, and the second observation dataset. The variance attribute value of the target grid in the second map is then updated based on the calculated variance. This achieves the fusion of sensor data and the target local grid map at time i-1.
[0081] The method steps for calculating altitude based on the preset Kalman filter algorithm, the altitude attribute value and variance attribute value of the target grid in the retained grid map, and the second point observation dataset can be determined by those skilled in the art without inventiveness from the prior art, and will not be elaborated here.
[0082] The method and steps for calculating variance based on the preset Kalman filtering algorithm, the variance attribute value of the target grid in the preserved grid map, and the second point observation dataset can be determined by those skilled in the art without any inventive step from the prior art, and will not be elaborated here.
[0083] This embodiment updates the attribute values of the target grid in the second map according to the observation data of each point falling into the target grid in the target point cloud and a preset second update strategy. The second update strategy first determines whether it is a passable overhead obstacle. If it is an impassable overhead obstacle, further processing of the current grid is stopped. Then it determines whether it is a vertical wall. If it is a vertical wall, further processing of the current grid is stopped. Finally, if it is a passable overhead obstacle and a non-vertical wall, the Kalman filter algorithm is used to update the elevation and variance attribute values of the target grid. This makes the entire update process fully consider the influence of overhead obstacles and vertical walls, so that information such as the height of complex obstacles and whether they hinder the robot can be quickly fed back to the map, improving the accuracy and practicality of the constructed target local grid map.
[0084] In one embodiment, the step of determining whether the object corresponding to the second observation dataset is a passable overhead obstacle includes:
[0085] S421: Obtain the three-dimensional position of the sensor corresponding to the target point cloud;
[0086] Specifically, the three-dimensional position of the sensor corresponding to the target point cloud can be obtained from the local storage space.
[0087] The sensor's three-dimensional position refers to the three-dimensional location of the sensor used to scan and generate the target point cloud. The sensor's three-dimensional position includes x-axis coordinates, y-axis coordinates, and z-axis coordinates, with the z-axis coordinate representing the altitude.
[0088] S422: Take any point observation data in the second point observation dataset as the data to be analyzed;
[0089] S423: Calculate the distance between the data to be analyzed and the three-dimensional position of the sensor to obtain the distance to be analyzed;
[0090] Specifically, the formula for calculating the distance to be analyzed is expressed as follows: for:
[0091]
[0092] Where, p i s is the data to be analyzed, and s is the three-dimensional position of the sensor.
[0093] S424: Calculate the maximum passable area above based on the preset maximum vertical distance, the preset maximum horizontal distance, the preset tilt angle, and the data to be analyzed;
[0094] Specifically, the formula for calculating the maximum passable area above is d. i for:
[0095]
[0096] Where max is used to calculate the maximum value. It is the square of the x-axis coordinate in the data to be analyzed. It is the square of the y-axis coordinate in the data to be analyzed. Yes Perform the square root calculation, tan -1 θ is (tanθ) -1 tan is the tangent function, θ is the preset tilt angle, and d hor It is the preset maximum horizontal distance, d ver It is the preset maximum vertical distance.
[0097] The preset maximum vertical distance is the maximum vertical distance that the robot can travel over overhead obstacles.
[0098] The preset maximum horizontal distance is the maximum horizontal distance the robot can travel over overhead obstacles.
[0099] The preset tilt angle is the elevation angle at which the robot can pass overhead obstacles.
[0100] S425: Subtract the altitude of the sensor's three-dimensional position from the altitude of the data to be analyzed to obtain the altitude difference;
[0101] Specifically, the altitude of the sensor's three-dimensional position is subtracted from the altitude of the data to be analyzed, and the resulting value is used as the altitude difference.
[0102] S426: If the maximum accessible area above is greater than the altitude difference, the preset maximum vertical distance threshold is greater than the altitude difference, and the distance to be analyzed is within the preset working distance range, then the single-point observation evaluation result corresponding to the data to be analyzed is determined to be passed; otherwise, the single-point observation evaluation result corresponding to the data to be analyzed is determined to be failed.
[0103] Specifically, if the maximum accessible area above is greater than the altitude difference, the preset maximum vertical distance threshold is greater than the altitude difference, and the distance to be analyzed is within the preset working distance range, it means that the robot can pass the object point corresponding to the data to be analyzed. Therefore, the single-point observation evaluation result corresponding to the data to be analyzed is determined to be passed. Otherwise, if any one of the three conditions (the maximum accessible area above is greater than the altitude difference, the preset maximum vertical distance threshold is greater than the altitude difference, and the distance to be analyzed is within the preset working distance range) is not met, it means that the robot cannot pass the object point corresponding to the data to be analyzed. Therefore, the single-point observation evaluation result corresponding to the data to be analyzed is determined to be failed.
[0104] An object point is a single point within an object.
[0105] The preset working distance range is the maximum vertical distance that the robot can travel.
[0106] S427: If all the single-point observation evaluation results corresponding to the second point observation dataset are passed, then the object corresponding to the second point observation dataset is determined to be a passable overhead obstacle; otherwise, the object corresponding to the second point observation dataset is determined to be a non-passable overhead obstacle.
[0107] Specifically, if all the single-point observation evaluation results corresponding to the second point observation dataset are passed, it means that the robot can pass all the object points corresponding to the second point observation dataset, and therefore the object corresponding to the second point observation dataset is determined to be a passable overhead obstacle; otherwise, that is, if at least one of the single-point observation evaluation results corresponding to the second point observation dataset is failed, it means that the robot cannot pass at least one object point corresponding to the second point observation dataset, and therefore the object corresponding to the second point observation dataset is determined to be a non-passable overhead obstacle.
[0108] This embodiment uses the sensor's three-dimensional position, preset maximum vertical distance, preset maximum horizontal distance, preset tilt angle, and preset working distance range to determine whether the objects in the second point observation dataset are passable overhead obstacles. This provides a basis for updating the target grid in the second map using different update strategies based on the judgment results. This avoids the previous error in altitude maps where overhead obstacles (i.e., obstacles suspended overhead) were incorrectly modeled as high obstacles rising from the ground. This modeling method would assume that the robot cannot pass the overhead obstacle.
[0109] In one embodiment, the step of determining whether the object corresponding to the second observation dataset is a vertical wall includes:
[0110] S441: Determine whether the number of point observation data in the second point observation dataset is greater than a preset point observation number threshold;
[0111] In environments where vertical walls may be encountered, multiple point observations may fall within the same grid cell. This situation requires special handling; otherwise, the estimated height value will be less than the actual height value. Therefore, it is necessary to determine whether the number of point observations in the second point observation dataset exceeds a preset point observation number threshold.
[0112] The preset threshold for the number of point observations is an integer greater than 1.
[0113] S442: If so, then determine that the object corresponding to the second observation dataset is a vertical wall;
[0114] Specifically, if the number of point observation data in the second point observation dataset is greater than the preset point observation number threshold, it means that the number of point observation data in the second point observation dataset exceeds the requirement. Therefore, it is determined that the object corresponding to the second point observation dataset is a vertical wall.
[0115] S443: If not, then determine that the object corresponding to the second observation dataset is not a vertical wall.
[0116] Specifically, if the number of point observation data in the second point observation dataset is less than or equal to the preset point observation number threshold, it means that the number of point observation data in the second point observation dataset has not exceeded the requirement. Therefore, it is determined that the object corresponding to the second point observation dataset is not a vertical wall.
[0117] This embodiment determines whether the object corresponding to the second point observation dataset is a vertical wall based on a preset threshold for the number of point observations, providing a basis for updating the target grid in the second map using different update strategies based on the determination result.
[0118] In one embodiment, the step of using the updated second map as the target local raster map at time i includes:
[0119] S51: Obtain the three-dimensional position of the sensor corresponding to the target point cloud;
[0120] Specifically, the three-dimensional position of the sensor corresponding to the target point cloud can be obtained from the local storage space.
[0121] S52: The ray from the three-dimensional position of the sensor to the target point observation is taken as the target ray, wherein the target point observation is any point observation in the target point cloud;
[0122] Specifically, a ray of light is established from the three-dimensional position of the sensor and directed towards the target point for observation, and this ray is used as the target ray.
[0123] S53: Using a preset step size and starting from the three-dimensional position of the sensor, the target light beam is traversed to obtain a set of light spots;
[0124] Specifically, starting from the three-dimensional position of the sensor, the target light ray is traversed using a preset step size. Each point traversed on the target light ray is taken as a light spot, and all the light spots obtained are taken as a light spot set.
[0125] S54: Obtain the grid corresponding to the target light point from the second map as the grid to be analyzed, wherein the target light point is any light point in the set of light points;
[0126] Specifically, the grid corresponding to the target light point is obtained from the second map and used as the grid to be analyzed, thus finding the grid corresponding to the target light point.
[0127] S55: Add the altitude in the three-dimensional position of the sensor to the preset altitude threshold to obtain the altitude to be analyzed;
[0128] Specifically, the altitude in the three-dimensional position of the sensor is added to a preset altitude threshold, and the resulting data is used as the altitude to be analyzed.
[0129] S56: Determine whether the altitude attribute value in the raster to be analyzed is greater than the altitude to be analyzed;
[0130] S57: If so, then clear the altitude attribute value of the grid cell to be analyzed in the second map, update the validity attribute value of the grid cell to be analyzed in the second map with the preset third valid value, and update the variance attribute value of the grid cell to be analyzed in the second map with the preset variance value.
[0131] Specifically, if the altitude attribute value of the grid cell to be analyzed is greater than the height to be analyzed, it means that the grid cell to be analyzed was previously an obstacle, but now the light has passed through it, and the obstacle has moved away from the corresponding position of the grid cell to be analyzed. Therefore, the altitude attribute value of the grid cell to be analyzed in the second map is cleared, the preset third valid value is updated to the validity attribute value of the grid cell to be analyzed in the second map, and the preset variance value is updated to the variance attribute value of the grid cell to be analyzed in the second map.
[0132] Optionally, the preset third valid value is set to a negative number. This provides a basis for subsequent applications of the target local raster map.
[0133] It is understandable that by repeating steps S54 to S57, the process of eliminating the afterimage of dynamic obstacles in the grid corresponding to each light spot in the light spot set can be completed.
[0134] S58: Use the second map as the target local raster map at time i.
[0135] Specifically, the second map, after eliminating the afterimages of dynamic obstacles, is used as the target local raster map at time i.
[0136] Since dynamic obstacles are constantly moving, if their influence is not considered, they may be mistakenly left in the map even after they have been removed, which would narrow the area that the robot can pass through. In this embodiment, the afterimages of dynamic obstacles are eliminated at each traversal point on the light ray from the three-dimensional position of the sensor to the observation point of the target point, thereby preventing the dynamic obstacles that have been removed from remaining in the target local grid map at time i.
[0137] In one embodiment, the step of extracting the map region overlapping with the second map from the first map to obtain a raster map includes:
[0138] S21: Delete the grid cells in the first map that do not overlap with the second map;
[0139] Specifically, the grid cells in the first map that do not overlap with the second map are deleted, thereby freeing up the GPU threads occupied by the grid cells in the first map that do not overlap with the second map.
[0140] GPU threads are the threads of the graphics processing unit.
[0141] S22: Allocate one GPU thread for each grid in the second map that does not overlap with the first map;
[0142] Specifically, a GPU thread is allocated to each non-overlapping grid cell in the second map, thus ensuring a fixed GPU thread for each newly added grid cell. Since most subsequent calculations involve traversing and iteratively updating each grid cell in the map, which aligns better with the parallel acceleration characteristics of GPUs, allocating a fixed GPU thread to each newly added grid cell facilitates the use of GPU-accelerated map construction.
[0143] For each grid cell, a global thread index is assigned in the GPU, video memory is allocated for each cell, and subsequent calculations are performed. The calculations for different grid cells are parallelized, thus greatly accelerating the algorithm.
[0144] i=threadIdx.x+blockIdx.x×blockDim.x
[0145] A thread's global ID in the GPU requires three built-in coordinate variables to uniquely identify it: threadIdx.x indicates the thread's position within the GPU block, and blockIdx.x indicates the thread's position within the GPU grid, which is the x-th dimension of the thread block. `thread` refers to a thread.
[0146] S23: Extract the map region that overlaps with the second map from the first map to obtain the preserved raster map.
[0147] Specifically, the map regions that overlap with the second map are extracted from the first map to obtain the preserved raster map, thereby providing a basis for updating the second map based on the preserved raster map.
[0148] Point cloud data is relatively large, and traditional CPU (Central Processing Unit) computation methods consume a lot of memory, resulting in a low frequency of map computation and output, which cannot meet the real-time motion and navigation needs of multi-legged robots. Furthermore, some technologies use point cloud downsampling, but this results in information loss, which is not conducive to robot activities in complex outdoor environments. This embodiment allocates a GPU thread to each newly added grid, thereby enabling each grid to be processed by a fixed GPU thread. This provides a foundation for GPU acceleration technology, avoids information loss caused by point cloud downsampling, and improves the accuracy of the constructed target local grid map.
[0149] In one embodiment, after the step of using the updated second map as the target local raster map at time i, the method further includes:
[0150] S61: Smooth the elevation attribute value of the target local raster map at time i to obtain the third map;
[0151] Specifically, the target local raster map at time i is smoothed by the elevation attribute value, and the smoothed target local raster map at time i is used as the third map.
[0152] Optionally, a Gaussian filter can be used for smoothing.
[0153] S62: Smooth the variance attribute values of the third map to obtain the target map;
[0154] Specifically, the variance attribute value of the third map is smoothed, and the smoothed third map is used as the target map.
[0155] S63: Extract the altitude map from the target map to obtain the altitude map at time i;
[0156] Specifically, an elevation map is extracted from the target map, and the extracted elevation map is used as the elevation map at time i.
[0157] The attribute value of each grid cell in the elevation map is its elevation.
[0158] S64: Perform variance map extraction on the target map to obtain the uncertainty map at time i.
[0159] Specifically, variance map extraction is performed on the target map, and the extracted altitude map is used as the uncertainty map at time i.
[0160] The attribute value of each grid cell in an uncertainty map is variance.
[0161] This embodiment improves the accuracy of the map by smoothing the altitude attribute value and the variance attribute value; by extracting the altitude map and uncertainty map from the smoothed map, the practicality of this application is further improved.
[0162] Reference Figure 2 This application also proposes a local raster map updating apparatus, the apparatus comprising:
[0163] The data acquisition module 100 is used to acquire a target point cloud, a first map, and a second map. The target point cloud is a point cloud in the local grid map coordinate system at time i, the first map is the target local grid map at time i-1, and the second map is the initial local grid map at time i.
[0164] Analysis module 200 is used to extract the map area that overlaps with the second map from the first map to obtain a retained raster map, and to determine whether the target raster exists in the retained raster map, wherein the target raster is any raster in the second map;
[0165] The first update module 300 is used to update the target grid in the second map according to the target point cloud and a preset first update strategy if the target grid does not exist in the reserved grid map.
[0166] The second update module 400 is used to update the target grid in the second map according to the retained grid map and the target point cloud according to a preset second update strategy if the target grid exists in the retained grid map. The second update strategy is an update strategy obtained based on the overhead obstacle processing strategy and the vertical wall processing strategy.
[0167] The target local raster map determination module 500 is used to use the updated second map as the target local raster map at time i.
[0168] This embodiment implements a second update strategy for grids that exist in two adjacent time intervals. It uses the data of the grid map retained from the previous time interval and the target point cloud from the current time interval to update the grid. Since the second update strategy is based on the processing strategy for overhead obstacles and the processing strategy for vertical walls, the entire update process fully considers the influence of overhead obstacles and vertical walls. This allows information such as the height of complex obstacles and whether they hinder the robot to be quickly fed back into the map, improving the accuracy and practicality of the constructed target local grid map.
[0169] Reference Figure 3This application also provides a computer device, which may be a server, and its internal structure may be as follows: Figure 3 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data such as methods for updating local raster maps. The network interface allows communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for updating a local raster map. The method for updating the local grid map includes: acquiring a target point cloud, a first map, and a second map, wherein the target point cloud is a point cloud in the local grid map coordinate system at time i, the first map is the target local grid map at time i-1, and the second map is the initial local grid map at time i; extracting map regions overlapping with the second map from the first map to obtain a retained grid map, and determining whether the target grid exists in the retained grid map, wherein the target grid is any grid in the second map; if not, updating the target grid in the second map according to the target point cloud using a preset first update strategy; if yes, updating the target grid in the second map according to the retained grid map and the target point cloud using a preset second update strategy, wherein the second update strategy is an update strategy obtained based on the overhead obstacle processing strategy and the vertical wall processing strategy; and using the updated second map as the target local grid map at time i.
[0170] This embodiment implements a second update strategy for grids that exist in two adjacent time intervals. It uses the data of the grid map retained from the previous time interval and the target point cloud from the current time interval to update the grid. Since the second update strategy is based on the processing strategy for overhead obstacles and the processing strategy for vertical walls, the entire update process fully considers the influence of overhead obstacles and vertical walls. This allows information such as the height of complex obstacles and whether they hinder the robot to be quickly fed back into the map, improving the accuracy and practicality of the constructed target local grid map.
[0171] An embodiment of this application also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements a method for updating a local grid map, including the steps of: acquiring a target point cloud, a first map, and a second map, wherein the target point cloud is a point cloud in the local grid map coordinate system at time i, the first map is a target local grid map at time i-1, and the second map is an initial local grid map at time i; extracting map regions overlapping with the second map from the first map to obtain a retained grid map, and determining whether a target grid exists in the retained grid map, wherein the target grid is any grid in the second map; if not, updating the target grid in the second map according to the target point cloud using a preset first update strategy; if yes, updating the target grid in the second map according to the retained grid map and the target point cloud using a preset second update strategy, wherein the second update strategy is an update strategy obtained based on a handling strategy for overhead obstacles and a handling strategy for vertical walls; and using the updated second map as the target local grid map at time i.
[0172] The aforementioned method for updating local grid maps involves updating grids that exist in two adjacent time intervals using the data from the previous time interval's retained grid map and the target point cloud at the current time interval according to a preset second update strategy. Since the second update strategy is based on the handling strategies for overhead obstacles and vertical walls, the entire update process fully considers the influence of overhead obstacles and vertical walls. This allows information such as the height of complex obstacles and whether they hinder the robot to be quickly fed back into the map, improving the accuracy and practicality of the constructed target local grid map.
[0173] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media provided in this application and in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0174] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0175] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for updating a local raster map, characterized in that, The method includes: Acquire a target point cloud, a first map, and a second map, wherein the target point cloud is the point cloud in the local grid map coordinate system at time i, the first map is the target local grid map at time i-1, and the second map is the initial local grid map at time i. Extract the map regions that overlap with the second map from the first map to obtain a retained raster map, and determine whether the target raster exists in the retained raster map, wherein the target raster is any raster in the second map; If not, the target grid in the second map is updated according to the target point cloud and a preset first update strategy; If so, the target grid in the second map is updated according to the preserved grid map and the target point cloud according to the preset second update strategy, wherein the second update strategy is an update strategy obtained based on the overhead obstacle processing strategy and the vertical wall processing strategy; The updated second map is used as the target local raster map at time i; The step of updating the target grid in the second map according to the preserved grid map and the target point cloud in accordance with the preset second update strategy includes: Find the observation data of each point that falls into the target grid from the target point cloud, and use it as the second point observation dataset; Determine whether the object corresponding to the second observation dataset is a passable overhead obstacle; If not, then the preset second valid value is updated to the validity attribute value of the target grid in the second map, and the time attribute value of the target grid in the second map is updated at time i. If so, the preset first valid value is updated to the validity attribute value of the target grid in the second map, and it is determined whether the object corresponding to the second point observation dataset is a vertical wall. If it is a vertical wall, then find the maximum value from each altitude in the second point observation dataset and the altitude attribute value of the target grid in the preserved grid map, and use it as the altitude to be updated. Update the altitude attribute value of the target grid in the second map with the altitude to be updated, and update the time attribute value of the target grid in the second map at the i-th time. If it is not a vertical wall, then the altitude attribute value and variance attribute value of the target grid in the second map are updated according to the preset Kalman filter algorithm, the preserved grid map and the second point observation dataset, and the time attribute value of the target grid in the second map is updated at time i.
2. The method for updating a local raster map according to claim 1, characterized in that, The step of updating the target grid in the second map according to the target point cloud and a preset first update strategy includes: Find the observation data of each point that falls into the target grid from the target point cloud, and use it as the first point observation dataset; The altitude is calculated based on the first observation dataset to obtain the first altitude. Update the first altitude to the altitude attribute value of the target grid in the second map; Update the variance attribute value of the target grid in the second map to the preset variance value; Update the validity attribute value of the target grid in the second map to the preset first valid value; Update the time attribute value of the target grid in the second map at time i.
3. The method for updating a local raster map according to claim 1, characterized in that, The step of determining whether the object corresponding to the second observation dataset is a passable overhead obstacle includes: Obtain the three-dimensional position of the sensor corresponding to the target point cloud; Use any point observation data in the second point observation dataset as the data to be analyzed; The distance between the data to be analyzed and the three-dimensional position of the sensor is calculated to obtain the distance to be analyzed; The maximum passable area above is calculated based on the preset maximum vertical distance, the preset maximum horizontal distance, the preset tilt angle, and the data to be analyzed. The altitude difference is obtained by subtracting the altitude of the sensor's three-dimensional position from the altitude of the data to be analyzed. If the maximum accessible area above is greater than the altitude difference, the preset maximum vertical distance threshold is greater than the altitude difference, and the distance to be analyzed is within the preset working distance range, then the single-point observation evaluation result corresponding to the data to be analyzed is determined to be passed; otherwise, the single-point observation evaluation result corresponding to the data to be analyzed is determined to be failed. If all the single-point observation evaluation results corresponding to the second point observation dataset are passed, then the object corresponding to the second point observation dataset is determined to be a passable overhead obstacle; otherwise, the object corresponding to the second point observation dataset is determined to be an impassable overhead obstacle.
4. The method for updating a local raster map according to claim 1, characterized in that, The step of determining whether the object corresponding to the second observation dataset is a vertical wall includes: Determine whether the number of point observation data in the second point observation dataset is greater than a preset point observation number threshold; If so, then the object corresponding to the second observation dataset is determined to be a vertical wall. If not, then it is determined that the object corresponding to the second observation dataset is not a vertical wall.
5. The method for updating a local raster map according to claim 1, characterized in that, The step of using the updated second map as the target local raster map at time i includes: Obtain the three-dimensional position of the sensor corresponding to the target point cloud; The ray from the three-dimensional position of the sensor to the target point observation is used as the target ray, wherein the target point observation is any point observation in the target point cloud; Using a preset step size and starting from the three-dimensional position of the sensor, the target light ray is traversed to obtain a set of light spots; Obtain the grid corresponding to the target light point from the second map as the grid to be analyzed, wherein the target light point is any light point in the set of light points; The altitude in the three-dimensional position of the sensor is added to a preset altitude threshold to obtain the altitude to be analyzed; Determine whether the altitude attribute value in the raster to be analyzed is greater than the altitude to be analyzed; If so, the altitude attribute value of the grid cell to be analyzed in the second map is cleared, the preset third valid value is updated to the validity attribute value of the grid cell to be analyzed in the second map, and the preset variance value is updated to the variance attribute value of the grid cell to be analyzed in the second map. The second map is used as the target local raster map at time i.
6. The method for updating a local raster map according to claim 1, characterized in that, The step of extracting the map region overlapping with the second map from the first map to obtain a raster map includes: Delete the grid cells in the first map that do not overlap with the second map; Allocate one GPU thread to each grid cell in the second map that does not overlap with the first map; The map region that overlaps with the second map is extracted from the first map to obtain the preserved raster map.
7. The method for updating a local raster map according to claim 1, characterized in that, After the step of using the updated second map as the target local raster map at time i, the method further includes: The elevation attribute value of the target local raster map at time i is smoothed to obtain the third map; The variance attribute values of the third map are smoothed to obtain the target map; The target map is subjected to elevation map extraction to obtain the elevation map at time i. Variance map extraction is performed on the target map to obtain the uncertainty map at time i.
8. A local raster map updating apparatus, used to implement the local raster map updating method as described in any one of claims 1-7, characterized in that, The device includes: The data acquisition module is used to acquire a target point cloud, a first map, and a second map. The target point cloud is the point cloud in the local grid map coordinate system at time i, the first map is the target local grid map at time i-1, and the second map is the initial local grid map at time i. The analysis module is used to extract the map area that overlaps with the second map from the first map to obtain a retained raster map, and to determine whether the target raster exists in the retained raster map, wherein the target raster is any raster in the second map; The first update module is used to update the target grid in the second map according to the target point cloud and a preset first update strategy if the target grid does not exist in the reserved grid map. The second update module is used to update the target grid in the second map according to the retained grid map and the target point cloud according to a preset second update strategy if the target grid exists in the retained grid map. The second update strategy is an update strategy obtained based on the overhead obstacle processing strategy and the vertical wall processing strategy. A target local raster map determination module is used to use the updated second map as the target local raster map at time i.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Occupied grid map construction method and apparatus, electronic device and storage medium
CN113077551A
Robot obstacle map construction method and device, robot and storage medium
CN113358110A