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

By building an environmental mesh model and simulated virtual lidar, simulating light projection, the problem of difficulty in building a 2D grid map of arbitrary specified heights in the existing technology is solved, and high-precision grid map construction is realized to adapt to different height requirements and improve the Navigation accuracy.

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

Patent Information

Application Number
CN202210970245.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2024-11-15
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

The existing three-dimensional lidar instant positioning and map construction technology can only obtain sparse three-dimensional point cloud maps, making it difficult to build a 2D raster map of any specified height, and discard multi-wire harness measurement information, affecting navigation accuracy.

Method used

By building an environmental mesh model, simulating virtual lidar, simulating ray projection, and constructing a grid map at a specified height based on the ray projection results, and reusing it using the environmental mesh model to adapt to different height needs.

Benefits of technology

It realizes the accurate construction of raster maps at any specified height, improves navigation accuracy, reduces the occurrence of erroneous generation of obstacle grids due to sloping ground, and ensures the accuracy of raster maps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115451938B_ABST
    Figure CN115451938B_ABST
Patent Text Reader

Abstract

The present application discloses a grid map construction method, device, electronic device and computer-readable storage medium. The method includes: constructing an environmental mesh model according to multiple frames of detection data collected by a detection device in an environment; for each frame of detection data, determining the position of a virtual laser radar in the environmental mesh model according to the detection data and a specified height, wherein the virtual laser radar is a virtual device with a laser radar function obtained by simulating data processing; using the position of the virtual laser radar as the light source position, simulating light projection in the environmental mesh model, wherein the projected light is parallel to the ground plane of the environmental mesh model; after obtaining the corresponding light projection results based on each frame of detection data, constructing a grid map of the environment at a specified height according to the light projection results. Through the present application scheme, a grid map of the environment at a specified height can be accurately constructed.
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] At present, the Simultaneous Localization and Mapping (SLAM) technology using three-dimensional (3D) laser radar can usually only obtain a sparse three-dimensional point cloud map of the environment. If there is a need to use a 2D grid map for robot navigation, the sparse three-dimensional point cloud map needs to be converted. A common way is to construct a 2D grid map through the Cartographer algorithm. However, this method only uses one of the multi-beams of the 3D laser radar and discards the measurement information of other beams, which will make it impossible to establish a 2D grid map of any specified height. 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 accurately construct a grid map of an environment at any specified altitude.

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

[0005] Build an environmental mesh model based on multiple frames of detection data collected by the detection device in the environment;

[0006] For each frame of detection data, the position of the virtual laser radar is determined in the environment mesh model according to the detection data and the specified height, wherein the virtual laser radar is a virtual device with laser radar function obtained by simulating through data processing;

[0007] Taking the position of the virtual laser radar as the light source position, simulating light projection in the environment mesh model, wherein the projected light is parallel to the ground plane of the environment mesh model;

[0008] After obtaining the corresponding ray casting results based on the detection data of each frame, a grid map of the environment at a specified height is constructed according to the ray casting results.

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

[0010] A model building module is used to build an environment mesh model based on multiple frames of detection data collected by the detection device in the environment;

[0011] A position determination module is used to determine the position of a virtual laser radar in the environment mesh model for each frame of detection data according to the detection data and a specified height, wherein the virtual laser radar is a virtual device with a laser radar function obtained by simulating data processing;

[0012] A ray casting module is used to simulate ray casting in the environment mesh model with the position of the virtual laser radar as the light source position, wherein the projected light is parallel to the ground plane of the environment mesh model;

[0013] The map construction module is used to construct a grid map of the environment at a specified height according to the ray projection results after obtaining the corresponding ray projection results based on the detection data of each frame.

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

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

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

[0017] Compared with the prior art, the present application has the following beneficial effects: the present application generates a grid map of the environment at any specified height based on the environment mesh model. Specifically, the electronic device can first construct an environment mesh model according to multiple frames of detection data collected by the detection device in the environment; then, for each frame of detection data, the electronic device can determine the position of the virtual laser radar in the environment mesh model by simulating data processing according to the detection data and the specified height, and the virtual laser radar is a virtual device with a laser radar function; then, the electronic device can simulate the light projection in the environment mesh model with the position of the virtual laser radar as the light source position, wherein the projected light is parallel to the ground plane of the environment mesh model; finally, the electronic device can obtain the corresponding light projection results based on each frame of detection data, and then construct a grid map of the environment at a specified height according to the light projection results. In the above process, the environment mesh model can be reused, and the specified height can also be set according to the needs of the robot to be navigated. No matter how high the laser radar carried by the robot to be navigated is, it will not affect the grid map at the specified height constructed based on the scheme of the present application. In summary, through the present application scheme, a grid map of the environment at any specified height can be accurately constructed.

[0018] 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

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

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

[0021] Figure 2 It is a schematic diagram of a specific implementation flow of step 102 in the grid map construction method provided in an embodiment of the present application;

[0022] Figure 3 This is a schematic diagram of a specific implementation flow of step 103 in the grid map construction method provided in an embodiment of the present application;

[0023] Figure 4 This is an example of a raster map obtained based on the prior art;

[0024] Figure 5This is an example diagram of a grid map obtained based on the grid map construction method provided in the embodiment of the present application;

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

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

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

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

[0029] The grid map construction method proposed in the embodiment of the present application can be applied to electronic devices, which may be robots, servers, or other devices capable of performing data processing operations. The type of the electronic device is not limited here.

[0030] The following is an explanation of 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:

[0031] Step 101: construct an environment mesh model based on multiple frames of detection data collected by a detection device in the environment.

[0032] The detection device specifically refers to a device equipped with a detection sensor. The detection sensor can usually be a radar, such as a 3D laser radar, etc. The type of the detection sensor is not limited here. As an example only, considering the grid map constructed in the embodiment of the present application Figure 1 It is generally used for robot navigation, and thus any robot can be randomly selected from the robots to be navigated in the environment as the detection device.

[0033] After the detection device is selected, the detection device can be controlled to move in the environment and continuously detect the environment during the movement. It can be understood that when the detection sensor is a radar, the detection device can collect radar data through the detection operation and use the radar data as the detection data.

[0034] Furthermore, in order to ensure the accuracy of grid map construction, the detection device may also be equipped with an inertial sensor, such as an inertial measurement unit (IMU), etc., which is not limited here. Based on this, the electronic device can obtain inertial data at the corresponding time while detecting the environment, and use the obtained radar data and the inertial data at the corresponding time as detection data.

[0035] When the detection device and the electronic device are different devices (for example, the detection device is a robot to be navigated, and the electronic device is a server), the detection device can report all detection data obtained during the movement in the environment to the electronic device, so that the electronic device can obtain multiple frames of detection data collected by the detection device in the environment, and execute step 101 based on this. When the detection device and the electronic device are the same device (for example, the detection device and the electronic device are the same robot to be navigated), the electronic device can directly start executing step 101 after the detection is completed.

[0036] As an example only, the process of constructing an environmental mesh model by an electronic device can be specifically as follows: first, each frame of detection data is processed by a 3D SLAM algorithm to obtain the dedistorted point cloud data and posture corresponding to each frame of detection data; wherein, the dedistorted point cloud data refers to the point cloud data obtained after removing the point cloud deformation caused by the movement of the carrier during the detection process, and the posture refers to the position and posture (i.e., orientation) of the detection device when the corresponding detection data is detected. Then, by processing the dedistorted point cloud data and posture corresponding to each frame of detection data based on a truncated signed distance function (TSDF) algorithm, a mesh model for describing the environment can be obtained, i.e., an environmental mesh model; wherein, in 3D computer graphics and solid modeling, a mesh model is a set of geometric shapes of a polyhedral object defined by vertices, edges, and faces. Of course, the electronic device can also select other suitable algorithms to replace the 3D SLAM algorithm and / or the TSDF algorithm; that is, the embodiment of the present application does not limit the construction method of the environmental mesh model.

[0037] Step 102, for each frame of detection data, determine the position of the virtual laser radar in the environment mesh model according to the detection data and the specified height.

[0038] Among them, virtual laser radar specifically refers to: a virtual device with laser radar function obtained by simulating data processing. It can be understood that for each frame of detection data, the electronic device can use the same processing flow to perform subsequent processing on it; therefore, please refer to Figure 2For the convenience of description, here we take a frame of detection data as an example to describe the process of determining the position of the virtual laser radar in detail:

[0039] Step 1021, calculating the device posture according to the detection data.

[0040] Among them, the device posture specifically refers to the corresponding posture in the environment mesh model when the detection device collects the detection data, including: the position and orientation of the detection device in the environment mesh model coordinate system. Generally speaking, the positive direction of the z-axis of the environment mesh model coordinate system is the vertical upward direction. Specifically, the environment mesh model coordinate system is an output of the TSDF algorithm; that is, for electronic devices, the environment mesh model is not a coordinate system customized by the electronic device, but a coordinate system passively obtained through an existing algorithm. It can be understood that the environment mesh model coordinate system is equivalent to the world coordinate system in the embodiment of the present application.

[0041] As described above, if the electronic device has obtained the posture corresponding to each frame of detection data through the 3D SLAM algorithm during the process of building the environmental mesh model, the posture can be directly converted to the environmental mesh model coordinate system to obtain the device posture of the currently processed detection data.

[0042] Step 1022, determining a corresponding ground plane model according to the device posture.

[0043] The ground of the environment may not be flat, and the ground may be tilted in some areas. Based on this, the electronic device can determine the corresponding ground plane according to the position indicated by the obtained device posture (that is, the coordinates of the detection device in the environment mesh model coordinate system). The ground plane model can be understood as: a plane model corresponding to the ground near the position indicated by the device posture.

[0044] Specifically, the electronic device can determine the region of interest (ROI) in the environmental mesh model according to the position indicated by the device posture. Generally speaking, the ROI area is near the position, and the ROI area is also related to the height of the detection sensor of the detection device, so as to ensure that the ground grid near the position is in the ROI area. After determining the ROI area, the electronic device can clip the grid points (that is, the vertices of the grid) in the ROI area to obtain sparse grid points on the ground. Afterwards, the electronic device can use the RANdom SAmple Consensus (RANSAC) algorithm or other fitting algorithms to perform a plane fitting operation on the clipped grid points to determine the ground plane model. In the environmental mesh model coordinate system, the ground plane model can be expressed as: Ax+By+Cz+D=0; wherein A, B and C are normal vectors of different specified planes, respectively, and the specified plane is a plane formed by two coordinate axes of the environmental mesh model coordinate system; D is the distance from the fitted plane to the origin of the environmental mesh model coordinate system.

[0045] Step 1023, determine the position of the virtual lidar in the environment mesh model according to the device posture, the ground plane model and the specified height.

[0046] Among them, the specified height is specifically the height relative to the ground, that is, the height from the ground. Since the embodiment of the present application ultimately generates a grid map of the environment at a specified height, it is necessary to first calculate the position of the virtual laser radar in the environmental mesh model coordinate system at the specified height. For ease of description, in the environmental mesh model coordinate system, the position of the virtual laser radar is recorded as the coordinates (x', y', z'), and the position indicated by the device posture is recorded as the coordinates (x0, y0, z0), then the calculation process of the position of the virtual laser radar can be shown as follows:

[0047] x'=x0

[0048] y'=y0

[0049] z'=(-(D–h)-A*x'–B*y') / C

[0050] Wherein, h is the specified height; A, B, C and D have been explained in the previous text and will not be repeated here.

[0051] It can be understood that if there are N frames of detection data involved in step 101, then after executing step 102, the electronic device can obtain a total of N corresponding device postures based on the N frames of detection data; each device posture corresponds to a ground plane model, and a total of N ground plane models can be obtained; finally, the electronic device can determine the positions of N virtual lidars.

[0052] Step 103, taking the position of the virtual laser radar as the light source position, simulating light projection in the environment mesh model.

[0053] The projected light is parallel to the ground plane of the environment mesh model. It can be understood that for each frame of detection data (that is, the virtual laser radar position corresponding to each frame of detection data), the electronic device can use the same processing flow to perform subsequent processing; therefore, please refer to Figure 3 For the convenience of description, the virtual laser radar position corresponding to a frame of detection data is taken as an example to describe the process of simulating ray casting in detail:

[0054] Step 1031, determining multiple target angles according to a preset angle sampling interval.

[0055] The target angle here refers to the angle formed relative to the x-axis direction of the virtual laser radar (that is, the front direction of the virtual laser radar), which can also be understood as the yaw angle. It can be understood that the rotation characteristics of the laser radar are taken into account here, simulating the projection of light parallel to the ground from all directions around a circle.

[0056] As an example only, the angle sampling interval may be 0.5°. Let the target angle be θ, then the values ​​of θ may be: 0, 0.5°, 1°, 1.5°, ..., 359° and 359.5°, for a total of 720 target angles. It is understood that the electronic device may set a suitable angle sampling interval from the perspective of accuracy and computational complexity, which is not limited here.

[0057] Step 1032, for each target angle, determine the corresponding target projection direction vector according to the target angle and the ground plane model.

[0058] Considering that the ground is not absolutely horizontal, in order to improve the efficiency of building the grid map, the electronic device can assume that the virtual laser radar is parallel to the ground plane. After the target angle θ is determined, the direction vector Dir of the target projection direction corresponding to the target angle can be calculated. This direction vector can be recorded as the target projection direction vector. The target projection direction vector Dir is a three-dimensional vector, and its specific calculation process is as follows:

[0059] Dir[0]=cos(θ)

[0060] Dir[1]=sin(θ)

[0061] Dir[2]=(-A*Dir[0]–B*Dir[1]) / C

[0062] Among them, Dir[0] is used to represent the unit quantity of the target projection direction projected on the x-axis of the environment mesh model coordinate system; Dir[1] is used to represent the unit quantity of the target projection direction projected on the y-axis of the environment mesh model coordinate system; Dir[2] is used to represent the unit quantity of the target projection direction projected on the z-axis of the environment mesh model coordinate system; A, B and C have been explained in the previous text and will not be repeated here.

[0063] Step 1033, taking the position of the virtual laser radar as the light source position, executing the ray casting algorithm in the environment mesh model according to each target projection direction vector, and obtaining the ray casting result corresponding to each target projection direction vector.

[0064] The electronic device can obtain the distance between the virtual laser radar and the hit point of the light projected from the virtual laser radar along the target projection direction in the environment mesh model through the ray projection algorithm. Based on this, the ray projection result can be specifically expressed as follows: (θ, d), where θ is the target angle corresponding to the target projection direction vector, and d is the distance between the hit point of the projected light in the environment mesh model and the virtual laser radar.

[0065] It can be understood that for the position of any virtual laser radar, assuming that M target angles are determined, M ray projection results can be obtained corresponding to the position of the virtual laser radar, that is, M (θ, d) can be obtained.

[0066] In some embodiments, the environment Mesh model inevitably has some holes, which will cause some of the projected light beams to pass through the holes and hit the back side of the opposite obstacle. The hit point obtained in this case is actually an erroneous hit point, that is, an invalid hit point. Based on this, for each ray projection result, the electronic device can detect whether it is valid, that is, whether the light is projected from the front. If the ray projection result is valid, the ray projection result can be retained, that is, the ray projection result can be put into use in the subsequent grid map construction process. If the ray projection result is invalid, the ray projection result can be discarded, that is, the ray projection result will not be used in step 104 to avoid affecting the accuracy of the subsequent constructed grid map.

[0067] The electronic device can detect whether the ray casting result is valid in the following way: first, obtain the normal vector of the target grid, which specifically refers to the grid where the hit point corresponding to the ray casting result is located; then, detect whether the angle between the specified vector and the normal vector is an acute angle, and the specified vector specifically refers to the vector pointing from the hit point to the virtual laser radar; if the angle is an acute angle, the ray casting result is determined to be valid; if the angle is not an acute angle, the ray casting result is determined to be invalid. Specifically, the electronic device can determine whether it is an acute angle by calculating the cosine value of the angle: when the calculated cosine value is greater than 0, the angle is an acute angle; when the calculated cosine value is not greater than 0, the angle is not an acute angle. Of course, the electronic device can also determine whether the angle is an acute angle in other ways, which are not limited here.

[0068] In addition, the projected light may fail to hit any object in the environment mesh model. In this case, the returned interval distance d is infinite, and the resulting ray casting result (that is, the ray casting result indicating that the interval distance d is infinite) will also be confirmed as invalid by the electronic device.

[0069] It can be understood that for the position of any virtual lidar, the electronic device can obtain all the light projection results corresponding to the position of the virtual lidar, and then test the validity of each light projection result in turn; or, the electronic device can also test the validity of any light projection result immediately after obtaining the light projection result, and there is no limitation on the detection timing here.

[0070] Step 104 , after obtaining the corresponding ray projection results based on the detection data of each frame, a grid map of the environment at a specified height is constructed according to the ray projection results.

[0071] It can be understood that for any virtual laser radar position, the electronic device can obtain multiple valid ray projection results; by combining these multiple valid ray projection results, a laser scanning data frame at the position of the virtual laser radar can be obtained. After traversing the positions of all virtual laser radars, that is, the positions of N virtual laser radars, the electronic device can obtain N frames of laser scanning data frames. According to the positions of these N virtual laser radars and the corresponding N frames of laser scanning data frames, the electronic device can use a grid update algorithm to generate a two-dimensional grid map, which is a map of the environment at a specified height.

[0072] It can be understood that the above process actually constructs the five-degree-of-freedom posture of the virtual laser radar in the environmental mesh model according to the device posture corresponding to the specified height and detection data, and performs fiber projection based on this. The five degrees of freedom are: x, y and z coordinates in the environmental mesh model coordinate system, roll angle and pitch angle (because the virtual laser radar is parallel to the ground plane, the value is related to the ground plane model, that is, the determined ground plane model implicitly determines the roll angle and pitch angle). Compared with the prior art method of constructing a grid map based on 3D scanning projection, the grid map construction method provided in the embodiment of the present application can reduce the situation where obstacle grids are mistakenly generated due to point cloud data of the inclined ground when there is an inclined ground in the environment, and can accurately distinguish whether each grid is in an idle state or an unknown state, thereby ensuring the accuracy of the grid map.

[0073] In some embodiments, when there are multiple robots to be navigated in the environment, the electronic device can determine the target robot among the multiple robots to be navigated according to the specified height corresponding to the grid map. It can be understood that the target robot refers to the robot to be navigated that hopes to perform subsequent navigation / positioning tasks with the grid map of the specified height. After determining the target robot, the electronic device can send the grid map to the target robot.

[0074] It should be noted that the environment mesh model is reusable. Based on this, before step 101, the electronic device can first detect whether there is an environment mesh model for the current environment. If there is, the electronic device can directly obtain the environment mesh model and execute step 102. If not, the electronic device can execute step 101 normally.

[0075] As an example only, assume that there are robots R1, R2 and R3 to be navigated in the environment. Among them, the robot R1 to be navigated needs a grid map of the environment at a height of h1, and the robots R2 and R3 to be navigated need a grid map of the environment at a height of h2. Then: the electronic device can first set the specified height to h1, execute the various steps proposed in the embodiment of the present application, obtain the grid map at the height of h1, and send the grid map at the height of h1 to the robot R1 to be navigated; thereafter, the electronic device sets the specified height to h2 again. Since the environment mesh file has been constructed when constructing the grid map at the height of h1, step 101 can be skipped this time, and the subsequent steps of step 101 are directly executed to obtain the grid map at the height of h2, and the grid map at the height of h2 is sent to the robots R2 and R3 to be navigated.

[0076] Please see attached Figure 4 And attached Figure 5 .in, Figure 4 An example of a raster map based on 3D scanning projection is given. Figure 5 An example of a grid map obtained based on the grid map construction method proposed in the embodiment of the present application is given. It can be seen that compared with the grid map obtained based on 3D scanning projection, the grid map obtained based on the grid map construction method proposed in the embodiment of the present application has higher accuracy (thinner walls), richer details, fewer discrete points, and basically no obvious ghosting, which can effectively improve the positioning / navigation accuracy of subsequent robots.

[0077] As can be seen from the above, the present application generates a grid map of the environment at any specified height based on the environment mesh model. Specifically, the electronic device can first construct an environment mesh model based on multiple frames of detection data collected by the detection device in the environment; then, for each frame of detection data, the electronic device can determine the position of the virtual laser radar in the environment mesh model by simulating data processing according to the detection data and the specified height, and the virtual laser radar is a virtual device with a laser radar function; then, the electronic device can simulate the light projection in the environment mesh model with the position of the virtual laser radar as the light source position, wherein the projected light is parallel to the ground plane of the environment mesh model; finally, the electronic device can obtain the corresponding light projection results based on each frame of detection data, and then construct a grid map of the environment at a specified height according to the light projection results. In the above process, the environment mesh model can be reused, and the specified height can also be set according to the needs of the robot to be navigated. No matter how high the laser radar carried by the robot to be navigated is, it will not affect the grid map at the specified height constructed based on the embodiment of the present application. In summary, through the embodiment of the present application, a grid map of the environment at any specified height can be accurately constructed.

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

[0079] A model building module 601 is used to build an environment mesh model based on multiple frames of detection data collected by the detection device in the environment;

[0080] A position determination module 602 is used to determine the position of a virtual laser radar in the environment mesh model for each frame of detection data according to the detection data and a specified height, wherein the virtual laser radar is a virtual device with a laser radar function obtained by simulating through data processing;

[0081] A ray casting module 603 is used to simulate ray casting in the environment mesh model by taking the position of the virtual laser radar as the light source position, wherein the projected light is parallel to the ground plane of the environment mesh model;

[0082] The map construction module 604 is used to construct a grid map of the environment at a specified height according to the ray projection results after obtaining the corresponding ray projection results based on the detection data of each frame.

[0083] In some embodiments, the location determination module 602 includes:

[0084] A posture calculation unit is used to calculate the device posture according to the detection data, wherein the device posture is: the corresponding posture in the environment mesh model when the detection device collects the detection data;

[0085] A ground plane model determination unit, used to determine a corresponding ground plane model according to the device posture;

[0086] The radar position determination unit is used to determine the position of the virtual lidar in the environment mesh model based on the device posture, the ground plane model and the specified height.

[0087] In some embodiments, the ground plane model determination unit includes:

[0088] An area of ​​interest determination subunit is used to determine an area of ​​interest in the environment mesh model according to the device posture;

[0089] The ground plane model determination subunit is used to determine the ground plane model by fitting the grid points in the region of interest.

[0090] In some embodiments, the ray casting module 603 includes:

[0091] A target angle determination unit, used to determine a plurality of target angles according to a preset angle sampling interval;

[0092] A target projection direction vector determination unit, for determining a corresponding target projection direction vector for each target angle according to the target angle and a ground plane model;

[0093] The ray projection unit is used to use the position of the virtual laser radar as the light source position, and execute the ray projection algorithm in the environment mesh model according to each target projection direction vector to obtain the ray projection result corresponding to each target projection direction vector. The ray projection result is: the distance between the impact point of the projected light in the environment mesh model and the virtual laser radar at the target angle corresponding to the target projection direction vector.

[0094] In some embodiments, the ray casting module 603 further includes:

[0095] A result detection unit, used for detecting whether the ray casting result is valid for each ray casting result;

[0096] The result processing unit is used to retain the ray casting result if the ray casting result is valid, and to discard the ray casting result if the ray casting result is invalid.

[0097] In some embodiments, the result detection unit includes:

[0098] The normal vector acquisition subunit is used to obtain the normal vector of the target mesh, where the target mesh is the mesh where the hit point corresponding to the ray casting result is located;

[0099] The acute angle detection subunit is used to detect whether the angle between the specified vector and the normal vector is an acute angle, wherein the specified vector is: a vector pointing from the impact point to the virtual laser radar;

[0100] The detection result determination subunit is used to determine that the ray casting result is valid if the angle is an acute angle, and to determine that the ray casting result is invalid if the angle is not an acute angle.

[0101] In some embodiments, the grid map construction device 6 further includes:

[0102] A target robot determination module is used to determine the target robot according to a specified height among the robots to be navigated in the environment;

[0103] The grid map sending module is used to send the grid map to the target robot.

[0104] As can be seen from the above, the present application generates a grid map of the environment at any specified height based on the environment mesh model. Specifically, the grid map construction device can first construct an environment mesh model based on multiple frames of detection data collected by the detection device in the environment; then, for each frame of detection data, the grid map construction device can determine the position of the virtual laser radar in the environment mesh model by simulating data processing according to the detection data and the specified height, and the virtual laser radar is a virtual device with a laser radar function; then, the grid map construction device can use the position of the virtual laser radar as the light source position, and simulate light projection in the environment mesh model, wherein the projected light is parallel to the ground plane of the environment mesh model; finally, the grid map construction device can obtain the corresponding light projection results based on each frame of detection data, and then construct a grid map of the environment at a specified height according to the light projection results. In the above process, the environment mesh model can be reused, and the specified height can also be set according to the needs of the robot to be navigated. Regardless of the height of the laser radar carried by the robot to be navigated, it will not affect the grid map at the specified height constructed based on the embodiment of the present application. In summary, it can be seen that through the embodiments of the present application, a grid map of the environment at any specified height can be accurately constructed.

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

[0106] Build an environmental mesh model based on multiple frames of detection data collected by the detection device in the environment;

[0107] For each frame of detection data, the position of the virtual laser radar is determined in the environment mesh model according to the detection data and the specified height, wherein the virtual laser radar is a virtual device with laser radar function obtained by simulating through data processing;

[0108] Taking the position of the virtual laser radar as the light source position, simulating light projection in the environment mesh model, wherein the projected light is parallel to the ground plane of the environment mesh model;

[0109] After obtaining the corresponding ray casting results based on the detection data of each frame, a grid map of the environment at a specified height is constructed according to the ray casting results.

[0110] Assuming that the above is the first possible implementation, in a second possible implementation provided on the basis of the first possible implementation, the position of the virtual laser radar is determined in the environment mesh model according to the detection data and the specified height, including:

[0111] Calculate the device posture according to the detection data, where the device posture is: the corresponding posture in the environment mesh model when the detection device collects the detection data;

[0112] Determine the corresponding ground plane model according to the device posture;

[0113] Determine the position of the virtual lidar in the environment mesh model based on the device pose, ground plane model and specified height.

[0114] In a third possible implementation provided on the basis of the second possible implementation, determining a corresponding ground plane model according to the device posture includes:

[0115] Determine the region of interest in the environment mesh model based on the device’s position;

[0116] The ground plane model is determined by fitting the grid points in the region of interest.

[0117] In a fourth possible implementation provided on the basis of the second possible implementation, the position of the virtual laser radar is used as the light source position, and light projection is simulated in the environment mesh model, including:

[0118] Determine multiple target angles according to a preset angle sampling interval;

[0119] For each target angle, determine the corresponding target projection direction vector according to the target angle and the ground plane model;

[0120] Taking the position of the virtual laser radar as the light source position, the ray casting algorithm is executed in the environment mesh model according to each target projection direction vector to obtain the ray casting result corresponding to each target projection direction vector. The ray casting result is: the distance between the impact point of the projected light in the environment mesh model and the virtual laser radar at the target angle corresponding to the target projection direction vector.

[0121] In a fifth possible implementation provided on the basis of the fourth possible implementation, the processor 702 further implements the following steps when running the computer program stored in the memory 701:

[0122] For each ray casting result, check whether the ray casting result is valid;

[0123] If the ray casting result is valid, keep the ray casting result;

[0124] If the ray casting result is invalid, the ray casting result is discarded.

[0125] In a sixth possible implementation provided on the basis of the fifth possible implementation, detecting whether the ray casting result is valid includes:

[0126] Get the normal vector of the target mesh, where the target mesh is the mesh where the hit point corresponding to the raycast result is located;

[0127] Detect whether the angle between the specified vector and the normal vector is an acute angle, wherein the specified vector is: a vector pointing from the hit point to the virtual laser radar;

[0128] If the angle is acute, the ray casting result is determined to be valid;

[0129] If the angle is not acute, the ray casting result is determined to be invalid.

[0130] In a seventh possible implementation provided on the basis of the first possible implementation, or the second possible implementation, or the third possible implementation, or the fourth possible implementation, or the fifth possible implementation, or the sixth possible implementation, after constructing a grid map of the environment at a specified height according to the ray casting result, the processor 702 further implements the following steps when running the computer program stored in the memory 701:

[0131] Among the robots to be navigated in the environment, a target robot is determined according to a specified height;

[0132] Send the grid map to the target robot.

[0133] It should be understood that in the embodiment of the present application, the processor 702 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.

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

[0135] As can be seen from the above, the present application generates a grid map of the environment at any specified height based on the environment mesh model. Specifically, the electronic device can first construct an environment mesh model based on multiple frames of detection data collected by the detection device in the environment; then, for each frame of detection data, the electronic device can determine the position of the virtual laser radar in the environment mesh model by simulating data processing according to the detection data and the specified height, and the virtual laser radar is a virtual device with a laser radar function; then, the electronic device can simulate the light projection in the environment mesh model with the position of the virtual laser radar as the light source position, wherein the projected light is parallel to the ground plane of the environment mesh model; finally, the electronic device can obtain the corresponding light projection results based on each frame of detection data, and then construct a grid map of the environment at a specified height according to the light projection results. In the above process, the environment mesh model can be reused, and the specified height can also be set according to the needs of the robot to be navigated. No matter how high the laser radar carried by the robot to be navigated is, it will not affect the grid map at the specified height constructed based on the embodiment of the present application. In summary, through the embodiment of the present application, a grid map of the environment at any specified height can be accurately constructed.

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

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

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

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

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

[0141] 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 this 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), electrical 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.

[0142] 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: Build an environmental mesh model based on multiple frames of detection data collected by the detection device in the environment; For each frame of detection data, determining the position of a virtual laser radar in the environment mesh model according to the detection data and the specified height, wherein the virtual laser radar is a virtual device with a laser radar function obtained by simulating through data processing; Taking the position of the virtual laser radar as the light source position, simulating light projection in the environment mesh model, wherein the projected light is parallel to the ground plane of the environment mesh model; After obtaining corresponding ray projection results based on each frame of detection data, constructing a grid map of the environment at the specified height according to the ray projection results; Determining the position of the virtual laser radar in the environment mesh model according to the detection data and the specified height includes: Calculate the device posture according to the detection data, wherein the device posture is: the corresponding posture in the environment mesh model when the detection device collects and obtains the detection data; Determine a corresponding ground plane model according to the device posture; The position of the virtual laser radar is determined in the environmental mesh model according to the device posture, the ground plane model and the specified height.

2. The grid map construction method according to claim 1, characterized in that: The determining a corresponding ground plane model according to the device posture includes: Determining a region of interest in the environment mesh model based on the device posture; A ground plane model is determined by fitting the grid points in the region of interest.

3. The grid map construction method according to claim 1, characterized in that: The step of taking the position of the virtual laser radar as the light source position and simulating light projection in the environment mesh model includes: Determine multiple target angles according to a preset angle sampling interval; For each target angle, determine a corresponding target projection direction vector according to the target angle and the ground plane model; Taking the position of the virtual laser radar as the light source position, a ray casting algorithm is executed in the environment mesh model according to each target projection direction vector to obtain a ray casting result corresponding to each target projection direction vector. The ray casting result is: the distance between the impact point of the projected light in the environment mesh model and the virtual laser radar at the target angle corresponding to the target projection direction vector.

4. The grid map construction method according to claim 3, characterized in that: The grid map construction method also includes: For each ray casting result, detecting whether the ray casting result is valid; If the ray casting result is valid, retaining the ray casting result; If the ray casting result is invalid, the ray casting result is discarded.

5. The grid map construction method according to claim 4, characterized in that: The detecting whether the ray casting result is valid comprises: Obtaining a normal vector of a target mesh, wherein the target mesh is: a mesh where the hit point corresponding to the ray casting result is located; Detecting whether the angle between a specified vector and the normal vector is an acute angle, wherein the specified vector is: a vector pointing from the impact point to the virtual laser radar; If the angle is an acute angle, determining that the ray casting result is valid; If the angle is not an acute angle, it is determined that the ray casting result is invalid.

6. The grid map construction method according to any one of claims 1 to 5, characterized in that: After constructing the grid map of the environment at the specified height according to the ray projection result, the grid map construction method further includes: Among the robots to be navigated in the environment, determining a target robot according to the specified height; The grid map is sent to the target robot.

7. A grid map construction device, characterized in that: include: A model building module is used to build an environment mesh model based on multiple frames of detection data collected by the detection device in the environment; a position determination module, for determining the position of a virtual laser radar in the environment mesh model for each frame of detection data according to the detection data and a specified height, wherein the virtual laser radar is a virtual device having a laser radar function obtained by simulating data processing; A ray projection module, used to simulate ray projection in the environment mesh model with the position of the virtual laser radar as the light source position, wherein the projected light is parallel to the ground plane of the environment mesh model; A map construction module, configured to construct a grid map of the environment at the specified height according to the ray projection results after obtaining corresponding ray projection results based on the detection data of each frame; Wherein, the location determination module includes: A posture calculation unit, used to calculate the device posture according to the detection data, wherein the device posture is: the corresponding posture in the environment mesh model when the detection device collects and obtains the detection data; A ground plane model determination unit, configured to determine a corresponding ground plane model according to the device posture; A radar position determination unit is used to determine the position of the virtual laser radar in the environment mesh model according to the device posture, the ground plane model and the specified height.

8. 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 6 is implemented.

9. 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 6 is implemented.

Citation Information

Patent Citations

  • Virtual scanning and ranging matching-based AGV laser SLAM method

    CN107239076A

  • Method and device for constructing map

    CN108550318A

  • Implementation method from 3D sparse point cloud to 2D grid map based on VSLAM

    CN110675307A

  • Mapping method and device based on multi-line laser radar, medium and equipment

    CN111578932A

  • Systems and Methods for Generating Synthetic Sensor Data via Machine Learning

    US20200301799A1