Map updating method and apparatus, computer device, and storage medium
By clearing obstacle information from the blind spots of the sensor field of view within the robot's perception space and projecting point cloud data, the problems of low accuracy and high computational complexity in traditional map update methods are solved, achieving efficient and accurate two-dimensional map updates.
Patent Information
- Application Number
- PCT/CN2025/087289
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-17
- Filing Date
- 2025-04-03
- Publication Date
- 2025-11-20
AI Technical Summary
In traditional map updating methods, robots face problems of low accuracy and high computational complexity when updating two-dimensional maps based on three-dimensional point cloud data. In particular, there are issues such as accidental removal of obstacles due to blind spots in the sensor's field of view and excessive resource consumption from processing large-scale point cloud data.
By acquiring an initial local 3D map of the robot's perception space, clearing the sensor information within the sensor's perception space, projecting environmental point cloud data onto an intermediate local 3D map, and finally projecting it onto the initial 2D map to form a target 2D map, the integrity of obstacle information within the blind spot is ensured.
It improves the accuracy and efficiency of map updates, reduces computational load and system resource consumption, and ensures the integrity and accuracy of obstacle information in 2D maps.
Smart Images

Figure CN2025087289_20112025_PF_FP_ABST
Abstract
Description
Map updating method and device, computer device, and storage medium
[0001] Cross-reference to Related Applications
[0002] This application claims priority to the Chinese patent application No. 2024106158050, filed on May 17, 2024, and entitled "Map updating method and device, computer device, and storage medium", the entire content of which is incorporated herein by reference. TECHNICAL FIELD
[0003] The present application relates to the technical field of computer, in particular to a map updating method and device, computer device and storage medium. BACKGROUND
[0004] With the development of computer technology, robot navigation technology has emerged. In a robot navigation system, a work map representing the environment around the robot is needed for path planning. During the travel of the robot, the robot continuously collects surrounding obstacle information through a sensor, and updates the work map based on the real-time collected obstacle information.
[0005] However, in the traditional map updating method, when the robot updates the two-dimensional map corresponding to the work area based on the collected three-dimensional point cloud data, it updates the three-dimensional map corresponding to the work area based on the collected three-dimensional point cloud data, and then updates the two-dimensional map based on the updated three-dimensional map. Since the sensor has a blind area when collecting data, the traditional map updating method has the problem of low map updating accuracy. In addition, the three-dimensional map contains a large number of point clouds, and directly updating the two-dimensional map based on the three-dimensional map corresponding to the work area has the problems of high computational complexity and large system resource consumption. SUMMARY
[0006] According to various embodiments of the present application, a map updating method, device, computer device, computer readable storage medium and computer program product are provided.
[0007] A map updating method is executed by a computer device, and the method comprises:
[0008] Obtaining environment point cloud data collected at a target pose in a robot work area, obtaining an initial local three-dimensional map corresponding to a robot perception space corresponding to the target pose;
[0009] In the initial local three-dimensional map, the perception information in the sensor perception space corresponding to the environment point cloud data is removed to obtain an intermediate local three-dimensional map corresponding to the robot perception space;
[0010] project the environment point cloud data onto the intermediate local three-dimensional map to obtain a target local three-dimensional map corresponding to the robot perception space;
[0011] project the target local three-dimensional map onto the initial two-dimensional map corresponding to the robot work area to obtain a target two-dimensional map.
[0012] The application also provides a map updating device, which comprises:
[0013] a data acquisition module configured to acquire environment point cloud data collected in a target pose in a robot work area, and acquire an initial local three-dimensional map corresponding to a robot perception space corresponding to the target pose;
[0014] an information clearing module configured to clear, in the initial local three-dimensional map, perception information in a sensor perception space corresponding to the environment point cloud data to obtain an intermediate local three-dimensional map corresponding to the robot perception space;
[0015] a point cloud projection module configured to project the environment point cloud data onto the intermediate local three-dimensional map to obtain a target local three-dimensional map corresponding to the robot perception space;
[0016] a map updating module configured to project the target local three-dimensional map onto the initial two-dimensional map corresponding to the robot work area to obtain a target two-dimensional map.
[0017] A computer device comprises a memory and a processor, the memory stores computer readable instructions, and the processor implements the steps of the above map updating method when executing the computer readable instructions.
[0018] A computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by a processor to implement the steps of the above map updating method.
[0019] A computer program product comprises computer readable instructions, and the computer readable instructions are executed by a processor to implement the steps of the above map updating method.
[0020] The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below. Other features and advantages of the application will be apparent from the description, the drawings, and the claims. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0022] FIG. 1 is a diagram of an application environment of a map updating method according to an embodiment of the present application;
[0023] FIG. 2 is a flowchart of a map updating method according to an embodiment of the present application;
[0024] FIG. 3 is a diagram of a sensor sensing space according to an embodiment of the present application;
[0025] FIG. 4 is a diagram of a blind area of a sensor according to an embodiment of the present application;
[0026] FIG. 5 is a flowchart of obtaining an initial local three-dimensional map according to an embodiment of the present application;
[0027] FIG. 6 is a diagram of a field of view of a sensor and environmental point cloud data according to an embodiment of the present application;
[0028] FIG. 7 is a block diagram of a map updating device according to an embodiment of the present application;
[0029] FIG. 8 is a diagram of an internal structure of a computer device according to an embodiment of the present application;
[0030] FIG. 9 is a diagram of an internal structure of a computer device according to another embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to facilitate the understanding of the present application, the present application will be described in more detail below with reference to the relevant drawings. The preferred embodiments of the present application are shown in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the application belongs. The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0033] The map updating method provided by the embodiments of the present application can be applied to an application environment as shown in FIG. 1. The map updating method can be executed by the terminal 102 or the server 104, or can be cooperatively executed by the terminal 102 and the server 104. The terminal 102 communicates with the server 104 through a network. A data storage system can store data required to be processed by the server 104. The data storage system can be integrated on the server 104, or can be placed on a cloud or other network server. The terminal 102 can be, but is not limited to, various robots, personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things device can be a smart television, a smart vehicle device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The robot can be various industrial robots (such as a carrying robot, a palletizing robot, a spraying robot, etc.) that need to move autonomously, service robots (such as a cleaning robot, a delivery robot, a mowing robot, etc.), or special robots (a fire-fighting robot, an underwater robot, a security robot, etc.). The server 104 can be implemented by an independent server or a server cluster composed of multiple servers. The terminal 102 and the server 104 can be directly or indirectly connected through wired or wireless communication, which is not limited in the present application. The terminal 102 acquires environment point cloud data collected in a robot work area at a target pose, and acquires an initial local three-dimensional map corresponding to a robot perception space corresponding to the target pose. The terminal 102 removes perception information in a sensor perception space corresponding to the environment point cloud data in the initial local three-dimensional map, and obtains an intermediate local three-dimensional map corresponding to the robot perception space. The terminal 102 projects the environment point cloud data onto the intermediate local three-dimensional map, and obtains a target local three-dimensional map corresponding to the robot perception space. The terminal 102 projects the target local three-dimensional map onto an initial two-dimensional map corresponding to the robot work area, and obtains a target two-dimensional map.
[0034] In one embodiment, as shown in FIG. 2, a map updating method is provided, which is taken as an example to illustrate the application of the method to a computer device. The computer device can be a terminal or a server, and the map updating method can be executed by the terminal or the server itself alone, or can be realized through interaction between the terminal and the server. The map updating method comprises the following steps:
[0035] In step S202, environment point cloud data collected in a robot work area at a target pose is acquired, and an initial local three-dimensional map corresponding to a robot perception space corresponding to the target pose is acquired.
[0036] The environment point cloud data refers to point cloud data collected by a three-dimensional sensor. For example, the three-dimensional sensor can be an RGBD depth camera, a multi-line laser radar sensor, or an ultrasonic sensor. The target pose refers to the pose of the robot when the robot collects the environment point cloud data, which describes the specific position and orientation in space, i.e., the position and orientation of the robot in the robot working area. The robot perception space corresponding to the target pose refers to the space within a preset range near the robot. The size of the robot perception space is determined according to the size of the map area updated each time the two-dimensional map is updated. The size of the map area updated each time is determined according to the working task of the robot. The driving speed corresponding to the working task of the robot is positively correlated with the size of the map area updated each time, that is, the greater the driving speed, the greater the size of the map area updated each time. In this way, the update range of the two-dimensional map can be matched with the driving speed of the robot, thereby improving the accuracy of path planning based on the two-dimensional map. The initial local three-dimensional map refers to the three-dimensional map corresponding to the robot perception space in the complete three-dimensional map of the robot working area. The initial local three-dimensional map is used to indicate the obstacle perception information around the target pose. The three-dimensional map can be a voxel map. The three-dimensional map uses a fixed-size cubic block (i.e., a voxel unit) as the smallest unit to represent three-dimensional objects in the environment, such as obstacles, stairs, walls, etc.
[0037] For example, the robot can periodically collect environment point cloud data through a three-dimensional sensor during driving, or can collect environment point cloud data through a three-dimensional sensor when reaching a specified position. The computer device obtains the environment point cloud data collected by the robot at the target pose in the robot working area, and then determines the initial local three-dimensional map corresponding to the robot perception space corresponding to the target area in the three-dimensional map corresponding to the robot working area. Specifically, the map update size, i.e., the size of the map area updated each time the two-dimensional map is updated, is obtained. In the three-dimensional map corresponding to the robot working area, the robot position corresponding to the target pose is taken as the center to determine a three-dimensional space with a size matching the map update size. The matching three-dimensional space is taken as the robot perception space. For example, when the map size of the three-dimensional map corresponding to the robot working area is 50 meters long, 40 meters wide, and 2 meters high, and the size of the area updated each time the two-dimensional map is updated is 5 meters by 5 meters, the robot perception space can be a space within the three-dimensional map, with the robot position corresponding to the target pose as the center, and with a size of 5 meters long, 5 meters wide, and 2 meters high.
[0038] In step S204, in the initial local three-dimensional map, the perception information within the sensor perception space corresponding to the environment point cloud data is removed to obtain an intermediate local three-dimensional map corresponding to the robot perception space.
[0039] The sensor perception space corresponding to the environment point cloud data refers to the field of view of the sensor, that is, the space that can be perceived by the sensor. For example, as shown in FIG. 3, the hexahedron marked with a shadow is a three-dimensional camera sensor perception space. The dark gray plane close to the sensor is the near plane, and the light gray plane far from the sensor is the far plane, which limits the perceivable area of the sensor. Any object with a distance less than or greater than this range will be cropped (not perceived), that is, the blind area of the sensor. For another example, as shown in FIG. 4, the area marked with a shadow is the field of view of a sensor, and the field of view of the sensor has a certain blind area (upper blind area and lower blind area). Directly projecting the environment point cloud data onto the two-dimensional map will ignore the historical obstacles in the blind area of the field of view. It can be understood that if the environment point cloud data is directly projected onto the two-dimensional map, as long as there is no obstacle in the sensor perception space, even if there is an obstacle in the blind area of the field of view above or below the sensor perception space, the obstacle information at the corresponding position in the two-dimensional map will be removed, resulting in obstacle misremoval and reducing the accuracy of map updating. Therefore, it is necessary to obtain an initial local three-dimensional map corresponding to the robot perception space corresponding to the target pose. The initial local three-dimensional map contains obstacle information in a predetermined range near the robot. It can be understood that the initial local three-dimensional map corresponding to the robot perception space contains obstacle information in the blind area of the field of view above or below the sensor perception space.
[0040] Illustratively, the computer device determines a target voxel unit located in the sensor perception space from each voxel unit included in the initial local three-dimensional map. The target voxel unit is removed in the initial local three-dimensional map to obtain an intermediate local three-dimensional map corresponding to the robot perception space. Specifically, the target voxel unit located in the sensor perception space can be determined and removed directly based on the spatial coordinates corresponding to the voxel unit to obtain the intermediate local three-dimensional map corresponding to the robot perception space, which can quickly determine the intermediate local three-dimensional map and improve the efficiency of map updating. Alternatively, coordinate conversion can be performed on each voxel unit included in the initial local three-dimensional map to obtain local point cloud data corresponding to the initial local three-dimensional map, the point cloud unit located in the sensor perception space is deleted from the local point cloud data to obtain updated local point cloud data, and coordinate conversion is performed on the updated local point cloud data to obtain the intermediate local three-dimensional map corresponding to the robot perception space. This map updating based on the local point cloud data can improve the accuracy of map updating.
[0041] In step S206, the environment point cloud data is projected onto the intermediate local three-dimensional map to obtain a target local three-dimensional map corresponding to the robot perception space.
[0042] Exemplarily, the computer device converts each point cloud unit in the environment point cloud data into a corresponding voxel unit in the intermediate local three-dimensional map according to a voxel resolution corresponding to the intermediate local three-dimensional map, to obtain the target local three-dimensional map.
[0043] In step S208, the target local three-dimensional map is projected onto an initial two-dimensional map corresponding to the robot working area to obtain a target two-dimensional map.
[0044] The two-dimensional map corresponding to the robot working area is a map used to represent obstacle information in the robot working area, which can be a two-dimensional grid map. The two-dimensional map divides the robot working area into passable and impassable regions, and is used to plan a path for the robot. The initial two-dimensional map refers to a two-dimensional map before updating.
[0045] Exemplarily, the computer device determines a to-be-updated map region of the target local three-dimensional map on the initial two-dimensional map. By projecting each voxel unit in the target local three-dimensional map onto the to-be-updated map region of the initial two-dimensional map, the computer device determines that each voxel unit corresponds to a target grid on the to-be-updated map region of the initial two-dimensional map. Each voxel unit in the to-be-updated map region of the initial two-dimensional map is marked as impassable, and the remaining grids in the to-be-updated map region are marked as passable, to obtain the target two-dimensional map.
[0046] In one embodiment, the two-dimensional map can be updated based on the environment point cloud data collected by multiple three-dimensional sensors at each time of updating the map, and each three-dimensional point cloud data can be installed at different parts of the robot to collect obstacle information in multiple directions, i.e., environment point cloud data. When the computer device obtains the environment point cloud data collected by each sensor at the target pose, an initial local three-dimensional map corresponding to the robot perception space corresponding to the target pose is obtained. In the initial local three-dimensional map, the perception information in the sensor perception space corresponding to each environment point cloud data is removed to obtain an intermediate local three-dimensional map corresponding to the robot perception space. Then, each environment point cloud data is projected onto the intermediate local three-dimensional map to obtain a target local three-dimensional map corresponding to the robot perception space. The target local three-dimensional map obtained in this way contains not only the current environment point cloud data collected by each three-dimensional sensor, but also the historical perception information corresponding to the visual blind area in the robot perception space except the sensor perception space. In this way, by obtaining the initial local three-dimensional map corresponding to the robot perception space corresponding to the target pose, all obstacle information in the space around the robot can be quickly and accurately determined, and the purpose of obtaining the initial local three-dimensional map is to quickly determine the obstacle information in the visual blind area corresponding to each environment point cloud data, and then combine the obstacle information in the visual blind area with the environment point cloud data to obtain the target local three-dimensional map. The target local three-dimensional map obtained in this way can accurately and comprehensively represent the obstacle information in the space around the robot. Updating the initial two-dimensional map based on the target local three-dimensional map can improve the accuracy of map updating.
[0047] In the above map updating method, when updating the two-dimensional map based on the environment point cloud data collected at the target pose, the initial local three-dimensional map corresponding to the robot perception space corresponding to the target pose is first determined. The robot perception space refers to the space range near the robot. Then, in the initial local three-dimensional map, the perception information in the sensor perception space corresponding to the environment point cloud data is removed to obtain an intermediate local three-dimensional map corresponding to the robot perception space. The environment point cloud data is projected onto the intermediate local three-dimensional map to obtain a target local three-dimensional map corresponding to the robot perception space. The target local three-dimensional map obtained in this way contains not only the latest environment point cloud data collected in the sensor perception space, but also the historical perception information corresponding to the visual blind area in the robot perception space except the sensor perception space. Finally, the target local three-dimensional map is projected onto the initial two-dimensional map corresponding to the robot working area to obtain a target two-dimensional map, which can improve the accuracy of map updating. At the same time, the initial local three-dimensional map is updated based on the environment point cloud data, the obstacle addition and retention for the local area are realized, the target local three-dimensional map is obtained, and the two-dimensional map is updated based on the target local three-dimensional map, which can effectively reduce the calculation amount and the consumption of system resources.
[0048] In one embodiment, as shown in FIG. 5, an initial local three-dimensional map corresponding to the robot perception space corresponding to the target pose is obtained, including:
[0049] Step S502, obtaining a root storage node corresponding to a global three-dimensional map corresponding to the robot working area.
[0050] Step S504, determining the robot perception space corresponding to the target pose in the robot working area.
[0051] Step S506, for each candidate sub-storage node corresponding to the root storage node, the candidate sub-storage node in which the stored voxel unit is located in the robot perception space is taken as the target sub-storage node, and the candidate sub-storage node in which the stored voxel unit intersects with the robot perception space is taken as the intermediate sub-storage node; the root node resolution corresponding to the voxel unit stored by the root storage node is lower than the sub-node resolution corresponding to the voxel unit stored by the candidate sub-storage node.
[0052] Step S508, taking the intermediate sub-storage node as the root storage node, continuing to determine the target sub-storage node based on each candidate sub-storage node corresponding to the root storage node until the end condition is met, and obtaining each target sub-storage node.
[0053] Step S510, merging the voxel units respectively stored by each target sub-storage node to obtain an initial local three-dimensional map corresponding to the robot perception space.
[0054] The global three-dimensional map refers to the largest and most complete three-dimensional map corresponding to the current stored robot working area. The global three-dimensional map is stored in a tree-shaped data structure, the root storage node is the root node of the entire global three-dimensional map corresponding to the entire data set, and contains the information of the entire global three-dimensional map. The root storage node stores a voxel unit, which represents the range of the entire global three-dimensional map, and the root storage node stores the voxel unit with the highest voxel resolution. Voxel resolution refers to the size of a voxel unit, which is used to indicate the accuracy of a voxel unit. When the map size of a three-dimensional map is fixed, the lower the voxel resolution of a voxel unit, the more detailed the space represented by the three-dimensional map, and the corresponding calculation and storage overhead will also increase.
[0055] The root storage node is branched downward, that is, the voxel units stored in the root storage node are refined to obtain candidate sub-storage nodes corresponding to the root storage node. Each candidate sub-storage node represents a local region in the global three-dimensional map and stores a more detailed three-dimensional map corresponding to the local region, that is, a three-dimensional map with lower voxel resolution corresponding to the voxel units. For example, the global three-dimensional map is divided into four regions, and each region corresponds to a three-dimensional map represented by voxel units with lower voxel resolution and stored in the corresponding candidate sub-storage node. For the three-dimensional map corresponding to the local region stored in each candidate sub-storage node, further refinement can be performed according to the complexity of the environment and the resolution requirement to adapt to different resolution requirements. At the specific data storage level, only the voxel units with non-zero attribute values are stored by virtue of the sparse storage feature, and the voxel units without attribute values are ignored, thereby greatly reducing the storage consumption and improving the data access efficiency. The attribute value corresponding to the voxel unit is used to represent the probability of the existence of an obstacle in the voxel unit, for example, an empty attribute value means no obstacle, and an attribute value of 1 indicates the existence of an obstacle.
[0056] The root node resolution refers to the voxel resolution corresponding to the voxel units in the three-dimensional map stored in the root storage node. The sub-node resolution refers to the voxel resolution corresponding to the voxel units in the three-dimensional map stored in the candidate sub-storage node.
[0057] Illustratively, the computer device obtains a root storage node corresponding to a global three-dimensional map of a robot working area, and determines a robot perception space corresponding to a target pose in the robot working area. Then, each voxel unit stored in the candidate sub-storage node corresponding to the root storage node is compared with the robot perception space. When each voxel unit stored in the candidate sub-storage node is located within the robot perception space, the candidate sub-storage node is taken as a target sub-storage node. When each voxel unit stored in the candidate sub-storage node is not located within the robot perception space, the candidate sub-storage node is taken as an intermediate sub-storage node. Then, the intermediate sub-storage node is taken as a root storage node, and the step of comparing each voxel unit stored in the candidate sub-storage node corresponding to the root storage node with the robot perception space is executed until no new intermediate sub-storage node appears, and each target sub-storage node is obtained. Based on the spatial coordinates corresponding to the voxel units respectively stored in each target sub-storage node, the voxel units respectively stored in the target sub-storage nodes are merged to obtain an initial local three-dimensional map corresponding to the robot perception space.
[0058] In the above embodiments, the global three-dimensional map is stored in a tree-shaped data structure, wherein each level corresponds to a different voxel resolution. The root storage node stores voxel units corresponding to a root node resolution lower than a sub-node resolution corresponding to voxel units stored by a candidate sub-storage node. Through this hierarchical storage structure, large-scale voxel data can be efficiently stored and processed. Each voxel unit can be refined or coarsened as needed to adapt to different resolution requirements, improving the accuracy and efficiency of the perception information representation. When querying the initial local three-dimensional map corresponding to the robot perception space, starting from the root storage node and traversing each storage node level by level, the local three-dimensional map corresponding to the location of the robot perception space can be quickly and accurately determined, effectively improving the query efficiency of the local three-dimensional map.
[0059] In one embodiment, in the initial local three-dimensional map, the perception information in the sensor perception space corresponding to the environmental point cloud data is removed to obtain an intermediate local three-dimensional map corresponding to the robot perception space, including:
[0060] In the initial local three-dimensional map, the voxel units located in the sensor perception space corresponding to the environmental point cloud data are removed to obtain a reference local three-dimensional map corresponding to the robot perception space; in the non-sensor perception space of the reference local three-dimensional map, the voxel units with a perception time interval greater than a first preset time length are removed to obtain an intermediate local three-dimensional map corresponding to the robot perception space.
[0061] The non-sensor perception space refers to the space in the space represented by the reference local three-dimensional map, outside the sensor perception space. The perception time interval of the voxel unit is used to represent the probability of the existence of obstacles in the voxel unit. The perception time interval can be the time interval from the time when the existence of obstacles in the voxel unit is perceived to the current time, or a normalized value of the time interval. The first preset time length can be set according to actual conditions.
[0062] Exemplarily, the computer device determines the voxel units in the initial local three-dimensional map located in the sensor perception space based on the spatial coordinates respectively corresponding to the voxel units in the initial local three-dimensional map, and clears the voxel units located in the sensor perception space in the initial local three-dimensional map to obtain the reference local three-dimensional map corresponding to the robot perception space. Since there can be a large number of dynamic obstacles in the robot working area, it is necessary to record the perception time intervals respectively corresponding to the voxel units. The larger the perception time interval corresponding to the voxel unit is, the smaller the probability of the existence of an obstacle in the voxel unit is, that is, the obstacle originally located in the voxel unit can have moved to other positions after a period of time. The smaller the perception time interval is, the greater the probability of the existence of an obstacle in the voxel unit is, that is, the obstacle originally located in the voxel unit can not have moved to other positions. The perception time intervals respectively corresponding to the voxel units in the non-sensor perception space in the reference local three-dimensional map are obtained. The voxel units with a perception time interval greater than a first preset time length in the reference local map are cleared to obtain the intermediate local three-dimensional map corresponding to the robot perception space.
[0063] In the above embodiment, after the voxel units located in the sensor perception space in the initial local three-dimensional map are cleared to obtain the reference local three-dimensional map, the voxel units with a perception time interval greater than a first preset time length in the non-sensor perception space in the reference local three-dimensional map are cleared, which can timely clear the dynamic obstacles that have disappeared in the non-sensor perception space, obtain a more accurate intermediate local three-dimensional map, and improve the accuracy of map updating.
[0064] In one embodiment, in the initial local three-dimensional map, the perception information in the sensor perception space corresponding to the environmental point cloud data is cleared to obtain the intermediate local three-dimensional map corresponding to the robot perception space, including:
[0065] For any one voxel unit included in the initial local three-dimensional map, the distances between the voxel unit and each spatial boundary of the sensor perception space corresponding to the environmental point cloud data are calculated based on the spatial coordinates corresponding to the voxel unit; the spatial boundary refers to each plane forming the sensor perception space; the target voxel unit located in the sensor perception space is determined from each voxel unit based on the distances between each voxel unit and each spatial boundary; and the target voxel unit is cleared in the initial local three-dimensional map to obtain the intermediate local three-dimensional map.
[0066] The spatial coordinates corresponding to the voxel unit refer to the coordinates of the voxel unit in the world coordinate system corresponding to the robot operating area. The spatial boundary corresponding to the sensor perception space refers to each plane forming the sensor perception space, as shown in FIG. 3, each plane marked with a shadow is a spatial boundary, and the hexahedron surrounded by each spatial boundary is the sensor perception space. The target voxel unit refers to a voxel unit whose spatial coordinates are located in the sensor perception space.
[0067] Exemplarily, for any voxel unit contained in the initial local three-dimensional map, the distance between the voxel unit and each spatial boundary of the sensor perception space is calculated based on the spatial coordinates corresponding to the voxel unit. Specifically, the distance between the voxel unit and each spatial boundary is calculated based on the spatial coordinates corresponding to the voxel unit and the plane equation corresponding to each spatial boundary of the sensor perception space. Based on the positive and negative nature of the distance between the voxel unit and each spatial boundary, it is determined whether the voxel unit is a target voxel unit located in the sensor perception space. The positive and negative nature of the distance refers to whether the distance between the voxel unit and the spatial boundary calculated based on the distance formula between a point and a plane is a positive number, a negative number or zero. In actual implementation, when determining the positive normal direction corresponding to the spatial boundary, the normal direction pointing to the inside of the sensor perception space is taken as the positive normal direction. At this time, only when the distance between the voxel unit and each spatial boundary is a positive number, it can be determined that the voxel unit is located in the sensor perception space, and the voxel unit is taken as the target voxel unit. Each target voxel unit is removed in the initial local three-dimensional map to obtain an intermediate local three-dimensional map.
[0068] In one embodiment, the distance between the voxel unit and the boundary plane can be determined by the following formula: Ax+By+Cz+D=0 distance i = Ax i +By i +Cz i +D
[0069] wherein Ax+By+Cz+D=0 is the plane equation corresponding to the boundary plane, A, B, C, D are plane parameters, x i , y i , z i respectively represent the horizontal coordinate, the vertical coordinate and the vertical coordinate corresponding to the i-th voxel unit in the robot operating area in the initial local three-dimensional map, and distance i is the distance between the i-th voxel unit and the boundary plane.
[0070] In the above embodiments, the target voxel units located in the sensor perception space can be quickly and accurately determined by calculating the distance between the voxel unit and each boundary plane, and then according to the positive or negative of the distance between the voxel unit and each boundary plane, so as to improve the efficiency and accuracy of generating the intermediate local three-dimensional map.
[0071] In one embodiment, the environment point cloud data is projected onto the intermediate local three-dimensional map to obtain a target local three-dimensional map corresponding to the robot perception space, including:
[0072] The environment point cloud data is projected onto the initial global three-dimensional map to obtain a target global three-dimensional map corresponding to the robot working area, and the map corresponding to the robot perception space in the target global three-dimensional map is taken as the target local three-dimensional map corresponding to the robot perception space.
[0073] The map updating method further includes:
[0074] When the area of the region corresponding to the target global three-dimensional map exceeds a preset area, the voxel units in the target global three-dimensional map with a perception time interval greater than a second preset time length are removed to obtain an updated target global three-dimensional map, and the updated target global three-dimensional map is used as the initial global three-dimensional map for the next map updating.
[0075] The area of the region refers to the area of the region occupied by the projection of the global three-dimensional map onto the two-dimensional map. The preset area can be set according to the actual situation, and is used to constrain the size of the global three-dimensional map. The preset area can be determined according to the area of the robot working area, for example, set to 30% of the area of the robot working area. The non-sensor perception space refers to the space outside the sensor perception space in the space represented by the reference local three-dimensional map. The perception time interval corresponding to the voxel unit is used to represent the probability of the existence of obstacles in the voxel unit. The second preset time length can be set according to the actual situation, and the second preset time length can be equal to or not equal to the first preset time length.
[0076] Exemplarily, the computer device projects the environment point cloud data onto the initial global three-dimensional map corresponding to the robot working area to obtain a target global three-dimensional map, and then takes the map corresponding to the robot perception space in the target global three-dimensional map as the target local three-dimensional map corresponding to the robot perception space. Since the three-dimensional map often contains large-scale voxel data, the storage of the three-dimensional map needs to occupy a large amount of storage space compared with the two-dimensional map. In order to save the storage resources of the computer, it is necessary to constrain the map size of the global three-dimensional map corresponding to the robot working area. Therefore, when the target global three-dimensional map is obtained by updating based on the environment point cloud data, it is necessary to judge whether the area corresponding to the target global three-dimensional map in the two-dimensional map exceeds a preset area. If the area exceeds the preset area, the voxel units with a perception time interval greater than a second preset time length in the target global three-dimensional map are removed to obtain an updated global three-dimensional map. In the actual implementation process, if the area corresponding to the updated global three-dimensional map is still greater than the preset area, the second preset time length is reduced. Based on the updated second preset time length, the voxel units with a perception time interval greater than the updated second preset time length in the updated global three-dimensional map are continuously removed until the area corresponding to the global three-dimensional map is less than or equal to the preset area. The finally updated global three-dimensional map is taken as the target global three-dimensional map. In the subsequent map updating process, the target global three-dimensional map is taken as the initial global three-dimensional map.
[0077] In the above embodiment, after updating the global three-dimensional map based on the environment perception point cloud each time, it is necessary to constrain the size of the global three-dimensional map according to the preset area. When the area corresponding to the global three-dimensional map exceeds the preset area, the voxel units with a perception time interval greater than a second preset time length in the global three-dimensional map are removed. Since the longer the perception time interval is, the lower the probability that there is an obstacle on the voxel unit is, therefore, deleting part of the voxel units according to the perception time interval can not only reduce the size of the global three-dimensional map and save computer resources, but also remove the dynamic obstacles that have disappeared in time and improve the accuracy of map updating.
[0078] In one embodiment, projecting the environment point cloud data onto the intermediate local three-dimensional map to obtain the target local three-dimensional map corresponding to the robot perception space comprises:
[0079] Obtaining a voxel resolution corresponding to the intermediate local three-dimensional map; based on the voxel resolution, performing coordinate mapping on each point cloud unit in the environment point cloud data to obtain the voxel units respectively corresponding to each point cloud unit in the intermediate local three-dimensional map; updating the voxel units respectively corresponding to each point cloud unit to the intermediate local three-dimensional map to obtain the target local three-dimensional map corresponding to the robot perception space.
[0080] Each point contained in the point cloud data is a point cloud unit.
[0081] Exemplarily, the computer device acquires a voxel resolution corresponding to the intermediate local three-dimensional map, performs coordinate mapping on spatial coordinates respectively corresponding to each point cloud unit in the environment point cloud data based on the voxel resolution, to obtain spatial coordinates of voxel units respectively corresponding to each point cloud unit in the intermediate local three-dimensional map. Based on the spatial coordinates respectively corresponding to each voxel unit, the voxel units respectively corresponding to each point cloud unit are updated to the intermediate local three-dimensional map, to obtain a target local three-dimensional map corresponding to the space perceived by the robot.
[0082] In one embodiment, the point cloud unit can be converted into a voxel unit in the three-dimensional map by the following formula:
[0083] wherein x, y and z respectively represent horizontal coordinates, vertical coordinates and vertical coordinates corresponding to the point cloud unit in a first world coordinate system corresponding to the robot working area, X, Y and Z respectively represent horizontal coordinates, vertical coordinates and vertical coordinates corresponding to the voxel unit in a second world coordinate system corresponding to the robot working area. The difference between the first world coordinate system and the second world coordinate system is only the unit length, for example, the first world coordinate system takes 1 millimeter as the unit length, and the second world coordinate system takes the voxel resolution of the voxel unit as the unit length. R is the voxel resolution, and the floor function represents the down rounding.
[0084] In the above embodiment, the spatial coordinates corresponding to the point cloud unit can be quickly and accurately converted into the spatial coordinates corresponding to the corresponding voxel unit according to the voxel resolution, and therefore the environment point cloud data can be quickly and accurately projected onto the intermediate local three-dimensional map based on the voxel resolution, to improve the accuracy and efficiency of map updating.
[0085] In one embodiment, the target local three-dimensional map is projected onto an initial two-dimensional map corresponding to the robot working area to obtain a target two-dimensional map, including:
[0086] A voxel resolution corresponding to the target local three-dimensional map is acquired, coordinate mapping is performed on each voxel unit in the target local three-dimensional map based on the voxel resolution, to obtain a local three-dimensional point cloud corresponding to the target local three-dimensional map. The local three-dimensional point cloud includes point cloud units respectively corresponding to each voxel unit. The local three-dimensional point cloud is projected onto an initial two-dimensional map corresponding to the robot working area to obtain a target two-dimensional map.
[0087] Exemplarily, the computer device acquires a voxel resolution corresponding to the target local three-dimensional map, performs coordinate mapping on spatial coordinates respectively corresponding to each voxel unit in the target local three-dimensional map based on the voxel resolution, to obtain spatial coordinates of point cloud units respectively corresponding to each voxel unit in the target local three-dimensional map, i.e., to obtain a local three-dimensional point cloud composed of point cloud units respectively corresponding to each voxel unit. The local three-dimensional point cloud is projected onto an initial two-dimensional map corresponding to the robot operating area, to obtain a target two-dimensional map. Specifically, the target local three-dimensional map is projected onto the initial two-dimensional map, to obtain a to-be-updated map area corresponding to the target local three-dimensional map on the initial two-dimensional map, the point cloud units in the local three-dimensional point cloud are projected onto the two-dimensional map to obtain corresponding projection points, the grid to which the projection points belong in the two-dimensional map is marked as impassable, and the remaining grid in the to-be-updated map area is marked as passable, to obtain the target two-dimensional map.
[0088] In one embodiment, the voxel unit can be converted into a point cloud unit by the following formula: x = (X + 0.5) * R y = (Y + 0.5) * R z = (Z + 0.5) * R
[0089] wherein x, y, and z respectively represent the horizontal coordinate, the vertical coordinate, and the vertical coordinate corresponding to the point cloud unit in the first world coordinate system corresponding to the robot operating area, X, Y, and Z respectively represent the horizontal coordinate, the vertical coordinate, and the vertical coordinate corresponding to the voxel unit in the second world coordinate system corresponding to the robot operating area, and R is the voxel resolution.
[0090] In the above embodiment, when updating the two-dimensional map based on the target local three-dimensional map, the voxel units in the local three-dimensional map are first converted into point cloud units to obtain local point cloud data corresponding to the local three-dimensional map. Since the point cloud data can better represent the position and shape of the object in the three-dimensional space, the accuracy of updating the two-dimensional map based on the local point cloud data is higher, which can ensure the projection accuracy and improve the accuracy of map updating.
[0091] In one specific embodiment, the map updating method proposed in the present application can be applied to a robot navigation and perception system to update a two-dimensional map used in the robot navigation system. The map updating method comprises the following steps:
[0092] 1. Data acquisition
[0093] The robot navigation and perception system obtains the point cloud data of the environment within the field of view (FOV) collected by the three-dimensional sensor. As shown in FIG. 6, the frustum formed by the solid line and the dashed line is the sensor perception space, including the two areas enclosed by the dashed line and the solid line, which are the truncations of the frustum at different lengths. It is determined whether the perception space contains the collected point cloud data (black points) of the environment. As shown in FIG. 6, the point cloud data of the environment is in the perception area enclosed by the dashed line. If the perception space contains the point cloud data of the environment, the initial local voxel map corresponding to the point cloud collection position is obtained in the global voxel map. The global three-dimensional map is stored and represented by using a VDB tree (Volume DataBase Tree). By using the sparse storage characteristics of the VDB tree, only the voxel units with non-zero attribute values, i.e., the voxel units marked as obstacles, are stored, and the blank areas without attribute values, i.e., the areas without obstacles, are ignored.
[0094] 2. Updating the local three-dimensional map
[0095] The robot navigation and perception system removes the voxel units located in the field of view of the three-dimensional sensor in the initial local three-dimensional map to obtain an intermediate local voxel map. Each point cloud unit in the point cloud data of the environment is converted into a voxel unit and added to the intermediate local three-dimensional map to obtain a target local three-dimensional map. For each voxel unit located outside the field of view in the target local three-dimensional map, the voxel unit with a time coefficient less than a preset threshold is deleted. The time coefficient is determined based on the perception time interval corresponding to the voxel unit, and the perception time interval is negatively correlated with the time coefficient. After updating the local area in the global three-dimensional map each time, it is determined whether the size of the global three-dimensional map exceeds a preset value. If the size exceeds the preset value, each voxel unit with a time coefficient greater than a preset threshold in the global three-dimensional map is projected into a new three-dimensional map to obtain the latest global three-dimensional map, and the original global three-dimensional map is deleted, thereby constraining the size of the global three-dimensional map and saving computer storage resources.
[0096] 3. Updating the two-dimensional map
[0097] The robot navigation and perception system converts each voxel unit in the target local three-dimensional map into a point cloud unit to obtain a corresponding local three-dimensional point cloud. The local three-dimensional point cloud is projected into the initial two-dimensional map to obtain a target two-dimensional map. The robot path planning is performed based on the target two-dimensional map.
[0098] In the above embodiments, when updating the two-dimensional map based on the environment point cloud data, the target local three-dimensional map is first obtained by combining the environment point cloud data and the initial local three-dimensional map, and then the two-dimensional map is updated based on the target local three-dimensional map. In this way, the problem of low map updating accuracy caused by ignoring blind area obstacles in the traditional method can be solved. The accuracy of updating the two-dimensional map based on the three-dimensional sensor is improved at a lower cost and computing power.
[0099] It should be understood that, although each step in the flowchart involved in each of the above embodiments is shown in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each of the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.
[0100] Based on the same inventive concept, the embodiments of the present application also provide a map updating device for implementing the above-mentioned map updating method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more map updating device embodiments provided below can refer to the limitations of the map updating method in the above text, which will not be repeated here.
[0101] In one embodiment, as shown in FIG. 7, a map updating device is provided, which includes a data acquisition module 702, an information clearing module 704, a point cloud projection module 706 and a map updating module 708, wherein:
[0102] The data acquisition module 702 is configured to acquire environment point cloud data collected at a target pose in a robot working area, and acquire an initial local three-dimensional map corresponding to a robot perception space corresponding to the target pose.
[0103] The information clearing module 704 is configured to clear the perception information in the sensor perception space corresponding to the environment point cloud data in the initial local three-dimensional map, to obtain an intermediate local three-dimensional map corresponding to the robot perception space.
[0104] The point cloud projection module 706 is configured to project the environment point cloud data onto the intermediate local three-dimensional map to obtain a target local three-dimensional map corresponding to the robot perception space.
[0105] The map updating module 708 is configured to project the target local three-dimensional map onto an initial two-dimensional map corresponding to the robot working area to obtain a target two-dimensional map.
[0106] In an embodiment, the data acquisition module 702 is further configured to:
[0107] acquire a root storage node corresponding to a global three-dimensional map corresponding to the robot working area; determine a robot perception space corresponding to the target pose in the robot working area; for each candidate sub-storage node corresponding to the root storage node, determine a target sub-storage node as a candidate sub-storage node in which the stored voxel unit is located in the robot perception space, and determine an intermediate sub-storage node as a candidate sub-storage node in which the stored voxel unit intersects with the robot perception space; the root node resolution corresponding to the voxel unit stored by the root storage node is lower than the sub-node resolution corresponding to the voxel unit stored by the candidate sub-storage node; continue to determine the target sub-storage node based on each candidate sub-storage node corresponding to the root storage node until a termination condition is met, to obtain each target sub-storage node; and merge the voxel units respectively stored by each target sub-storage node to obtain an initial local three-dimensional map corresponding to the robot perception space.
[0108] In an embodiment, the information clearing module 704 is further configured to:
[0109] In the initial local three-dimensional map, clear the voxel unit located in the sensor perception space corresponding to the environment point cloud data to obtain a reference local three-dimensional map corresponding to the robot perception space; and in the non-sensor perception space of the reference local three-dimensional map, clear the voxel unit with a perception time interval greater than a first preset time interval to obtain an intermediate local three-dimensional map corresponding to the robot perception space.
[0110] In an embodiment, the information clearing module 704 is further configured to:
[0111] For any one voxel unit included in the initial local three-dimensional map, calculate the distance between the voxel unit and each spatial boundary of the sensor perception space corresponding to the environment point cloud data based on the spatial coordinates corresponding to the voxel unit; the spatial boundary refers to each plane forming the sensor perception space; determine a target voxel unit located in the sensor perception space from each voxel unit based on the distance between each voxel unit and each spatial boundary; and clear the target voxel unit in the initial local three-dimensional map to obtain an intermediate local three-dimensional map.
[0112] In an embodiment, the point cloud projection module 706 is further configured to:
[0113] The environment point cloud data is projected on the initial global three-dimensional map to obtain a target global three-dimensional map corresponding to the robot working area; a map corresponding to the robot sensing space in the target global three-dimensional map is taken as a target local three-dimensional map corresponding to the robot sensing space; the map updating method further comprises: when an area corresponding to the target global three-dimensional map exceeds a preset area, removing voxel units in the target global three-dimensional map with a sensing time interval greater than a second preset time length to obtain an updated target global three-dimensional map; and the updated target global three-dimensional map is used as an initial global three-dimensional map for the next map updating.
[0114] In one embodiment, the point cloud projection module 706 is further configured to:
[0115] obtain a voxel resolution corresponding to the intermediate local three-dimensional map; perform coordinate mapping on each point cloud unit in the environment point cloud data based on the voxel resolution to obtain a voxel unit corresponding to each point cloud unit in the intermediate local three-dimensional map, respectively; and update the voxel unit corresponding to each point cloud unit, respectively, to the intermediate local three-dimensional map to obtain a target local three-dimensional map corresponding to the robot sensing space.
[0116] In one embodiment, the map updating module 708 is further configured to:
[0117] obtain a voxel resolution corresponding to the target local three-dimensional map; perform coordinate mapping on each voxel unit in the target local three-dimensional map based on the voxel resolution to obtain a local three-dimensional point cloud corresponding to the target local three-dimensional map; the local three-dimensional point cloud comprises a point cloud unit corresponding to each voxel unit, respectively; and project the local three-dimensional point cloud on an initial two-dimensional map corresponding to the robot working area to obtain a target two-dimensional map.
[0118] The map updating device determines an initial local three-dimensional map corresponding to a robot perception space of a target pose first when updating a two-dimensional map based on environment point cloud data collected at the target pose. The robot perception space refers to a spatial range near the robot. Then, in the initial local three-dimensional map, the sensing information in a sensor perception space corresponding to the environment point cloud data is removed to obtain an intermediate local three-dimensional map corresponding to the robot perception space. The environment point cloud data is projected onto the intermediate local three-dimensional map to obtain a target local three-dimensional map corresponding to the robot perception space. The target local three-dimensional map obtained in this way contains not only the latest collected environment point cloud data in the sensor perception space, but also historical sensing information corresponding to a visual blind area in the robot perception space except the sensor perception space. Finally, the target local three-dimensional map is projected onto an initial two-dimensional map corresponding to a robot work area to obtain a target two-dimensional map, which can improve the accuracy of map updating. At the same time, the initial local three-dimensional map is updated based on the environment point cloud data, the target local three-dimensional map is obtained by adding and retaining obstacles in the local area, and the two-dimensional map is updated based on the target local three-dimensional map, which can effectively reduce the calculation amount and the consumption of system resources.
[0119] Each module in the map updating device can be realized by software, hardware, and a combination thereof in whole or in part. Each module can be embedded in or independent of a processor in a computer device in a hardware form, or stored in a memory in a computer device in a software form, so as to be called and executed by a processor to perform the operations corresponding to each module.
[0120] In an embodiment, a computer device, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in FIG. 8. The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for running the operating system and the computer readable instructions in the non-volatile storage medium. The database of the computer device is configured to store environment point cloud data, a target two-dimensional map, and the like. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with a terminal outside through a network connection. The computer readable instructions are executed by the processor to implement a map updating method.
[0121] In an embodiment, a computer device is provided, which can be a terminal, and an internal structure diagram of the computer device can be as shown in FIG. 9. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer readable instructions. The internal memory provides an environment for the operating system and the computer readable instructions in the non-volatile storage medium to run. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be achieved through WIFI, mobile cellular network, NFC (near field communication) or other technologies. The computer readable instructions are executed by the processor to implement a map updating method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0122] Those skilled in the art can understand that the structures shown in FIGS. 8 and 9 are only block diagrams of part of the structures related to the scheme of the present application, and do not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0123] In an embodiment, a computer device is provided, which includes a memory and a processor, the memory stores computer readable instructions, and the processor executes the computer readable instructions to implement the steps in each of the above method embodiments. The computer device can be various industrial robots (such as transfer robots, palletizing robots, spraying robots, etc.) that need to move autonomously, service robots (such as cleaning robots, delivery robots, guide robots, lawn mowing robots, etc.) or special robots (firefighting robots, underwater robots, security robots, etc.).
[0124] In an embodiment, a computer readable storage medium is provided, which stores computer readable instructions, and the computer readable instructions are executed by a processor to implement the steps in each of the above method embodiments.
[0125] In an embodiment, a computer program product or computer readable instructions are provided, which include computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in each of the above method embodiments.
[0126] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0127] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through computer readable instructions. The computer readable instructions can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0128] Any combination of the technical features of the above-mentioned embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above-mentioned embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0129] The above-mentioned embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the patent scope of the application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the patent protection scope of the present application should be subject to the appended claims.
Claims
1. A map updating method, executed by a computer device, comprising: obtaining environment point cloud data collected in a robot working area at a target pose, and obtaining an initial local three-dimensional map corresponding to a robot perception space corresponding to the target pose; in the initial local three-dimensional map, clearing perception information within a sensor perception space corresponding to the environment point cloud data to obtain an intermediate local three-dimensional map corresponding to the robot perception space; projecting the environment point cloud data onto the intermediate local three-dimensional map to obtain a target local three-dimensional map corresponding to the robot perception space; and projecting the target local three-dimensional map onto an initial two-dimensional map corresponding to the robot working area to obtain a target two-dimensional map. The method further comprises:
2. The method of claim 1, wherein, determining a size of an updated map area each time a two-dimensional map is updated according to a working task of a robot, and determining the robot perception space according to the size of the updated map area each time a two-dimensional map is updated; the working task of the robot is positively correlated with the size of the updated map area each time a two-dimensional map is updated. The determination of the robot perception space according to the size of the updated map area each time a two-dimensional map is updated comprises:
3. The method of claim 2, wherein, taking the size of the updated map area each time a two-dimensional map is updated as a map updating size, and in a three-dimensional map corresponding to the robot working area, taking a robot position corresponding to the target pose as a center to determine a three-dimensional space with a size matching the map updating size, and taking the matching three-dimensional space as the robot perception space. The obtaining of the initial local three-dimensional map corresponding to the robot perception space corresponding to the target pose comprises:
4. The method of claim 1, wherein, obtaining a root storage node corresponding to a global three-dimensional map corresponding to the robot working area; determining a robot perception space corresponding to the target pose in the robot working area; for each candidate sub-storage node corresponding to the root storage node, taking a candidate sub-storage node in which a stored voxel unit is located within the robot perception space as a target sub-storage node, and taking a candidate sub-storage node in which the stored voxel unit intersects with the robot perception space as an intermediate sub-storage node; a root node resolution corresponding to the voxel unit stored by the root storage node is lower than a sub-node resolution corresponding to the voxel unit stored by the candidate sub-storage node; taking the intermediate sub-storage node as the root storage node, and continuing to determine the target sub-storage node based on each candidate sub-storage node corresponding to the root storage node until a termination condition is met to obtain each target sub-storage node; and merging the voxel units stored by the target sub-storage nodes to obtain the initial local three-dimensional map corresponding to the robot perception space. The clearing of the perception information within the sensor perception space corresponding to the environment point cloud data in the initial local three-dimensional map to obtain the intermediate local three-dimensional map corresponding to the robot perception space comprises:
5. The method of claim 1, wherein, in the initial local three-dimensional map, clearing a voxel unit located within the sensor perception space corresponding to the environment point cloud data to obtain a reference local three-dimensional map corresponding to the robot perception space; and In the non-sensor perception space of the reference local three-dimensional map, clear the voxel units with a perception time interval greater than a first preset time length, to obtain an intermediate local three-dimensional map corresponding to the robot perception space.
6. The method of claim 1, wherein, The method further comprises: For any voxel unit included in the initial local three-dimensional map, based on the spatial coordinates corresponding to the voxel unit, distances between the voxel unit and each spatial boundary of the sensor perception space corresponding to the environment point cloud data are calculated; the spatial boundary refers to each plane forming the sensor perception space; Based on the distances between each voxel unit included in the initial local three-dimensional map and each spatial boundary, target voxel units located in the sensor perception space are determined from the voxel units; and In the initial local three-dimensional map, the target voxel units are cleared to obtain an intermediate local three-dimensional map.
7. The method of claim 6, wherein, The method further comprises: Based on the spatial coordinates corresponding to the voxel unit and the plane equations respectively corresponding to each spatial boundary of the sensor perception space corresponding to the environment point cloud data, distances between the voxel unit and each spatial boundary are calculated.
8. The method of claim 1, wherein, The method further comprises: The environment point cloud data is projected onto the intermediate local three-dimensional map to obtain a target local three-dimensional map corresponding to the robot perception space; and The environment point cloud data is projected onto an initial global three-dimensional map to obtain a target global three-dimensional map corresponding to the robot working area; and The map corresponding to the robot perception space in the target global three-dimensional map is taken as the target local three-dimensional map corresponding to the robot perception space. The method further comprises:
9. The method of claim 8, wherein, When the area of the region corresponding to the target global three-dimensional map exceeds a preset area, voxel units with a perception time interval greater than a second preset time length in the target global three-dimensional map are cleared to obtain an updated target global three-dimensional map; the updated target global three-dimensional map is used as an initial global three-dimensional map for the next map update. The method further comprises: When the area of the region corresponding to the updated target global three-dimensional map exceeds the preset area, the second preset time length is reduced, and the updated target global three-dimensional map is taken as an updated global three-dimensional map; and 10. The method of claim 1, wherein, Based on the updated second preset time length, in the updated global three-dimensional map, voxel units with a perception time interval greater than the updated second preset time length are cleared until the area of the region corresponding to the updated global three-dimensional map is less than or equal to the preset area, and the finally updated global three-dimensional map is taken as a target global three-dimensional map. The method further comprises: The voxel resolution corresponding to the intermediate local three-dimensional map is obtained; mapping coordinates of each point cloud unit in the environment point cloud data based on the voxel resolution, to obtain voxel units respectively corresponding to the each point cloud unit in the intermediate local three-dimensional map; and updating the voxel units respectively corresponding to the each point cloud unit to the intermediate local three-dimensional map, to obtain a target local three-dimensional map corresponding to the robot perception space.
11. The method of claim 1, wherein, projecting the target local three-dimensional map onto the initial two-dimensional map corresponding to the robot work area, to obtain a target two-dimensional map, including: acquiring a voxel resolution corresponding to the target local three-dimensional map; mapping coordinates of each voxel unit in the target local three-dimensional map based on the voxel resolution, to obtain a local three-dimensional point cloud corresponding to the target local three-dimensional map; the local three-dimensional point cloud includes point cloud units respectively corresponding to the each voxel unit; and projecting the local three-dimensional point cloud onto the initial two-dimensional map corresponding to the robot work area, to obtain a target two-dimensional map.
12. The method of claim 1, wherein, projecting the target local three-dimensional map onto the initial two-dimensional map corresponding to the robot work area, to obtain a target two-dimensional map, including: determining a to-be-updated map area corresponding to the target local three-dimensional map on the initial two-dimensional map corresponding to the robot work area; determining target grids respectively corresponding to the each voxel unit on the to-be-updated map area of the initial two-dimensional map by projecting the each voxel unit in the target local three-dimensional map onto the to-be-updated map area of the initial two-dimensional map; and on the to-be-updated map area of the initial two-dimensional map, marking the target grids respectively corresponding to the each voxel unit as impassable, and marking each grid remaining in the to-be-updated map area of the initial two-dimensional map as passable, to obtain a target two-dimensional map.
13. A map updating apparatus, the apparatus comprising: a data acquisition module configured to acquire environment point cloud data collected in a robot work area at a target pose, and acquire an initial local three-dimensional map corresponding to a robot perception space corresponding to the target pose; an information clearing module configured to clear perception information in a sensor perception space corresponding to the environment point cloud data in the initial local three-dimensional map, to obtain an intermediate local three-dimensional map corresponding to the robot perception space; a point cloud projection module configured to project the environment point cloud data onto the intermediate local three-dimensional map, to obtain a target local three-dimensional map corresponding to the robot perception space; and a map updating module configured to project the target local three-dimensional map onto an initial two-dimensional map corresponding to the robot work area, to obtain a target two-dimensional map. the data acquisition module is further configured to:
14. The apparatus of claim 13, wherein, acquire a root storage node corresponding to a global three-dimensional map corresponding to the robot work area; determine a robot perception space corresponding to the target pose in the robot work area; For each candidate sub-storage node corresponding to the root storage node, a candidate sub-storage node in which the stored voxel unit is located within the robot perception space is taken as a target sub-storage node, and a candidate sub-storage node in which the stored voxel unit intersects with the robot perception space is taken as an intermediate sub-storage node; The root node resolution corresponding to the voxel unit stored by the root storage node is lower than the sub-node resolution corresponding to the voxel unit stored by the candidate sub-storage node; The intermediate sub-storage node is taken as the root storage node, and the target sub-storage node is determined based on each candidate sub-storage node corresponding to the root storage node, until a termination condition is met, to obtain each target sub-storage node; And The voxel units stored by each target sub-storage node are merged to obtain an initial local three-dimensional map corresponding to the robot perception space.
15. The apparatus of claim 13, wherein, The information clearing module is further configured to: In the initial local three-dimensional map, clear the voxel units located within the sensor perception space corresponding to the environment point cloud data to obtain a reference local three-dimensional map corresponding to the robot perception space; And In the non-sensor perception space of the reference local three-dimensional map, clear the voxel units with a perception time interval greater than a first preset time length to obtain an intermediate local three-dimensional map corresponding to the robot perception space.
16. The apparatus of claim 13, wherein, The information clearing module is further configured to: For any one voxel unit included in the initial local three-dimensional map, based on the spatial coordinates corresponding to the voxel unit, the distances between the voxel unit and each spatial boundary of the sensor perception space corresponding to the environment point cloud data are calculated; the spatial boundary refers to each plane forming the sensor perception space; Based on the distances between each voxel unit included in the initial local three-dimensional map and each spatial boundary, target voxel units located within the sensor perception space are determined from the voxel units; and In the initial local three-dimensional map, the target voxel units are cleared to obtain an intermediate local three-dimensional map.
17. The apparatus of claim 13, wherein, The point cloud projection module is further configured to: Obtain a voxel resolution corresponding to the intermediate local three-dimensional map; Based on the voxel resolution, coordinate mapping is performed on each point cloud unit in the environment point cloud data to obtain the voxel units corresponding to each point cloud unit in the intermediate local three-dimensional map; and The voxel units corresponding to each point cloud unit are updated to the intermediate local three-dimensional map to obtain a target local three-dimensional map corresponding to the robot perception space.
18. The apparatus of claim 13, wherein, The map updating module is further configured to: Obtain a voxel resolution corresponding to the target local three-dimensional map; Based on the voxel resolution, coordinate mapping is performed on each voxel unit in the target local three-dimensional map to obtain a local three-dimensional point cloud corresponding to the target local three-dimensional map; the local three-dimensional point cloud includes point cloud units corresponding to each voxel unit; and The local three-dimensional point cloud is projected onto an initial two-dimensional map corresponding to the robot work area to obtain a target two-dimensional map. 19.A computer device, comprising a memory and a processor, wherein the memory stores computer readable instructions, and the processor executes the computer readable instructions to implement steps of the method in any one of claims 1 to 12. 20.A computer readable storage medium, having stored thereon computer readable instructions, wherein the computer readable instructions are executed by a processor to implement steps of the method in any one of claims 1 to 12.
Citation Information
Patent Citations
Method and device for updating and slicing local area of three-dimensional simulation map
CN106611438A
Grid map updating method and device, robot and storage medium
CN112526993A
Static map generation method and device, computer equipment and storage medium
CN112799095A
Point cloud map construction method and device, equipment, storage medium and computer program
CN114092638A
Method and device for updating three-dimensional point cloud map
CN116737740A