Grid map construction method, robot and computer-readable storage medium
By building and updating the raster map, using point cloud data to fill the blind spots of the robot's perspective, the problem of low scene restoration in traditional methods is solved, and more accurate scene representation is achieved.
Patent Information
- Application Number
- CN202211680150.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-12-27
AI Technical Summary
The traditional raster map construction method causes obstacles to be not observed due to the blind spot of the robot's perspective, which causes the raster map to be unable to accurately reflect the real scene and reduce the scene restoration degree.
By obtaining the point cloud of the target scene at the current field of view, building an occupied raster map and altitude raster map, and updating the target raster map based on these maps to avoid obstructing blind spots and improve the scene restoration degree.
A grid map that more accurately reflects the robot's running scene is realized, avoiding blind spots occluding and improving the restore degree of the scene.
Smart Images

Figure CN116086430B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robot navigation technology, and in particular to a grid map construction method, a robot and a computer-readable storage medium. Background Art
[0002] Grid map (also called "static grid map") is an important form of representation of prior environmental information in robot navigation. It usually divides the robot's operating scene into a series of grids, where each grid is given a possible value, indicating the probability of the grid being occupied.
[0003] In traditional technology, the robot converts the collected point cloud into the plane where the grid map is located, and obtains the grid map corresponding to the robot's operation scenario based on the distribution of the point cloud in the grid map.
[0004] However, due to the blind spots in the robot's vision caused by occlusion of spatial objects, some obstacles in the operating scene are not observed. When constructing the grid map, the robot will directly determine that there are no obstacles in the grid, resulting in the obtained grid map not being able to accurately reflect the actual operating scene, reducing the scene restoration degree. Summary of the invention
[0005] Based on this, it is necessary to provide a grid map construction method, a robot and a computer-readable storage medium to address the above technical problems.
[0006] In a first aspect, the present application provides a method for constructing a raster map, comprising:
[0007] Get the point cloud of the target scene under the current field of view;
[0008] Constructing an occupancy grid map and a height grid map under the current field of view angle according to the point cloud under the current field of view angle; wherein the occupancy grid map includes the point cloud occupancy probability value of each grid, and the height grid map includes the point cloud height value of each grid; the occupancy grid map and the height grid map correspond to each other;
[0009] The target grid map of the target scene is updated according to the point cloud occupancy probability values in the occupancy grid map and the point cloud height values in the height grid map.
[0010] In one embodiment, constructing an occupancy grid map and a height grid map at a current field of view angle according to a point cloud at a current field of view angle includes:
[0011] Map the point clouds under the current field of view angle to the blank grid map respectively to obtain the reference grid map under the current field of view angle;
[0012] Determine the occupancy grid map under the current field of view according to the distribution information of the point cloud in the reference grid map under the current field of view;
[0013] The height grid map under the current field of view is determined according to the height information of the point cloud in the reference grid map under the current field of view and the height grid map under the previous field of view.
[0014] In one embodiment, determining the occupancy grid map at the current field of view angle according to distribution information of the point cloud in the reference grid map at the current field of view angle includes:
[0015] If the grid in the reference grid map under the current field of view does not include a point cloud, determining the point cloud occupancy probability value of the grid as a first probability value;
[0016] If the grid in the reference grid map under the current field of view angle includes a point cloud, determining that the point cloud occupancy probability value of the grid is a second probability value; wherein the second probability value is greater than the first probability value;
[0017] The occupancy grid map under the current field of view is determined according to the point cloud occupancy probability value of each grid in the reference grid map under the current field of view.
[0018] In one embodiment, determining the height grid map at the current field of view angle according to the height information of the point cloud in the reference grid map at the current field of view angle and the height grid map at the previous field of view angle includes:
[0019] Determine the maximum point cloud height in each grid according to the height information of the point cloud in the reference grid map at the current viewing angle, as the point cloud height value of each grid;
[0020] According to the point cloud height value of each grid and the height grid map under the previous field of view angle, a height grid map under the current field of view angle is formed; wherein the point cloud acquisition times of the current field of view angle and the previous field of view angle are adjacent.
[0021] In one embodiment, forming a height grid map at a current field of view angle according to the point cloud height value of each grid and the height grid map at a previous field of view angle includes:
[0022] Compare the point cloud height value of the corresponding position grid under the previous field of view angle and the point cloud height value under the current field of view angle;
[0023] The maximum point cloud height value is determined as the point cloud height value of the grid at the corresponding position, forming a height grid map under the current field of view.
[0024] In one embodiment, updating a target grid map of a target scene according to point cloud occupancy probability values in an occupancy grid map and point cloud height values in a height grid map includes:
[0025] Determine the visible height of each grid according to the point cloud height value in the height grid map;
[0026] In the occupancy grid map and the height grid map, determine the point cloud occupancy probability value and the point cloud height value of the corresponding position grid;
[0027] According to the visible height, point cloud occupancy probability value and point cloud height value of the corresponding position grid, the point cloud occupancy probability value in the target initial grid map of the target scene is updated; wherein, if the current field of view angle is the field of view angle for obtaining the point cloud for the first time, the target grid map is a blank grid map; if the current field of view angle is not the field of view angle for obtaining the point cloud for the first time, the target grid map is the target grid map determined under the previous field of view angle.
[0028] In one embodiment, updating the point cloud occupancy probability value in the target grid map of the target scene according to the visible height, the point cloud occupancy probability value and the point cloud height value of the corresponding position grid includes:
[0029] If the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is occupied, the point cloud occupancy probability value of the corresponding position grid in the target grid map is increased according to a preset increase parameter;
[0030] If the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is not occupied, the point cloud occupancy probability value of the corresponding position grid in the target grid map is updated according to the point cloud height value and the visible height of the corresponding position grid.
[0031] In one embodiment, updating the point cloud occupancy probability value of the corresponding position grid in the target grid map according to the point cloud height value and the visible height of the corresponding position grid includes:
[0032] If the point cloud height value of the corresponding position grid is greater than the visible height, the point cloud occupancy probability value of the corresponding position grid in the target grid map is reduced according to the preset reduction parameter;
[0033] If the point cloud height value of the corresponding position grid is less than or equal to the visible height, the point cloud occupancy probability value of the corresponding position grid in the target grid map remains unchanged.
[0034] In a second aspect, the present application further provides a robot, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0035] In a third aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the above methods when executed by a processor.
[0036] In the above-mentioned grid map construction method, robot and computer-readable storage medium, by obtaining the point cloud of the target scene at the current field of view angle, and constructing the corresponding occupancy grid map and height grid map at the current field of view angle according to the point cloud at the current field of view angle, and then updating the target grid map of the target scene according to the point cloud occupancy probability value of each grid in the occupancy grid map and the point cloud height value of each grid in the height grid map. In the above-mentioned method, based on the cloud occupancy probability value and point cloud height value determined by the occupancy grid map and the height grid map at the current viewing angle of the robot, the point cloud occupancy probability value of the corresponding position grid in the existing target grid map is continuously updated, and the continuously updated target grid map avoids occlusion blind spots, and can more accurately reflect the real operation scene, greatly improving the restoration degree of the scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a diagram of the internal structure of a robot in one embodiment;
[0038] Figure 2 A schematic diagram of a process of constructing a grid map in one embodiment;
[0039] Figure 3 A schematic diagram of the field of view angles generated by a robot at different positions in one embodiment;
[0040] Figure 4 A schematic diagram of a process for constructing an occupancy grid map and a height grid map in one embodiment;
[0041] Figure 5 A schematic diagram of a process of forming a reference grid map in one embodiment;
[0042] Figure 6 A schematic diagram of a process for forming an occupancy grid map in one embodiment;
[0043] Figure 7 A schematic diagram of a process for forming a height grid map in one embodiment;
[0044] Figure 8 A schematic diagram of a process for forming a height grid map in another embodiment;
[0045] Fig. 9 A schematic diagram of a process for updating a target grid map in one embodiment;
[0046] Fig.10 A schematic diagram of an actual application scenario in an embodiment;
[0047] Fig.11 is a height grid map including point cloud height values of a portion of the grid in one embodiment;
[0048] Fig.12 A schematic diagram of a process for updating a target grid map in one embodiment;
[0049] Fig.13 A schematic diagram of a process for updating a target grid map in another embodiment;
[0050] Fig.14 A schematic diagram of a process for updating a target grid map in another embodiment;
[0051] Fig.15 It is a structural block diagram of a grid map construction device in one embodiment. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0053] The grid map construction method provided in the embodiment of the present application can be applied to a robot, and its internal structure diagram can be as follows: Figure 1 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. 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 a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a grid map construction method is implemented. The display screen of the robot can be a liquid crystal display screen or an electronic ink display screen, and the input device of the robot can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the robot shell, or an external keyboard, touchpad or mouse, etc.
[0054] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0055] In one embodiment, Figure 2 As shown, a grid map construction method is provided, which is applied to Figure 1The robot in the example is used to illustrate the following steps:
[0056] S210: Obtain a point cloud of the target scene under the current field of view.
[0057] The field of view (FOV) is the angle that characterizes the range that the robot lens can cover. The target scene is the robot's driving scene. The robot can move in the target scene, and as the robot moves, the robot's field of view changes accordingly.
[0058] Optionally, the robot can obtain the point cloud of the target scene at the current field of view angle through the camera device (such as RGBD camera) carried by itself during the movement. The robot can specifically circle the target scene and obtain point clouds at multiple different current field of view angles, that is, the current field of view angle changes continuously as the robot moves. For example, Figure 3 As shown in the figure, the rectangular area is the target scene. The robot can move clockwise around the boundary of the rectangular area and obtain point clouds under the corresponding FOV-1, FOV-2, FOV-3, and FOV-4 angles at positions A, B, C, and D respectively.
[0059] In other embodiments, the point cloud of the target scene under the current field of view angle can also be obtained through the laser radar device carried by itself, which is not limited here.
[0060] S220: construct an occupancy grid map and a height grid map at the current field of view according to the point cloud at the current field of view.
[0061] The occupancy grid map includes the point cloud occupancy probability value of each grid, and the height grid map includes the point cloud height value of each grid. The occupancy grid map and the height grid map correspond to each other, that is, the grid size and resolution are the same.
[0062] It should be noted that the occupancy grid map reflects the distribution of the point cloud, which can be determined independently based on the point cloud under an independent field of view. The point cloud occupancy probability value represents the possibility that the grid is occupied by the point cloud. The height grid map reflects the height information of the point cloud, which can be determined based on the accumulation of the point cloud under the existing field of view. The point cloud height value is the spatial coordinate height of the point cloud in the grid.
[0063] Optionally, the robot obtains the point cloud under the current field of view angle, and maps the point cloud under the current field of view angle to the grid plane (generally the ground), determines the point cloud occupancy probability value of each grid in the grid plane according to the distribution of the point cloud in the grid plane after mapping, and determines the point cloud height value of each grid according to the spatial coordinate height of the point cloud in each grid under the existing field of view angle.
[0064] For point clouds under different current field of view angles, occupancy grid maps and height grid maps under different current field of view angles can be obtained. Continuing the above example, for FOV-1, occupancy grid map M-1 and height grid map H-1 are obtained; for FOV-2, occupancy grid map M-2 and height grid map H-2 are obtained; for FOV-3, occupancy grid map M-3 and height grid map H-3 are obtained; for FOV-4, occupancy grid map M-4 and height grid map H-4 are obtained.
[0065] S230 . Update the target grid map of the target scene according to the point cloud occupancy probability values in the occupancy grid map and the point cloud height values in the height grid map.
[0066] Optionally, after obtaining the occupancy grid map and the height grid map under the current field of view angle, the robot can compare the relationship between the point cloud height value of each grid in the height grid map and the height threshold, and update the point cloud occupancy probability value of the corresponding position grid in the existing target grid map of the target scene according to the comparison result, thereby obtaining the updated target grid map of the target scene.
[0067] Optionally, for a single grid, if the comparison result is that the point cloud height value is greater than the height threshold, the target probability value of the grid at the corresponding position is determined by comprehensively determining the point cloud occupancy probability value of the grid at the corresponding position in the occupancy grid map, so as to update the point cloud occupancy probability value of the grid at the corresponding position in the existing target grid map with the target probability value. Optionally, for a single grid, if the comparison result is that the point cloud height is not greater than the height threshold, the point cloud occupancy probability value of the grid at the corresponding position in the existing target grid map is maintained.
[0068] In this embodiment, the robot obtains the point cloud of the target scene under the current field of view, and constructs the corresponding occupancy grid map and height grid map under the current field of view according to the point cloud under the current field of view, and then updates the target grid map of the target scene according to the point cloud occupancy probability value of each grid in the occupancy grid map and the point cloud height value of each grid in the height grid map. In the above method, based on the cloud occupancy probability value and point cloud height value determined by the occupancy grid map and the height grid map under the current viewing angle of the robot, the point cloud occupancy probability value of the corresponding position grid in the existing target grid map is continuously updated. The continuously updated target grid map not only avoids the occlusion blind spot, but also can more accurately reflect the real operation scene of the robot, greatly improving the scene restoration degree.
[0069] The point cloud under the current field of view angle forms an occupancy grid map and a height grid map under the current field of view angle. Figure 4 As shown, the above S220, constructing an occupancy grid map and a height grid map at the current field of view angle according to the point cloud at the current field of view angle, includes:
[0070] S410, mapping the point clouds under the current field of view angle to the blank grid map respectively, to obtain the reference grid map under the current field of view angle.
[0071] The blank grid map is a grid map that corresponds to the occupancy grid map and the height grid map, that is, has the same specifications as the grid map. Optionally, the blank grid map does not include a parameter value corresponding to each grid, or the parameter value corresponding to each grid is 0.
[0072] Optionally, the robot maps the point cloud under the current field of view angle to a blank grid map to obtain a reference grid map under the current field of view angle. Figure 5 A schematic diagram of the process of mapping a point cloud under a current field of view angle to a blank grid map to form a reference grid map under the corresponding field of view angle, wherein the robot can specifically convert the point cloud under the current field of view angle from the camera coordinate system to the robot coordinate system according to the external parameters of the acquisition device (using the camera coordinate system), and then convert the point cloud from the robot coordinate system to the world coordinate system according to the robot's posture in the world coordinate system, and finally convert the point cloud from the world coordinate system to the map coordinate system according to the resolution of the blank grid map, so as to realize the mapping of points to the blank grid map and obtain the reference grid map corresponding to the current field of view angle.
[0073] S420: Determine an occupancy grid map at the current field of view angle according to distribution information of the point cloud in the reference grid map at the current field of view angle and the height grid map at the previous field of view angle.
[0074] Optionally, for the reference grid map under the current field of view angle, the robot can determine the point cloud occupancy probability value of the corresponding grid based on the distribution information of the point cloud in each grid in the reference grid map, so as to form an occupancy grid map including the point cloud occupancy probability value of each grid based on the blank grid map.
[0075] Optionally, the robot may determine the point cloud occupancy probability value of the corresponding grid according to whether there is a point cloud in each grid in the reference grid map. For example, if there is a point cloud in the grid, the point cloud occupancy probability value of the grid is determined to be 255; if there is no point cloud in the grid, the point cloud occupancy probability value of the grid is determined to be 0. Among them, 0≤point cloud occupancy probability value≤255.
[0076] S430, determining a height grid map at the current field of view angle according to the height information of the point cloud in the reference grid map at the current field of view angle and the height grid map at the previous field of view angle.
[0077] Optionally, for the reference grid map under the current field of view angle, the robot can determine the point cloud height value of the corresponding grid based on the height information of the point cloud in each grid in the reference grid map and the height grid map under the previous field of view angle, so as to form a height grid map including the point cloud height value of each grid based on the blank grid map.
[0078] Optionally, for the point cloud in each grid in the reference grid map, the robot traverses and obtains the spatial coordinate height of each point cloud, and determines the maximum height therefrom as the point cloud height value of the corresponding grid.
[0079] In this embodiment, the point cloud under the current field of view is mapped to the blank grid map to obtain the reference grid map under the current field of view. The occupancy grid map under the current field of view is determined based on the distribution information of the point cloud in the reference grid map under the current field of view. The height grid map under the current field of view is determined based on the height information of the point cloud in the reference grid map under the current field of view and the height grid map under the previous field of view. The above method can be used to obtain the occupancy grid map and height grid map including information of different dimensions under the current field of view, so as to prepare data for the subsequent construction of the target grid map of the target scene, so as to improve the scene restoration degree of the target grid map.
[0080] In practical applications, the occupancy grid map can be determined based on whether the grid includes a point cloud. Figure 6 As shown, the above S420, determining the occupancy grid map under the current field of view angle according to the distribution information of the point cloud in the reference grid map under the current field of view angle, includes:
[0081] S610: If the grid in the reference grid map under the current field of view does not include a point cloud, determine that the point cloud occupancy probability value of the grid is a first probability value.
[0082] S620: If the grid in the reference grid map under the current field of view angle includes a point cloud, determine that the point cloud occupancy probability value of the grid is a second probability value.
[0083] The second probability value is greater than the first probability value.
[0084] Optionally, for the reference grid map under the current field of view, the robot counts whether each grid in the reference grid map includes a point cloud, and then determines the point cloud occupancy probability value of each grid in the reference grid map. If the grid does not include a point cloud, a smaller point cloud occupancy probability value is assigned to the grid, such as the first probability value; if the grid includes a point cloud, a larger point cloud occupancy probability value is assigned to the grid, such as the second probability value. The first probability value can be 0, the second probability value can be 255, and the preset quantity threshold can be 1 or other specific values. In this embodiment, there is no specific restriction on the values of the first probability value and the second probability value, which can be set according to experience and needs.
[0085] S630: Determine an occupied grid map at the current field of view angle according to the point cloud occupancy probability value of each grid in the reference grid map at the current field of view angle.
[0086] Optionally, after the robot obtains the point cloud occupancy probability value of each grid in the reference grid map under the current field of view, it fills each point cloud occupancy probability value into the corresponding grid in the blank grid map to obtain the occupancy grid map under the current field of view.
[0087] In this embodiment, for the current field of view, the robot assigns different point cloud occupancy probability values to the corresponding grids by determining whether each grid in the reference grid map includes a point cloud, thereby obtaining an occupied grid map under the current field of view. Specifically, when the grid does not include a point cloud, the point cloud occupancy probability value can be determined to be a smaller first probability value; when the grid includes a point cloud, the point cloud occupancy probability value can be determined to be a larger second probability value. In the above method, the corresponding point cloud occupancy probability value is determined based on whether each grid in the reference grid map includes a point cloud. Since whether the grid includes a point cloud can accurately reflect the situation where the grid is occupied by a point cloud, the above method improves the accuracy of the determined occupied grid map.
[0088] The height grid map is determined based on the accumulation of point clouds under the existing field of view. Figure 7 As shown, the above S430, determining the height grid map under the current field of view angle according to the height information of the point cloud in the reference grid map under the current field of view angle and the height grid map under the previous field of view angle, includes:
[0089] S710 . Determine the maximum point cloud height in each grid according to the height information of the point cloud in the reference grid map at the current viewing angle, as the point cloud height value of each grid.
[0090] Optionally, the robot determines the spatial coordinate height of the point cloud in the same grid according to the height information of the point cloud in the reference grid map at the current viewing angle, and determines the maximum point cloud height therefrom, and uses the maximum point cloud height as the point cloud height value of the corresponding grid, thereby obtaining the point cloud height value of each grid. S720: Form a height grid map at the current viewing angle according to the point cloud height value of each grid and the height grid map at the previous viewing angle.
[0091] The point cloud acquisition times of the current field of view angle and the previous field of view angle are adjacent. When the current field of view angle is the field of view angle for acquiring the point cloud for the first time, the height grid map under the previous field of view angle is a blank grid map.
[0092] Optionally, for the current field of view angle that is not the first time to obtain the point cloud, there is a previous field of view angle before the current field of view angle at which the point cloud was obtained. When the robot determines the height grid map under the current field of view angle, it can pre-acquire the height grid map under the previous field of view angle of the current field of view angle, and update the point cloud height value of the corresponding position grid in the height grid map under the previous field of view angle according to the point cloud height value of each grid under the current field of view angle to form the height grid map under the current field of view angle. For the current field of view angle that is the first time to obtain the point cloud, when the robot determines the height grid map under the current field of view angle, it directly uses the point cloud height value of each grid under the current field of view angle as the point cloud height value of the corresponding position grid in the blank grid map to form the height grid map under the current field of view angle.
[0093] In an optional embodiment, if Figure 8 As shown, in the above S720, the height grid map under the current field of view angle is formed according to the point cloud height value of each grid and the height grid map under the previous field of view angle, including:
[0094] S810 , comparing the point cloud height value of the corresponding position grid at the previous field of view angle with the point cloud height value at the current field of view angle.
[0095] Optionally, after obtaining the point cloud height value in each grid under the current field of view angle and the height grid map under the previous field of view angle, the robot compares the point cloud height value of the grid at the previous field of view angle with the point cloud height value at the current field of view angle to determine the point cloud height value of the grid at the corresponding position based on the comparison result.
[0096] S820: Determine the maximum point cloud height value as the point cloud height value of the grid at the corresponding position, and form a height grid map under the current field of view.
[0097] Optionally, for each grid, after obtaining the comparison result between the point cloud height value of the grid at the corresponding position under the current field of view angle and the point cloud height value at the previous field of view angle, the robot can determine the maximum point cloud height value as the point cloud height value of the grid at the corresponding position, thereby forming a height grid map under the current field of view angle.
[0098] In this embodiment, the robot obtains the maximum point cloud height in each grid in the reference grid map for the current field of view as the point cloud height value of each grid, and forms a height grid map under the current field of view according to the height grid map under the previous field of view and the point cloud height value of each grid under the current field of view. Specifically, the height grid map under the current field of view can be formed by comparing the point cloud height value of the corresponding position grid under the previous field of view and the point cloud height value under the current field of view to determine that the maximum point cloud height value is the point cloud height value of the corresponding position grid. In the above process of forming the height grid map under the current field of view, different field of view angles are taken into account by accumulating the current field of view angle and the field of view angle of the previous frame, thereby avoiding occlusion blind spots. As more and more current field of view angles are accumulated, the height grid map is iteratively updated, thereby improving the accuracy of the height grid map.
[0099] The target grid map of the target scene is continuously updated iteratively. In one embodiment, Fig. 9 As shown, the above S230, updating the target grid map of the target scene according to the point cloud occupancy probability value in the occupancy grid map and the point cloud height value in the height grid map under the current field of view angle, includes:
[0100] S910: Determine the visible height of each grid according to the point cloud height value in the height grid map.
[0101] The visible height is the minimum height value that can be seen by the robot under the current field of view. For the same grid, the visible height determined under different current field of view angles may be different due to the different point cloud height values of the surrounding grids.
[0102] Optionally, for the current field of view angle, after obtaining the height grid map under the current field of view angle, the robot further estimates the visible height of each grid according to the point cloud height values of the grids around each grid according to the estimation criteria. The estimation criteria include that in the direction of the corresponding field of view angle, the visible height of the rear grid is greater than or equal to the visible height / point cloud height value of the front grid.
[0103] Optionally, based on the above estimation criteria, the visible height on the grid intersecting with the longitudinal section can be estimated by using a geometric algorithm based on the intersection information between the longitudinal section where a ray is located in the field of view angle direction and the spatial object in the target scene. Fig.10As shown in the figure, point o is the location of the robot. The projection of the FOV formed based on point o on the two-dimensional map is fan-shaped. Take a ray oe on the FOV for illustration. The starting point of the ray is the robot origin o, and ef is the maximum detection position of the robot. The ray corresponds to a longitudinal section in space (the shaded area in the figure). The longitudinal section intersects with the space object (A, B, C in the figure) to form a line segment oabcde. The geometric algorithm is used to estimate the visual height of the relevant grid, as shown in the figure. Fig.10 and Fig.11 As shown in the figure, the area below the line segment oabcde is the robot invisible area, and the area between the line segment oabcde and the line segment of is the robot visible area. For grids whose point cloud height value is not 0, the point cloud height value of the grid is the visible height of the grid; for grids whose point cloud height value is 0, the visible height of the grid can be estimated by using a geometric algorithm based on the estimation criteria ( Fig.11 The point cloud height values in the grid of the middle shaded area are estimated).
[0104] S920. Determine the point cloud occupancy probability value and the point cloud height value of the corresponding position grid in the occupancy grid map and the height grid map.
[0105] Optionally, for the occupancy grid map and height grid map under the current field of view, the robot obtains the point cloud occupancy probability value and point cloud height value of the corresponding position grid from them. Fig.12 As shown, for grid b, the point cloud occupancy probability value P of grid b is obtained in the occupancy grid map. b , get the point cloud height value H of grid b in the height grid map b ; For grid c, obtain the point cloud occupancy probability value P of grid c in the occupancy grid map c , get the point cloud height value H of grid c in the height grid map c ; For grid d, obtain the point cloud occupancy probability value P of grid d in the occupancy grid map d , get the point cloud height value H of grid d in the height grid map d .
[0106] S930. Update the point cloud occupancy probability value in the target grid map of the target scene according to the visible height value, the point cloud occupancy probability value and the point cloud height value of the corresponding position grid.
[0107] Among them, if the current field of view angle is the field of view angle of the first acquisition of the point cloud, the target grid map is a blank grid map; if the current field of view angle is not the field of view angle of the first acquisition of the point cloud, the target grid map is the target grid map determined under the previous field of view angle.
[0108] Optionally, after obtaining the visible height, point cloud occupancy probability value and point cloud height value of the corresponding position grid, the robot can update the point cloud occupancy probability value of the corresponding position grid in the target grid map according to the visible height, point cloud occupancy probability value and point cloud height value of the corresponding position grid.
[0109] In an optional embodiment, if Fig.13 As shown, the above S930, according to the visible height, point cloud occupancy probability value and point cloud height value of the corresponding position grid, updates the point cloud occupancy probability value of the corresponding position grid in the target grid map, including:
[0110] S1310 , if the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is occupied, increase the point cloud occupancy probability value of the corresponding position grid in the target grid map according to a preset increase parameter.
[0111] Among them, the point cloud occupancy probability value can be used to represent that the grid is occupied by the point cloud, and can also be used to represent that the grid is not occupied by the point cloud, which is determined by the specific value of the point cloud occupancy probability value.
[0112] Optionally, the robot can compare the point cloud occupancy probability value with a preset probability value. If the point cloud occupancy probability value is greater than the preset probability value, the point cloud occupancy probability value is used to indicate that the grid is occupied; conversely, if the point cloud occupancy probability value is less than or equal to the preset probability value, the point cloud occupancy probability value is used to indicate that the grid is not occupied. In the above embodiment, the first probability value is used to indicate that the grid is not occupied, and the second probability value is used to indicate that the grid is occupied.
[0113] Optionally, the robot obtains the point cloud occupancy probability value of the corresponding position grid and compares it with the preset probability value. If the point cloud occupancy probability value is greater than the preset probability value, which indicates that the corresponding position grid is occupied, the point cloud occupancy probability value of the corresponding position grid in the target grid map is increased. Specifically, the preset increase parameter can be used for increase, and the preset increase parameter can be an increase step size or an increase coefficient. Fig.12 For example, if the point cloud occupancy probability value P of grid b b is the second grid value (such as 255), which indicates that grid b is occupied. At this time, the robot increases the point cloud occupancy probability value P of grid b in the target grid map according to the preset increase step size V1. b ', get the updated point cloud occupancy probability value P of grid b b '+V1. If the updated point cloud occupancy probability value P b '+V1>maximum probability value P max , then P b '+V1 directly takes P max Optionally, P max =255.
[0114] In an alternative embodiment, V1 may be 20.
[0115] In other embodiments, P max There are other values like V1 and V2, which are not limited here.
[0116] Optionally, each time the point cloud is updated, the target grid map is updated.
[0117] S1320. If the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is not occupied, update the point cloud occupancy probability value of the corresponding position grid in the target grid map of the target scene according to the point cloud height value and visible height of the corresponding position grid.
[0118] Optionally, the robot obtains the point cloud occupancy probability value of the corresponding position grid and compares it with the preset probability value. If the point cloud occupancy probability value is less than or equal to the preset probability value, which indicates that the corresponding position grid is not occupied, the point cloud occupancy probability value of the corresponding position grid in the target grid map is updated according to the point cloud height value and visible height of the corresponding position grid. Fig.12 For example, if the point cloud occupancy probability value P of grid c c is the first grid value (such as 0), which means that grid c is not occupied. At this time, the robot calculates the height value H of the point cloud of grid c. c and visual height H c ', Update the point cloud occupancy probability value P of grid c in the existing target grid map c '.
[0119] In an optional embodiment, if Fig.14 As shown, S1320, if the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is not occupied, then according to the point cloud height value and the visible height of the corresponding position grid, the point cloud occupancy probability value of the corresponding position grid in the target grid map of the target scene is updated, including:
[0120] S1410: If the point cloud height value of the corresponding position grid is greater than the visible height, the point cloud occupancy probability value of the corresponding position grid in the target grid map is reduced according to a preset reduction parameter.
[0121] Optionally, the robot compares the point cloud height value of the corresponding position grid with the visible height, and updates the point cloud occupancy probability value of the corresponding position grid in the target grid map of the target scene according to the comparison result.
[0122] Optionally, when the point cloud height value of the grid at the corresponding position is greater than the visible height, the point cloud occupancy probability value of the grid at the corresponding position in the target grid map is reduced. Specifically, a preset reduction parameter may be used for reduction, and the preset reduction parameter may be a reduction step size or a reduction coefficient. Fig.12For example, if the point cloud height value H of grid c c Greater than the visual height H c ', which means that the grid c should include the point cloud under the current field of view, but the point cloud occupancy probability value P c The grid is not occupied. Since the height grid map is accumulated from multiple viewing angles, there is a situation where the point cloud no longer exists (the target has been moved) but still exists in the height grid map. At this time, the robot reduces the point cloud occupancy probability value P of grid c in the target grid map according to the preset step size V2. c ', get the updated point cloud occupancy probability value P of grid c c '-V2. If the updated point cloud occupancy probability value P c '-V2<minimum probability value P min , then P c '-V2 directly takes P min Optionally, P min =0.
[0123] S1420: If the point cloud height value of the corresponding position grid is less than or equal to the visible height, the point cloud occupancy probability value of the corresponding position grid in the target grid map is kept unchanged.
[0124] Optionally, when the point cloud height value of the corresponding position grid is less than or equal to the visible height, the robot keeps the point cloud occupancy probability value of the corresponding position grid in the target grid map unchanged. Fig.12 As shown, for grid d, the point cloud occupancy probability value of grid d in the grid map (such as 0) indicates that grid d is not occupied by point cloud. Compare the point cloud height value H of grid d d and the corresponding visual height H d ', assuming H d =H d '=0, the robot maintains the point cloud occupancy probability value P of grid d in the target grid map d 'constant.
[0125] In a specific scenario, if there are two tables, one high and one low, when the robot is located on the side of the low table facing away from the high table, it can obtain point clouds of both the low table and the high table. However, if the robot is located on the side of the high table facing away from the low table, it can only obtain the point cloud of the high table.
[0126] When the robot is located on the side of the low table facing away from the high table, the height value of the part of the point cloud corresponding to the high table is greater than the visible height. Therefore, if the high table changes (such as being moved), the robot can observe it and update the point cloud occupancy probability of the corresponding grid in its target grid map.
[0127] When the robot is located on the side of the high table away from the low table, it cannot see the point cloud of the low table, that is, the height value of some point clouds corresponding to the low table is less than the visible height, so it is not updated to prevent erroneous updates.
[0128] In this embodiment, the robot determines the visible height of each grid according to the point cloud height value in the height grid map, and determines the point cloud occupancy probability and point cloud height value of the corresponding position grid in the occupancy grid map and the height grid map, and then updates the point cloud occupancy probability value in the target grid map of the target scene according to the visible height, point cloud occupancy probability value and point cloud height value of the corresponding position grid to obtain an updated target grid map. Specifically, the point cloud occupancy probability value of the corresponding position grid in the target grid map is increased or decreased according to the visible height, point cloud occupancy probability value and point cloud height value of the corresponding position grid. The above method can be used to continuously update the point cloud occupancy probability value of the corresponding position grid of the target grid map, so as to obtain an updated target grid map that avoids occlusion of blind spots and has a higher degree of scene restoration.
[0129] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0130] In one embodiment, Fig.15 As shown, a grid map construction device is provided, including: a point cloud acquisition module 1501, a map construction module 1502 and a map update module 1503, wherein:
[0131] The point cloud acquisition module 1501 is used to acquire the point cloud of the target scene under the current field of view;
[0132] The map construction module 1502 is used to construct an occupancy grid map and an altitude grid map at the current field of view according to the point cloud at the current field of view; wherein the occupancy grid map includes the point cloud occupancy probability value of each grid, and the altitude grid map includes the point cloud height value of each grid; the occupancy grid map and the altitude grid map correspond to each other;
[0133] The map updating module 1503 is used to update the target grid map of the target scene according to the point cloud occupancy probability values in the occupancy grid map and the point cloud height values in the height grid map.
[0134] In one embodiment, the map construction module 1502 is specifically used to:
[0135] The point clouds under the current field of view are mapped to the blank grid map respectively to obtain the reference grid map under the current field of view; the occupancy grid map under the current field of view is determined according to the distribution information of the point cloud in the reference grid map under the current field of view; the height grid map under the current field of view is determined according to the height information of the point cloud in the reference grid map under the current field of view and the height grid map under the previous field of view.
[0136] In one embodiment, the map construction module 1502 is specifically used to:
[0137] If the grid in the reference grid map under the current field of view does not include point clouds, the point cloud occupancy probability value of the grid is determined to be a first probability value; if the grid in the reference grid map under the current field of view includes point clouds, the point cloud occupancy probability value of the grid is determined to be a second probability value; wherein the second probability value is greater than the first probability value; the occupied grid map under the current field of view is determined according to the point cloud occupancy probability value of each grid in the reference grid map under the current field of view.
[0138] In one embodiment, the map construction module 1502 is specifically used to:
[0139] According to the height information of the point cloud in the reference grid map under the current field of view, the maximum point cloud height in each grid is determined as the point cloud height value of each grid; according to the point cloud height value of each grid and the height grid map under the previous field of view, the height grid map under the current field of view is formed; wherein the point cloud acquisition times of the current field of view and the previous field of view are adjacent.
[0140] In one embodiment, the map construction module 1502 is specifically used to:
[0141] Compare the point cloud height value of the corresponding position grid under the previous field of view angle and the point cloud height value under the current field of view angle; determine the maximum point cloud height value as the point cloud height value of the corresponding position grid, and form a height grid map under the current field of view angle.
[0142] In one embodiment, the map update module 1503 is specifically used to:
[0143] The visible height of each grid is determined according to the point cloud height value in the height grid map; in the occupancy grid map and the height grid map, the point cloud occupancy probability value and the point cloud height value of the grid at the corresponding position are determined; according to the visible height, the point cloud occupancy probability value and the point cloud height value of the grid at the corresponding position, the point cloud occupancy probability value in the target grid map of the target scene is updated; wherein, if the current field of view angle is the field of view angle for obtaining the point cloud for the first time, the target grid map is a blank grid map; if the current field of view angle is not the field of view angle for obtaining the point cloud for the first time, the target grid map is the target grid map determined under the previous field of view angle.
[0144] In one embodiment, the map update module 1503 is specifically used to:
[0145] If the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is occupied, the point cloud occupancy probability value of the corresponding position grid in the target grid map is increased according to the preset increase parameter; if the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is not occupied, the point cloud occupancy probability value of the corresponding position grid in the target grid map is updated according to the point cloud height value and visible height of the corresponding position grid.
[0146] In one embodiment, the map update module 1503 is specifically used to:
[0147] If the point cloud height value of the grid at the corresponding position is greater than the visible height, the point cloud occupancy probability value of the grid at the corresponding position in the target grid map is reduced according to the preset reduction parameter; if the point cloud height value of the grid at the corresponding position is less than or equal to the visible height, the point cloud occupancy probability value of the grid at the corresponding position in the target grid map remains unchanged.
[0148] Each module in the above-mentioned grid map construction device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0149] In one embodiment, a robot is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0150] Obtain the point cloud of the target scene under the current field of view; construct an occupancy grid map and a height grid map under the current field of view according to the point cloud under the current field of view; wherein the occupancy grid map includes the point cloud occupancy probability value of each grid, and the height grid map includes the point cloud height value of each grid; the occupancy grid map and the height grid map correspond to each other; update the target grid map of the target scene according to the point cloud occupancy probability value in the occupancy grid map and the point cloud height value in the height grid map.
[0151] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0152] The point clouds under the current field of view are mapped to the blank grid map respectively to obtain the reference grid map under the current field of view; the occupancy grid map under the current field of view is determined according to the distribution information of the point cloud in the reference grid map under the current field of view; the height grid map under the current field of view is determined according to the height information of the point cloud in the reference grid map under the current field of view and the height grid map under the previous field of view.
[0153] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0154] If the grid in the reference grid map under the current field of view does not include point clouds, the point cloud occupancy probability value of the grid is determined to be a first probability value; if the grid in the reference grid map under the current field of view includes point clouds, the point cloud occupancy probability value of the grid is determined to be a second probability value; wherein the second probability value is greater than the first probability value; the occupied grid map under the current field of view is determined according to the point cloud occupancy probability value of each grid in the reference grid map under the current field of view.
[0155] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0156] According to the height information of the point cloud in the reference grid map under the current field of view, the maximum point cloud height in each grid is determined as the point cloud height value of each grid; according to the point cloud height value of each grid and the height grid map under the previous field of view, the height grid map under the current field of view is formed; wherein the point cloud acquisition times of the current field of view and the previous field of view are adjacent.
[0157] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0158] Compare the point cloud height value of the corresponding position grid under the previous field of view angle and the point cloud height value under the current field of view angle; determine the maximum point cloud height value as the point cloud height value of the corresponding position grid, and form a height grid map under the current field of view angle.
[0159] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0160] Determine the visible height of each grid according to the point cloud height value in the height grid map; determine the point cloud occupancy probability value and point cloud height value of the grid at the corresponding position in the occupancy grid map and the height grid map;
[0161] According to the visible height, point cloud occupancy probability value and point cloud height value of the corresponding position grid, the point cloud occupancy probability value in the target grid map of the target scene is updated; wherein, if the current field of view angle is the field of view angle for obtaining the point cloud for the first time, the target grid map is a blank grid map; if the current field of view angle is not the field of view angle for obtaining the point cloud for the first time, the target grid map is the target grid map determined under the previous field of view angle.
[0162] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0163] If the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is occupied, the point cloud occupancy probability value of the corresponding position grid in the target grid map is increased according to the preset increase parameter; if the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is not occupied, the point cloud occupancy probability value of the corresponding position grid in the target grid map is updated according to the point cloud height value and visible height of the corresponding position grid.
[0164] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0165] If the point cloud height value of the grid at the corresponding position is greater than the visible height, the point cloud occupancy probability value of the grid at the corresponding position in the target grid map is reduced according to the preset reduction parameter; if the point cloud height value of the grid at the corresponding position is less than or equal to the visible height, the point cloud occupancy probability value of the grid at the corresponding position in the target grid map remains unchanged.
[0166] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0167] Obtain the point cloud of the target scene under the current field of view; construct an occupancy grid map and a height grid map under the current field of view according to the point cloud under the current field of view; wherein the occupancy grid map includes the point cloud occupancy probability value of each grid, and the height grid map includes the point cloud height value of each grid; the occupancy grid map and the height grid map correspond to each other; update the target grid map of the target scene according to the point cloud occupancy probability value in the occupancy grid map and the point cloud height value in the height grid map.
[0168] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0169] The point clouds under the current field of view are mapped to the blank grid map respectively to obtain the reference grid map under the current field of view; the occupancy grid map under the current field of view is determined according to the distribution information of the point cloud in the reference grid map under the current field of view; the height grid map under the current field of view is determined according to the height information of the point cloud in the reference grid map under the current field of view and the height grid map under the previous field of view.
[0170] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0171] If the grid in the reference grid map under the current field of view does not include point clouds, the point cloud occupancy probability value of the grid is determined to be a first probability value; if the grid in the reference grid map under the current field of view includes point clouds, the point cloud occupancy probability value of the grid is determined to be a second probability value; wherein the second probability value is greater than the first probability value; the occupied grid map under the current field of view is determined according to the point cloud occupancy probability value of each grid in the reference grid map under the current field of view.
[0172] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0173] According to the height information of the point cloud in the reference grid map under the current field of view, the maximum point cloud height in each grid is determined as the point cloud height value of each grid; according to the point cloud height value of each grid and the height grid map under the previous field of view, the height grid map under the current field of view is formed; wherein the point cloud acquisition times of the current field of view and the previous field of view are adjacent.
[0174] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0175] Compare the point cloud height value of the corresponding position grid under the previous field of view angle and the point cloud height value under the current field of view angle; determine the maximum point cloud height value as the point cloud height value of the corresponding position grid, and form a height grid map under the current field of view angle.
[0176] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0177] The visible height of each grid is determined according to the point cloud height value in the height grid map; in the occupancy grid map and the height grid map, the point cloud occupancy probability value and the point cloud height value of the grid at the corresponding position are determined; according to the visible height, the point cloud occupancy probability value and the point cloud height value of the grid at the corresponding position, the point cloud occupancy probability value in the target grid map of the target scene is updated; wherein, if the current field of view angle is the field of view angle for obtaining the point cloud for the first time, the target grid map is a blank grid map; if the current field of view angle is not the field of view angle for obtaining the point cloud for the first time, the target grid map is the target grid map determined under the previous field of view angle.
[0178] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0179] If the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is occupied, the point cloud occupancy probability value of the corresponding position grid in the target grid map is increased according to the preset increase parameter; if the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is not occupied, the point cloud occupancy probability value of the corresponding position grid in the target grid map is updated according to the point cloud height value and visible height of the corresponding position grid.
[0180] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0181] If the point cloud height value of the grid at the corresponding position is greater than the visible height, the point cloud occupancy probability value of the grid at the corresponding position in the target grid map is reduced according to the preset reduction parameter; if the point cloud height value of the grid at the corresponding position is less than or equal to the visible height, the point cloud occupancy probability value of the grid at the corresponding position in the target grid map remains unchanged.
[0182] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0183] Obtain the point cloud of the target scene under the current field of view; construct an occupancy grid map and a height grid map under the current field of view according to the point cloud under the current field of view; wherein the occupancy grid map includes the point cloud occupancy probability value of each grid, and the height grid map includes the point cloud height value of each grid; the occupancy grid map and the height grid map correspond to each other; update the target grid map of the target scene according to the point cloud occupancy probability value in the occupancy grid map and the point cloud height value in the height grid map.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0185] The point clouds under the current field of view are mapped to the blank grid map respectively to obtain the reference grid map under the current field of view; the occupancy grid map under the current field of view is determined according to the distribution information of the point cloud in the reference grid map under the current field of view; the height grid map under the current field of view is determined according to the height information of the point cloud in the reference grid map under the current field of view and the height grid map under the previous field of view.
[0186] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0187] If the grid in the reference grid map under the current field of view does not include point clouds, the point cloud occupancy probability value of the grid is determined to be a first probability value; if the grid in the reference grid map under the current field of view includes point clouds, the point cloud occupancy probability value of the grid is determined to be a second probability value; wherein the second probability value is greater than the first probability value; the occupied grid map under the current field of view is determined according to the point cloud occupancy probability value of each grid in the reference grid map under the current field of view.
[0188] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0189] According to the height information of the point cloud in the reference grid map under the current field of view, the maximum point cloud height in each grid is determined as the point cloud height value of each grid; according to the point cloud height value of each grid and the height grid map under the previous field of view, the height grid map under the current field of view is formed; wherein the point cloud acquisition times of the current field of view and the previous field of view are adjacent.
[0190] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0191] Compare the point cloud height value of the corresponding position grid under the previous field of view angle and the point cloud height value under the current field of view angle; determine the maximum point cloud height value as the point cloud height value of the corresponding position grid, and form a height grid map under the current field of view angle.
[0192] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0193] The visible height of each grid is determined according to the point cloud height value in the height grid map; in the occupancy grid map and the height grid map, the point cloud occupancy probability value and the point cloud height value of the grid at the corresponding position are determined; according to the visible height, the point cloud occupancy probability value and the point cloud height value of the grid at the corresponding position, the point cloud occupancy probability value in the target grid map of the target scene is updated; wherein, if the current field of view angle is the field of view angle for obtaining the point cloud for the first time, the target grid map is a blank grid map; if the current field of view angle is not the field of view angle for obtaining the point cloud for the first time, the target grid map is the target grid map determined under the previous field of view angle.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0195] If the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is occupied, the point cloud occupancy probability value of the corresponding position grid in the target grid map is increased according to the preset increase parameter; if the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is not occupied, the point cloud occupancy probability value of the corresponding position grid in the target grid map is updated according to the point cloud height value and visible height of the corresponding position grid.
[0196] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0197] If the point cloud height value of the grid at the corresponding position is greater than the visible height, the point cloud occupancy probability value of the grid at the corresponding position in the target grid map is reduced according to the preset reduction parameter; if the point cloud height value of the grid at the corresponding position is less than or equal to the visible height, the point cloud occupancy probability value of the grid at the corresponding position in the target grid map remains unchanged.
[0198] 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 a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the 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 memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access 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 and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0199] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0200] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for constructing a grid map, characterized in that: The method comprises: Get the point cloud of the target scene under the current field of view; Constructing an occupancy grid map and a height grid map under the current field of view angle according to the point cloud under the current field of view angle; wherein the occupancy grid map includes a point cloud occupancy probability value of each grid, and the height grid map includes a point cloud height value of each grid; the occupancy grid map and the height grid map correspond to each other; Determine the visible height of each grid according to the point cloud height value in the height grid map; In the occupancy grid map and the height grid map, determining the point cloud occupancy probability value and the point cloud height value of the corresponding position grid; According to the visible height, point cloud occupancy probability value and point cloud height value of the corresponding position grid, the point cloud occupancy probability value in the target grid map of the target scene is updated; Among them, if the current field of view angle is the field of view angle for acquiring the point cloud for the first time, the target grid map is a blank grid map; if the current field of view angle is not the field of view angle for acquiring the point cloud for the first time, the target grid map is the target grid map determined under the previous field of view angle.
2. The method according to claim 1, characterized in that: The step of constructing an occupancy grid map and a height grid map at the current field of view angle according to the point cloud at the current field of view angle includes: Mapping the point clouds under the current field of view angle to blank grid maps respectively to obtain a reference grid map under the current field of view angle; Determine an occupancy grid map at the current field of view according to distribution information of a point cloud in a reference grid map at the current field of view; The height grid map at the current field of view angle is determined according to the height information of the point cloud in the reference grid map at the current field of view angle and the height grid map at the previous field of view angle.
3. The method according to claim 2, characterized in that The step of determining the occupancy grid map at the current field of view angle according to distribution information of the point cloud in the reference grid map at the current field of view angle comprises: If the grid in the reference grid map under the current field of view angle does not include a point cloud, determining the point cloud occupancy probability value of the grid to be a first probability value; If a point cloud is included in a grid in the reference grid map under the current field of view angle, determining that the point cloud occupancy probability value of the grid is a second probability value; wherein the second probability value is greater than the first probability value; The occupancy grid map under the current field of view angle is determined according to the point cloud occupancy probability value of each grid in the reference grid map under the current field of view angle.
4. The method according to any one of claims 2 to 3, characterized in that: Determining the height grid map at the current field of view angle according to the height information of the point cloud in the reference grid map at the current field of view angle and the height grid map at the previous field of view angle includes: Determine the maximum point cloud height in each grid according to the height information of the point cloud in the reference grid map under the current field of view, as the point cloud height value of each grid; The height grid map under the current field of view angle is formed according to the point cloud height value of each grid and the height grid map under the previous field of view angle; wherein the point cloud acquisition times of the current field of view angle and the previous field of view angle are adjacent.
5. The method according to claim 4, characterized in that The step of forming the height grid map at the current field of view angle according to the point cloud height value of each grid and the height grid map at the previous field of view angle comprises: Compare the point cloud height value of the corresponding position grid at the previous field of view angle with the point cloud height value at the current field of view angle; The maximum point cloud height value is determined as the point cloud height value of the corresponding position grid, and a height grid map under the current field of view is formed.
6. The method according to any one of claims 1 to 3, characterized in that The updating of the point cloud occupancy probability value in the target grid map of the target scene according to the visible height, the point cloud occupancy probability value and the point cloud height value of the corresponding position grid includes: If the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is occupied, increasing the point cloud occupancy probability value of the corresponding position grid in the target grid map according to a preset increase parameter; If the point cloud occupancy probability value of the corresponding position grid indicates that the corresponding position grid is not occupied, the point cloud occupancy probability value of the corresponding position grid in the target grid map is updated according to the point cloud height value and the visible height of the corresponding position grid.
7. The method according to claim 6, characterized in that The updating of the point cloud occupancy probability value of the corresponding position grid in the target grid map according to the point cloud height value and the visible height of the corresponding position grid includes: If the point cloud height value of the corresponding position grid is greater than the visible height, reducing the point cloud occupancy probability value of the corresponding position grid in the target grid map according to a preset reduction parameter; If the point cloud height value of the corresponding position grid is less than or equal to the visible height, the point cloud occupancy probability value of the corresponding position grid in the target grid map is kept unchanged.
8. A robot comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method and deviceofmap generation, equipmentand medium
CN110221616A
Grid map generation method and device, moving tool and storage medium
CN115114387A
Cited By
Grid map construction method, robot and computer-readable storage medium
EP4644835A1