A grid map construction method, grid map construction device and electronic equipment

The virtual wiring harness ranging results are generated through three-dimensional detection equipment, and the grid map structure table is maintained, which solves the problem that two-dimensional lidar cannot reflect plane obstacles of different heights, and realizes efficient real-time construction and update of grid maps.

CN115507840BActive Publication Date: 2024-11-15UBTECH ROBOTICS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211142230.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-20
Publication Date
2024-11-15
Estimated Expiration
2042-09-20

AI Technical Summary

Technical Problem

The existing raster map construction method cannot effectively reflect spatial obstacles in different height planes due to its reliance on two-dimensional lidar, resulting in limitations.

Method used

Three-dimensional detection equipment is used to collect point cloud keyframes, generate virtual harness ranging results based on preset height intervals, maintain the grid map structure table, and update the environment grid map, fully considering the impact of obstacles in different height intervals.

Benefits of technology

It realizes efficient real-time construction of spatial barriers of different height planes, reduces the demand for computing power, and can run on ordinary platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115507840B_ABST
    Figure CN115507840B_ABST
Patent Text Reader

Abstract

The present application discloses a grid map construction method, a grid map construction device, an electronic device and a computer-readable storage medium. The method comprises: for each point cloud key frame currently collected by the three-dimensional detection device, generating a virtual wire harness ranging result corresponding to the point cloud key frame according to a preset height interval; maintaining a grid map structure table according to the posture of the three-dimensional detection device corresponding to each point cloud key frame and the virtual wire harness ranging result corresponding to each point cloud key frame, wherein the grid map structure table is used to describe the status of each grid in the environmental grid map; and updating the environmental grid map according to the grid map structure table. Through the scheme of the present application, efficient construction of grid maps can be achieved for spatial obstacles at different height planes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of navigation technology, and in particular relates to a grid map construction method, a grid map construction device, an electronic device and a computer-readable storage medium. Background Art

[0002] Grid Figure 1 Generally, when the robot is performing simultaneous localization and mapping (SLAM), it relies on the distance measurement data of obstacles carried by the robot's two-dimensional laser radar to generate the distance measurement data. However, the two-dimensional laser radar can usually only scan the distance measurement data at the same horizontal plane height as itself. Therefore, due to the placement height of the two-dimensional laser radar, spatial obstacles at different height planes cannot be reflected in the grid map, resulting in the current grid map having great limitations. Summary of the invention

[0003] The present application provides a grid map construction method, a grid map construction device, an electronic device and a computer-readable storage medium, which can realize efficient construction of grid maps for spatial obstacles in planes of different heights.

[0004] In a first aspect, the present application provides a method for constructing a raster map, comprising:

[0005] For each point cloud key frame currently collected by the three-dimensional detection device, a virtual wire harness ranging result corresponding to the point cloud key frame is generated according to a preset height interval;

[0006] According to the pose of the three-dimensional detection device corresponding to each point cloud key frame and the virtual harness ranging result corresponding to each point cloud key frame, a grid map structure table is maintained, and the grid map structure table is used to describe the status of each grid in the environment grid map;

[0007] Update the environment grid map according to the grid map structure table.

[0008] In a second aspect, the present application provides a grid map construction device, comprising:

[0009] A generation module, for generating a virtual wire harness ranging result corresponding to each point cloud key frame currently collected by the three-dimensional detection device according to a preset height interval;

[0010] A maintenance module is used to maintain a grid map structure table according to the posture of the three-dimensional detection device corresponding to each point cloud key frame and the virtual harness ranging result corresponding to each point cloud key frame. The grid map structure table is used to describe the status of each grid in the environment grid map;

[0011] The update module is used to update the environment grid map according to the grid map structure table.

[0012] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of the first aspect when executing the computer program.

[0013] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method of the first aspect are implemented.

[0014] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by one or more processors, it implements the steps of the method of the first aspect.

[0015] Compared with the prior art, the present application has the following beneficial effects: the grid map is no longer generated by a two-dimensional detection device, but the spatial perception capability of a three-dimensional detection device is utilized to generate a grid map by a three-dimensional detection device. Specifically, for each point cloud keyframe currently collected by the three-dimensional detection device, a virtual wire harness ranging result corresponding to the point cloud keyframe can be generated according to a preset height interval, and then a grid map structure table is maintained according to the posture of the three-dimensional detection device corresponding to each point cloud keyframe and the virtual wire harness ranging result corresponding to each point cloud keyframe. The grid map structure table is used to describe the status of each grid in the environmental grid map, and finally the environmental grid map can be updated according to the grid map structure table. It can be understood that the above process fully considers the impact of obstacles in the height interval of interest on the grid map when constructing the grid map, and does not require high computing power support. It can realize efficient real-time construction of grid maps for spatial obstacles at different height planes under ordinary platform operating environments.

[0016] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1It is a schematic diagram of the implementation process of the grid map construction method provided in the embodiment of the present application;

[0019] Figure 2 is a schematic diagram of a judgment process of a third target element provided in an embodiment of the present application;

[0020] Figure 3 is a structural block diagram of a grid map construction device provided in an embodiment of the present application;

[0021] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0023] In order to illustrate the technical solution proposed in this application, a specific embodiment is provided below for illustration.

[0024] The grid map construction method proposed in the embodiment of the present application can be applied to electronic devices, which may be a robot, a server that establishes a communication connection with the robot, or other devices that establish a communication connection with the robot and can perform data processing operations. The type of the electronic device is not limited here.

[0025] The following uses a robot as an example to illustrate the grid map construction method proposed in the embodiment of the present application. Figure 1 , the implementation process of the grid map construction method is described in detail as follows:

[0026] Step 101: for each point cloud key frame currently collected by the three-dimensional detection device, a virtual wire harness ranging result corresponding to the point cloud key frame is generated according to a preset height interval.

[0027] The robot is generally equipped with a three-dimensional detection device. As an example only, the three-dimensional detection device can be a detection sensor with spatial perception capability such as a three-dimensional laser radar, and the specific type of the three-dimensional detection device is not limited here.

[0028] When it is necessary to build an environmental grid map, the robot can trigger its SLAM system to run, initialize an environmental grid map of a preset size and a grid map structure table, and autonomously control its own movement in the environment. Specifically, after the SLAM system is running, the origin of the map can be set according to the posture of the three-dimensional detection device when it collects the first frame of the point cloud key frame, where the posture includes: position and orientation, and the position specifically refers to the two-dimensional coordinates under the specified plane (generally the ground plane); that is, it can be considered that when the three-dimensional detection device collects the first frame of the point cloud key frame, its own position is the origin of the map.

[0029] When the robot moves in the environment, it can monitor its own movement based on its inertial measurement unit (IMU) or other sensors. Once it is detected that its own movement meets the preset movement conditions, such as the distance of movement reaches the preset distance threshold, or the angle of movement reaches the preset angle threshold, the three-dimensional detection device can be triggered to detect the environment, thereby obtaining a new frame of point cloud keyframe, and the posture of the three-dimensional detection device when detecting the point cloud keyframe. That is, each frame of point cloud keyframe has corresponding posture information, and the posture information represents the posture of the three-dimensional detection device when collecting the point cloud keyframe.

[0030] It is understandable that since the 3D detection device is usually fixed on the robot, once the position and posture of the 3D detection device is known, the position and posture of the robot has also been determined. For the convenience of subsequent description, the position and posture of the 3D detection device can be equated with the position and posture of the robot. That is, the position of the 3D detection device can be considered to be the position of the robot, and the orientation of the 3D detection device can be considered to be the orientation of the robot.

[0031] It is understandable that as the robot moves, the size of the environment grid map and the grid map structure table may be increased accordingly when necessary, and the sizes of the environment grid map and the grid map structure table are always kept synchronized, which will not be repeated here.

[0032] In order to realize the real-time construction of the grid map, each time the robot acquires a new point cloud keyframe through the three-dimensional detection device, the execution of step 101 and subsequent steps can be triggered, so that the environment grid map can be updated according to the latest point cloud keyframe. In the actual application process, in order to save computing power, when the robot obtains the first frame of the point cloud keyframe, it can generate a virtual wire harness ranging result corresponding to the first frame of the point cloud keyframe and store it in the storage space; therefore, when the robot obtains the second frame of the point cloud keyframe, the virtual wire harness ranging result corresponding to the first frame of the point cloud keyframe has been stored in the storage space, and this time it only needs to generate a virtual wire harness ranging result corresponding to the second frame of the point cloud keyframe and store it in the storage space; by analogy, when the robot obtains the nth frame of the point cloud keyframe, the virtual wire harness ranging results corresponding to the first n frames of the point cloud keyframe have been stored in the storage space, and this time it only needs to generate a virtual wire harness ranging result corresponding to the nth frame of the point cloud keyframe and store it in the storage space. That is, for each point cloud key frame currently collected by the three-dimensional detection device, although the robot needs to generate a corresponding virtual wire beam ranging result, the actual generation timing may not be unified. Specifically, for any point cloud key frame, the robot can immediately generate a virtual wire beam ranging result corresponding to the point cloud key frame according to a preset height range after obtaining the point cloud key frame, wherein the height range plays a role in preliminary screening of the points in the point cloud key frame.

[0033] Step 102: maintaining a grid map structure table according to the posture of the three-dimensional detection device corresponding to each point cloud key frame and the virtual wire harness ranging result corresponding to each point cloud key frame.

[0034] Among them, the grid map structure table is used to describe the status of each grid in the environmental grid map. Specifically, the grid has the following three states: occupied, idle and unknown. For any point cloud key frame, the robot can generate a two-dimensional virtual harness corresponding to the point cloud key frame in the grid map structure table according to the posture of the three-dimensional detection device corresponding to the point cloud key frame and the virtual harness ranging result. According to the path of the virtual harness, the robot can maintain the status of each grid in the grid map structure table. In the embodiment of the present application, the grid map structure table can be understood as a temporary grid map.

[0035] It should be noted that when the height range that the robot is concerned about has a large span, in order to ensure the accuracy of the subsequent environmental grid map, the robot may consider maintaining two or more grid map structure tables. Different grid map structure tables are used to describe the status of each grid in the environmental grid map at different height ranges, and the map size ranges represented by different grid map structure tables are exactly the same.

[0036] Step 103: Update the environment grid map according to the grid map structure table.

[0037] When the height range that the robot is concerned about has a small span, the robot can maintain a grid map structure table; in this case, the grid map structure table itself can be equivalent to the environmental grid map, that is, the state of each grid represented by the grid map structure table is the state of each corresponding grid in the environmental grid map. When the height range that the robot is concerned about has a large span, the robot can usually maintain two or more grid map structure tables; in this case, the robot can fuse the maintained grid map structure tables and update the environmental grid map according to the fusion results.

[0038] Specifically, the previous text has explained that the grid map structure table is similar to a temporary grid map. Therefore, here, the robot maintains two grid map structure tables, MAP1 and MAP2, as an example, and the strategy adopted during fusion is illustrated in Table 1 below:

[0039]

[0040] Table 1

[0041] Among them, MAP refers to the environmental grid map obtained after fusion. As can be seen from Table 1 above, for grids with the same index, if the state of the grid in MAP1 and / or MAP2 is occupied, the final state of the grid in MAP is also occupied; if the state of the grid in MAP1 and MAP2 is unknown, the final state of the grid in MAP is also unknown; if the state of the grid in MAP1 is idle and the state in MAP2 is idle or unknown, or the state of the grid in MAP2 is idle and the state in MAP1 is idle or unknown, the final state of the grid in MAP is idle.

[0042] In some embodiments, considering that the robot can use the same process to generate the virtual wire harness ranging results corresponding to each point cloud keyframe, for ease of understanding, here, any point cloud keyframe is taken as an example to illustrate the generation process of the virtual wire harness ranging results corresponding to the point cloud keyframe. The generation process includes:

[0043] Step 1011, determining the number of virtual line beams and the angular resolution of the virtual line beams according to the properties of the three-dimensional detection device.

[0044] The properties of the three-dimensional detection device include: the number of laser points and the horizontal angular resolution of a horizontal scan line of the three-dimensional detection device. In the embodiment of the present application, the number of virtual beams is equal to the number of laser points. For the convenience of subsequent description, the number of virtual beams is recorded as H_NUM; similarly, the angular resolution of the virtual beam is also equal to the horizontal angular resolution. For the convenience of subsequent description, the angular resolution of the virtual beam is recorded as H_RES. Generally speaking, the number of virtual beams and the angular resolution satisfy the following relationship:

[0045] Step 1012, create an array.

[0046] The number of elements in the array is equal to the number of virtual wire harnesses, and the value of each element in the array is initialized to infinity. It should be noted that the embodiment of the present application does not limit the number of arrays, and the robot can create a certain number of arrays according to the span of the height range it is concerned with.

[0047] Specifically, when the robot only focuses on a higher obstacle, a first array associated with the higher obstacle may be created. For ease of description, the higher obstacle may be referred to as the first obstacle. It is understood that, based on the first array, the robot will only generate a corresponding grid map structure table.

[0048] Specifically, when the robot only focuses on the lower obstacle, a second array associated with the lower obstacle may be created accordingly. For ease of description, the lower obstacle may be recorded as the second obstacle. It is understood that, subsequently, based on the second array, the robot will only generate a corresponding grid map structure table.

[0049] Obviously, the first obstacle is a higher obstacle and the second obstacle is a lower obstacle, and the height of the first obstacle must be higher than the height of the second obstacle; that is, the first obstacle is a non-low obstacle and the second obstacle is a low obstacle.

[0050] Specifically, when the robot not only pays attention to lower obstacles but also to higher obstacles, the robot can create a first array and a second array accordingly. It can be understood that, according to the first array and the second array, the robot can generate two grid map structure tables accordingly, namely: a first grid map structure table for the first obstacle (i.e., non-low obstacle) and a second grid map structure table for the second obstacle (i.e., low obstacle).

[0051] For the convenience of subsequent description, the first array may be recorded as range[H_NUM], and the second array may be recorded as low_range[H_NUM].

[0052] Step 1013, updating the array according to the height range, angular resolution and point cloud key frame, and the updated array is used to represent the virtual beam ranging result.

[0053] The robot can first perform a preliminary screening of each point of the point cloud keyframe through the height interval. After that, the robot can further screen the points retained after the screening and update the array according to the results of the further screening.

[0054] Taking the first array and the second array mentioned in the previous article as an example: the updated first array can be used to represent the ranging results obtained when the virtual line beam hits the first obstacle (non-low obstacle); the updated second array can be used to represent the ranging results obtained when the virtual line beam hits the second obstacle (low obstacle).

[0055] Through the above process, the robot can obtain the distance measurement results of a limited number of virtual harnesses in the form of an array. In addition, in the process of updating the array, the robot will screen the points in the point cloud keyframe, which can avoid the robot's excessive demand for computing power and ensure that the process can be implemented on a platform with lower computing power.

[0056] In some embodiments, step 1013 specifically includes:

[0057] A1. Filter out candidate points from the point cloud keyframes. The candidate points are points within the height range.

[0058] The robot can traverse the points in the point cloud keyframe to determine whether each point is in the set height range. It can be understood that the points in the height range are the points of interest to the robot. Therefore, the points in the height range can be determined by the robot as candidate points, thereby filtering out the points on the ground and the points that the robot obviously does not care about. Specifically, taking any point as an example, the coordinates of the point can be expressed as (x, y, z). Among them, x represents the offset of the point on the X-axis of the three-dimensional detection device relative to the three-dimensional detection device; y represents the offset of the point on the Y-axis of the three-dimensional detection device relative to the three-dimensional detection device; z represents the offset of the point on the Z-axis of the three-dimensional detection device relative to the three-dimensional detection device (that is, the height relative to the three-dimensional detection device); the XY plane is generally parallel to the specified plane (that is, the ground plane). Then, the robot can compare the coordinate z value of the point with the set height range to determine whether the point is a candidate point.

[0059] When the robot pays attention to both the first obstacle and the second obstacle, the span of the height interval is usually large. Considering that the first obstacle and the second obstacle have different obstacle heights, in order to achieve relatively accurate screening, the height intervals of interest can be set for the first obstacle and the second obstacle respectively according to the height interval. Specifically, for the first obstacle (that is, the first array), the first height interval can be set according to the set height interval and the general height of the first obstacle; for the second obstacle (that is, the second array), the second height interval can be set according to the set height interval and the general height of the second obstacle. It can be understood that in this way, more targeted candidate points can be screened out for the first array and the second array respectively.

[0060] As an example only, in the height interval [z 01 ,z 02 ], the first height interval can be [z 03 ,z 02 ], the second height interval can be [z 01 ,z 04 ], where z 03 >z 01 , z 04 <z 02 , and z 04 >z 03 Among them, z 04 >z 03 The reason is that the second obstacle (i.e., the low obstacle) concerned in the embodiment of the present application needs to be at z 03 There is no obstacle above the height; but if we only focus on z 01 To z 03 For a point within this height range, the robot cannot know the z position of the obstacle corresponding to that point. 03 Is there really no obstacle above the height? Based on this, for the second obstacle, the height range that the robot focuses on can be relaxed to avoid mistakenly identifying points on the first obstacle as points on the second obstacle.

[0061] A2. Calculate the orientation angle of each candidate point relative to the three-dimensional detection device and the projection distance of each candidate point relative to the three-dimensional detection device.

[0062] Projection distance refers to the distance between the candidate point and the 3D detection device after being projected on the specified plane, that is, the distance between the candidate point and the 3D detection device on the specified plane, where the specified plane is specifically the XY plane of the 3D detection device (equivalent to the ground plane). Taking the coordinates of the candidate point as (x, y, z) as an example, the orientation angle of the candidate point relative to the 3D detection device can be calculated using the following formula: Wherein, orient is the calculated orientation distance; the projection distance of the candidate point relative to the three-dimensional detection device can be calculated by the following formula: Among them, horizon_range is the calculated projection distance.

[0063] A3. Update the first array and the second array according to the orientation angle of each candidate point relative to the three-dimensional detection device, the projection distance of each candidate point relative to the three-dimensional detection device, and the angular resolution.

[0064] Specifically, the first array can be updated through the following process:

[0065] B1. Based on each candidate point screened out from the first array, calculate a first index value corresponding to the candidate point according to the orientation angle and angular resolution of the candidate point relative to the three-dimensional detection device.

[0066] The first index value corresponding to the candidate point can be calculated by the following formula: Wherein, index1 is the calculated first index value, and orient and H_RES have been explained in the previous text and will not be repeated here.

[0067] B2. Compare the value of the first target element with the projection distance of the candidate point relative to the three-dimensional detection device.

[0068] The first target element is: the element indicated by the first index value in the first array. That is, the robot can compare the horizon_range corresponding to the candidate point with range[index1].

[0069] B3. If the projection distance of the candidate point relative to the three-dimensional detection device is less than the value of the first target element, the value of the first target element is updated to the projection distance of the candidate point relative to the three-dimensional detection device.

[0070] That is, when the horizon_range corresponding to the candidate point is less than range[index1], the robot may update the value of range[index1] to the horizon_range. Correspondingly, when the horizon_range corresponding to the candidate point is greater than or equal to range[index1], the robot may not update the value of range[index1].

[0071] It can be understood that after steps B1 to B3 are performed for all candidate points, the value of any element in the first array can eventually be updated to: the minimum projection distance of the candidate point under the corresponding orientation angle.

[0072] Specifically, the second array can be updated through the following process:

[0073] C1. Create a container.

[0074] Similar to the array that has been created, the number of elements in the container is equal to the number of virtual harnesses. However, it should be noted that the elements in the container are specifically a priority queue implemented by a small top heap structure, which is subsequently used to store the value pairs of all candidate points belonging to the same orientation angle orient; the value pair consists of the projection distance and height corresponding to the candidate point, which can be expressed as (horizon_range, z). It can be understood that each element in the container is initially empty (that is, each priority queue is initially empty).

[0075] For the convenience of subsequent description, the container may be referred to as vec_priority_queue[H_NUM].

[0076] C2. Calculate the second index value corresponding to each candidate point according to the orientation angle and angular resolution of each candidate point relative to the three-dimensional detection device.

[0077] Wherein, for any candidate point, the second index value corresponding to the candidate point can be calculated by the following formula: Wherein, index2 is the calculated second index value, and orient and H_RES have been explained in the previous text and will not be repeated here.

[0078] C3. For each second index value, according to the order of projection distance from small to large, insert the value pairs of each candidate point corresponding to the second index value into the second target element, and the second target element is: the element indicated by the second index value in the container.

[0079] As described above, the numerical pairs of candidate points considered in the embodiments of the present application specifically include the projection distance and height of the candidate point. It can be understood that through this step, each element (that is, each priority queue) actually stores: the (horizon_range, z) numerical pairs of all candidate points belonging to the same orientation angle orient, and the order of these numerical pairs in the element (that is, the priority queue) is from small to large in the order of projection distance. Finally, the head of each element (that is, each priority queue) stores: the (horizon_range, z) numerical pair of the candidate point with the smallest projection distance (that is, the candidate point closest to the three-dimensional detection device on the XY plane) under the corresponding orientation angle orient.

[0080] As an example only, the second index values ​​corresponding to the four candidate points P1, P2, P3 and P4 are the same, which is 8. Then the value pairs of these four candidate points can be inserted into the element vec_priority_queue[8]. Assuming that the value pair of P1 is (horizon_range1, z1), the value pair of P2 is (horizon_range2, z2), the value pair of P3 is (horizon_range3, z3), and the value pair of P4 is (horizon_range4, z4), and horizon_range3<horizon_range2<horizon_range1<horizon_range4, the insertion order is: P3's value pair - P2's value pair - P1's value pair - P4's value pair. Since the characteristic of the queue is that the insertion operation is performed at the end of the queue, the order of the value pairs contained in the element vec_priority_queue[8] is equivalent to the insertion order of each value pair. Finally, in the element vec_priority_queue[8], the value pair of P3 is at the head of the queue, the value pair of P2 is at the second position in the queue, the value pair of P3 is at the third position in the queue, and the value pair of P4 is at the end of the queue.

[0081] C4. Filter out the third target element from the container.

[0082] For any element in the container, it can be determined whether the data pair of the element at the head of the team meets the preset screening condition. If it does, the element can be determined as the third target element. It can be understood that the robot can set the screening condition in advance, and the screening condition is mainly used to determine whether the candidate point corresponding to the value pair of each element at the head of the team is really from the second obstacle (that is, the low obstacle).

[0083] Considering that the main difference between the first obstacle and the second obstacle is the height, for each element in the container, the robot can determine whether the element is the third target element according to the height in the first target value pair of the element and the preset height threshold, wherein the first target value pair is: the value pair at the head of the element. It can be understood that the height threshold is specifically: the maximum height of the second obstacle that the robot is concerned about.

[0084] In some embodiments, see Figure 2 To achieve accurate screening, for any element in the container, the robot can determine whether it is the third target element through the following process:

[0085] C41, whether the height of the first target value pair of the detection element is greater than the height threshold. If yes, execute step C47, if not, execute step C42.

[0086] The first target value pair is the value pair at the head of the queue. The height in the first target value pair is referred to as height_nearest. When height_nearest>H, step C47 is executed, otherwise step C42 is executed. H is the height threshold.

[0087] C42: Check whether the second target value pair exists in the element. If yes, execute step C43; if no, execute step C48.

[0088] Among them, the second target numerical pair is: the numerical pair at the i-th position in the element, where i is initially 2.

[0089] C43, detecting whether the difference in projection distance between the second target value pair and the first target value pair is less than a preset first difference threshold. If yes, executing step C45, if no, executing step C44.

[0090] The projection distance of the second target value pair is range_i, and the projection distance of the first target value pair is range_nearest. When range_i-range_nearest<D1, step C45 is executed, otherwise step C44 is executed. Wherein D1 is the first difference threshold.

[0091] C44, detecting whether the difference in projection distance between the second target value pair and the first target value pair is greater than a preset second difference threshold. If yes, executing step C48, if no, executing step C46.

[0092] When range_i-range_nearest>D2, step C48 is executed, otherwise step C46 is executed. Wherein, D2 is the second difference threshold. It should be noted that the second difference threshold is greater than the first difference threshold, that is, D2>D1.

[0093] C45, detecting whether the height of the second target value pair is greater than the height threshold. If yes, executing step C47, if no, executing step C46.

[0094] Let the height of the second target value pair be height_i. When height_i>H, execute step C47, otherwise execute step C46.

[0095] C46. Update i and jump to step C42.

[0096] The specific update operation is: i is incremented by 1, that is, i=i+1.

[0097] C47. Make sure that the element is not the third target element.

[0098] C48. Determine that the element is the third target element.

[0099] C5. For each third target element in the container, update the value of the fourth target element to the projection distance of the value pair at the head of the team in the third target element, where the fourth target element is: the element in the second array with the same index value as the third target element.

[0100] Let the filtered third target element be vec_priority_queue[x], then the projection distance of the value pair at the head of the queue in vec_priority_queue[x] (that is, the first target value pair) can be assigned to low_range[x].

[0101] As an example only, if vec_priority_queue[8] shown above is determined as the third target element through step C4, the projection distance horizon_range3 in the value pair at the head of the queue in vec_priority_queue[8] can be assigned to low_range[8], that is, the value of low_range[8] is updated to horizon_range3.

[0102] In some embodiments, to achieve effective maintenance of the grid map structure table, step 102 specifically includes:

[0103] Step 1021, for each point cloud key frame, determine the path of the virtual wire harness according to the posture of the three-dimensional detection device corresponding to the point cloud key frame and the virtual wire harness ranging result.

[0104] When using an array to represent the distance measurement result of a virtual wire beam, different elements of the array correspond to different orientation angles, and the value of each element is: the distance measurement result obtained when the virtual wire beam hits the obstacle at the corresponding orientation angle. Based on this, for each point cloud keyframe, the path of a virtual wire beam can be determined according to the posture of the three-dimensional detection device corresponding to the point cloud keyframe and an element in the array. Among them, the starting point of the path is: the position indicated by the posture of the three-dimensional detection device; the end point of the path is: the position at the orientation angle corresponding to the element, which is the target distance from the starting point, and the target distance is the value of the element. Subsequently, the robot can generate the path of the virtual wire beam based on the starting point and end point of the path in combination with Bresenham's line algorithm, thereby knowing all the grids passed by the virtual wire beam.

[0105] Step 1022, maintaining a grid map structure table according to the paths of each virtual wire harness.

[0106] It can be understood that for any virtual line path, its end point is the hit point of the virtual line (that is, the point where the hit obstacle is located). Based on this, the grid map structure table can be maintained according to the path of each virtual line, specifically:

[0107] In the case where the grid is a grid passed by a virtual wire harness, if the state of the grid was originally unknown, the robot can update the state of the grid to idle in the grid map structure table; if the state of the grid was originally not unknown, the robot can reduce the number of hits of the grid by 1.

[0108] When the grid is the grid corresponding to the end point (ie, the hitting point) of a virtual wire harness, the robot may add 1 to the hitting times of the grid.

[0109] For each grid, when the number of hits for the grid is greater than a preset threshold, the robot can update the state of the grid to occupied in the grid map structure table; when the number of hits for the grid is less than or equal to the threshold, the robot can update the state of the grid to idle in the grid map structure table.

[0110] It can be understood that in the grid map structure table, the status of all grids is initially unknown, and the number of hits of all grids is initially zero.

[0111] When the robot generates the first array, the robot can maintain the first grid map structure table according to the first array corresponding to each point cloud key frame and the posture of the three-dimensional detection device corresponding to each point cloud key frame; the first grid map structure table can be understood as: a temporary grid map obtained based on the first obstacle (non-low obstacle).

[0112] Similarly, when the robot generates a second array, the robot can maintain a second grid map structure table based on the second array corresponding to each point cloud key frame and the posture of the three-dimensional detection device corresponding to each point cloud key frame; the second grid map structure table can be understood as: a temporary grid map obtained based on the second obstacle (low obstacle).

[0113] In some embodiments, when the robot moves to a position that has been reached before in the environment, a loop correction operation can be triggered, and the loop correction operation can correct the position and posture of the three-dimensional detection device corresponding to all point cloud key frames. After the correction is completed, the robot can trigger the execution of steps 102 and 103 again, so that the grid map structure table can be updated according to the corrected position and posture of the three-dimensional detection device, helping to obtain a more accurate environment grid map.

[0114] As can be seen from the above, the embodiment of the present application no longer generates a grid map through a two-dimensional detection device, but uses the spatial perception capability of a three-dimensional detection device to generate a grid map through a three-dimensional detection device. Specifically, for each point cloud key frame currently collected by the three-dimensional detection device, a virtual wire harness ranging result corresponding to the point cloud key frame can be generated according to a preset height interval, and then a grid map structure table is maintained according to the posture of the three-dimensional detection device corresponding to each point cloud key frame and the virtual wire harness ranging result corresponding to each point cloud key frame. The grid map structure table is used to describe the status of each grid in the environmental grid map, and finally the environmental grid map can be updated according to the grid map structure table. It can be understood that the above process fully considers the impact of obstacles in the height interval of interest on the grid map when constructing the grid map, and does not require high computing power support. It can realize efficient real-time construction of grid maps for spatial obstacles in different height planes under ordinary platform operating environments.

[0115] Corresponding to the grid map construction method provided above, the present application embodiment also provides a grid map construction device. Figure 3 As shown, the grid map construction device 3 includes:

[0116] A generation module 301 is used to generate a virtual wire harness ranging result corresponding to each point cloud key frame currently collected by the three-dimensional detection device according to a preset height interval;

[0117] A maintenance module 302 is used to maintain a grid map structure table according to the posture of the three-dimensional detection device corresponding to each point cloud key frame and the virtual wire harness ranging result corresponding to each point cloud key frame, and the grid map structure table is used to describe the status of each grid in the environment grid map;

[0118] The updating module 303 is used to update the environment grid map according to the grid map structure table.

[0119] In some embodiments, the generating module 301 includes:

[0120] A wire harness parameter determination submodule, used to determine the number of virtual wire harnesses and the angular resolution of the virtual wire harnesses according to the properties of the three-dimensional detection device;

[0121] An array creation submodule, used for creating an array, wherein the number of elements in the array is equal to the number of virtual harnesses, and the value of each element in the array is initialized to infinity;

[0122] The ranging result updating submodule is used to update the array according to the height range, angular resolution and point cloud keyframe. The updated array is used to represent the virtual harness ranging result.

[0123] In some embodiments, the array includes: a first array associated with a first obstacle, and a second array associated with a second obstacle, wherein the height of the first obstacle is higher than the height of the second obstacle; and the ranging result updating submodule includes:

[0124] The screening unit is used to screen candidate points from the point cloud keyframe, where the candidate points are points in the height range;

[0125] A calculation unit, used to calculate the orientation angle of each candidate point relative to the three-dimensional detection device, and the projection distance of each candidate point relative to the three-dimensional detection device, where the projection distance is: the distance between the candidate point and the three-dimensional detection device after being projected on a specified plane;

[0126] The updating unit is used to update the first array and the second array according to the orientation angle of each candidate point relative to the three-dimensional detection device, the projection distance and angular resolution of each candidate point relative to the three-dimensional detection device.

[0127] In some embodiments, the updating unit includes:

[0128] A first index value calculation subunit is used to calculate, for each candidate point, a first index value corresponding to the candidate point according to an orientation angle and an angular resolution of the candidate point relative to the three-dimensional detection device;

[0129] A comparison subunit is used to compare the value of the first target element with the projection distance of the candidate point relative to the three-dimensional detection device, wherein the first target element is: an element indicated by the first index value in the first array;

[0130] The first updating subunit is used to update the value of the first target element to the projection distance of the candidate point relative to the three-dimensional detection device if the projection distance of the candidate point relative to the three-dimensional detection device is less than the value of the first target element.

[0131] In some embodiments, the updating unit includes:

[0132] A container creation subunit, used for creating a container, wherein the number of elements of the container is equal to the number of virtual harnesses, the elements in the container are queues, and each element of the container is initially empty;

[0133] A second index value calculation subunit calculates a second index value corresponding to each candidate point according to the orientation angle and angular resolution of each candidate point relative to the three-dimensional detection device;

[0134] The container updating subunit is used to insert the value pairs of each candidate point corresponding to the second index value into the second target element according to the order of projection distance from small to large for each second index value, wherein the value pairs include projection distance and height, and the second target element is: the element indicated by the second index value in the container;

[0135] An element screening subunit, used to screen out a third target element from the container, wherein the value pair at the head of the queue in the third target element meets a preset screening condition;

[0136] The second updating subunit is used to update the value of the fourth target element to the projection distance of the value pair at the head of the team in the third target element for each third target element in the container, wherein the fourth target element is: an element in the second array with the same index value as the third target element.

[0137] In some embodiments, the element screening subunit is specifically used to determine whether the element is a third target element for each element in the container based on the height and screening conditions in the first target value pair of the element, wherein the first target value pair is: the value pair at the head of the team in the element, and the screening conditions are set according to a preset height threshold.

[0138] In some embodiments, the maintenance module 302 includes:

[0139] A virtual harness determination submodule is used to determine the path of the virtual harness for each point cloud keyframe according to the posture of the three-dimensional detection device corresponding to the point cloud keyframe and the virtual harness ranging result;

[0140] The structure table maintenance submodule is used to maintain the grid map structure table according to the paths of each virtual harness.

[0141] As can be seen from the above, the embodiment of the present application no longer generates a grid map through a two-dimensional detection device, but uses the spatial perception capability of a three-dimensional detection device to generate a grid map through a three-dimensional detection device. Specifically, for each point cloud key frame currently collected by the three-dimensional detection device, a virtual wire harness ranging result corresponding to the point cloud key frame can be generated according to a preset height interval, and then a grid map structure table is maintained according to the posture of the three-dimensional detection device corresponding to each point cloud key frame and the virtual wire harness ranging result corresponding to each point cloud key frame. The grid map structure table is used to describe the status of each grid in the environmental grid map, and finally the environmental grid map can be updated according to the grid map structure table. It can be understood that the above process fully considers the impact of obstacles in the height interval of interest on the grid map when constructing the grid map, and does not require high computing power support. It can realize efficient real-time construction of grid maps for spatial obstacles in different height planes under ordinary platform operating environments.

[0142] Corresponding to the grid map construction method provided above, the present application embodiment also provides an electronic device. Figure 4 The electronic device 4 in the embodiment of the present application includes: a memory 401, one or more processors 402 ( Figure 4Only one is shown) and a computer program stored in the memory 401 and executable on the processor. The memory 401 is used to store software programs and units, and the processor 402 executes various functional applications and data processing by running the software programs and units stored in the memory 401 to obtain the resources corresponding to the above-mentioned preset events. Specifically, the processor 402 implements the following steps when running the above-mentioned computer program stored in the memory 401:

[0143] For each point cloud key frame currently collected by the three-dimensional detection device, a virtual wire harness ranging result corresponding to the point cloud key frame is generated according to a preset height interval;

[0144] According to the pose of the three-dimensional detection device corresponding to each point cloud key frame and the virtual harness ranging result corresponding to each point cloud key frame, a grid map structure table is maintained, and the grid map structure table is used to describe the status of each grid in the environment grid map;

[0145] Update the environment grid map according to the grid map structure table.

[0146] Assuming that the above is the first possible implementation, in a second possible implementation provided on the basis of the first possible implementation, generating a virtual wire harness ranging result corresponding to a point cloud key frame according to a preset height interval includes:

[0147] Determine the number of virtual wire bundles and the angular resolution of the virtual wire bundles according to the properties of the three-dimensional detection device;

[0148] Create an array, where the number of elements in the array is equal to the number of virtual harnesses, and the value of each element in the array is initialized to infinity;

[0149] The array is updated according to the height range, angular resolution and point cloud keyframe, and the updated array is used to represent the virtual wire harness ranging result.

[0150] In a third possible implementation provided based on the second possible implementation, the array includes: a first array associated with a first obstacle, and a second array associated with a second obstacle, wherein the height of the first obstacle is higher than the height of the second obstacle; and updating the array according to the height range, the angular resolution, and the point cloud key frame includes:

[0151] From the point cloud keyframes, select candidate points, which are: points in the height range;

[0152] Calculate the orientation angle of each candidate point relative to the three-dimensional detection device and the projection distance of each candidate point relative to the three-dimensional detection device, where the projection distance is the distance between the candidate point and the three-dimensional detection device after being projected on the specified plane;

[0153] The first array and the second array are updated according to the orientation angle of each candidate point relative to the three-dimensional detection device, the projection distance of each candidate point relative to the three-dimensional detection device, and the angular resolution.

[0154] In a fourth possible implementation provided on the basis of the third possible implementation, the updating process of the first array includes:

[0155] For each candidate point, calculate a first index value corresponding to the candidate point according to the orientation angle and angular resolution of the candidate point relative to the three-dimensional detection device;

[0156] Compare the value of the first target element with the projection distance of the candidate point relative to the three-dimensional detection device, wherein the first target element is: the element indicated by the first index value in the first array;

[0157] If the projection distance of the candidate point relative to the three-dimensional detection device is less than the value of the first target element, the value of the first target element is updated to the projection distance of the candidate point relative to the three-dimensional detection device.

[0158] In a fifth possible implementation provided on the basis of the third possible implementation, the updating process of the second array includes:

[0159] Create a container, where the number of elements in the container is equal to the number of virtual harnesses, the elements in the container are queues, and each element of the container is initially empty;

[0160] Calculate the second index value corresponding to each candidate point according to the orientation angle and angular resolution of each candidate point relative to the three-dimensional detection device;

[0161] For each second index value, insert the value pairs of each candidate point corresponding to the second index value into the second target element according to the order of projection distance from small to large, the value pairs include projection distance and height, and the second target element is: the element indicated by the second index value in the container;

[0162] Filter out a third target element from the container, wherein the value pair at the head of the queue in the third target element meets a preset filtering condition;

[0163] For each third target element in the container, update the value of the fourth target element to the projection distance of the value pair at the head of the third target element, where the fourth target element is: an element in the second array with the same index value as the third target element.

[0164] In a sixth possible implementation provided on the basis of the fifth possible implementation, screening out a third target element from the container includes:

[0165] For each element in the container, determine whether the element is the third target element based on the height of the first target value pair of the element and the filtering condition, where the first target value pair is: the value pair at the head of the element, and the filtering condition is set according to a preset height threshold.

[0166] In a seventh possible implementation provided on the basis of the first possible implementation, a grid map structure table is maintained according to the pose of the three-dimensional detection device corresponding to each point cloud key frame and the virtual wire harness ranging result corresponding to each point cloud key frame, including:

[0167] For each point cloud keyframe, the path of the virtual wire harness is determined according to the posture of the three-dimensional detection device corresponding to the point cloud keyframe and the virtual wire harness ranging result;

[0168] According to the paths of each virtual harness, a grid map structure table is maintained.

[0169] It should be understood that in the embodiment of the present application, the processor 402 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0170] The memory 401 may include a read-only memory and a random access memory, and provide instructions and data to the processor 402. A part or all of the memory 401 may also include a non-volatile random access memory. For example, the memory 401 may also store information of a device category.

[0171] As can be seen from the above, the embodiment of the present application no longer generates a grid map through a two-dimensional detection device, but uses the spatial perception capability of a three-dimensional detection device to generate a grid map through a three-dimensional detection device. Specifically, for each point cloud key frame currently collected by the three-dimensional detection device, a virtual wire harness ranging result corresponding to the point cloud key frame can be generated according to a preset height interval, and then a grid map structure table is maintained according to the posture of the three-dimensional detection device corresponding to each point cloud key frame and the virtual wire harness ranging result corresponding to each point cloud key frame. The grid map structure table is used to describe the status of each grid in the environmental grid map, and finally the environmental grid map can be updated according to the grid map structure table. It can be understood that the above process fully considers the impact of obstacles in the height interval of interest on the grid map when constructing the grid map, and does not require high computing power support. It can realize efficient real-time construction of grid maps for spatial obstacles in different height planes under ordinary platform operating environments.

[0172] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0173] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0174] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of external device software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0175] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0176] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0177] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the associated hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The above-mentioned computer-readable storage medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer-readable memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media does not include electrical carrier signals and telecommunication signals.

[0178] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for constructing a grid map, characterized in that: include: For each point cloud key frame currently collected by the three-dimensional detection device, a virtual wire harness ranging result corresponding to the point cloud key frame is generated according to a preset height interval; According to the pose of the three-dimensional detection device corresponding to each of the point cloud key frames and the virtual wire harness ranging result corresponding to each of the point cloud key frames, a grid map structure table is maintained, wherein the grid map structure table is used to describe the state of each grid in the environment grid map; According to the grid map structure table, updating the environment grid map; The generating a virtual wire harness ranging result corresponding to the point cloud key frame according to a preset height interval includes: Determining the number of virtual line beams and the angular resolution of the virtual line beams according to the properties of the three-dimensional detection device; Creating an array, wherein the number of elements in the array is equal to the number of the virtual wire harnesses, and the value of each element in the array is initialized to infinity; According to the height interval, the angular resolution and the point cloud key frame, the array is updated, and the updated array is used to represent the virtual wire harness ranging result; The array includes: a first array associated with a first obstacle, and a second array associated with a second obstacle, the height of the first obstacle is higher than the height of the second obstacle; and updating the array according to the height range, the angular resolution and the point cloud key frame includes: Select candidate points from the point cloud keyframes, where the candidate points are points in the height range; Calculate the orientation angle of each candidate point relative to the three-dimensional detection device, and the projection distance of each candidate point relative to the three-dimensional detection device, where the projection distance is: the distance between the candidate point and the three-dimensional detection device after being projected on a specified plane; The first array and the second array are updated according to the orientation angle of each candidate point relative to the three-dimensional detection device, the projection distance of each candidate point relative to the three-dimensional detection device, and the angular resolution.

2. The grid map construction method according to claim 1, characterized in that: The updating process of the first array includes: For each of the candidate points, calculating a first index value corresponding to the candidate point according to the orientation angle of the candidate point relative to the three-dimensional detection device and the angular resolution; Compare the value of the first target element with the projection distance of the candidate point relative to the three-dimensional detection device, wherein the first target element is: the element indicated by the first index value in the first array; If the projection distance of the candidate point relative to the three-dimensional detection device is smaller than the value of the first target element, the value of the first target element is updated to the projection distance of the candidate point relative to the three-dimensional detection device.

3. The grid map construction method according to claim 1, characterized in that: The updating process of the second array includes: Creating a container, wherein the number of elements in the container is equal to the number of the virtual harnesses, the elements in the container are queues, and each element of the container is initially empty; Calculate a second index value corresponding to each candidate point according to the orientation angle of each candidate point relative to the three-dimensional detection device and the angular resolution; For each of the second index values, inserting the value pairs of each candidate point corresponding to the second index value into a second target element according to the order of projection distance from small to large, the value pairs including the projection distance and the height, the second target element being: the element indicated by the second index value in the container; Filtering out a third target element from the container, wherein the value pair at the head of the queue in the third target element meets a preset filtering condition; For each of the third target elements in the container, the value of the fourth target element is updated to the projection distance of the numerical pair at the head of the team in the third target element, wherein the fourth target element is: the element in the second array with the same index value as the third target element.

4. The grid map construction method according to claim 3, characterized in that: The step of screening out a third target element from the container includes: For each of the elements in the container, determine whether the element is a third target element based on the height of the first target value pair of the element and the filtering condition, wherein the first target value pair is: the value pair at the head of the element, and the filtering condition is set according to a preset height threshold.

5. The grid map construction method according to claim 1, characterized in that: The grid map structure table is maintained according to the posture of the three-dimensional detection device corresponding to each of the point cloud key frames and the virtual wire harness ranging results corresponding to each of the point cloud key frames, including: For each of the point cloud key frames, determining a path of the virtual wire harness according to the posture of the three-dimensional detection device corresponding to the point cloud key frame and the virtual wire harness ranging result; The grid map structure table is maintained according to the paths of the virtual wire harnesses.

6. A grid map construction device, characterized in that: include: A generation module, for generating a virtual wire harness ranging result corresponding to each point cloud key frame currently collected by the three-dimensional detection device according to a preset height interval; A maintenance module, used to maintain a grid map structure table according to the posture of the three-dimensional detection device corresponding to each of the point cloud key frames and the virtual wire harness ranging results corresponding to each of the point cloud key frames, wherein the grid map structure table is used to describe the status of each grid in the environment grid map; An updating module, used for updating the environmental grid map according to the grid map structure table; Wherein, the generating module comprises: A wire beam parameter determination submodule, used to determine the number of virtual wire beams and the angular resolution of the virtual wire beams according to the properties of the three-dimensional detection device; An array creation submodule, used for creating an array, wherein the number of elements in the array is equal to the number of the virtual wire harnesses, and the value of each element in the array is initialized to infinity; A ranging result updating submodule, used for updating the array according to the height interval, the angular resolution and the point cloud key frame, wherein the updated array is used for representing the virtual wire harness ranging result; The array includes: a first array associated with a first obstacle, and a second array associated with a second obstacle, and the height of the first obstacle is higher than the height of the second obstacle; the ranging result updating submodule includes: A screening unit, used to screen candidate points from the point cloud keyframe, wherein the candidate points are points in the height range; A calculation unit, used to calculate the orientation angle of each candidate point relative to the three-dimensional detection device, and the projection distance of each candidate point relative to the three-dimensional detection device, wherein the projection distance is the distance between the candidate point and the three-dimensional detection device after being projected on a specified plane; An updating unit is used to update the first array and the second array according to the orientation angle of each candidate point relative to the three-dimensional detection device, the projection distance of each candidate point relative to the three-dimensional detection device and the angular resolution.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.