A method, system, electronic device and storage medium for generating a grid map
By using millimeter-wave radar and probability value adjustment technology to generate low-cost grid maps, the problems of high cost of lidar technology and difficulty in noise filtering are solved, and more accurate environmental mapping is achieved.
Patent Information
- Application Number
- CN202011445128.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-08
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2040-12-08
AI Technical Summary
The existing raster map generation methods rely on expensive lidar technology, which leads to high costs and is difficult to effectively filter noise, affecting the accuracy of the map.
Use millimeter wave radar to obtain point cloud data, generate raster maps through probability value adjustment and update, and use trajectory data and point cloud data of millimeter wave radar to determine the radar hit point and unoccupied points in the world coordinate system. Probability values, filter noise and build low-cost raster maps.
Reduce the cost of raster map generation and avoid the influence of noise. The built map can more accurately reflect real environment information and effectively filter some noise.
Smart Images

Figure CN112581613B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of map technology, and in particular to the field of grid map technology, and specifically relates to a method, system, electronic device and storage medium for generating a grid map. Background Art
[0002] Electronic maps refer to digital maps generated using computing technology, which can be widely used in search, positioning, navigation and other scenarios. Figure 1 Generally, it is divided into ordinary navigation maps and high-precision maps. Ordinary navigation maps are user-oriented maps that provide a visual interface for users to query and display; while high-precision maps are machine-oriented map data that can be used for, for example, autonomous driving, robot navigation and positioning. Ordinary navigation maps are usually obtained through satellite mapping, and their accuracy is usually not high (for example, the error can reach several meters or even tens of meters). High-precision maps are high-precision map data that not only has high accuracy, but also includes other information that can be used for precise navigation and positioning, such as lane line information, object height information, road shape information, etc.
[0003] Grid map is a commonly used high-precision electronic map form, which divides the environment into a series of grids, where each grid is marked with a value, which indicates that the grid is occupied. In other words, the grid map is a product of digitally rasterizing the real environment, which identifies obstacles in the environment by whether the grid is occupied. Due to the demand for navigation and positioning of self-driving cars and robots, occupancy grid maps are widely used in the navigation and positioning scenarios of unmanned vehicles and intelligent robots.
[0004] The commonly used sensor for generating raster maps is LiDAR (single or multi-line), which generates trajectories while building raster maps. When the laser encounters an obstacle, it returns and is considered occupied. The grid from the origin to the occupied point is considered unoccupied, and the remaining points are considered unknown areas. The current method of using LiDAR to generate raster maps benefits from the characteristics of LiDAR's high accuracy, low noise, long distance, and large number of points, but the current method of using LiDAR to build maps is relatively expensive. Summary of the invention
[0005] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a method, system, electronic device and storage medium for generating a grid map, so as to provide a low-cost way of generating a grid map.
[0006] To achieve the above-mentioned purpose and other related purposes, an embodiment of the present invention provides a method for generating a grid map, including: obtaining trajectory data and point cloud data of a millimeter-wave radar; initializing a grid map based on the trajectory data; multiplying the point cloud data of the millimeter-wave radar of the current frame with the corresponding trajectory data to transform into a world coordinate system; obtaining the position of the radar hit point in the grid map based on the point in the world coordinate system obtained by the transformation; adjusting the probability values of the radar hit point and the unoccupied point respectively, and updating the grid map based on the adjusted probability values; detecting whether the processing of the point cloud data of the millimeter-wave radar of all frames is completed, and in response to the processing of the point cloud data of the millimeter-wave radar of all frames not being completed, and based on the processing process of the current frame, completing the processing of the point cloud data of the millimeter-wave radar of all other frames; and saving the grid map based on the probability value of the radar hit point in each frame.
[0007] In one embodiment of the present application, in step S1 , point cloud data of a millimeter-wave radar that satisfies a preset distance range is obtained.
[0008] In one embodiment of the present application, in step S5, the implementation method of adjusting the probability value of the radar hit point includes: detecting whether the radar hit point is the first hit; in response to the radar hit point being the first hit, marking the radar hit point and increasing the probability value of the radar hit point; in response to the radar hit point not being the first hit, increasing the probability value of the radar hit point.
[0009] In one embodiment of the present application, in step S5, the implementation method of adjusting the probability value of the unoccupied point includes: confirming that the points on the line between the radar hit point and the vehicle body position other than the radar hit point are unoccupied points; confirming whether the unoccupied point is marked; in response to the unoccupied point being marked, keeping the probability value of the point unchanged; in response to the unoccupied point not being marked, reducing the probability value of the point.
[0010] In one embodiment of the present application, in step S7, the implementation method of saving the grid map based on the probability value of the radar hit point in each frame includes: confirming whether the probability value of the radar hit point is greater than a probability threshold; in response to the probability value of the radar hit point being greater than the probability threshold, confirming that the radar hit point is an occupied point and marking it as a first value; confirming whether the probability value of the radar hit point is equal to an initial value of the grid map; in response to the probability value of the radar hit point being equal to the initial value of the grid map, confirming that the radar hit point is an unknown point and marking it as a second value; in response to the probability value of the radar hit point being less than or equal to the probability threshold, or in response to the probability value of the radar hit point being not equal to the initial value of the grid map, confirming that the radar hit point is an unoccupied point and marking it as a third value.
[0011] In one embodiment of the present application, in step S1, the trajectory data is acquired based on visual SLAM data, laser SLAM data, vehicle body data or millimeter wave radar data.
[0012] An embodiment of the present invention further provides a grid map generation system, comprising: a data acquisition module for acquiring trajectory data and point cloud data of a millimeter-wave radar; an initialization module for initializing a grid map based on the trajectory data; a coordinate transformation module for multiplying the point cloud data of the millimeter-wave radar of the current frame with the corresponding trajectory data and transforming them into a world coordinate system; a hit point position acquisition module for acquiring the position of the radar hit point in the grid map based on the point in the world coordinate system obtained by the transformation; a probability update module for adjusting the probability values of the radar hit point and the unoccupied point respectively, and updating the grid map based on the adjusted probability values; a traversal detection module for detecting whether the processing of the point cloud data of the millimeter-wave radar of all frames is completed, and the coordinate transformation module, the hit point position acquisition module and the probability update module continue to complete the processing of the point cloud data of the millimeter-wave radar of all other frames in response to the processing of the point cloud data of the millimeter-wave radar of all frames not being completed; and a map saving module for saving the grid map based on the probability values of the radar hit points in each frame.
[0013] In one embodiment of the present application, the data acquisition module acquires point cloud data of the millimeter wave radar that meets a preset distance range.
[0014] In one embodiment of the present application, the probability update module includes: a first hit detection unit, used to detect whether the radar hit point is a first hit; a probability increase unit, used to mark the radar hit point and increase the probability value of the radar hit point in response to the radar hit point being a first hit, and increase the probability value of the radar hit point in response to the radar hit point not being a first hit.
[0015] In one embodiment of the present application, the probability update module also includes: a line point confirmation unit, used to confirm that points on the line between the radar hit point and the vehicle body position other than the radar hit point are unoccupied points; a mark confirmation unit, used to confirm whether the unoccupied points are marked; and a probability adjustment unit, used to keep the probability value of the point unchanged in response to the unoccupied point being marked, and to reduce the probability value of the point in response to the unoccupied point not being marked.
[0016] In one embodiment of the present application, the map saving module includes: an occupied point confirmation unit, used to confirm whether the probability value of the radar hit point is greater than a probability threshold, and in response to the probability value of the radar hit point being greater than the probability threshold, confirming that the radar hit point is an occupied point and marking it as a first value; an unknown point confirmation unit, used to confirm whether the probability value of the radar hit point is equal to an initial value of a grid map, and in response to the probability value of the radar hit point being equal to the initial value of the grid map, confirming that the radar hit point is an unknown point and marking it as a second value; an unoccupied point confirmation unit, used to confirm that the radar hit point is an unoccupied point and marking it as a third value in response to the probability value of the radar hit point being less than or equal to the probability threshold, or in response to the probability value of the radar hit point being not equal to the initial value of the grid map.
[0017] In one embodiment of the present application, the trajectory data acquired in the data acquisition module is generated based on visual SLAM data, laser SLAM data, vehicle body data or millimeter wave radar data.
[0018] An embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores program instructions; the processor executes the program instructions to implement the above-mentioned method for generating a grid map.
[0019] An embodiment of the present invention further provides a storage medium storing program instructions, which implement the above-mentioned method for generating a grid map when executed.
[0020] As described above, the grid map generation method, system, electronic device and storage medium of the present invention have the following beneficial effects:
[0021] 1. The present invention constructs a grid map through millimeter wave radar, which greatly reduces the cost of map construction and positioning.
[0022] 2. The method of adjusting the hit point probability value in the present invention can prevent effective information from being erased by subsequent noise points, so that the constructed map can reflect the information of the real environment.
[0023] 3. When saving the grid map, the present invention confirms whether it is an occupied grid through the probability value. Points that are hit a small number of times will be filtered out, and points that are hit multiple times will be retained, effectively filtering out some noise points. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 Shown is a schematic flow chart of a method for generating a grid map according to the present invention.
[0025] Figure 2 Shown is an example diagram of a frame of data emitted by a millimeter-wave radar in the method for generating a grid map of the present invention.
[0026] Figure 3 Shown is a schematic diagram of initializing a grid map based on SLAM trajectory data in the grid map generation method of the present invention.
[0027] Figure 4 Shown is a schematic diagram of the process of adjusting the probability value of the radar hit point in the method for generating a grid map of the present invention.
[0028] Figure 5 Shown is a schematic diagram of the process of adjusting points between the origin and the radar hit point in the method for generating a grid map of the present invention.
[0029] Figure 6 Shown is a schematic diagram of the process of saving a map in the method for generating a raster map of the present invention.
[0030] Figure 7 Shown is a schematic diagram of a grid map constructed in the method for generating a grid map of the present invention.
[0031] Figure 8 It is a schematic diagram showing the overall execution process of the method for generating a grid map of the present invention.
[0032] Fig. 9 Shown is a schematic diagram of the principle structure of the grid map generation system of the present invention.
[0033] Fig.10 Shown is a schematic diagram of the principle structure of a probability update module in the grid map generation system of the present invention.
[0034] Fig.11 Shown is a schematic diagram of the principle structure of the probability update module in the grid map generation system of the present invention.
[0035] Fig.12 Shown is a schematic diagram of the principle structure of a map storage module in the grid map generation system of the present invention.
[0036] Fig.13 Shown is a schematic diagram of the structure of an electronic device in an embodiment of the present application.
[0037] Component number description
[0038] 100 Grid map generation system
[0039] 110 Data acquisition module
[0040] 120 Initialization module
[0041] 130 Coordinate transformation module
[0042] 140 Hit point location acquisition module
[0043] 150 Probability Update Module
[0044] 151 First Hit Detection Unit
[0045] 152 Probability Increase Unit
[0046] 153 Connection point confirmation unit
[0047] 154 Marking confirmation unit
[0048] 155 Probability Adjustment Unit
[0049] 160 Traversal Detection Module
[0050] 170 Map saving module
[0051] 171 Occupancy point confirmation unit
[0052] 172 Unknown point confirmation unit
[0053] 173 Unoccupied point confirmation unit
[0054] 10 Electronic devices
[0055] 101 Processor
[0056] 102 Memory
[0057] Steps S1 to S7
[0058] Steps S510 to S580
[0059] S710~S750 Steps DETAILED DESCRIPTION
[0060] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0061] The purpose of this embodiment is to provide a method, system, electronic device and storage medium for generating a raster map, so as to provide a low-cost way of generating a raster map.
[0062] The principles and implementation methods of the grid map generation method, system, electronic device and storage medium of this embodiment will be described in detail below, so that those skilled in the art can understand the grid map generation method, system, electronic device and storage medium of the present invention without creative work.
[0063] Example 1
[0064] like Figure 1 As shown, this embodiment provides a method for generating a grid map, including:
[0065] Step S1: Acquire trajectory data and point cloud data of millimeter wave radar;
[0066] Step S2: Initializing a grid map based on the trajectory data;
[0067] Step S3: multiplying the point cloud data of the millimeter-wave radar of the current frame by the corresponding trajectory data and transforming them into the world coordinate system;
[0068] Step S4: based on the point in the world coordinate system obtained by transformation, obtaining the position of the radar hit point in the grid map;
[0069] Step S5: respectively adjusting the probability values of the radar hit points and the unoccupied points, and updating the grid map based on the adjusted probability values;
[0070] Step S6: Detecting whether the processing of the point cloud data of the millimeter-wave radar of all frames is completed, in response to the processing of the point cloud data of the millimeter-wave radar of all frames not being completed, and based on the processing process of the current frame, completing the processing of the point cloud data of the millimeter-wave radar of all other frames;
[0071] Step S7: Save the grid map based on the probability value of the radar hit point in each frame.
[0072] The following is a detailed description of steps S1 to S7 of the method for generating a grid map in this embodiment.
[0073] Step S1: Acquire trajectory data and point cloud data of millimeter-wave radar.
[0074] In step S1 , the trajectory data is acquired based on but not limited to visual SLAM data, laser SLAM data, vehicle body data or millimeter wave radar data.
[0075] For example, the trajectory data is acquired based on visual SLAM data.
[0076] SLAM (Simultaneous Localization and Mapping) is considered to be the key to achieving truly fully autonomous mobile positioning. It is mainly divided into two parts: front-end preprocessing and back-end optimization. The front-end preprocessing provides initial estimated maps and location information by analyzing and synthesizing various sensor data. The back-end optimization uses a graphical model to describe the initial estimate and probability constraints, and uses the optimization method to optimize the initial estimate to achieve higher-precision mapping and positioning SLAM trajectory data.
[0077] Among them, the process of generating trajectory data based on visual SLAM data includes:
[0078] 1) When any vehicle is in a map building mode, the vehicle's motion posture and the vehicle's surrounding image are acquired and landmark information is extracted from the vehicle's surrounding image.
[0079] 2) Based on the SLAM algorithm, a landmark map and a vehicle driving trajectory are generated according to the vehicle's motion posture and the landmark information.
[0080] The SLAM algorithms used in this embodiment include but are not limited to the EXF family, particle filter FastSLAM, graph optimization, etc.
[0081] Most vision-based SLAM technologies use landmark information such as SIFT and FAST. However, these landmark information are greatly affected by environmental changes and have poor time invariance. Therefore, they cannot be saved in the map. In this embodiment, when using the SLAM algorithm to construct a map, the landmark information selected includes but is not limited to the fixed point of the parking space, the edge of the column, and its projection on the ground.
[0082] In addition, in this embodiment, other methods for obtaining trajectory data in the prior art may also be used, and are not limited to the above-mentioned process of generating trajectory data based on visual SLAM data.
[0083] Since the noise of millimeter wave radar is relatively large, this embodiment filters the point cloud data of millimeter wave radar. Specifically, in this embodiment, when acquiring the point cloud data of millimeter wave radar, the point cloud data of millimeter wave radar that meets the preset distance range is acquired, wherein the preset distance range is but not limited to 10 meters to 30 meters, for example, the point cloud data of millimeter wave radar within 20 meters of the vehicle is retained.
[0084] In this embodiment, the echo point cloud data of the target is obtained by millimeter wave radar. Figure 2 The display is an example of a frame of data sent by the millimeter wave radar in the method for generating a grid map of the present invention. The point cloud data is the result of distance measurement, speed measurement, angle measurement and constant false alarm rate detection of the data cube received by the millimeter wave radar. The point cloud data includes but is not limited to the number of points, the distance of each point, the Doppler (speed) information of each point and the angle parameter of each point.
[0085] Those skilled in the art may also adopt other methods in the prior art for obtaining trajectory data and point cloud data of millimeter-wave radar according to actual needs, which will not be described in detail in this embodiment.
[0086] Step S2: Initializing a grid map based on the trajectory data.
[0087] Figure 3The diagram is a schematic diagram of initializing a grid map based on SLAM trajectory data in this embodiment. Specifically, in this embodiment, the vehicle drivable area is detected and a grid map is generated according to the vehicle driving trajectory and the detected drivable area.
[0088] In this embodiment, the drivable area of the road surface morphology is sensed, and a local grid map is generated according to the vehicle's motion information, motion posture and landmark information. Among them, each grid in the grid map stores the attributes of the area covered by the grid. For example, 1 represents a road surface, and 0 represents a non-road surface. The drivable area of the road surface morphology of the drivable road surface is sensed and the drivable area of the road surface morphology is mapped to the grid map, the road surface is segmented by semantics, and the drivable area of the road surface morphology is mapped to the grid map. In this embodiment, the road surface morphology, i.e., the drivable area, includes but is not limited to a straight road surface, an entrance and exit road surface, and an intersection road surface.
[0089] Initializing the grid map means calculating the size of the generated grid map to avoid out-of-bounds mapping. Generally speaking, the smaller the size of each grid, the higher the accuracy and resolution. In other words, for the same spatial grid, the more grids there are, the higher the resolution of the spatial grid. Initializing the grid map means setting each grid to a predetermined size (e.g., 0.125 meters or other sizes).
[0090] Step S3: multiply the point cloud data of the millimeter-wave radar of the current frame by the corresponding trajectory data and transform them into the world coordinate system.
[0091] This embodiment uses trajectory data to register the millimeter wave radar as a grid map.
[0092] The world coordinate system is the absolute coordinate system of the system. Before the user coordinate system is established, the coordinates of all points on the screen are determined by the origin of the coordinate system.
[0093] Specifically, in this embodiment, the world coordinate system is the position of the first frame of the visual trajectory, and the process of multiplying the point cloud data of the millimeter-wave radar of the current frame with the corresponding trajectory data and transforming it into the world coordinate system is:
[0094] Assume Pi is a point in the current frame, Twc is the transformation of the current frame to the world coordinate system (rotation R + translation t), then the transformation to the world coordinate system is Pw = Twc*Pi = R*Pi+t.
[0095] Step S4: Based on the point in the world coordinate system obtained by transformation, the position of the radar hit point in the grid map is obtained.
[0096] Step S5: respectively adjusting the probability values of the radar hit points and the unoccupied points, and updating the grid map based on the adjusted probability values.
[0097] Figure 4 The figure shows a flow chart of adjusting the probability value of the radar hit point in the method for generating a grid map of the present invention. Specifically, Figure 4 As shown, in this embodiment, in step S5, the implementation method of adjusting the probability value of the radar hit point includes:
[0098] Step S510: Detect whether the radar hit point is the first hit, if so, continue to step S520, if not, continue to step S530.
[0099] Step S520: In response to the radar hitting point being the first hit, marking the radar hitting point and increasing the probability value of the radar hitting point.
[0100] Step S530: In response to the radar hitting point not being the first hit, increasing the probability value of the radar hitting point.
[0101] That is, in this embodiment, according to the point of the world coordinate system obtained, the vehicle position is first obtained, and the position of the grid map where the radar hit point is located is calculated. If the radar hit point is hit for the first time, then the radar hit point is marked as a hit point and its probability value is increased; if the radar hit point is not hit for the first time, then its probability value is directly increased.
[0102] In this embodiment, the method of increasing the probability value is as follows:
[0103] The increase in probability value is reflected in the form of the change value of the logarithmic function. Assuming that the probability of a certain grid is p, the change value of the probability value of the grid (radar hit point) is log(p / (1-p)). log odd = log(p / (1-p)), where log odd is the logarithmic change value of the probability and p is the initial probability of the grid. Assuming that the real-time probability value of log odd of the current grid is map_odd, then the update when it is hit is map_odd = map_odd + log_occ, where log_occ is the preset fixed value of increase.
[0104] Figure 5 The figure shows a schematic diagram of the process of adjusting the points between the origin and the radar hit point in the method for generating a grid map of the present invention. Figure 5 As shown, in this embodiment, in step S5, the implementation method of adjusting the probability value of the unoccupied point includes:
[0105] Step S540: confirming that points other than the radar hitting point on the line between the radar hitting point and the vehicle body position are unoccupied points;
[0106] Step S550: confirm whether the unoccupied point is marked; if so, proceed to step S570; if not, proceed to step S580;
[0107] Step S560: in response to the unoccupied point being marked, keeping the probability value of the point unchanged;
[0108] Step S570: In response to the unoccupied point not being marked, reducing the probability value of the point.
[0109] First, the vehicle position is obtained, and then a line is formed between the radar hit point and the vehicle position. The points on the line (excluding the radar hit point (hit point)) are unoccupied points. If the unoccupied point has been marked, its probability value remains unchanged; if the unoccupied point has not been marked, its probability value decreases.
[0110] In this embodiment, the method of reducing the probability value is as follows:
[0111] The decrease in probability value is reflected by the change in the logarithmic function. Assuming that the probability of a certain grid is p, the probability value of the grid (radar hit point) decreases by log(p / (1-p)). log odd = log(p / (1-p)), where log odd is the logarithmic change value of the probability and p is the initial probability of the grid. Assuming that the real-time probability value of log odd of the current grid is map_odd, then when it is passed by a ray (not occupied), it is updated to map_odd = map_odd – log_free, where log_free c is the preset fixed value of the decrease.
[0112] After filtering the point cloud data of the millimeter wave radar in this embodiment, the noise will still have an impact, causing the effective information to be washed out by the subsequent noise points, so that the grid map cannot reflect the information of the real environment. Therefore, this embodiment adopts the above probability strategy when constructing the grid map: once a point is hit, the point will be marked. When calculating the probability value, if a line passes through it, its probability value will not decrease. After being hit again, the probability value will still increase. Therefore, the method of adjusting the probability value of the radar hit point in this embodiment can prevent the effective information from being washed out by the subsequent noise points, so that the constructed map can reflect the information of the real environment.
[0113] Step S6: Detect whether the processing of the point cloud data of the millimeter-wave radar of all frames is completed. In response to the incomplete processing of the point cloud data of the millimeter-wave radar of all frames, and based on the processing process of the current frame, complete the processing of the point cloud data of the millimeter-wave radar of all other frames.
[0114] If the millimeter-wave radar traversal of all frames is completed, the process proceeds to step S7 to save the map; if the traversal is not completed, the process returns to step S3 to continue processing the next frame of trajectory data.
[0115] After processing each frame of trajectory data, the grid map is updated after the probability value of the radar hit point is adjusted, and the grid map is updated after the probability value of the point between the origin and the radar hit point is adjusted.
[0116] Step S7: Save the grid map based on the probability value of the radar hit point in each frame.
[0117] Figure 6 The figure shows a schematic diagram of the process of saving a map in the method for generating a grid map of the present invention. Figure 6 As shown, in this embodiment, in step S7, the implementation method of saving the grid map based on the probability value of the radar hit point in each frame includes:
[0118] Step S710: confirm whether the probability value of the radar hit point is greater than a probability threshold.
[0119] Step S720: In response to the probability value of the radar hit point being greater than the probability threshold, confirming that the radar hit point is an occupied point and marking it as a first value.
[0120] The first value is a marking number, such as but not limited to 100.
[0121] Step S730: confirm whether the probability value of the radar hit point is equal to the initial value of the grid map.
[0122] Step S740: In response to the probability value of the radar hit point being equal to the initial value of the grid map, confirming that the radar hit point is an unknown point and marking it as a second value.
[0123] The second value is a marking number different from the first value, for example but not limited to -1.
[0124] It should be noted that step S710 and step S720 may be performed first, and then step S730 and step S740 may be performed, or step S730 and step S740 may be performed first, and then step S710 and step S720 may be performed.
[0125] Step S750: In response to the probability value of the radar hit point being less than or equal to the probability threshold, or in response to the probability value of the radar hit point being not equal to the initial value of the grid map, confirming that the radar hit point is an unoccupied point and marking it as a third value.
[0126] The third value is a marking number that is different from the first value and the second value, for example but not limited to 0.
[0127] For example, when saving a grid map, points with probability greater than a certain threshold are occupied points and are marked as 100; points equal to the initial value of the map are unknown points and are marked as -1; and the remaining points are unoccupied points and are marked as 0. The schematic diagram of the grid map constructed in this embodiment is shown in FIG. Figure 7 shown.
[0128] In addition, it should be noted that in this embodiment, updating of occupied (radar hit points) and unoccupied points is to update the logarithmic value of the probability increase or decrease log odd. For example, we update occupied points with a fixed preset increase value log_occ, and update unoccupied points with a preset fixed decrease value log_free.
[0129] Assuming that the real-time probability value of log odd of the current grid is map_odd, then the update when it is hit is map_odd = map_odd + log_occ, and the update when it is passed by a ray (unoccupied) is map_odd = map_odd - log_free. When a grid has been marked as occupied, no unoccupied update is performed.
[0130] When saving a map, the log odd value of the existing data is converted into a probability value for saving. Assuming that the log odd value of a grid in the current map is m, then its probability value p = exp(m) / (1+exp(m)).
[0131] Therefore, when saving the grid map, the grid map generation method of this embodiment confirms whether it is an occupied grid through the probability value, and points that are hit a small number of times will be filtered out, and points that are hit multiple times will be retained, effectively filtering out some noise points.
[0132] In order to enable those skilled in the art to further understand the implementation process of the method for generating a grid map of this embodiment, the implementation process of the method for generating a grid map of this embodiment is further described below.
[0133] like Figure 8 As shown, the trajectory data and the point cloud data of the millimeter-wave radar are obtained respectively, the grid map is initialized based on the trajectory data, and the point cloud data of the millimeter-wave radar of the current frame is multiplied by the corresponding trajectory data and transformed into the world coordinate system.
[0134] For the radar hit point, the position of the radar hit point in the grid map is calculated based on the point in the world coordinate system. If the radar hit point is hit for the first time, then the radar hit point is marked as a hit point and its probability value is increased; if the radar hit point is not hit for the first time, then its probability value is directly increased. Then update the grid map.
[0135] For the points between the origin and the radar hit point, a line is formed between the radar hit point and the vehicle position. The points on the line (excluding the radar hit point (hit point)) are unoccupied points. If the unoccupied point has been marked, its probability value remains unchanged; if the unoccupied point is not marked, its probability value decreases. Then update the grid map.
[0136] By adjusting the radar hit point probability value in the above manner, it is possible to prevent effective information from being erased by subsequent noise points, so that the constructed map can reflect the information of the real environment.
[0137] Check whether the millimeter-wave radar traversal of all frames is completed. If so, enter the map saving process; if not, return to continue processing the next frame of trajectory data.
[0138] When saving the map, points with probability values greater than a certain threshold are confirmed as occupied points and marked as 100; points equal to the initial value of the map are confirmed as unknown points and marked as -1; the remaining points are confirmed as unoccupied points and marked as 0. The probability value is used to determine whether the grid is occupied. Points that are hit a small number of times will be filtered out, and points that are hit multiple times will be retained, effectively filtering out some noise points.
[0139] Example 2
[0140] like Fig. 9 As shown, this embodiment provides a grid map generation system 100, and the grid map generation system 100 includes: a data acquisition module 110, an initialization module 120, a coordinate transformation module 130, a hit point position acquisition module 140, a probability update module 150, a traversal detection module 160 and a map saving module 170.
[0141] In this embodiment, the data acquisition module 110 is used to acquire trajectory data and point cloud data of millimeter wave radar.
[0142] The trajectory data acquired in the data acquisition module 110 is generated based on but not limited to visual SLAM data, laser SLAM data, vehicle body data or millimeter wave radar data.
[0143] For example, the trajectory data acquired in the data acquisition module 110 is generated based on visual SLAM data.
[0144] Among them, the process of generating trajectory data based on visual SLAM data includes:
[0145] 1) When any vehicle is in a map building mode, the vehicle's motion posture and the vehicle's surrounding image are acquired and landmark information is extracted from the vehicle's surrounding image.
[0146] 2) Based on the SLAM algorithm, a landmark map and a vehicle driving trajectory are generated according to the vehicle's motion posture and the landmark information.
[0147] The SLAM algorithms used in this embodiment include but are not limited to the EXF family, particle filter FastSLAM, graph optimization, etc.
[0148] Most vision-based SLAM technologies use landmark information such as SIFT and FAST. However, these landmark information are greatly affected by environmental changes and have poor time invariance. Therefore, they cannot be saved in the map. In this embodiment, when using the SLAM algorithm to construct a map, the landmark information selected includes but is not limited to the fixed point of the parking space, the edge of the column, and its projection on the ground.
[0149] Since the noise of millimeter wave radar is relatively large, this embodiment filters the point cloud data of millimeter wave radar. In this embodiment, the data acquisition module 110 acquires the point cloud data of millimeter wave radar that meets the preset distance range. The preset distance range is but not limited to 10 meters to 30 meters, for example, the point cloud data of millimeter wave radar within 20 meters near the vehicle is retained.
[0150] In this embodiment, the initialization module 120 is used to initialize a grid map based on the trajectory data.
[0151] In this embodiment, the initialization module 120 detects the drivable area of the vehicle and generates a grid map according to the vehicle driving trajectory and the detected drivable area.
[0152] In this embodiment, the coordinate transformation module 130 is used to multiply the point cloud data of the millimeter-wave radar of the current frame by the corresponding trajectory data to transform it into the world coordinate system.
[0153] In this embodiment, the hit point position acquisition module 140 is used to acquire the position of the radar hit point in the grid map based on the point in the world coordinate system obtained by transformation.
[0154] In this embodiment, the probability updating module 150 is used to adjust the probability values of the radar hit points and the unoccupied points respectively, and update the grid map based on the adjusted probability values.
[0155] In this embodiment, if Fig.10 As shown, the probability updating module 150 includes: a first hit detection unit 151 and a probability increasing unit 152.
[0156] Among them, the first hit detection unit 151 is used to detect whether the radar hit point is the first hit; the probability increase unit 152 is used to mark the radar hit point and increase the probability value of the radar hit point in response to the radar hit point being the first hit, and increase the probability value of the radar hit point in response to the radar hit point not being the first hit.
[0157] In this embodiment, the position of the radar hit point on the grid map is calculated based on the point in the world coordinate system. If the radar hit point is hit for the first time, the radar hit point is marked as a hit point and its probability value is increased; if the radar hit point is not hit for the first time, its probability value is directly increased.
[0158] In this embodiment, if Fig.11 As shown, the probability updating module 150 further includes: a connection point confirmation unit 153 , a mark confirmation unit 154 and a probability adjustment unit 155 .
[0159] Among them, the connecting point confirmation unit 153 is used to confirm that the points on the connecting line between the radar hit point and the vehicle body position other than the radar hit point are unoccupied points, wherein the probability update module 150 also includes a vehicle body position unit, which is used to obtain the vehicle body position; the mark confirmation unit 154 is used to confirm whether the unoccupied point is marked; the probability adjustment unit 155 is used to keep the probability value of the point unchanged in response to the unoccupied point being marked, and reduce the probability value of the point in response to the unoccupied point not being marked.
[0160] That is, a line is formed between the radar hit point and the vehicle body position, and the points on the line (excluding the radar hit point (hit point)) are unoccupied points. If the unoccupied point has been marked, its probability value remains unchanged; if the unoccupied point has not been marked, its probability value decreases.
[0161] After processing each frame of trajectory data, the grid map is updated after the probability value of the radar hit point is adjusted, and the grid map is updated after the probability value of the point between the origin and the radar hit point is adjusted.
[0162] In this embodiment, the traversal detection module 160 is used to detect whether the processing of the point cloud data of the millimeter-wave radar of all frames is completed, and the coordinate transformation module 130, the hitting point position acquisition module 140 and the probability update module 150 respond to the processing of the point cloud data of the millimeter-wave radar of all frames not being completed, and continue to complete the processing of the point cloud data of the millimeter-wave radar of all other frames.
[0163] In this embodiment, the map saving module 170 is used to save the grid map based on the probability value of the radar hit point in each frame.
[0164] In this embodiment, if Fig.12 As shown, the map storage module 170 includes: an occupied point confirmation unit 171, an unknown point confirmation unit 172 and an unoccupied point confirmation unit 173.
[0165] In this embodiment, the occupied point confirmation unit 171 is used to confirm whether the probability value of the radar hit point is greater than a probability threshold, and in response to the probability value of the radar hit point being greater than the probability threshold, confirm that the radar hit point is an occupied point and mark it as a first value.
[0166] In this embodiment, the unknown point confirmation unit 172 is used to confirm whether the probability value of the radar hit point is equal to the initial value of the grid map, and in response to the probability value of the radar hit point being equal to the initial value of the grid map, confirm that the radar hit point is an unknown point and mark it as a second value.
[0167] In this embodiment, the unoccupied point confirmation unit 173 is used to confirm that the radar hit point is an unoccupied point and mark it as a third value in response to the probability value of the radar hit point being less than or equal to the probability threshold, or in response to the probability value of the radar hit point being not equal to the initial value of the grid map.
[0168] Therefore, when saving the grid map, the grid map generation system 100 of this embodiment confirms whether it is an occupied grid through the probability value, and points that are hit a small number of times will be filtered out, and points that are hit multiple times will be retained, effectively filtering out some noise points.
[0169] The technical features specifically implemented by the grid map generation system 100 of this embodiment are substantially the same as those of the grid map generation method in the aforementioned embodiment 1, and the technical contents that are common between the embodiments will not be repeated.
[0170] It should be noted that it should be understood that the division of the various modules of the above devices is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, a module can be a separately established processing element, or it can be integrated in a chip of an electronic terminal. In addition, it can also be stored in the memory of the above terminal in the form of program code, and called and executed by a processing element of the above terminal. The function of the above tracking calculation module. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in software form.
[0171] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0172] Example 3
[0173] like Fig.13As shown, this embodiment also provides an electronic device 10, which includes a processor 101 and a memory 102. The electronic device 10 is a vehicle-mounted terminal, such as a vehicle-mounted machine or a vehicle-mounted box. The electronic device 10 can also be a mobile terminal placed in the car, such as a smart phone, a PAD, smart glasses, a smart bracelet, etc. The method for generating a grid map can be applied to various types of electronic devices 10100. The electronic device 10 can also be, for example, a computer including components such as a memory, a storage controller, one or more processing units (CPUs), a peripheral interface, an RF circuit, an audio circuit, a speaker, a microphone, an input / output (I / O) subsystem, a display screen, other output or control devices, and an external port; the computer includes but is not limited to personal computers such as desktop computers, laptops, and smart TVs. In other embodiments, the electronic device 10 can also be a server, which can be arranged on one or more physical servers according to various factors such as functions and loads, or can be composed of distributed or centralized server clusters, which is not limited in this embodiment.
[0174] The memory 102 is connected to the processor 101 through a system bus and communicates with each other. The memory 102 is used to store computer programs. The processor 101 is coupled to the display 1003 and the memory 1002. The processor 101 is used to run the computer program so that the electronic device 10100 executes the method for generating a grid map described in Example 1. Example 1 has already described the method for generating a grid map in detail, which will not be repeated here.
[0175] In an actual implementation, the electronic device 10100 is, for example, an electronic device 10100 installed with an Android operating system or an iOS operating system, or an operating system such as Palm OS, Symbian, or Black Berry OS, Windows Phone, etc.
[0176] In an exemplary embodiment, the electronic device 10100 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, cameras or other electronic components to execute the above-mentioned grid map generation method.
[0177] It should be noted that the system bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 The term "communication interface" is represented by only one thick line, but it does not mean that there is only one bus or one type of bus. The communication interface is used to implement communication between the database access device and other devices (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage.
[0178] The above-mentioned processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0179] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0180] Example 4
[0181] This embodiment provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method for generating a grid map is implemented. The method for generating a grid map has been described in detail above, and will not be repeated here.
[0182] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0183] In summary, the present invention constructs a grid map through millimeter wave radar, which greatly reduces the cost of map construction and positioning; the method of adjusting the probability value of the hit point in the present invention can prevent effective information from being washed out by subsequent noise points, so that the constructed map can reflect the information of the real environment; when saving the grid map, the present invention confirms whether it is an occupied grid through the probability value, and a small number of points hit will be filtered out, and points hit multiple times will be retained, effectively filtering out some noise points. Therefore, the present invention effectively overcomes various shortcomings in the prior art and has a high industrial utilization value.
[0184] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A method for generating a grid map, characterized in that: include: Step S1, obtaining trajectory data and point cloud data of millimeter wave radar; Step S2, initializing a grid map based on the trajectory data; Step S3, multiplying the point cloud data of the millimeter-wave radar of the current frame by the corresponding trajectory data and transforming them into a world coordinate system; Step S4, obtaining the position of the radar hit point in the grid map based on the point in the world coordinate system obtained by transformation; Step S5, respectively adjusting the probability value of the radar hit point and adjusting the probability value of the unoccupied point, and updating the grid map based on the adjusted probability values; Step S6, detecting whether the processing of the point cloud data of the millimeter-wave radar of all frames is completed, and in response to the processing of the point cloud data of the millimeter-wave radar of all frames not being completed, and based on the processing process of the current frame, completing the processing of the point cloud data of the millimeter-wave radar of all other frames; Step S7, saving the grid map based on the probability value of the radar hit point in each frame; The implementation methods of adjusting the probability value of unoccupied points include: confirming that points on the line between the radar hit point and the vehicle body position other than the radar hit point are unoccupied points; confirming whether the unoccupied point is marked; In response to the unoccupied point being marked, keeping the probability value of the point unchanged; In response to the unoccupied point not being marked, reducing the probability value of the point; The implementation method of adjusting the probability value of the radar hit point includes: Detecting whether the radar hit point is a first hit; In response to the radar hitting point being a first hit, marking the radar hitting point and increasing the probability value of the radar hitting point, and if the radar hitting point of the first hit is again on the line between the radar hitting point and the vehicle body, keeping the probability value of the radar hitting point of the first hit unchanged; In response to the radar hitting point not being the first hit, the probability value of the radar hitting point is increased.
2. The method for generating a grid map according to claim 1, characterized in that: In step S1 , point cloud data of a millimeter-wave radar that meets a preset distance range is obtained.
3. The method for generating a grid map according to claim 1, characterized in that: In step S7, the implementation method of saving the grid map based on the probability value of the radar hit point in each frame includes: confirming whether the probability value of the radar hit point is greater than a probability threshold; In response to the probability value of the radar hit point being greater than the probability threshold, confirming the radar hit point as an occupied point and marking it as a first value; confirming whether the probability value of the radar hit point is equal to the initial value of the grid map; In response to the probability value of the radar hit point being equal to the initial value of the grid map, confirming that the radar hit point is an unknown point and marking it as a second value; In response to the probability value of the radar hit point being less than or equal to the probability threshold, or in response to the probability value of the radar hit point being not equal to an initial value of the grid map, confirming the radar hit point as an unoccupied point and marking it as a third value.
4. The method for generating a grid map according to claim 1, characterized in that: In step S1, the trajectory data is acquired based on visual SLAM data, laser SLAM data, vehicle body data or millimeter wave radar data.
5. A grid map generation system, characterized in that: include: Data acquisition module, used to obtain trajectory data and point cloud data of millimeter-wave radar; An initialization module, used for initializing a grid map based on the trajectory data; A coordinate transformation module, used for multiplying the point cloud data of the millimeter-wave radar of the current frame with the corresponding trajectory data and transforming them into a world coordinate system; A hit point position acquisition module, used to acquire the position of the radar hit point in the grid map based on the point in the world coordinate system obtained by transformation; A probability updating module, used to adjust the probability values of the radar hit points and the unoccupied points respectively, and update the grid map based on the adjusted probability values; The traversal detection module is used to detect whether the processing of the point cloud data of the millimeter-wave radar of all frames is completed, and the coordinate transformation module, the hitting point position acquisition module and the probability update module respond to the processing of the point cloud data of the millimeter-wave radar of all frames not being completed, and continue to complete the processing of the point cloud data of the millimeter-wave radar of all other frames; A map saving module, used for saving the grid map based on the probability value of the radar hit point in each frame; The probability update module also includes: A line point confirmation unit, used to confirm that points other than the radar hit point on the line between the radar hit point and the vehicle body position are unoccupied points; a marking confirmation unit, used to confirm whether the unoccupied point is marked; a probability adjustment unit, configured to keep the probability value of the point unchanged in response to the unoccupied point being marked, In response to the unoccupied point not being marked, reducing the probability value of the point; a first hit detection unit, used to detect whether the radar hit point is a first hit; The probability increasing unit is used to mark the radar hit point and increase the probability value of the radar hit point in response to the radar hit point being the first hit. If the radar hit point of the first hit is again on the line between the radar hit point and the vehicle body, the probability value of the radar hit point of the first hit remains unchanged; in response to the radar hit point not being the first hit, increase the probability value of the radar hit point.
6. The grid map generation system according to claim 5, characterized in that: The data acquisition module acquires point cloud data of the millimeter-wave radar that meets a preset distance range.
7. The grid map generation system according to claim 5, characterized in that: The map storage module includes: an occupied point confirmation unit, configured to confirm whether the probability value of the radar hit point is greater than a probability threshold, and in response to the probability value of the radar hit point being greater than the probability threshold, confirm that the radar hit point is an occupied point and mark it as a first value; an unknown point confirmation unit, configured to confirm whether the probability value of the radar hit point is equal to the initial value of the grid map, and in response to the probability value of the radar hit point being equal to the initial value of the grid map, confirm that the radar hit point is an unknown point and mark it as a second value; An unoccupied point confirmation unit is used to confirm that the radar hit point is an unoccupied point and mark it as a third value in response to the probability value of the radar hit point being less than or equal to the probability threshold, or in response to the probability value of the radar hit point being not equal to the initial value of the grid map.
8. The grid map generation system according to claim 5, characterized in that: The trajectory data acquired in the data acquisition module is generated based on visual SLAM data, laser SLAM data, vehicle body data or millimeter wave radar data.
9. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores program instructions; the processor executes the program instructions to implement the method for generating a grid map according to any one of claims 1 to 4.
10. A storage medium storing program instructions, characterized in that: When the program instructions are executed, the method for generating a grid map according to any one of claims 1 to 4 is implemented.
