Cross-floor memory path reconstruction method, device, equipment and vehicle
By enhancing the memory paths in the intelligent parking system and matching the lane line point cloud data, lane line segmentation is reconstructed, and the problem of non-optimal memory paths is solved, improving parking efficiency and effect.
Patent Information
- Application Number
- CN202411293595.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-17
AI Technical Summary
In intelligent parking systems, due to sensor errors during map creation or obstacle avoidance, the learning memory path is not optimal, resulting in insufficient optimization of the actual parking path, low efficiency and poor parking effect.
By obtaining the original memory path and lane line point cloud data, path point density processing and matching are performed, lane line points gathering, lane line segments are constructed, and path reconstruction is performed based on these segments to generate target memory paths.
The driving path quality and parking effect during actual parking are improved, and the poor experience, low efficiency and parking failure caused by non-optimal memory paths are avoided.
Smart Images

Figure CN119146991A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of path planning, and in particular to a method, device, equipment and vehicle for reconstructing a cross-floor memory path. Background Art
[0002] With the development of intelligent driving technology, the memory parking function in the intelligent parking system is becoming increasingly popular. In the new environment, the intelligent parking system enters the path learning mode. When the driver drives the vehicle from the parking starting point to the target parking point, the parking system collects perception data and on-board sensor data to build a regional map and store the path to complete the memory path learning. After that, when the vehicle comes to any position of the memory path again, the memory parking function can be turned on. The system automatically finds a matching path and controls the vehicle to drive to the target parking spot, finds an empty space to complete parking and other operations and feedbacks the situation.
[0003] However, when building a map in path learning mode, the learned path may not be optimal due to sensor errors or obstacle avoidance, such as non-dense, redundant detours, and other issues. If the memory path is not optimized, when performing memory parking, the memory path used as a reference line for local path planning will make the actual driving path less optimized, resulting in poor parking tracking experience, low driving efficiency, and even parking failure. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method, device, equipment and vehicle for reconstructing a cross-floor memory path to solve the problem that in the memory parking function, the learned memory path is not optimal due to various reasons during map construction, thereby affecting the driving path and parking effect during actual parking.
[0005] In a first aspect, an embodiment of the present invention provides a method for reconstructing a cross-floor memory path, the method comprising:
[0006] Obtain the original memory path and the lane line point cloud data of the vehicle during the current memory path;
[0007] Densifying the original path points of multiple different floors in the original memory path to obtain multiple path points, and constructing a path point sequence based on the multiple path points;
[0008] Based on matching the path points in the path point sequence with the point clouds in the lane line point cloud data, a corresponding relationship between the point clouds and the path points is obtained, and based on the corresponding relationship, all point clouds in the lane line point cloud data are divided into different types of lane line point cloud sets;
[0009] Lane line segments are constructed using different types of lane line point cloud sets, and paths are reconstructed based on the lane line segments to obtain a target memory path.
[0010] Furthermore, the densification processing is performed on the original path points of multiple different floors in the original memory path to obtain multiple path points, and a path point sequence is constructed based on the multiple path points, including:
[0011] Traversing the floor attributes of each original path point, taking the original path point whose floor attributes have changed as the key path point, and adding the floor attributes corresponding to the key path point to the feature array;
[0012] Performing an equal-interval densification process on all original path points in the original path to obtain an initial path point sequence, and calculating a matching degree between each path point in the initial path point sequence and the key path point;
[0013] Determine the target path point corresponding to the key path point in the initial path point sequence by using the matching degree;
[0014] Extracting the floor attribute corresponding to the key path point from the feature array, and adding the floor attribute to the target path point corresponding to the key path point in the initial path point sequence;
[0015] The path point sequence is constructed based on the target path point carrying the floor attribute and other path points, wherein the other data points are data points in the initial path point sequence that do not correspond to the key path points.
[0016] Furthermore, the matching of the path points in the path point sequence with the point cloud in the lane line point cloud data to obtain the corresponding relationship between the point cloud and the path points includes:
[0017] Calculating the correlation between the point cloud in the lane line point cloud data and each path point in the path point sequence;
[0018] The path points whose correlations meet preset conditions are used as the path points for point cloud matching;
[0019] Construct a correspondence between each point cloud in the lane line point cloud data and a path point matched with the point cloud.
[0020] Furthermore, the calculating of the correlation between the point cloud in the lane line point cloud data and each path point in the path point sequence includes:
[0021] Acquire a first spatial coordinate and a first floor attribute corresponding to each point cloud in the lane point cloud data, and acquire a second spatial coordinate and a second floor attribute corresponding to each path point in the path point sequence;
[0022] Calculating the Euclidean distance between the point cloud and the path point based on the first spatial coordinates and the second spatial coordinates, and determining the attribute difference between the first floor attribute and the second floor attribute;
[0023] The correlation between the point cloud and each of the path points is calculated based on the Euclidean distance and the attribute difference.
[0024] Furthermore, the dividing all point clouds in the lane point cloud data into different types of lane point cloud sets based on the corresponding relationship includes:
[0025] Acquire the path point corresponding to each point cloud based on the corresponding relationship, and determine the spatial coordinates of the path point;
[0026] For each point cloud, construct a coordinate vector using a first spatial coordinate corresponding to the point cloud, a spatial coordinate of a path point matched by the point cloud, and a spatial coordinate of a next path point;
[0027] Analyzing the orientation relationship of the coordinate vector to obtain the point cloud orientation type of the point cloud;
[0028] Construct the corresponding lane line point cloud set based on the point cloud of the same point cloud orientation type.
[0029] Furthermore, the construction of lane line segments using different types of lane line point cloud sets includes:
[0030] Optimizing the point cloud in the lane line point cloud set to obtain an optimized lane line point cloud set;
[0031] Obtaining adjacent point clouds in the optimized lane line point cloud set;
[0032] Using the adjacent point clouds to construct a relationship vector, and obtaining the sequence number difference between the adjacent point clouds;
[0033] Calculating angle data between adjacent point clouds using the relationship vector, and taking adjacent point clouds whose angle data fall within a preset angle range as inflection points;
[0034] The adjacent point clouds whose serial number difference is greater than the preset difference value are regarded as discontinuity points;
[0035] The lane line point cloud is segmented using the inflection points and the discontinuity points to obtain the lane line segments.
[0036] Furthermore, the path reconstruction based on the lane line segmentation to obtain the target memory path includes:
[0037] Traversing the length of each lane line segment, and taking the lane line segment whose length meets the preset length as the target lane line segment;
[0038] Acquire a path to be optimized from the target lane line segment, and select a starting point and an end point from the path to be optimized;
[0039] A path is reconstructed based on the starting point and the ending point to obtain reconstructed path segments;
[0040] A collision test is performed on the reconstructed path segment. If the reconstructed path segment passes the collision test, the target memory path is constructed using the reconstructed path segment.
[0041] Furthermore, the selecting a starting point and an ending point from the path to be optimized includes:
[0042] Acquire two reference points from the point cloud corresponding to the target lane segment, and construct a reference vector based on the spatial coordinates of the reference points;
[0043] Obtaining a connection vector corresponding to each pair of adjacent points in the path to be optimized;
[0044] Calculating the vector inner product and vector modulus of the connection vector and the reference vector;
[0045] Based on the vector inner product and the vector modulus, determining an angle relationship between a path point in the path to be optimized and the target lane line segment;
[0046] The angle relationship is used to select parallel points corresponding to the target lane line segment, and a point is taken from each end of the parallel points as the starting point and the ending point respectively.
[0047] Furthermore, the path reconstruction is performed based on the starting point and the ending point to obtain the reconstructed path segmentation, including:
[0048] Acquire a first distance between the starting point and the ending point;
[0049] Comparing the first distance with a preset threshold to obtain a comparison result, and performing path reconstruction according to a path reconstruction strategy corresponding to the comparison result to obtain a candidate path segment, wherein the candidate path segment includes a plurality of candidate path points;
[0050] Acquire matching points corresponding to the candidate path points from the original memory path, and acquire attribute information of the matching points;
[0051] The candidate path points in the candidate path segment are assigned values using the attribute information of the matching points, and the reconstructed path segment is constructed using the assigned candidate path points.
[0052] Further, performing path reconstruction according to the path reconstruction strategy corresponding to the comparison result to obtain candidate path segments includes:
[0053] If the first distance is less than a preset threshold, obtaining a heading and a point spacing, calculating a connection path using the spatial coordinates corresponding to the starting point, the spatial coordinates corresponding to the end point, the heading and the point spacing, and constructing the candidate path segment based on the connection path;
[0054] If the first distance is greater than or equal to the preset threshold, a first candidate point and a second candidate point are obtained at the starting point and the ending point, and the candidate path segment is constructed based on the starting point, the first candidate point, the second candidate point and the ending point; wherein the distance between the first candidate point and the starting point is greater than the preset distance, and the distance between the second candidate point and the ending point is greater than the preset distance.
[0055] Further, the performing collision test on the reconstructed path segments includes:
[0056] Obtaining the nearest point of each point cloud in the lane line point cloud data on the target memory path, and calculating a second distance between each point cloud in the lane line point cloud data and the corresponding nearest point;
[0057] Using the second distance to determine whether the point cloud is located in a corresponding collision range, wherein the collision range is constructed with the nearest point of the point cloud on the target memory path as the center and a preset expansion radius;
[0058] If the point cloud is within the collision range, counting is performed and it is detected whether N point clouds appear consecutively within the collision range. If N point clouds appear consecutively within the collision range, it is determined that the collision test has failed; or, if N point clouds appear consecutively within the collision range, it is determined that the collision test has passed.
[0059] In a second aspect, an embodiment of the present invention provides a device for reconstructing a cross-floor memory path, the device comprising:
[0060] An acquisition module is used to obtain the original memory path and the lane line point cloud data of the vehicle during the current memory path;
[0061] A processing module, configured to perform densification processing on a plurality of the original path points in the original memory path to obtain a plurality of path points, and construct a path point sequence based on the plurality of path points;
[0062] A matching module, configured to match the path points in the path point sequence with the point clouds in the lane line point cloud data to obtain a correspondence between the point clouds and the path points, and to divide all point clouds in the lane line point cloud data into different types of lane line point cloud sets based on the correspondence;
[0063] The reconstruction module is used to construct lane line segments using different types of lane line point cloud sets, and to reconstruct the path based on the lane line segments to obtain the target memory path.
[0064] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0065] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method of the first aspect or any corresponding embodiment thereof.
[0066] In a fifth aspect, an embodiment of the present invention provides a vehicle, comprising: a path planning system and a controller; wherein the controller stores instructions for controlling the operation of the path planning system, and the path planning system is used to execute the above-mentioned cross-floor memory path reconstruction method according to the instructions of the controller.
[0067] The embodiment of the present application first densifies the original path points to make the path more refined, better reflect the actual road conditions, and avoid inaccuracies caused by sparse paths. Secondly, by combining with the lane line point cloud data to match and divide the point cloud set, the lane line information of the vehicle at different positions can be more accurately determined, providing a more accurate data basis for path reconstruction, and at the same time correcting deviations caused by sensor errors or avoiding obstacles. Finally, path reconstruction based on lane line segmentation can remove the non-optimal part of the original memory path, thereby improving the driving path quality and parking effect during actual parking, and avoiding problems such as poor experience, low efficiency, and parking failure caused by non-optimal memory paths.
[0068] The embodiment of the present application first determines the key path points by traversing the floor attributes of the original path points and adds them to the feature array, which can accurately capture the key positions of floor changes and provide important reference information for subsequent processing. Then, the original path points are subjected to equal spacing densification processing to obtain the initial path point sequence, which makes the path more refined and is conducive to improving the accuracy of subsequent calculations. By calculating the matching degree between the initial path point sequence and the key path points, the target path points corresponding to the key path points can be effectively found, ensuring that the key information is accurately corresponding to the densified path. The floor attributes are extracted from the feature array and added to the target path points, ensuring that the densified path points have accurate floor information and avoiding information loss. Finally, a path point sequence is constructed based on the target path points and other path points carrying floor attributes, so that the entire path contains both detailed location information and accurate floor attributes, providing a more complete and accurate data basis for subsequent path planning and analysis, and helping to improve the path planning accuracy and reliability of the intelligent system in different floor environments.
[0069] The embodiment of the present application first calculates the correlation between the point cloud in the lane line point cloud data and each path point in the path point sequence, which can comprehensively consider the two important factors of spatial coordinates and floor attributes, so that the matching is more accurate and comprehensive. After obtaining the first spatial coordinates and the first floor attributes of the point cloud and the second spatial coordinates and the second floor attributes of the path point, the Euclidean distance is calculated to measure the spatial proximity between the point cloud and the path point, and the difference in floor attributes is determined to consider information at different height levels. Calculating the correlation based on the Euclidean distance and the attribute difference can effectively balance the role of spatial position and floor attributes in matching. Using the path points whose correlation meets the preset conditions as the path points for point cloud matching and constructing a corresponding relationship helps to accurately associate the lane line point cloud with the path points, providing a more accurate data basis for subsequent path planning, intelligent driving and other applications, and improving the system's perception and understanding of the environment, thereby achieving safer and more efficient driving and parking operations.
[0070] The embodiment of the present application first optimizes the point cloud in the lane line point cloud set, which can remove duplicate points, perform mean filtering and remove outliers, improve the quality and accuracy of the point cloud data, and reduce noise interference. By obtaining adjacent point clouds in the optimized point cloud set and constructing relationship vectors and calculating sequence number differences and angle data, the relationship between point clouds can be analyzed from multiple dimensions. Adjacent point clouds whose angle data falls within the preset angle range are used as inflection points, which can accurately identify the turning point of the lane line, which is crucial for understanding the shape and direction of the lane line. Adjacent point clouds with sequence number differences greater than the preset difference are used as discontinuity points, which can effectively segment different lane line segments, which helps to better analyze and process the local features of the lane line. The lane line point cloud set is segmented using inflection points and discontinuity points to obtain lane line segments, making the analysis of the lane line more detailed and targeted, providing more accurate lane line information for subsequent path planning, intelligent driving decisions, etc., and improving the safety and reliability of the system.
[0071] The embodiment of the present application first obtains the first distance between the starting point and the ending point, and compares the distance with a preset threshold to select different path reconstruction strategies, which can flexibly adapt to paths of different lengths. When the distance is less than the preset threshold, the starting point, the ending point, the heading and the point spacing are used to calculate the connection path to construct a reconstructed path segment. When the distance is greater than or equal to the preset threshold, a specific first candidate point and a second candidate point are obtained between the starting point and the ending point for reconstruction, which can better handle longer distance paths and ensure the rationality and continuity of the path. Next, the matching points corresponding to the candidate path points are obtained from the original memory path and their attribute information is obtained, and the candidate path points are assigned values, so that the reconstructed path segment can inherit the important attributes of the original path, ensuring the accuracy and integrity of the path. Finally, a collision test is performed on the reconstructed path segment. By obtaining the nearest point of each point cloud in the lane line point cloud data on the target memory path and calculating the second distance, it is determined whether the point cloud is within the collision range constructed with the nearest point as the center and a preset expansion radius. At the same time, counting is performed to detect whether multiple point clouds appear continuously in the collision range, ensuring the safety and feasibility of the reconstructed path segment, avoiding collision accidents in actual applications, and providing a reliable path planning solution for scenarios such as intelligent driving and parking. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0073] Figure 1is a flowchart of a method for reconstructing a cross-floor memory path according to some embodiments of the present invention;
[0074] Figure 2 is a flowchart of a method for reconstructing a cross-floor memory path according to some embodiments of the present invention;
[0075] Figure 3 is a schematic diagram of densification processing of path points according to some embodiments of the present invention;
[0076] Figure 4 Schematic diagram of dividing lane lines into segments according to some embodiments of the present invention
[0077] Figure 5 is a schematic diagram of a vehicle according to some embodiments of the present invention;
[0078] Figure 6 is a structural block diagram of a device for reconstructing a cross-floor memory path according to an embodiment of the present invention;
[0079] Figure 7 It is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0081] According to an embodiment of the present invention, a method, device, equipment and vehicle for reconstructing a cross-floor memory path are provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0082] In this embodiment, a method for reconstructing a cross-floor memory path is provided, which can be used for the above-mentioned mobile terminal. Figure 1 is a flow chart of a method for reconstructing a cross-floor memory path according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0083] Step S101, obtaining the original memory path and the lane line point cloud data of the vehicle during the current memory path.
[0084] In an embodiment of the present application, in order to obtain the original memory path across floors and the lane line point cloud data of the vehicle during the current memory path, it is necessary to first determine a suitable data source. For the original memory path across floors, it can be obtained from the indoor positioning system (such as Bluetooth positioning, Wi-Fi positioning, etc.) or the building information model data, and the data is read after the interface method with the vehicle system is clarified. After reading, the data is processed and converted, the different coordinate systems are unified, and smoothed to remove noise and discontinuous points, and finally stored in the vehicle system. For lane line point cloud data, select a sensor suitable for a cross-floor environment, such as a camera combined with a computer vision algorithm. After installing and calibrating the sensor, start the acquisition when the vehicle is traveling on the current memory path across floors to obtain the lane line point cloud data of the vehicle during the current memory path.
[0085] Step S102, densifying the original path points of multiple different floors in the original memory path to obtain multiple path points, and constructing a path point sequence based on the multiple path points.
[0086] In an embodiment of the present application, multiple original path points in the original memory path are obtained, and the method and parameters for densification are determined. For example, linear interpolation, spline curve interpolation, etc. can be selected according to the characteristics and requirements of the path. If the linear interpolation method is used, for two adjacent original path points, the distance between them is calculated, and it is determined whether a new path point needs to be inserted based on a set distance threshold. If the distance is greater than the threshold, a new path point is inserted between the two original path points at a certain interval. The coordinates of the newly inserted path point can be calculated by linear interpolation, that is, determined based on the coordinates of the two adjacent original path points and the position ratio of the insertion point.
[0087] For the spline curve interpolation method, the original path points are fitted using the spline curve function, and more points are selected on the fitted curve as the densified path points. This process is repeated continuously, and all adjacent pairs of original path points are processed until the densification of the entire original memory path is completed. Finally, the multiple densified path points are sequentially constructed into a path point sequence.
[0088] Step S103, matching the path points in the path point sequence with the point clouds in the lane line point cloud data to obtain the correspondence between the point clouds and the path points, and dividing all point clouds in the lane line point cloud data into different types of lane line point cloud sets based on the correspondence.
[0089] In an embodiment of the present application, first, each path point in the path point sequence is traversed. For each path point, the distance between it and all point clouds in the lane line point cloud data is calculated. A suitable distance measurement method such as Euclidean distance can be used. Then, according to the set distance threshold, the point cloud closest to the path point is found. The corresponding relationship between this path point and the nearest point cloud is established. This process is repeated until all path points in the path point sequence are matched with points in the lane line point cloud.
[0090] Next, based on the obtained correspondence, all point clouds in the lane point cloud data are classified. The point cloud type can be divided according to the attributes of the path point or specific rules. For example, according to the position of the path point in the path, the point cloud is divided into lane point cloud sets in different directions, such as left lane point cloud, right lane point cloud, etc. In the classification process, the accuracy of the classification is ensured by pre-set filtering conditions and verification mechanisms. For example, for point clouds that are very close to multiple path points, the point cloud set to which they belong can be determined according to additional rules, such as giving priority to specific types of path points or averaging. Finally, different types of lane point cloud sets are obtained for subsequent analysis and processing.
[0091] Step S104: construct lane line segments using different types of lane line point cloud sets, and reconstruct the path based on the lane line segments to obtain the target memory path.
[0092] In an embodiment of the present application, first, different types of lane line point cloud sets are analyzed. For each type of point cloud set, it is divided into several continuous sub-point sets through a clustering algorithm or a specific segmentation method, and these sub-point sets represent different lane line segments. For example, clustering can be performed according to the spatial distribution and density of the point cloud, and closely connected point clouds can be divided into a lane line segment. Then, for each lane line segment, its feature information is extracted, such as the coordinates, length, direction, etc. of the starting point and the end point. Using this feature information, a clearer lane line segment representation can be constructed.
[0093] Then, the path is reconstructed based on the constructed lane line segments. Curve fitting methods, such as Bezier curve or spline curve fitting, can be used to connect adjacent lane line segments to form a smooth path. In the reconstruction process, factors such as the continuity and smoothness of the lane line and the consistency with the original memory path should be considered. At the same time, the reconstructed path can be optimized according to actual needs. For example, redundant parts in the path can be removed, and the curvature of the path can be adjusted to adapt to vehicle driving. Finally, the reconstructed and optimized path is the target memory path. The target memory path can be verified and evaluated to ensure its accuracy and reliability for use in vehicle navigation and path planning.
[0094] The method provided in the embodiment of the present application, first, densifies the original path points to make the path more refined, better reflect the actual road conditions, and avoid inaccuracies caused by sparse paths. Secondly, by combining with lane line point cloud data to match and divide point cloud sets, the lane line information of the vehicle at different positions can be determined more accurately, providing a more accurate data basis for path reconstruction, and at the same time correcting deviations caused by sensor errors or avoiding obstacles. Finally, path reconstruction based on lane line segmentation can remove non-optimal parts of the original memory path, thereby improving the quality of the driving path and parking effect during actual parking, and avoiding problems such as poor experience, low efficiency, and parking failures caused by non-optimal memory paths.
[0095] Figure 2 is a flow chart of a method for reconstructing a cross-floor memory path according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0096] Step S201, obtaining the original memory path and the lane line point cloud data of the vehicle during the current memory path. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.
[0097] Step S202, densifying the original path points of multiple different floors in the original memory path to obtain multiple path points, and constructing a path point sequence based on the multiple path points.
[0098] In an embodiment of the present application, the original path points of multiple different floors in the original memory path are densified to obtain multiple path points, and a path point sequence is constructed based on the multiple path points, including the following steps A1-A5:
[0099] Step A1, traverse the floor attributes of each original path point, take the original path point whose floor attributes change as the key path point, and add the floor attributes corresponding to the key path point to the feature array.
[0100] Specifically, first, get all the original path points in the original memory path. Traverse these original path points and check the floor attribute (floor value) of each path point. When the floor attribute of the current path point is found to be different from the floor attribute of the previous path point, mark the path point as a critical path point. Record the information of the critical path point, including its id, x, y, z and floor value, and add this information to the feature array "floor_inflection_points".
[0101] Step A2, performing equal-interval densification processing on all original path points in the original path to obtain an initial path point sequence, and calculating the matching degree between each path point in the initial path point sequence and the key path point.
[0102] Specifically, the interpolation densification method is called to perform equidistant densification on all original path points in the original path. You can choose a suitable interpolation method according to specific needs, such as linear interpolation. After densification, you get the initial path point sequence, which contains more path points, and each path point has information such as id, x, y, z, slope, etc. For each key path point in the feature array, calculate its matching degree with each path point in the initial path point sequence.
[0103] The matching degree can be calculated by constructing a weighted objective function. The objective function considers the Euclidean distance of the x, y, z and id of the path point, and normalizes the evaluation targets of different attributes and multiplies them by their respective weight coefficients. For example, the Euclidean distance of the key path point and a path point in the initial path point sequence is calculated first, and then another similarity index is calculated based on the total number of path points and id. These indicators are then normalized and multiplied by the corresponding weights and added to get the matching degree.
[0104] Step A3: using the matching degree to determine the target path point corresponding to the key path point in the initial path point sequence.
[0105] Specifically, for each key path point, compare its objective function value with that of each path point in the initial path point sequence, and select the path point with the smallest objective function value as the target path point corresponding to the key path point in the initial path point sequence.
[0106] Step A4, extracting the floor attribute corresponding to the key path point from the feature array, and adding the floor attribute to the target path point corresponding to the key path point in the initial path point sequence.
[0107] Specifically, for each determined target path point, find the corresponding key path point in the feature array. Extract the floor attribute (floor value) of the key path point from the feature array. Assign the extracted floor attribute to the target path point, that is, update the floor attribute of the target path point.
[0108] Step A5, constructing a path point sequence based on the target path point carrying the floor attribute and other path points, wherein the other data points are data points in the initial path point sequence that do not correspond to the key path points.
[0109] Specifically, the target path point with floor attributes is merged with other path points in the initial path point sequence that do not correspond to the key path points. A new path point sequence is constructed according to the order of the path points (such as Figure 3 As shown in Figure 2, each path point in this sequence has accurate floor attributes and other attribute information, which is convenient for subsequent local optimization processing.
[0110] In addition, after the path points are densified, in order to ensure that the densified path points can accurately reflect the curvature and direction change characteristics of the path, its curvature and heading angle attributes need to be recalculated and restored. This is because the densification process may affect the accuracy of these attributes. In order to make the curvature and heading angle smoother, the four-point jump point method is used for calculation. The curvature reflects the degree of curvature of the path, and the heading angle indicates the direction change of the path. Calculating and restoring the curvature and heading angle attributes in this way can provide accurate attribute data for the downstream "S-bend path optimization reconstruction method" module, so that the module can better perform path optimization reconstruction.
[0111] The embodiment of the present application first determines the key path points by traversing the floor attributes of the original path points and adds them to the feature array, which can accurately capture the key positions of floor changes and provide important reference information for subsequent processing. Then, the original path points are subjected to equal spacing densification processing to obtain the initial path point sequence, which makes the path more refined and is conducive to improving the accuracy of subsequent calculations. By calculating the matching degree between the initial path point sequence and the key path points, the target path points corresponding to the key path points can be effectively found, ensuring that the key information is accurately corresponding to the densified path. The floor attributes are extracted from the feature array and added to the target path points, ensuring that the densified path points have accurate floor information and avoiding information loss. Finally, a path point sequence is constructed based on the target path points and other path points carrying floor attributes, so that the entire path contains both detailed location information and accurate floor attributes, providing a more complete and accurate data basis for subsequent path planning and analysis, and helping to improve the path planning accuracy and reliability of the intelligent system in different floor environments.
[0112] Step S203, matching the path points in the path point sequence with the point clouds in the lane line point cloud data to obtain the correspondence between the point clouds and the path points, and dividing all point clouds in the lane line point cloud data into different types of lane line point cloud sets based on the correspondence.
[0113] In the embodiment of the present application, the corresponding relationship between the point cloud and the path point is obtained based on matching the path point in the path point sequence with the point cloud in the lane line point cloud data, including the following steps B1-B3:
[0114] Step B1, calculating the correlation between the point cloud in the lane line point cloud data and each path point in the path point sequence.
[0115] Specifically, the correlation between the point cloud in the lane point cloud data and each path point in the path point sequence is calculated, including: obtaining the first spatial coordinate and the first floor attribute corresponding to each point cloud in the lane point cloud data, and obtaining the second spatial coordinate and the second floor attribute corresponding to each path point in the path point sequence; calculating the Euclidean distance between the point cloud and the path point based on the first spatial coordinate and the second spatial coordinate, and determining the attribute difference between the first floor attribute and the second floor attribute; calculating the correlation between the point cloud and each path point based on the Euclidean distance and the attribute difference.
[0116] First, obtain lane point cloud data from vehicle sensors or specific data sources. For each point cloud in the lane point cloud data, determine its corresponding first spatial coordinates (usually including coordinate values in three dimensions of x, y, and z) and first floor attributes. The floor attribute can use a number or a specific identifier to represent the floor where the point cloud is located. At the same time, obtain a sequence of path points that have been processed (such as densification operations). For each path point in the path point sequence, determine its corresponding second spatial coordinates (also x, y, and z coordinate values) and second floor attributes.
[0117] In order to determine the spatial relationship between the point cloud and the path point, the Euclidean distance between the point cloud and the path point is calculated based on the first spatial coordinate and the second spatial coordinate. The attribute difference between the first floor attribute and the second floor attribute is determined. If the first floor attribute and the second floor attribute are the same, the attribute difference is 0; if they are different, a difference value is determined according to a specific rule, for example, the difference between different floors can be set to 1.
[0118] The correlation between the point cloud and each path point is calculated based on the Euclidean distance and attribute difference. The correlation can be determined by constructing a comprehensive calculation formula, for example, the Euclidean distance and attribute difference can be weighted and summed. Different weights are given to the Euclidean distance and attribute difference, and the size of the weight can be determined according to actual needs and experience. If you pay more attention to spatial proximity, you can give a larger weight to the Euclidean distance; if the consistency of floor attributes is also important, you can give an appropriate weight to the attribute difference.
[0119] Step B2: taking the path points whose correlations meet the preset conditions as the path points for point cloud matching.
[0120] Specifically, a correlation threshold is set. When the correlation between a point cloud and a path point is greater than this threshold, the path point is considered to meet the preset conditions. For each point cloud, its correlation with all path points in the path point sequence is traversed. The path points whose correlation meets the preset conditions are screened out as the path points matched by the point cloud. If there are multiple path points that meet the conditions, further screening can be performed according to specific rules, such as selecting the path point with the greatest correlation.
[0121] Step B3, constructing a correspondence between each point cloud in the lane line point cloud data and the path point matched by the point cloud.
[0122] Specifically, a dictionary, list or other suitable data structure is used to store the correspondence between the point cloud and the matching path point. For example, a dictionary can be created in which the key is the identifier of the point cloud and the value is the identifier or coordinate information of the matching path point. For each point cloud in the lane line point cloud data, it is associated with the matching path point determined previously. The identifier of the point cloud and the identifier or coordinate information of the matching path point are stored in the correspondence data structure. In this way, the correspondence between each point cloud and the path point matching the point cloud is established.
[0123] In the embodiment of the present application, all point clouds in the lane point cloud data are divided into different types of lane point cloud sets based on the matching results, including the following steps C1-C4:
[0124] Step C1, obtaining the path point corresponding to each point cloud based on the corresponding relationship, and determining the spatial coordinates of the path point.
[0125] Specifically, first, the point cloud and path point correspondence data structure established previously is searched. For each point cloud, the corresponding path point is found in the correspondence data structure through its identifier. Once the path point is determined, its spatial coordinates (usually the values of the three dimensions of x, y, and z) are extracted from the data storage of the path point.
[0126] Step C2, for each point cloud, construct a coordinate vector using the first spatial coordinates corresponding to the point cloud, the spatial coordinates of the path point that matches the point cloud, and the spatial coordinates of the next path point.
[0127] Specifically, for each point cloud, obtain its own first spatial coordinates, which is information known when obtaining the point cloud data. Next, obtain the spatial coordinates of the path point that matches the point cloud, then find the next path point of the matching path point in the path point sequence and obtain its spatial coordinates. Taking the spatial coordinates of the point cloud as the starting point, construct vectors pointing to the matching path point and the next path point respectively. Suppose the coordinates of the point cloud are (x1, y1, z1), the coordinates of the matching path point are (x2, y2, z2), and the coordinates of the next path point are (x3, y3, z3). The two constructed vectors are (x2-x1, y2-y1, z2-z1) and (x3-x1, y3-y1, z3-z1).
[0128] Step C3, analyzing the orientation relationship of the coordinate vector to obtain the point cloud orientation type of the point cloud.
[0129] Specifically, by calculating the product of the vector sum, a new vector can be obtained, which is perpendicular to the plane where the original two vectors are located. The orientation type of the point cloud is determined according to the direction of the new vector. If the direction of the new vector is within a certain direction range (for example, the range of the left and right directions is determined according to the direction of the vehicle and the layout of the lane), it can be determined that the point cloud is on the left or right side of the path. The specific judgment method can be set according to the actual situation. For example, the left-right relationship of the point cloud can be determined by comparing the positive and negative components of the new vector on a certain coordinate axis.
[0130] Step C4, constructing a corresponding lane line point cloud set based on point clouds of the same point cloud orientation type.
[0131] Specifically, two data sets are created to store the left lane point cloud and the right lane point cloud respectively. For each point cloud, it is added to the corresponding lane point cloud set according to the determined orientation type. If the point cloud is judged to be on the left side of the path, it is added to the left lane point cloud set; if it is on the right side, it is added to the right lane point cloud set. Finally, two orderly arranged lane point cloud sets are obtained, corresponding to the left lane and the right lane respectively. These point cloud sets can be used for subsequent path reconstruction and optimization operations.
[0132] Step S204: construct lane line segments using different types of lane line point cloud sets, and reconstruct the path based on the lane line segments to obtain the target memory path.
[0133] In an embodiment of the present application, lane line segments are constructed using different types of lane line point cloud sets, including: optimizing the point clouds in the lane line point cloud set to obtain an optimized lane line point cloud set; obtaining adjacent point clouds in the optimized lane line point cloud set; constructing relationship vectors using adjacent point clouds, and obtaining the serial number difference between adjacent point clouds; calculating the angle data between adjacent point clouds using the relationship vector, and taking adjacent point clouds whose angle data falls within a preset angle range as inflection points; taking adjacent point clouds whose serial number difference is greater than a preset difference as discontinuity points; and segmenting the lane line point cloud set using the inflection points and discontinuity points to obtain lane line segments.
[0134] Specifically, the optimization process of the point cloud in the lane point cloud set includes the following process: First, traverse all the point clouds in the lane point cloud set. For point clouds with the same sequence number, calculate their distance from the path (the distance algorithm from the point to the nearest point on the path can be used). Keep the point cloud closest to the path and remove other point clouds with repeated sequence numbers. Secondly, determine a suitable window size, such as selecting several adjacent point clouds as a window. For each point cloud, calculate the mean of all point cloud coordinates in its window. Update the coordinates of the point cloud to the mean coordinates to achieve smoothing. Furthermore, traverse the point cloud set after deduplication and mean filtering. For each point cloud, use the previous point cloud and the next point cloud to calculate the heading angle. The heading angle can be obtained by calculating the angle between two vectors (the vector formed by the current point cloud and the previous point cloud, and the vector formed by the current point cloud and the next point cloud). Analyze the change of the heading angle, and mark the points with sudden changes in the heading angle or extreme values as potential outliers. At the same time, points that are very close but with small disturbances resulting in large heading angles are further screened to remove these possible outliers and step point clouds, and finally the optimized lane line point cloud set is obtained.
[0135] After obtaining the optimized lane line point cloud set, for each point cloud in the optimized lane line point cloud set, obtain its previous point cloud and the next point cloud as adjacent point clouds (for the first point cloud, its previous point cloud can be set to itself or a specific starting point; for the last point cloud, its next point cloud can be set to itself or a specific ending point). For each pair of adjacent point clouds, construct a vector, which is obtained by subtracting the coordinates of the previous point cloud from the coordinates of the next point cloud. At the same time, record the serial numbers of the adjacent point clouds and calculate their serial number differences.
[0136] For each pair of vectors constructed from adjacent point clouds, calculate their inner product and modulus. Calculate the angle between the two vectors (i.e., the angle between adjacent point clouds) based on the vector inner product formula and modulus. Compare the angle data with the preset angle range (e.g., 3 degrees and 19 degrees). If the angle falls within this range, the pair of adjacent point clouds is marked as an inflection point. For each pair of adjacent point clouds, the serial number difference is compared with the preset difference (e.g., 80). If the serial number difference is greater than the preset difference, the pair of adjacent point clouds is marked as a discontinuity point.
[0137] Finally, based on the turning points and discontinuity points, the lane line point cloud is segmented into lane line segments with straight line features (such as Figure 4 For each polyline segment, the position (coordinate) and serial number of its endpoints, as well as other relevant information (such as length, direction, etc.) are recorded to form lane segmentation information.
[0138] The embodiment of the present application first optimizes the point cloud in the lane line point cloud set, which can remove duplicate points, perform mean filtering and remove outliers, improve the quality and accuracy of the point cloud data, and reduce noise interference. By obtaining adjacent point clouds in the optimized point cloud set and constructing relationship vectors and calculating sequence number differences and angle data, the relationship between point clouds can be analyzed from multiple dimensions. Adjacent point clouds whose angle data falls within the preset angle range are used as inflection points, which can accurately identify the turning point of the lane line, which is crucial for understanding the shape and direction of the lane line. Adjacent point clouds with sequence number differences greater than the preset difference are used as discontinuity points, which can effectively segment different lane line segments, which helps to better analyze and process the local features of the lane line. The lane line point cloud set is segmented using inflection points and discontinuity points to obtain lane line segments, making the analysis of the lane line more detailed and targeted, providing more accurate lane line information for subsequent path planning, intelligent driving decisions, etc., and improving the safety and reliability of the system.
[0139] In the embodiment of the present application, path reconstruction is performed based on lane line segmentation to obtain a target memory path, including the following steps D1-D4:
[0140] Step D1, traverse the length of each lane line segment, and take the lane line segment whose length meets the preset length as the target lane line segment.
[0141] Specifically, first, obtain all lane line segment information. This information includes relevant information such as the endpoint position and serial number of each lane line segment. Traverse all lane line segments and calculate the length of each segment. The length can be determined by calculating the distance between the two endpoints of the segment, for example, using the Euclidean distance formula. Compare the length of each lane line segment with a preset length threshold. If the length of the segment is greater than or equal to the preset length, mark the segment as the target lane line segment; if the length is less than the preset length, skip the segment and continue processing the next segment.
[0142] Step D2, obtaining the path to be optimized from the target lane line segment, and selecting the starting point and the ending point from the path to be optimized.
[0143] Specifically, the path to be optimized is obtained from the target lane line segment, including: for each segment marked as the target lane line segment, a rectangular frame is generated according to its endpoint position. The boundary of the rectangular frame can be constructed by determining the maximum and minimum coordinate values of the two end points of the segment in the horizontal and vertical directions. All path points are traversed to check whether each path point is framed by the rectangular frame. The path points framed by the rectangular frame are marked as the path point set to be optimized after segmentation. Consider the problems that may be caused by point cloud preprocessing, such as shortening of both ends of the point cloud or loss of lane lines at turns. In order to solve this problem, the adjacent target lane line segments are checked. For adjacent target lane line segments, their head and tail positions are determined. This can be determined by obtaining the coordinates of the starting point and the end point of the segment. The middle position of the head and tail positions of adjacent target lane line segments is calculated, and this middle position will be used as the dividing line between adjacent paths to be optimized.
[0144] Within the generated rectangular frame, extend the path to be optimized to both ends. During the extension process, make sure that it does not exceed the dividing line. The specific extension method can be determined according to the actual situation, for example, it can be extended according to a certain ratio or a fixed distance. The final extended path to be optimized will be used for subsequent local optimization processing.
[0145] Specifically, a starting point and an ending point are selected from the path to be optimized, including: obtaining two reference points from the point cloud corresponding to the target lane line segment, and constructing a reference vector based on the spatial coordinates of the reference points; obtaining a connection vector corresponding to each pair of adjacent points in the path to be optimized; calculating the vector inner product and the vector modulus of the connection vector and the reference vector; determining the angular relationship between the path point in the path to be optimized and the target lane line segment based on the vector inner product and the vector modulus; using the angular relationship to screen the parallel points corresponding to the target lane line segment, and taking a point from each end of the parallel points as the starting point and the ending point, respectively.
[0146] Select two points from the point cloud data of the target lane segment as reference points. You can consider selecting the starting point and the end point of the point cloud segment, or select two points that can better represent the segment according to specific rules. Determine the spatial coordinates of the two reference points. Assume that the coordinates of one reference point are (x start ,y start ), the other reference point coordinate is (x end ,y end ). Then construct the reference vector, that is, the reference vector (x end -x start ,y end -y start ).
[0147] Traverse all points on the optimization path. For each pair of adjacent points, calculate the coordinate difference between them to get the connection vector. For example, two adjacent points, one with coordinate (x i ,y i ), and the other coordinate is (x i+1 ,y i+1 ), then the connection vector is (x i+1 -x i ,y i+1 -y i ).
[0148] For each connection vector, perform an inner product operation on it and the reference vector. The inner product calculation formula is the product of the horizontal coordinate of the connection vector and the horizontal coordinate of the reference vector, plus the product of the vertical coordinate of the connection vector and the vertical coordinate of the reference vector, that is, (x i+1 -x i )(x end -x start )+(y i+1 -y i )(y end -y start ).
[0149] Calculate the modulus of the connection vector and the reference vector respectively. The formula for calculating the modulus of the connection vector is: The formula for calculating the modulus length of the reference vector is:
[0150] Using the results of vector inner product and vector modulus, the angle relationship between the point in the path to be optimized and the target lane segment is determined by the vector angle formula. The angle calculation formula is:
[0151]
[0152] Traverse the angle relationship corresponding to all points in the path to be optimized, and define the points with angles less than 7 degrees as points parallel to the lane line. After all parallel points are determined, select a point at each end of the parallel points. You can select the non-parallel points closest to both ends as the starting and ending points of the optimization reconstruction.
[0153] Step D3, reconstructing the path based on the starting point and the ending point to obtain reconstructed path segments.
[0154] In the embodiment of the present application, a path is reconstructed based on a starting point and an ending point to obtain a reconstructed path segment, including the following steps D301-D304:
[0155] Step D301, obtaining a first distance between a starting point and an ending point.
[0156] Step D302, comparing the first distance with a preset threshold to obtain a comparison result, and performing path reconstruction according to a path reconstruction strategy corresponding to the comparison result to obtain a candidate path segment, wherein the candidate path segment includes a plurality of candidate path points.
[0157] Specifically, the preset threshold is 28 meters. The calculated first distance is compared with the preset threshold. When the first distance is less than 28 meters, one Bezier curve is used for reconstruction. When the first distance is greater than 28 meters, three Bezier curves are used for reconstruction. The specific reconstruction process is as follows:
[0158] If the first distance is less than the preset threshold, the heading and the point spacing are obtained, the connection path is calculated using the spatial coordinates corresponding to the starting point, the spatial coordinates corresponding to the ending point, the heading and the point spacing, and the candidate path segment is constructed based on the connection path.
[0159] Specifically, for a Bezier curve reconstruction, a second-order Bezier curve can be used. A second-order Bezier curve requires three control points: a starting point, an intermediate control point, and an end point. Calculate the coordinates of the intermediate control point. A simple method is to take a point on the line connecting the starting point and the end point as the intermediate control point. The coordinates of the intermediate control point can be calculated based on the coordinates of the starting point and the end point and a scale parameter.
[0160] Use the Bezier curve formula to calculate the points on the connection path. The second-order Bezier curve formula is:
[0161] B(t)=(1-t) 2 P0+2t(1-t)P1+tP2, where P0 is the starting point, P1 is the intermediate control point, P2 is the end point, and t is a parameter ranging from 0 to 1.
[0162] Determine the step size of parameter t according to the point spacing requirement. For example, if the point spacing requirement is d1, the step size of t can be determined based on the distance between the starting point and the end point and the number of points required. Let the distance between the starting point and the end point be d2, and the number of points required be n, then the step size of t is 1 / n, where n=d2 / d1. Traverse the value range of parameter t, starting from 0, and increase the step size each time to calculate the coordinates of the corresponding points on the Bezier curve. Store the coordinates of these points in a list, which is the point on the connection path. Then connect the points on the connection path in order to form a candidate path segment, which includes multiple candidate path points. Check whether the reconstructed path segment is smoothly connected. You can judge whether the path is smooth by calculating the angle change of the connecting line between adjacent points. If the angle change is too large, you can adjust the position or scale parameter of the intermediate control point and recalculate the connection path until the smooth connection requirement is met.
[0163] Alternatively, if the first distance is greater than or equal to a preset threshold, a first candidate point and a second candidate point are obtained at the starting point and the ending point, and a candidate path segment is constructed based on the starting point, the first candidate point, the second candidate point and the ending point; wherein the distance between the first candidate point and the starting point is greater than the preset distance, and the distance between the second candidate point and the ending point is greater than the preset distance.
[0164] Specifically, the coordinates of the starting point a are known to be (x a ,y a ), the coordinates of the end point c are (x c ,y c ). Since it is required to take two points k1 and k2 between the starting point and the end point, and the distance ak1 is greater than 12 meters, and the distance k2c is greater than 12 meters. Calculate the distance between the starting point a and the end point c Determine a direction vector from a to c, that is
[0165] Calculate the coordinates of the first candidate point k1: First, determine a scale parameter t1 so that the distance ak1 meets the requirement of being greater than 12 meters. Suppose the coordinates of the first candidate point k1 are (x k1 ,y k1 ), then x k1 =x a +t1(x c -x a ), y k1 =y a +t1(y c -y a ).
[0166] Calculate the coordinates of the second candidate point k2: Similarly, determine a proportional parameter t1 so that the distance meets the requirement of being greater than 12 meters. At the same time, the value to be guaranteed is such that the distance between k1 and k2 is reasonable, which can ensure that the k1k2 segment travels in the right lane and that the ak1 and k2c segments can change lanes smoothly.
[0167] Suppose the coordinates of the second candidate point k2 are (x k2 ,y k2 ), then, x k2 =x c -t2(x c -x a ), y k2 =y c -t2(y c -y a ).
[0168] Use three Bezier curves to connect a—k1, k1—k2, and k2—c respectively.
[0169] For the segment a-k1: determine a and k1 as the starting and ending points, and then select appropriate intermediate control points. The coordinates of the intermediate control points can be determined in a similar way to the reconstruction of a Bezier curve. Use the Bezier curve formula to calculate the points on the segment a-k1 and store them in a list.
[0170] For the k1-k2 segment: determine k1 and k2 as the starting and ending points, select the middle control point and calculate the points on the k1-k2 segment.
[0171] For the k2-c segment: determine k2 and c as the starting and ending points, select the middle control point and calculate the points on the k2-c segment.
[0172] The points calculated from the three Bezier curves are connected in sequence to form a candidate path segment, which includes multiple candidate path points.
[0173] Through the above steps, when the first distance is greater than or equal to the preset threshold, the first candidate point and the second candidate point can be obtained at the starting point and the ending point, and the reconstructed path segment can be constructed based on the starting point, the first candidate point, the second candidate point and the ending point.
[0174] Step D303, obtaining matching points corresponding to the candidate path points from the original memory path, and obtaining attribute information of the matching points.
[0175] Specifically, for each candidate path point in the candidate path segment, determine its coordinates in space, usually two-dimensional coordinates (x, y), if it is a three-dimensional space, it is (x, y, z). Traverse all path points in the original memory path and calculate the distance between each original path point and the current candidate path point. The calculation can be performed using methods such as Euclidean distance. Find the nearest original path point as the matching point corresponding to the current candidate path point. Once the matching point is determined, obtain the attribute information of the matching point. This attribute information includes but is not limited to the z coordinate (if any), floor attribute, slope attribute, etc.
[0176] Step D304, assigning values to candidate path points in the candidate path segments using the attribute information of the matching points, and constructing a reconstructed path segment using the assigned candidate path points.
[0177] Specifically, for each candidate path point in the candidate path segment, the attribute information of the obtained matching point is assigned to the current candidate path point, that is, the z coordinate, floor attribute and slope attribute of the matching point are assigned to the corresponding attributes of the candidate path point. After traversing all candidate path points and completing the attribute assignment, these candidate path points have complete attribute information. The reconstructed path segment is constructed using the assigned candidate path points. This reconstructed path segment contains all candidate path points with complete attribute information and is arranged in the order they are in the path.
[0178] Finally, the curvature and heading angle are recalculated based on the coordinates of the points on the reconstructed path segment. For each reconstructed curve, its starting and ending numbers in the original path, as well as x, y, z, floor, slope and other attributes are recorded. This information can be used for subsequent path splicing and further processing.
[0179] Step D4, performing a collision test on the reconstructed path segment. If the reconstructed path segment passes the collision test, the target memory path is constructed using the reconstructed path segment.
[0180] Specifically, before the collision test, first, the heading angle and curvature of the optimized path are judged. Through a specific calculation method or according to a preset standard, determine whether the heading angle and curvature of the optimized path meet the specified requirements. If it does not meet the requirements, the reconstructed path is not recorded directly to avoid the use of non-compliant paths and subsequent problems. Next, since the point cloud has been classified and serialized in the previous point cloud preprocessing stage. Using the start and end point information of the reconstructed path, a range can be determined to filter out the point cloud around the path from the classified and serialized point cloud. Only collision detection is performed on these surrounding point clouds instead of all point clouds, which can reduce unnecessary calculations, thereby reducing time complexity and improving the operating efficiency of the entire system. Finally, check the position of the point cloud. Specifically check whether the left point cloud runs to the right of the optimized path, or the right point cloud runs to the left of the optimized path. If such a position disorder occurs, it means that there may be a problem with the path, and this path is also not recorded to ensure that the recorded path is accurate and reliable, providing an effective path basis for subsequent intelligent driving or parking operations.
[0181] Specifically, a collision test is performed on the reconstructed path segments, including: obtaining the nearest point of each point cloud in the lane line point cloud data on the target memory path, and calculating the second distance between each point cloud in the lane line point cloud data and the corresponding nearest point; using the second distance to determine whether the point cloud is located in the corresponding collision range, wherein the collision range is constructed with the nearest point of the point cloud on the target memory path as the center and a preset expansion radius; if the point cloud is within the collision range, counting is performed, and detecting whether N point clouds appear consecutively within the collision range, wherein if N point clouds appear consecutively within the collision range, it is determined that the collision test has failed; or, if N point clouds appear consecutively within the collision range, it is determined that the collision test has passed.
[0182] First, in order to ensure the feasibility and safety of the reconstructed path segmentation, a collision test is required. The purpose of this test is to check whether the reconstructed path collides with the surrounding environment (mainly the lane line point cloud data here). If the path does not collide with the surrounding point cloud data, it can be used as the target memory path; if a collision occurs, the path needs to be further adjusted or rebuilt.
[0183] For each point cloud in the lane point cloud data, it is necessary to find its closest point on the target memory path. This can be done by calculating the distance from the point cloud to each path point on the target memory path, and then selecting the path point with the smallest distance as the closest point. Once the closest point is determined, the distance between the point cloud and the closest point is calculated, and this distance is called the second distance.
[0184] Get the preset expansion radius, and use the nearest point of the point cloud on the target memory path as the center of the circle, and construct a circular collision range with the preset expansion radius. If the second distance between the point cloud and the nearest point is less than or equal to the preset expansion radius, then the point cloud is considered to be within the collision range; if the second distance is greater than the preset expansion radius, then the point cloud is not within the collision range.
[0185] Set a threshold N, which indicates how many consecutive point clouds appear within the collision range before the collision test is considered to have failed or passed.
[0186] When a point cloud is found to be within the collision range, it is counted. If the number of consecutive point clouds within the collision range is less than N, then the detection continues. If N consecutive point clouds are all within the collision range, it is determined that the collision test has not passed. This means that the reconstructed path segment may have collided with the surrounding environment and needs to be adjusted or rebuilt. On the contrary, if N consecutive point clouds are not within the collision range, it is determined that the collision test has passed. At this time, the reconstructed path segment can be used as the target memory path.
[0187] Through the above steps, the reconstructed path segments can be effectively crash-tested to ensure the safety and feasibility of the generated target memory path in practical applications.
[0188] If the reconstructed path segment collision test passes, then all reconstructed path segment sets are looped based on the start and end point numbers of the original path recorded in the reconstructed path. In this process, the reconstructed path segments are spliced to replace the original path. When splicing, it is necessary to ensure that the paths do not cross and that the spliced path is spatially reasonable. Finally, the heading angle and curvature information of the spliced path are recalculated and output to the downstream module.
[0189] The embodiment of the present application first obtains the first distance between the starting point and the ending point, and compares the distance with a preset threshold to select different path reconstruction strategies, which can flexibly adapt to paths of different lengths. When the distance is less than the preset threshold, the starting point, the ending point, the heading and the point spacing are used to calculate the connection path to construct a reconstructed path segment. When the distance is greater than or equal to the preset threshold, a specific first candidate point and a second candidate point are obtained between the starting point and the ending point for reconstruction, which can better handle longer distance paths and ensure the rationality and continuity of the path. Next, the matching points corresponding to the candidate path points are obtained from the original memory path and their attribute information is obtained, and the candidate path points are assigned values, so that the reconstructed path segment can inherit the important attributes of the original path, ensuring the accuracy and integrity of the path. Finally, a collision test is performed on the reconstructed path segment. By obtaining the nearest point of each point cloud in the lane line point cloud data on the target memory path and calculating the second distance, it is determined whether the point cloud is within the collision range constructed with the nearest point as the center and a preset expansion radius. At the same time, counting is performed to detect whether multiple point clouds appear continuously in the collision range, ensuring the safety and feasibility of the reconstructed path segment, avoiding collision accidents in actual applications, and providing a reliable path planning solution for scenarios such as intelligent driving and parking.
[0190] The present application also provides a vehicle, comprising: a path planning system and a controller; wherein the controller stores instructions for controlling the operation of the path planning system, and the path planning system is used to execute the above-mentioned cross-floor memory path reconstruction method according to the instructions of the controller. Figure 5As shown, the path planning system includes: a memory path processing module 501, a point cloud processing module 502 and a path reconstruction module 503, wherein the memory path processing module 501 is used to perform densification processing on the original path points of multiple different floors in the original memory path to obtain multiple path points, and to construct a path point sequence based on the multiple path points; the point cloud processing module 502 is used to match the path points in the path point sequence with the point clouds in the lane line point cloud data to obtain the correspondence between the point clouds and the path points, and to divide all the point clouds in the lane line point cloud data into different types of lane line point cloud sets based on the correspondence. The path reconstruction module 503 is used to construct lane line segments using different types of lane line point cloud sets, and to reconstruct the path based on the lane line segments to obtain the target memory path.
[0191] In this embodiment, a device for reconstructing a cross-floor memory path is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are omitted. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0192] This embodiment provides a device for reconstructing a cross-floor memory path, such as Figure 6 As shown, including:
[0193] An acquisition module 601 is used to acquire the original memory path and the lane line point cloud data of the vehicle during the current memory path;
[0194] Processing module 602, used for performing densification processing on original path points of multiple different floors in the original memory path to obtain multiple path points, and constructing a path point sequence based on the multiple path points;
[0195] A matching module 603 is used to match the path points in the path point sequence with the point clouds in the lane line point cloud data to obtain the corresponding relationship between the point clouds and the path points, and divide all the point clouds in the lane line point cloud data into different types of lane line point cloud sets based on the corresponding relationship;
[0196] The reconstruction module 604 is used to construct lane line segments using different types of lane line point cloud sets, and to reconstruct the path based on the lane line segments to obtain a target memory path.
[0197] In an embodiment of the present application, processing module 602 is used to traverse the floor attributes of each original path point, take the original path points with changed floor attributes as key path points, and add the floor attributes corresponding to the key path points to the feature array; perform equidistant densification processing on all original path points in the original path to obtain an initial path point sequence, and calculate the matching degree between each path point in the initial path point sequence and the key path point; use the matching degree to determine the target path point corresponding to the key path point in the initial path point sequence; extract the floor attributes corresponding to the key path point from the feature array, and add the floor attributes to the target path point corresponding to the key path point in the initial path point sequence; construct a path point sequence based on the target path points carrying floor attributes and other path points, wherein the other data points are data points in the initial path point sequence that do not correspond to the key path points.
[0198] In an embodiment of the present application, the matching module 603 is used to calculate the correlation between the point cloud in the lane line point cloud data and each path point in the path point sequence; use the path points whose correlation meets the preset conditions as the path points for point cloud matching; and construct a corresponding relationship between each point cloud in the lane line point cloud data and the path points matched by the point cloud.
[0199] In an embodiment of the present application, the matching module 603 is used to obtain the first spatial coordinates and the first floor attributes corresponding to each point cloud in the lane point cloud data, and to obtain the second spatial coordinates and the second floor attributes corresponding to each path point in the path point sequence; calculate the Euclidean distance between the point cloud and the path point based on the first spatial coordinates and the second spatial coordinates, and determine the attribute difference between the first floor attribute and the second floor attribute; calculate the correlation between the point cloud and each path point based on the Euclidean distance and the attribute difference.
[0200] In an embodiment of the present application, the matching module 603 is used to obtain the path points corresponding to each point cloud based on the corresponding relationship, and determine the spatial coordinates of the path points; for each point cloud, a coordinate vector is constructed using the first spatial coordinates corresponding to the point cloud, the spatial coordinates of the path points matched by the point cloud, and the spatial coordinates of the next path point; the orientation relationship of the coordinate vector is analyzed to obtain the point cloud orientation type of the point cloud; and a corresponding lane line point cloud set is constructed based on point clouds of the same point cloud orientation type.
[0201] In an embodiment of the present application, the reconstruction module 604 is used to optimize the point cloud in the lane line point cloud set to obtain an optimized lane line point cloud set; obtain adjacent point clouds in the optimized lane line point cloud set; use adjacent point clouds to construct a relationship vector and obtain the serial number difference between adjacent point clouds; use the relationship vector to calculate the angle data between adjacent point clouds, and use the adjacent point clouds whose angle data falls within a preset angle range as inflection points; use adjacent point clouds whose serial number difference is greater than the preset difference as discontinuity points; use the inflection points and discontinuity points to segment the lane line point cloud set to obtain lane line segments.
[0202] In an embodiment of the present application, the reconstruction module 604 is used to traverse the length of each lane line segment, and take the lane line segment whose length meets the preset length as the target lane line segment; obtain the path to be optimized from the target lane line segment, and select the starting point and the ending point from the path to be optimized; reconstruct the path based on the starting point and the ending point to obtain a reconstructed path segment; perform a collision test on the reconstructed path segment, and if the reconstructed path segment passes the collision test, use the reconstructed path segment to construct the target memory path.
[0203] In an embodiment of the present application, the reconstruction module 604 is used to obtain two reference points from the point cloud corresponding to the target lane line segment, and construct a reference vector based on the spatial coordinates of the reference points; obtain the connection vector corresponding to each pair of adjacent points in the path to be optimized; calculate the vector inner product and vector modulus of the connection vector and the reference vector; based on the vector inner product and vector modulus, determine the angular relationship between the path point in the path to be optimized and the target lane line segment; use the angular relationship to screen the parallel points corresponding to the target lane line segment, and take a point from each end of the parallel points as the starting point and the ending point respectively.
[0204] In the embodiment of the present application, the reconstruction module 604 is used to obtain a first distance between the starting point and the ending point;
[0205] Comparing the first distance with a preset threshold to obtain a comparison result, and performing path reconstruction according to a path reconstruction strategy corresponding to the comparison result to obtain a candidate path segment, wherein the candidate path segment includes a plurality of candidate path points;
[0206] Obtain matching points corresponding to candidate path points from the original memory path, and obtain attribute information of the matching points;
[0207] The attribute information of the matching points is used to assign values to the candidate path points in the candidate path segment, and the assigned candidate path points are used to construct the reconstructed path segment.
[0208] In an embodiment of the present application, the reconstruction module 604 is used to obtain the heading and the point spacing if the first distance is less than a preset threshold, calculate the connection path using the spatial coordinates corresponding to the starting point, the spatial coordinates corresponding to the ending point, the heading and the point spacing, and construct a candidate path segment based on the connection path; if the first distance is greater than or equal to the preset threshold, obtain the first candidate point and the second candidate point at the starting point and the ending point, and construct a candidate path segment based on the starting point, the first candidate point, the second candidate point and the ending point; wherein the distance between the first candidate point and the starting point is greater than the preset distance, and the distance between the second candidate point and the ending point is greater than the preset distance.
[0209] In an embodiment of the present application, the reconstruction module 604 is used to obtain the nearest point of each point cloud in the lane line point cloud data on the target memory path, and calculate the second distance between each point cloud in the lane line point cloud data and the corresponding nearest point; use the second distance to determine whether the point cloud is located in the corresponding collision range, wherein the collision range is constructed with the nearest point of the point cloud on the target memory path as the center and a preset expansion radius; if the point cloud is within the collision range, count it and detect whether N point clouds appear consecutively in the collision range, wherein if N point clouds appear consecutively and are all within the collision range, it is determined that the collision test has failed; or, if N point clouds appear consecutively in the collision range, it is determined that the collision test has passed.
[0210] See also Figure 7 , Figure 7 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.
[0211] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0212] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0213] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of an electronic device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0214] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0215] The electronic device further comprises a communication interface 30 for the electronic device to communicate with other devices or a communication network.
[0216] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0217] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for reconstructing a cross-floor memory path, characterized in that: The method comprises: Obtain the original memory path and the lane line point cloud data of the vehicle during the current memory path; Densifying the original path points of multiple different floors in the original memory path to obtain multiple path points, and constructing a path point sequence based on the multiple path points; Based on matching the path points in the path point sequence with the point clouds in the lane line point cloud data, a corresponding relationship between the point clouds and the path points is obtained, and based on the corresponding relationship, all point clouds in the lane line point cloud data are divided into different types of lane line point cloud sets; Lane line segments are constructed using different types of lane line point cloud sets, and paths are reconstructed based on the lane line segments to obtain a target memory path.
2. The method according to claim 1, characterized in that The densification processing is performed on the original path points of multiple different floors in the original memory path to obtain multiple path points, and a path point sequence is constructed based on the multiple path points, including: Traversing the floor attributes of each original path point, taking the original path point whose floor attributes have changed as the key path point, and adding the floor attributes corresponding to the key path point to the feature array; Performing an equal-interval densification process on all original path points in the original path to obtain an initial path point sequence, and calculating a matching degree between each path point in the initial path point sequence and the key path point; Determine the target path point corresponding to the key path point in the initial path point sequence by using the matching degree; Extracting the floor attribute corresponding to the key path point from the feature array, and adding the floor attribute to the target path point corresponding to the key path point in the initial path point sequence; The path point sequence is constructed based on the target path point carrying the floor attribute and other path points, wherein the other data points are data points in the initial path point sequence that do not correspond to the key path points.
3. The method according to claim 1, characterized in that The matching of the path points in the path point sequence with the point cloud in the lane line point cloud data to obtain a corresponding relationship between the point cloud and the path points includes: Calculating the correlation between the point cloud in the lane line point cloud data and each path point in the path point sequence; The path points whose correlations meet preset conditions are used as the path points for point cloud matching; Construct a correspondence between each point cloud in the lane line point cloud data and a path point matched with the point cloud.
4. The method according to claim 3, characterized in that The calculating the correlation between the point cloud in the lane line point cloud data and each path point in the path point sequence includes: Acquire a first spatial coordinate and a first floor attribute corresponding to each point cloud in the lane point cloud data, and acquire a second spatial coordinate and a second floor attribute corresponding to each path point in the path point sequence; Calculating the Euclidean distance between the point cloud and the path point based on the first spatial coordinates and the second spatial coordinates, and determining the attribute difference between the first floor attribute and the second floor attribute; The correlation between the point cloud and each of the path points is calculated based on the Euclidean distance and the attribute difference.
5. The method according to claim 3, characterized in that: The dividing all point clouds in the lane point cloud data into different types of lane point cloud sets based on the corresponding relationship includes: Acquire the path point corresponding to each point cloud based on the corresponding relationship, and determine the spatial coordinates of the path point; For each point cloud, construct a coordinate vector using a first spatial coordinate corresponding to the point cloud, a spatial coordinate of a path point matched by the point cloud, and a spatial coordinate of a next path point; Analyzing the orientation relationship of the coordinate vector to obtain the point cloud orientation type of the point cloud; Construct the corresponding lane line point cloud set based on the point cloud of the same point cloud orientation type.
6. The method according to claim 1, characterized in that The lane line segmentation is constructed by using different types of lane line point cloud sets, including: Optimizing the point cloud in the lane line point cloud set to obtain an optimized lane line point cloud set; Obtaining adjacent point clouds in the optimized lane line point cloud set; Using the adjacent point clouds to construct a relationship vector, and obtaining the sequence number difference between the adjacent point clouds; Calculating angle data between adjacent point clouds using the relationship vector, and taking adjacent point clouds whose angle data fall within a preset angle range as inflection points; The adjacent point clouds whose serial number difference is greater than the preset difference value are regarded as discontinuity points; The lane line point cloud is segmented using the inflection points and the discontinuity points to obtain the lane line segments.
7. The method according to claim 1, characterized in that The path reconstruction based on the lane line segmentation to obtain the target memory path includes: Traversing the length of each lane line segment, and taking the lane line segment whose length meets the preset length as the target lane line segment; Acquire a path to be optimized from the target lane line segment, and select a starting point and an end point from the path to be optimized; A path is reconstructed based on the starting point and the ending point to obtain reconstructed path segments; A collision test is performed on the reconstructed path segment. If the reconstructed path segment passes the collision test, the target memory path is constructed using the reconstructed path segment.
8. The method according to claim 7, characterized in that The selecting a starting point and an ending point from the path to be optimized includes: Acquire two reference points from the point cloud corresponding to the target lane segment, and construct a reference vector based on the spatial coordinates of the reference points; Obtaining a connection vector corresponding to each pair of adjacent points in the path to be optimized; Calculating the vector inner product and vector modulus of the connection vector and the reference vector; Based on the vector inner product and the vector modulus, determining an angle relationship between a path point in the path to be optimized and the target lane line segment; The angle relationship is used to select parallel points corresponding to the target lane line segment, and a point is taken from each end of the parallel points as the starting point and the ending point respectively.
9. The method according to claim 7, characterized in that: The path reconstruction is performed based on the starting point and the ending point to obtain the reconstructed path segment, including: Acquire a first distance between the starting point and the ending point; Comparing the first distance with a preset threshold to obtain a comparison result, and performing path reconstruction according to a path reconstruction strategy corresponding to the comparison result to obtain a candidate path segment, wherein the candidate path segment includes a plurality of candidate path points; Acquire matching points corresponding to the candidate path points from the original memory path, and acquire attribute information of the matching points; The candidate path points in the candidate path segment are assigned values using the attribute information of the matching points, and the reconstructed path segment is constructed using the assigned candidate path points.
10. The method according to claim 9, characterized in that The performing path reconstruction according to the path reconstruction strategy corresponding to the comparison result to obtain candidate path segments includes: If the first distance is less than a preset threshold, obtaining a heading and a point spacing, calculating a connection path using the spatial coordinates corresponding to the starting point, the spatial coordinates corresponding to the end point, the heading and the point spacing, and constructing the candidate path segment based on the connection path; If the first distance is greater than or equal to the preset threshold, a first candidate point and a second candidate point are obtained at the starting point and the ending point, and the candidate path segment is constructed based on the starting point, the first candidate point, the second candidate point and the ending point; wherein the distance between the first candidate point and the starting point is greater than the preset distance, and the distance between the second candidate point and the ending point is greater than the preset distance.
11. The method according to claim 7, characterized in that The performing collision test on the reconstructed path segments comprises: Obtaining the nearest point of each point cloud in the lane line point cloud data on the target memory path, and calculating a second distance between each point cloud in the lane line point cloud data and the corresponding nearest point; Using the second distance to determine whether the point cloud is located in a corresponding collision range, wherein the collision range is constructed with the nearest point of the point cloud on the target memory path as the center and a preset expansion radius; If the point cloud is within the collision range, counting is performed and it is detected whether N point clouds appear consecutively within the collision range. If N point clouds appear consecutively within the collision range, it is determined that the collision test has failed; or, if N point clouds appear consecutively within the collision range, it is determined that the collision test has passed.
12. A device for reconstructing a cross-floor memory path, characterized in that: The device comprises: An acquisition module is used to obtain the original memory path and the lane line point cloud data of the vehicle during the current memory path; A processing module, configured to perform densification processing on the original path points of multiple different floors in the original memory path to obtain multiple path points, and construct a path point sequence based on the multiple path points; A matching module, configured to match the path points in the path point sequence with the point clouds in the lane line point cloud data to obtain a correspondence between the point clouds and the path points, and to divide all point clouds in the lane line point cloud data into different types of lane line point cloud sets based on the correspondence; The reconstruction module is used to construct lane line segments using different types of lane line point cloud sets, and to reconstruct the path based on the lane line segments to obtain the target memory path.
13. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for reconstructing a cross-floor memory path as described in any one of claims 1 to 11 by executing the computer instructions.
14. A vehicle, characterized in that: The vehicle includes: a path planning system and a controller; wherein the controller stores instructions for controlling the operation of the path planning system, and the path planning system is used to execute the cross-floor memory path reconstruction method described in any one of claims 1 to 11 according to the instructions of the controller.
