An obstacle grid map acquisition method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202610849526.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-12
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2046-06-12
AI Technical Summary
[0003]然而,传统的栅格地图的构建方法通常采用固定的概率模型来更新栅格,即采用相同的覆盖区域和概率分布特征更新栅格,因此,探测精度较差且对于环境的适应性较差,从而导致构建出的栅格地图的探测精度以及对复杂场景的适应能力一般
在本申请实施例中,获取多个探测周期的超声波探测数据之后,可以先基于多个探测周期中的相邻探测周期的超声波探测数据所对应的探测范围,确定被测障碍物的轮廓信息,接着,再对轮廓信息进行分析,得到被测障碍物的类型信息,并基于类型信息生成被测障碍物的概率模型,该概率模型的参数包括概率模型的覆盖区域和概率分布特征,从而基于概率模型对初始栅格地图进行更新,得到障碍物栅格地图。可见,本方案能够基于超声波探测数据提取出被测障碍物的轮廓信息,并基于该轮廓信息所反映的障碍物类型动态确定概率模型的参数,使概率模型的覆盖区域和概率分布特征能够随障碍物的类型进行变化,从而适应不同形状的障碍物的探测特性,提高探测精度。因此,相比于固定概率模型,基于这种动态的概率模型所更新的障碍物栅格地图,能够显著提高障碍物栅格地图的精度以及对复杂场景的适应能力。
Smart Images

Figure CN122486592B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for acquiring obstacle grid maps. Background Technology
[0002] In intelligent driving systems, vehicles can acquire information about their surroundings through various sensors to build high-precision maps, supporting decisions such as path planning and obstacle avoidance. For example, when using ultrasonic sensors to build maps, a grid map approach is typically used. This involves dividing the environmental space around the vehicle into a series of discrete grid cells, each associated with a probability value representing the confidence level that the cell is occupied by an obstacle. By fusing ultrasonic detection data from multiple ultrasonic sensors at multiple time points, the occupancy probability of the grid cells is continuously updated, ultimately forming a probabilistic representation of the surrounding environment.
[0003] However, traditional raster map construction methods typically use a fixed probability model to update the raster, that is, using the same coverage area and probability distribution characteristics to update the raster. As a result, the detection accuracy is poor and the adaptability to the environment is poor, which leads to the raster map having generally poor detection accuracy and adaptability to complex scenes. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and storage medium for acquiring obstacle grid maps, which significantly improves the detection accuracy of obstacle grid maps and their adaptability to complex scenes.
[0005] In a first aspect, embodiments of this application provide a method for obtaining an obstacle grid map, including: Acquire ultrasonic detection data from multiple detection cycles; Based on the detection range corresponding to the ultrasonic detection data of adjacent detection cycles in the plurality of detection cycles, the contour information of the obstacle under test is determined. The contour information is analyzed to obtain the type information of the obstacle being measured; Based on the type information, a probability model of the obstacle under test is generated, wherein the parameters of the probability model include the coverage area and probability distribution characteristics of the probability model; The initial grid map is updated based on the probability model to obtain an obstacle grid map.
[0006] Optionally, determining the contour information of the obstacle based on the detection range corresponding to the ultrasonic detection data of adjacent detection cycles in the plurality of detection cycles includes: Based on the detection range corresponding to the ultrasonic detection data of multiple adjacent detection cycles, the intersection of the detection range boundaries of the multiple adjacent detection cycles is determined, and the intersection of the detection range boundaries is used to indicate the initial contour of the obstacle under test. The contour information is determined based on the intersection of the detection range boundaries of the multiple adjacent detection cycles.
[0007] Optionally, for the first detection cycle among the plurality of detection cycles, the detection range corresponding to the first detection cycle is represented by an arc. The arc is generated within a preset angle range in the detection direction, with the position of the ultrasonic sensor associated with the ultrasonic detection data of the first detection cycle as the center and the reflection distance of the ultrasonic sensor as the radius. The determination of the intersection of the detection range boundaries of the multiple adjacent detection cycles based on the ultrasonic detection data from multiple adjacent detection cycles includes: Tangents are drawn on the arcs corresponding to the multiple adjacent detection cycles to obtain multiple tangent segments; Based on the multiple tangent segments, the intersection of the detection range boundaries is determined.
[0008] Optionally, the step of analyzing the contour information to obtain the type information of the obstacle being measured includes: Curve fitting is performed on the contour information to obtain the curvature feature of the contour information, and the curvature feature is used to indicate the type information.
[0009] Optionally, generating a probability model of the obstacle under test based on the type information includes: Obtain the curvature features corresponding to a predetermined number of tangent segments from the plurality of tangent segments; Based on the curvature characteristics corresponding to the preset number of tangent segments, the coverage area and probability distribution characteristics of the probability model are determined.
[0010] Optionally, updating the initial grid map based on the probability model to obtain an obstacle grid map includes: Based on the coverage area of the probability model, determine the grid cells to be updated in the initial grid map; Based on the probability distribution characteristics of the probability model, the probability of the grid to be updated being occupied in the current detection period is determined; Based on the historical occupied probability of the grid to be updated, the occupied probability of the grid to be updated is updated by Bayesian estimation algorithm to obtain the latest occupied probability of the grid to be updated. The obstacle grid map is determined based on the latest occupied probability of the grid to be updated.
[0011] Optionally, after determining the occupancy probability of the grid to be updated in the current detection period based on the probability distribution characteristics of the probability model, the method further includes: Obtain the number of times the grid to be updated is updated within a preset time period; If the number of updates exceeds the update threshold, the updating of the grid to be updated is stopped.
[0012] Secondly, embodiments of this application provide an obstacle grid map acquisition device, comprising: The data acquisition module is used to acquire ultrasonic detection data from multiple detection cycles; The contour determination module is used to determine the contour information of the obstacle under test based on the detection range corresponding to the ultrasonic detection data of adjacent detection cycles in the plurality of detection cycles. The type acquisition module is used to analyze the contour information to obtain the type information of the obstacle being measured; The model generation module is used to generate a probability model of the obstacle under test based on the type information. The parameters of the probability model include the coverage area and probability distribution characteristics of the probability model. The map acquisition module is used to update the initial grid map based on the probability model to obtain an obstacle grid map.
[0013] Thirdly, embodiments of this application provide an electronic device, the device including: a processor, a memory, and a system bus; The processor and the memory are connected via the system bus; The memory is used to store a program, the program including instructions that, when executed by the processor, cause the processor to perform any of the implementation steps of the obstacle grid map acquisition method described above.
[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the implementation steps of the obstacle grid map acquisition method described above.
[0015] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: In this embodiment, after acquiring ultrasonic detection data from multiple detection cycles, the contour information of the obstacle under test can be determined based on the detection range corresponding to the ultrasonic detection data of adjacent detection cycles. Then, the contour information is analyzed to obtain the type information of the obstacle under test, and a probability model of the obstacle under test is generated based on the type information. The parameters of this probability model include the coverage area and probability distribution characteristics of the probability model. The initial grid map is then updated based on the probability model to obtain an obstacle grid map. It is evident that this solution can extract the contour information of the obstacle under test based on ultrasonic detection data and dynamically determine the parameters of the probability model based on the obstacle type reflected by the contour information. This allows the coverage area and probability distribution characteristics of the probability model to change with the type of obstacle, thereby adapting to the detection characteristics of obstacles of different shapes and improving detection accuracy. Therefore, compared to a fixed probability model, an obstacle grid map updated based on this dynamic probability model can significantly improve the accuracy of the obstacle grid map and its adaptability to complex scenes. Attached Figure Description
[0016] Figure 1 A flowchart illustrating a method for obtaining an obstacle grid map as provided in an embodiment of this application; Figure 2a A schematic diagram illustrating the detection range of the same ultrasonic sensor in three adjacent detection cycles, provided as an embodiment of this application; Figure 2b A schematic diagram illustrating the intersection of the detection range boundaries of the same ultrasonic sensor in three adjacent detection cycles, as provided in an embodiment of this application; Figure 2c A schematic diagram of the coverage area of a probability model provided in an embodiment of this application; Figure 2d A schematic diagram illustrating the probability distribution characteristics of a probability model provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an obstacle grid map acquisition device provided in an embodiment of this application. Detailed Implementation
[0017] As mentioned earlier, traditional raster map construction methods typically employ a fixed probability model to update the raster. Here, a fixed probability model means that regardless of changes in the actual shape, material, or surface curvature of obstacles, the same coverage area and probability distribution characteristics are used for updating. For example, whether the obstacle is a flat wall, a cylindrical utility pole, or a recessed corner, the same sector coverage area and the same probability decay function are used to calculate the raster occupancy probability.
[0018] However, this fixed probability model has several significant technical drawbacks: First, poor detection accuracy. For convex obstacles with large curvature, such as cylinders, the echo signal from the ultrasonic sensor is strong and stable, and the obstacle boundary is relatively clear. If a large coverage area is still used in this case, the grid at the obstacle edge will be over-marked as occupied, reducing the accuracy of obstacle localization. Conversely, for concave obstacles such as corners or recesses, the echo from the ultrasonic sensor may have problems such as multipath reflection or signal attenuation, and the uncertainty of the obstacle boundary is high. If a small coverage area is used in this case, it may lead to missed detection of concave areas. Second, poor environmental adaptability. Because obstacles of different materials and shapes have significantly different reflection characteristics of ultrasonic waves, such as smooth metal surfaces reflecting strongly while rough rubber surfaces reflecting weakly; convex surfaces reflecting concentratedly while concave surfaces reflecting diffusely, etc., the fixed probability model cannot adapt to these changes, resulting in a decrease in map quality in complex scenes.
[0019] It is evident that traditional raster map construction methods have poor detection accuracy and poor adaptability to the environment, resulting in raster maps with generally low detection accuracy and limited adaptability to complex scenes.
[0020] In order to solve the above problems, this application provides a method for obtaining an obstacle grid map, which may include: after obtaining ultrasonic detection data of multiple detection cycles, determining the contour information of the obstacle to be tested based on the detection range corresponding to the ultrasonic detection data of adjacent detection cycles in the multiple detection cycles; then analyzing the contour information to obtain the type information of the obstacle to be tested; and generating a probability model of the obstacle to be tested based on the type information. The parameters of the probability model include the coverage area and probability distribution characteristics of the probability model. The initial grid map is then updated based on the probability model to obtain the obstacle grid map.
[0021] As can be seen, this scheme can extract the contour information of the obstacle being measured based on ultrasonic detection data, and dynamically determine the parameters of the probability model based on the obstacle type reflected by this contour information. This allows the coverage area and probability distribution characteristics of the probability model to change with the type of obstacle, thus adapting to the detection characteristics of obstacles with different shapes. Therefore, compared with a fixed probability model, the obstacle grid map updated based on this dynamic probability model can significantly improve the detection accuracy of the obstacle grid map and its adaptability to complex scenes.
[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0023] Figure 1 This is a flowchart illustrating a method for obtaining an obstacle grid map, as provided in an embodiment of this application. (In conjunction with...) Figure 1 As shown, the obstacle grid map acquisition method provided in this application embodiment may specifically include the following steps S101-S105.
[0024] S101: Acquire ultrasonic detection data for multiple detection cycles.
[0025] The detection cycle refers to the data acquisition cycle of an ultrasonic sensor, that is, the time process of completing one transmission, receiving, and outputting data. Correspondingly, ultrasonic detection data across multiple detection cycles refers to the data continuously collected by the ultrasonic sensor within multiple detection cycles. In the field of intelligent driving, this ultrasonic detection data can be collected by an intelligent vehicle equipped with multiple ultrasonic sensors, thereby reflecting characteristics such as the distance or reflection intensity of obstacles around the intelligent vehicle. For example, an intelligent vehicle can be equipped with 12 ultrasonic sensors, which can be arranged around the vehicle body. For ease of understanding, this application embodiment uses the ultrasonic detection data corresponding to one ultrasonic sensor as an example. In practice, the ultrasonic detection data of ultrasonic sensors in other locations on the vehicle can also be processed according to the method provided in this application embodiment.
[0026] In this embodiment, the ultrasonic detection data includes information such as the direct reflection distance, indirect reflection distance, reflection intensity, and detection time of the ultrasonic sensor. In practice, at least 30 detection cycles of ultrasonic detection data can be collected and stored first, thereby improving the continuity and stability of subsequent contour extraction and probabilistic model generation. Furthermore, multiple detection cycles can refer to consecutive cycles or multiple effective cycles arranged chronologically within a short period.
[0027] Furthermore, when acquiring ultrasonic detection data, the intelligent vehicle's own location information can also be obtained. This location information includes the lateral distance, longitudinal distance, heading angle, and corresponding acquisition time of the vehicle's rear axle center in the world coordinate system. The rear axle center can be understood as a vehicle coordinate reference point, used to uniformly describe the vehicle's trajectory. Accordingly, this location information can be obtained through an onboard positioning system.
[0028] In this way, after obtaining the ultrasonic detection data and the vehicle's own position information, the ultrasonic detection data and position information can be aligned one by one according to the acquisition time to obtain the position and orientation of the ultrasonic sensor in the world coordinate system for each detection cycle. In this way, by aligning the data in time and space, the continuity and accuracy of subsequent contour calculations can be improved, avoiding contour recognition errors caused by missing or misaligned data.
[0029] In addition, the installation position information of each ultrasonic sensor relative to the rear axle center of the intelligent vehicle can be obtained, such as the lateral installation distance, longitudinal installation distance, ground clearance, and orientation angle of each ultrasonic sensor in the vehicle coordinate system. Accordingly, this installation position information can be obtained through on-site measurement or through the vehicle's factory calibration parameters; this application embodiment is not specifically limited to this.
[0030] It should be noted that, since the ultrasonic detection data or the location information of the intelligent vehicle itself may involve data related to user or enterprise privacy, when the embodiments of this application are applied to specific products or technologies, permission or consent from users or enterprises is required. Furthermore, the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, before acquiring ultrasonic detection data or the location information of the intelligent vehicle itself, permission or consent from users or enterprises must be obtained to authorize the data acquisition operation.
[0031] S102: Determine the contour information of the obstacle being measured based on the detection range corresponding to the ultrasonic detection data of adjacent detection cycles in multiple detection cycles.
[0032] In this embodiment of the application, since the vehicle is in motion, the position and orientation of the same ultrasonic sensor are different at different times, and its detection range is also different. Therefore, by analyzing the detection range corresponding to the ultrasonic detection data of adjacent detection cycles in multiple detection cycles, the position boundary of the obstacle under test can be inferred, thereby obtaining the contour information of the obstacle.
[0033] Accordingly, the detection range refers to the area that an ultrasonic sensor can cover within a single detection cycle, thus defining the spatial range in which obstacles may exist. Taking the first detection cycle out of multiple detection cycles as an example, since the ultrasonic sensor has a certain detection orientation and ranging radius, the detection range corresponding to this first detection cycle can be represented as an arc-shaped area formed with the ultrasonic sensor's position as the center, the reflection distance as the radius, and within a preset angle range along the detection orientation direction. For ease of understanding, the following description is provided in conjunction with the accompanying drawings.
[0034] Combination Figure 2aAs shown, taking three adjacent detection cycles t1, t2, and t3 as an example, since the ultrasonic sensor moves with the vehicle, sns_t1, sns_t2, and sns_t3 can represent three positions of the same ultrasonic sensor during the vehicle's movement. Correspondingly, the three arcs formed by these three positions represent the detection range of the ultrasonic sensor in the three adjacent detection cycles, where the preset angle is 30 degrees.
[0035] Based on this, regarding the implementation process of step S102 above, firstly, the intersection of the detection range boundaries of multiple adjacent detection cycles can be determined based on the detection ranges corresponding to the ultrasonic detection data of multiple adjacent detection cycles. Here, the intersection of detection range boundaries refers to the common boundary area of the detection ranges of adjacent detection cycles. Since ultrasonic sensors usually have a certain beam angle, a single detection cannot accurately provide a single point on the obstacle. However, the superposition and comparison of the detection ranges of adjacent cycles can reconstruct the boundary shape of the obstacle. Therefore, the intersection of detection range boundaries can indicate the initial contour of the obstacle being measured. In this way, the contour information can be determined subsequently based on the intersection of the detection range boundaries of multiple adjacent detection cycles.
[0036] As can be seen, this solution makes full use of the multi-cycle data generated by vehicle movement, so that the detection results obtained by a single ultrasonic sensor at different positions are mutually constrained, thereby reducing the impact of the uncertainty of single-frame ultrasonic ranging on obstacle contour judgment. This enables the acquisition of an initial contour that is closer to the actual obstacle boundary, reducing the situation of misjudging drivable areas as obstacle-occupied areas.
[0037] Regarding the process of determining the intersection of the detection range boundaries, in practical implementation, tangents can be drawn on the arcs corresponding to multiple adjacent detection cycles to obtain multiple tangent segments. Here, a tangent segment can be understood as a line segment that approximates the actual surface of the obstacle, determined based on the arc boundaries of two adjacent detection cycles. Since the same ultrasonic sensor will detect the same obstacle at different positions during vehicle movement, the arc boundaries of adjacent cycles contain the boundary constraints of the obstacle under different detection perspectives. By drawing tangents on adjacent arcs, local line segments on the obstacle surface can be approximated.
[0038] Next, based on multiple tangent segments, the intersection of the detection range boundaries is determined. In this way, by fitting the contour boundary with circular arc tangents, the actual contour of the obstacle can be more closely approximated, reducing contour distortion.
[0039] Specifically, multiple tangent segments can connect the boundaries of adjacent arcs to form continuous contour segments of the obstacle. Therefore, the intersection of the detection range boundaries can be determined based on multiple tangent segments. For ease of understanding, the following description is provided in conjunction with the accompanying drawings.
[0040] Combination Figure 2b As shown, taking three adjacent detection cycles t1, t2, and t3 as an example, drawing tangents on the arcs corresponding to sns_t1 and sns_t2 yields a tangent segment formed by the combination of t1 and t2; similarly, drawing tangents on the arcs corresponding to sns_t2 and sns_t3 yields a tangent segment formed by the combination of t2 and t3. These two tangent segments together constitute part of the initial contour of the obstacle being measured (i.e., the red line segment in the figure).
[0041] Similarly, when the number of detection cycles reaches a preset number, such as 30 detection cycles, a continuous polygonal line composed of multiple tangent segments can be obtained, which can represent the contour information of the obstacle being measured.
[0042] In practical applications, this preset number can be dynamically adjusted based on the detection quality. For example, when the intersection of the detection ranges of adjacent cycles is relatively stable (i.e., the tangent position changes little), it indicates that the obstacle shape is regular, and the preset number can be reduced; when the intersection changes drastically, it indicates that the obstacle shape is complex or the vehicle's motion state changes greatly, and the preset number can be increased to improve the contour stability.
[0043] S103: Analyze the contour information to obtain the type information of the obstacle being measured.
[0044] Here, type information refers to the feature information used to describe the contour shape of the obstacle being measured. It can reflect whether the obstacle is closer to a flat surface, a curved surface, or a surface with different curvature changes. In the embodiments of this application, type information is not limited to semantic categories such as vehicle, wall, or column, but can also be morphological categories such as convex, concave, or linear.
[0045] Accordingly, when analyzing contour information, curve fitting can be performed to obtain the curvature characteristics of the contour information. Here, curve fitting can transform the contour information indicated by multiple tangent segments into a smoother curve, thus enabling the curve to represent the obstacle surface more continuously. Correspondingly, the curvature characteristics describe the degree of curvature of the corresponding curve; a smaller curvature generally indicates that the obstacle surface is closer to flat, while a larger curvature indicates a greater degree of curvature. Therefore, curvature characteristics can be used to indicate the type of obstacle being measured.
[0046] In practical implementation, the contour information can be fitted with Bézier or B-spline to obtain the curvature of the smooth curve on each segment of the polygon. Both Bézier and B-spline fitting can be used to generate smooth curves from discrete polygons, thereby reducing local abrupt changes caused by noise at individual measurement points or tangent segments. For example, after 30 detection cycles form a continuous polygon, B-spline fitting can be performed based on this polygon to obtain a smooth contour curve, and then the curvature of this curve at the corresponding positions of each tangent segment can be calculated. If the curvature change is small, the obstacle contour can be considered to be relatively straight; if the curvature change is significant, the obstacle contour can be considered to have strong bending characteristics. In this way, by using curvature characteristics to indicate obstacle type information, different probability models can be generated for obstacles with different contour shapes, instead of using a fixed standard probability model for all obstacles. This ensures that the subsequently generated probability models match the actual contour shape of the obstacles, improving the rationality of the probability model's coverage area and probability distribution.
[0047] S104: Based on type information, generate a probability model of the obstacle being measured. The parameters of the probability model include the coverage area and probability distribution characteristics of the probability model.
[0048] Here, a probabilistic model refers to a model that describes the area that an obstacle may occupy in space and the probability distribution of that occupancy. The coverage area of the probabilistic model refers to the physical spatial range covered when the model is applied to a raster map; that is, the area where probabilities need to be updated based on the model. The probability distribution characteristics refer to the changing pattern of the probability of an obstacle occupying a location at different locations within the coverage area. For example, the probability of an obstacle occupying a location closer to the fitted contour curve may be higher; the probability of an obstacle occupying a location further away from the fitted contour curve may gradually decrease. Since different obstacle contour shapes correspond to different reflection characteristics and spatial occupancy relationships, embodiments of this application can generate variable probabilistic models based on type information to match the actual contour shape of the obstacle.
[0049] Based on this, in the process of generating a probabilistic model of the obstacle being measured, the curvature features corresponding to a predetermined number of tangent segments from a set number of tangent segments can be obtained first. In practical applications, the predetermined number can be set to 3 to 5, that is, the curvature features corresponding to the polyline segments under 3 to 5 detection cycles are obtained as input parameters of the probabilistic model. Furthermore, these tangent segments can be the most recently generated tangent segments to more accurately reflect the local morphology of the obstacle contour near the current detection cycle.
[0050] Next, based on the curvature characteristics corresponding to the preset number of tangent segments, the coverage area and probability distribution characteristics of the probability model are determined. For example, with a preset number of 3, when the curvature characteristics corresponding to these three tangent segments indicate that the outline of the obstacle being measured is close to straight, a probability model suitable for a straight obstacle surface can be generated. Its coverage area can extend along the direction of the tangent segments, and the probability distribution can be higher near the tangent segments or the fitted curve, gradually decreasing towards both sides. When the curvature characteristics corresponding to these three tangent segments indicate that the outline of the obstacle being measured has obvious curvature, the coverage area can be adjusted according to the curvature direction and magnitude to make the coverage area fit the curved surface better, and the occupancy probability of each position within the coverage area can be adjusted accordingly. Thus, the variable probability model can change with the type of obstacle outline in terms of both coverage area and probability distribution, avoiding the errors caused by using the same fixed standard model for all obstacles. For ease of understanding, the following description is provided with reference to the accompanying drawings.
[0051] Combination Figure 2c As shown, taking three adjacent detection periods t1, t2, and t3 as an example, based on the curvature characteristics corresponding to the broken line segments (i.e., the red line segments in the figure) of these three detection periods, the coverage area of the corresponding probability model can be determined to be the area enclosed by the green and red lines in the figure. Combined with... Figure 2d As shown in the figure, regions 1 and 2 can be respectively represented by the probability that the position under that region is occupied by the measured obstacle, so as to represent the probability distribution characteristics of the probability model.
[0052] Furthermore, in this embodiment, the probability distribution of the probability model can be adjusted based on the measurement distance of the ultrasonic sensor. This is because ultrasonic ranging inherently involves a certain measurement error, which is usually more pronounced at longer detection distances. Therefore, by introducing a distance uncertainty factor to reflect the impact of ranging uncertainty on the grid occupancy probability, the probability model more accurately reflects the actual error characteristics of the ultrasonic detection data, thereby improving the reliability of the grid map update results.
[0053] In practice, this distance uncertainty factor can be constructed based on the detection distance, for example, through functions such as the square root relationship or linear relationship of the distance. The greater the detection distance, the greater the distance uncertainty can be, and the more dispersed the probability distribution can be; the closer the detection distance, the smaller the distance uncertainty can be, and the more concentrated the probability distribution can be.
[0054] S105: Update the initial grid map based on the probability model to obtain the obstacle grid map.
[0055] The initial raster map refers to a raster map that has been created in advance but has not yet been updated, or it can be a raster map that was generated in the previous moment and has historical occupancy probabilities stored.
[0056] Accordingly, when updating the initial grid map based on the probabilistic model, the grid cells to be updated in the initial grid map can first be determined based on the coverage area of the probabilistic model. These grid cells are those that fall within the coverage area of the probabilistic model and require updating based on the occupied probability of the probabilistic model in the current detection period.
[0057] Specifically, when determining the raster to be updated, the physical coordinates (x, y) within the probabilistic model's coverage area are first converted to raster coordinates (dx, dy), where dx and dy represent the offsets of the physical coordinates relative to the raster resolution. Next, the raster's row and column positions (cellX, cellY) on the map are calculated based on the map resolution. Map resolution refers to the size of a raster in real physical space; for example, a raster might correspond to a 0.1m x 0.1m area. Then, based on the row and column positions (cellX, cellY), a one-dimensional raster index can be calculated for quick location of the corresponding raster within the map data structure. Finally, based on the probabilistic model's coverage area, the raster index corresponding to the raster to be updated is determined.
[0058] Next, based on the probability distribution characteristics of the probability model, the occupancy probability of the raster to be updated in the current detection period is determined. In other words, for each raster falling within the coverage area of the probability model, the occupancy probability corresponding to the center point of the raster or the position of the physical area corresponding to the raster in the probability model can be read or calculated as the occupancy probability of the raster to be updated in the current detection period.
[0059] Then, based on the historical occupancy probability of the grid to be updated, the occupancy probability of the grid to be updated is updated using a Bayesian estimation algorithm to obtain the latest occupancy probability of the grid to be updated. Thus, based on the latest occupancy probability of the grid to be updated, the obstacle grid map is determined. Among them, the historical occupancy probability refers to the occupancy probability obtained after multiple detections of the grid to be updated at the previous moment or before, which belongs to prior information. The occupancy probability of the grid to be updated in the current detection period refers to the latest detection information obtained based on the current ultrasonic detection data and probability model. Based on this, the probability update can be completed by fusing the historical occupancy probability and the occupancy probability of the grid to be updated in the current detection period using a Bayesian estimation algorithm, so as to obtain the latest occupancy probability of the grid to be updated. For ease of understanding, the following is an example introduction with reference to formula (1).
[0060] As an example, Bayesian estimation can be performed using the following formula (1): P(H|O)=P(O|H)·P(H) / P(O) (1) Wherein, P(H|O) represents the latest occupied probability of the grid to be updated, P(O|H) represents the occupied probability of the grid to be updated in the current detection period, P(H) represents the historical occupied probability of the grid to be updated, and P(O) represents the normalization factor.
[0061] Therefore, if a grid cell had a high probability of being occupied in the previous time step, and the probability model for the current detection cycle also considers the grid cell to have a high probability of being occupied, then the updated latest occupancy probability will remain high. Conversely, if a grid cell had a high historical probability of being occupied, but current detections show a low probability of occupancy, then the occupancy probability of the grid cell can be gradually reduced through Bayesian estimation. This allows for continuous correction of the grid map based on ultrasonic detection data, better adapting to environmental changes and improving the accuracy and stability of ultrasonic grid detection.
[0062] Furthermore, in this embodiment, after determining the occupancy probability of the grid to be updated during the current detection period, the number of updates to the grid within a preset time period can be further obtained. If the number of updates exceeds a threshold, updating the grid can be stopped. This is because if a grid has already undergone multiple occupancy probability updates in a short period, adding new ultrasonic sensor data to that grid may lead to overly dense grid data, distorting local environmental features, or amplifying the impact of noise points on the map. Therefore, when the number of updates exceeds the threshold, updating the grid can be stopped, thereby reducing the computational load in the localization and matching phase, reducing the impact of noise points on map accuracy, and making the overall map smoother and more stable. Simultaneously, since the grid has already obtained sufficient detection information in a short period, stopping updates will not significantly reduce the grid's reliability; on the contrary, it helps avoid excessive probability concentration or local error accumulation caused by repeated detection.
[0063] Furthermore, in the field of intelligent driving, as the vehicle moves, if the intelligent vehicle has moved beyond the resolution of a grid map, the entire grid map can be translated or repositioned according to the vehicle's pose change, so that the grid map continuously covers the key areas around the vehicle, thereby ensuring that the rear axle center of the vehicle is always near the center of the grid map, and that the effective detection area around the vehicle is always within the map range, which facilitates path planning and obstacle avoidance during automatic parking.
[0064] Based on the relevant content of steps S101-S105 above, it can be seen that in this embodiment, after acquiring ultrasonic detection data for multiple detection cycles, the contour information of the obstacle to be measured can be determined first based on the detection range corresponding to the ultrasonic detection data of adjacent detection cycles in the multiple detection cycles. Then, the contour information is analyzed to obtain the type information of the obstacle to be measured, and a probability model of the obstacle to be measured is generated based on the type information. The parameters of the probability model include the coverage area and probability distribution characteristics of the probability model. Thus, the initial grid map is updated based on the probability model to obtain an obstacle grid map. It can be seen that this solution can extract the contour information of the obstacle to be measured based on ultrasonic detection data, and dynamically determine the parameters of the probability model based on the obstacle type reflected by the contour information. This allows the coverage area and probability distribution characteristics of the probability model to change with the type of obstacle, thereby adapting to the detection characteristics of obstacles of different shapes and improving detection accuracy. Therefore, compared with a fixed probability model, the obstacle grid map updated based on this dynamic probability model can significantly improve the accuracy of the obstacle grid map and its adaptability to complex scenes.
[0065] Based on the obstacle grid map acquisition method provided in the above embodiments, this application embodiment can also provide an obstacle grid map acquisition device. The obstacle grid map acquisition device will be described below with reference to embodiments and accompanying drawings.
[0066] Figure 3 This is a schematic diagram of the structure of an obstacle grid map acquisition device provided in an embodiment of this application. (Combined with...) Figure 3 As shown, the obstacle grid map acquisition device 300 provided in this application embodiment includes: The data acquisition module 301 is used to acquire ultrasonic detection data from multiple detection cycles; The contour determination module 302 is used to determine the contour information of the obstacle under test based on the detection range corresponding to the ultrasonic detection data of adjacent detection cycles in the plurality of detection cycles. The type acquisition module 303 is used to analyze the contour information to obtain the type information of the obstacle under test; The model generation module 304 is used to generate a probability model of the obstacle under test based on the type information. The parameters of the probability model include the coverage area and probability distribution characteristics of the probability model. The map acquisition module 305 is used to update the initial grid map based on the probability model to obtain an obstacle grid map.
[0067] Optionally, the contour determination module 302 includes: The intersection determination module is used to determine the intersection of the detection range boundaries of the multiple adjacent detection cycles based on the detection range corresponding to the ultrasonic detection data of multiple adjacent detection cycles. The intersection of the detection range boundaries is used to indicate the initial contour of the obstacle under test. The contour sub-determination module is used to determine the contour information based on the intersection of the detection range boundaries of the multiple adjacent detection cycles.
[0068] Optionally, for the first detection cycle among the plurality of detection cycles, the detection range corresponding to the first detection cycle is represented by an arc. The arc is generated within a preset angle range in the detection direction, with the position of the ultrasonic sensor associated with the ultrasonic detection data of the first detection cycle as the center and the reflection distance of the ultrasonic sensor as the radius. The intersection determination module is specifically used for: Tangents are drawn on the arcs corresponding to the multiple adjacent detection cycles to obtain multiple tangent segments; Based on the multiple tangent segments, the intersection of the detection range boundaries is determined.
[0069] Optionally, the type acquisition module 303 is specifically used for: Curve fitting is performed on the contour information to obtain the curvature feature of the contour information, and the curvature feature is used to indicate the type information.
[0070] Optionally, the model generation module 304 is specifically used for: Obtain the curvature features corresponding to a predetermined number of tangent segments from the plurality of tangent segments; Based on the curvature characteristics corresponding to the preset number of tangent segments, the coverage area and probability distribution characteristics of the probability model are determined.
[0071] Optionally, the map acquisition module 305 is specifically used for: Based on the coverage area of the probability model, determine the grid cells to be updated in the initial grid map; Based on the probability distribution characteristics of the probability model, the probability of the grid to be updated being occupied in the current detection period is determined; Based on the historical occupied probability of the grid to be updated, the occupied probability of the grid to be updated is updated by Bayesian estimation algorithm to obtain the latest occupied probability of the grid to be updated. The obstacle grid map is determined based on the latest occupied probability of the grid to be updated.
[0072] Optionally, the obstacle grid map acquisition device 300 further includes: The update count acquisition module is used to acquire the number of times the grid to be updated is updated within a preset time period; The update stop module is used to stop updating the grid to be updated when the number of updates exceeds the update number threshold.
[0073] Furthermore, embodiments of this application also provide an electronic device, including: a processor, a memory, and a system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, the one or more programs including instructions that, when executed by the processor, cause the processor to perform any of the implementation steps of the obstacle grid map acquisition method described above.
[0074] Furthermore, embodiments of this application also provide a computer-readable storage medium storing instructions that, when executed on an electronic device, enable the implementation of any step of the above-described method for acquiring an obstacle grid map.
[0075] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application. It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on describing the differences from other embodiments. The same or similar parts between the various embodiments can be referred to mutually.
[0076] The system disclosed in the embodiments is described simply because it corresponds to the method disclosed in the embodiments; relevant details can be found in the method section.
[0077] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0078] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An obstacle grid map acquisition method characterized by comprising: include: Acquire ultrasonic detection data from multiple detection cycles; Based on the detection range corresponding to the ultrasonic detection data of adjacent detection cycles in the plurality of detection cycles, the contour information of the obstacle under test is determined. The contour information is analyzed to obtain the type information of the obstacle being measured; Based on the type information, a probability model of the obstacle under test is generated, wherein the parameters of the probability model include the coverage area and probability distribution characteristics of the probability model; The initial grid map is updated based on the probability model to obtain an obstacle grid map; Specifically, for the first detection cycle among the plurality of detection cycles, the detection range corresponding to the first detection cycle is represented by an arc. The arc is generated within a preset angle range in the detection direction, with the position of the ultrasonic sensor associated with the ultrasonic detection data of the first detection cycle as the center and the reflection distance of the ultrasonic sensor as the radius. The determination of the outline information of the obstacle being measured based on the detection range corresponding to the ultrasonic detection data of adjacent detection cycles among the multiple detection cycles includes: Tangents are drawn on the arcs corresponding to multiple adjacent detection cycles to obtain multiple tangent segments; Based on the multiple tangent segments, the intersection of the detection range boundaries is determined, and the intersection of the detection range boundaries is used to indicate the initial contour of the obstacle under test. The contour information is determined based on the intersection of the detection range boundaries of the multiple adjacent detection cycles.
2. The method for obtaining an obstacle grid map according to claim 1, characterized in that, The analysis of the contour information to obtain the type information of the obstacle being measured includes: Curve fitting is performed on the contour information to obtain the curvature feature of the contour information, and the curvature feature is used to indicate the type information.
3. The method for obtaining an obstacle grid map according to claim 2, characterized in that, The step of generating a probability model of the obstacle under test based on the type information includes: Obtain the curvature features corresponding to a predetermined number of tangent segments from the plurality of tangent segments; Based on the curvature characteristics corresponding to the preset number of tangent segments, the coverage area and probability distribution characteristics of the probability model are determined.
4. The method for obtaining an obstacle grid map according to any one of claims 1 to 3, characterized in that, The process of updating the initial grid map based on the probability model to obtain an obstacle grid map includes: Based on the coverage area of the probability model, determine the grid cells to be updated in the initial grid map; Based on the probability distribution characteristics of the probability model, the probability of the grid to be updated being occupied in the current detection period is determined; Based on the historical occupied probability of the grid to be updated, the occupied probability of the grid to be updated is updated by Bayesian estimation algorithm to obtain the latest occupied probability of the grid to be updated. The obstacle grid map is determined based on the latest occupied probability of the grid to be updated.
5. The method for obtaining an obstacle grid map according to claim 4, characterized in that, After determining the occupancy probability of the grid to be updated in the current detection period based on the probability distribution characteristics of the probability model, the method further includes: Obtain the number of times the grid to be updated is updated within a preset time period; If the number of updates exceeds the update threshold, the updating of the grid to be updated is stopped.
6. A device for acquiring an obstacle grid map, characterized in that, include: The data acquisition module is used to acquire ultrasonic detection data from multiple detection cycles; The contour determination module is used to determine the contour information of the obstacle under test based on the detection range corresponding to the ultrasonic detection data of adjacent detection cycles in the plurality of detection cycles. The type acquisition module is used to analyze the contour information to obtain the type information of the obstacle being measured; The model generation module is used to generate a probability model of the obstacle under test based on the type information. The parameters of the probability model include the coverage area and probability distribution characteristics of the probability model. The map acquisition module is used to update the initial grid map based on the probability model to obtain an obstacle grid map; Specifically, for the first detection cycle among the plurality of detection cycles, the detection range corresponding to the first detection cycle is represented by an arc. The arc is generated within a preset angle range in the detection direction, with the position of the ultrasonic sensor associated with the ultrasonic detection data of the first detection cycle as the center and the reflection distance of the ultrasonic sensor as the radius. The contour determination module includes: The intersection determination module is used to draw tangents on the arcs corresponding to multiple adjacent detection cycles to obtain multiple tangent segments; based on the multiple tangent segments, the intersection of the detection range boundaries is determined, and the intersection of the detection range boundaries is used to indicate the initial contour of the obstacle being measured; The contour sub-determination module is used to determine the contour information based on the intersection of the detection range boundaries of the multiple adjacent detection cycles.
7. An electronic device, characterized in that, The device includes: a processor, a memory, and a system bus; The processor and the memory are connected via the system bus; The memory is used to store a program, the program including instructions that, when executed by the processor, cause the processor to perform the steps of the obstacle grid map acquisition method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the obstacle grid map acquisition method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Obstacle grid marking method based on occupancy probability value and robot
CN118688828A
Travelable area detection method and device and storage medium
CN119413190A
Autonomous path planning method for dredger based on reinforcement learning
CN120802954A