Disclosure of Invention
The technical problem to be solved by the invention is as follows: how to ensure that the two-dimensional radar sparse data can be used for obtaining the correct tracking effect and reduce the data error in the data processing process, provides a dynamic obstacle tracking method based on sparse laser radar data.
The invention solves the technical problems through the following technical scheme, and the invention comprises the following steps:
s1: eliminating static background
Determining a travelable area, deleting the ground point cloud of the travelable area and the point cloud exceeding a specified height, and obtaining the residual point cloud as the obstacle point cloud;
s2: dynamic point cloud clustering
Clustering the obstacle point clouds in the step S1, and dividing the point clouds belonging to different dynamic obstacles into different clusters;
s3: convex hull extraction
After the clustering of step S2, extracting a convex hull of the clustered point cloud;
s4: feature extraction
Carrying out fuzzy classification by utilizing the angle information of the convex hull, and fitting the point clouds to obtain position information of the obstacle;
s5: data association
Associating positions belonging to the same barrier at different moments according to position information of the barriers in different frames, fitting the positions into a track, associating the tracked track with the clustered point cloud detected by the current data frame, and updating the motion track of the dynamic barrier;
s6: predicting trajectories
Predicting the position of the dynamic obstacle using a trajectory function: increasing x of x value of last track point according to track functionpSubstituting into the formula to find ypCoordinate (x)p,yp) Namely predicting the track point, the formula brought in during the straight line prediction is as follows:
wherein (x)i,yi) Is a locus of a fitted straight line, a0To fit the slope of the straight line, a1For the intercept of a fitted straight line, R2Summing the distance differences of the locus points and the fitted straight line;
the formula carried in when predicting a polynomial curve is as follows:
wherein (x)i,yi) Is a locus point of a fitting cubic polynomial, a0、a1、a2、a3To fit coefficients of a cubic polynomial, R2Summing the distance differences of the locus points and the fitted curve;
the trajectory functions include a straight line prediction function and a polynomial curve prediction function, and the straight line prediction function is as follows:
xp=x[n]+(len)/(t*n)
wherein, X [ n ] is the current track point, len is the sum of the increment absolute values of the X coordinate of the existing track point, t is an adjustable parameter, n is the number of the existing track points, and the possible X transformation degree at the current moment is estimated according to the average value of the X transformation degree of the existing track in the straight line prediction;
the polynomial curve prediction function is as follows:
xp=x[n]+len/(t*n)*k
wherein X [ n ] is the current track point, t is an adjustable parameter, n is the number of the existing track points, len is the sum of Euclidean distances of the existing track points, k is the slope of the current track, and in the polynomial curve prediction, the X increment of the current moment is estimated according to the average value of the X increments among the existing track points.
Further, in the step S1, the point cloud only includes coordinate information, and the coordinate is in the form of two-dimensional coordinates (x, y).
Further, the specific processing procedure in S1 of the step includes the following steps:
s11: determining an acquisition plane
Setting the height of the acquisition plane to be 0.8-1.0 m according to the height of the main obstacle;
s12: generating a template
Constructing a grid map or converting an existing mine map into the grid map, wherein the grid map is divided into an obstacle layer, an expansion layer and a travelable layer;
s13: pretreatment of
Loading the grid map built in the step S12, setting the thickness of the expansion layer to be 0.05 m, receiving the original data of the laser radar, processing the point cloud, and deleting the illegal value in the point cloud;
s14: filtering point cloud
And comparing the point coordinates with the grid map to judge whether the point is positioned on a travelable layer, and if the point is positioned on the travelable layer, keeping the point or deleting the point.
Further, in step S2, the point cloud is divided into a core point and a boundary point in the clustering process, where the core point is a clustered skeleton, and the clustering process involves two core parameters, respectively Eps and MinPts, and Eps is a boundary formula of a neighborhood between the point clouds, as shown below:
Ne={xi∈D|distance(xi,xj)<Eps}
wherein x isiRepresenting points in a point cloud, distance (x)i,yi) The Euclidean distance between point clouds is shown, Eps is a distance threshold value of the clustering algorithm classified into the same type of point clouds, and D is a range field;
when the distance between the two points is smaller than Eps, judging that the two points are in the same neighborhood; MinPts is a parameter for judging the core point, and if the number of points with the distance in the neighborhood of the points smaller than Eps is larger than MinPts, the points are judged to be the core points.
Further, the clustering process includes the steps of:
s21: counting the number of points in each point neighborhood, storing the number into pts attributes, judging whether each point pts attribute is larger than MinPts, if so, judging that the point is a core point, and storing the core point into a core point array;
s22: traversing the array of core points concatenates core points within the neighborhood of the current core point into one class,
s23: and traversing all the boundary points, and merging the boundary points in the neighborhood of the core point into the core point class.
Further, in step S4, the moving objects in the mine environment are pedestrians and mine cars, the pedestrians are classified into elliptical point clouds, the mine cars can be classified into rectangular point clouds and linear point clouds when viewed from different angles, and the moving objects are classified into elliptical, rectangular and linear points based on the characteristics of the moving objects and the angle information of the convex hulls.
Further, in step S4, the included angle information of the point cloud is obtained by a convex hull, and after a group of convex hull points of the point cloud is obtained, a vertex in which the closest point to the laser radar is an angle is selected, and angle information using the closest point as the vertex is counted and used as the angle feature of the point cloud, that is, the included angle information.
Further, the specific processing process of the point cloud angular features comprises the following steps:
s41: taking the point closest to the laser radar in the obtained convex hull array as a vertex;
s42: taking a point at the lower left corner in the convex hull array as a starting point, starting clockwise as an end point of one side of the angle, starting anticlockwise, taking a convex hull point as an end point of the other side of the angle, calculating the angle, and counting the maximum value of the angle and summing;
s43: obtaining an angle classification standard through angle statistics after point cloud angle features of the dynamic barrier are extracted, and determining an angle type according to the angle classification standard;
s44: and judging the source of the point cloud data according to the angle type, fitting different types of graphic point clouds by using different fitting formulas according to different driving characteristics of different sources, and further calculating the set characteristics of the graphic point clouds.
Furthermore, an ellipse fitting formula is used for fitting the ellipse to obtain the center of the circle, the major axis, the minor axis and the deflection angle of the ellipse, and the ellipse fitting formula is as follows:
f=∑(xi 2+Axiyi+Byi 2+Cxi+Dyi+E)
wherein (x)i,yi) For the points of the fitted ellipse, A, B, C, D, E is the coefficients of the non-standard equation of the fitted ellipse;
and fitting a straight line by using a straight line fitting formula to obtain the length, the coordinates of the starting point, the coordinates of the ending point and the coordinates of the central point, wherein the straight line fitting formula is as follows:
wherein (x)i,yi) Is the locus point of the fitting straight line, a is the slope of the fitting straight line, b is the intercept of the fitting straight line, R2Summing the distance differences of the locus points and the fitted straight line;
obtaining coordinates of a center point, a length, a width and four corner points of a rectangle by using the existing rectangle fitting function; the point representing the position is then determined based on the difference between the pedestrian and the mine car, and the position of the vehicle is represented by a right-angle point formed by the front end of the car and the side near the radar when the position point is determined. Represents an ellipse of the pedestrian, and takes the center point of the ellipse as the position point of the pedestrian.
The invention also provides a dynamic obstacle tracking system based on sparse lidar data, which comprises:
the elimination module is used for determining a travelable area and deleting ground point clouds and point clouds exceeding a certain height in the travelable area;
the clustering module is used for clustering the obstacle point clouds and dividing the point clouds belonging to different dynamic obstacles into different clusters;
the convex hull extracting module is used for extracting a convex hull of the clustered point cloud after clustering;
the characteristic extraction module is used for carrying out fuzzy classification by utilizing the angle information of the convex hull and then fitting the point clouds to obtain the position information of the obstacle;
the data association module is used for associating positions at different moments belonging to the same barrier according to the position information of the barrier in different frames, fitting the positions into a track, associating the tracked track with the clustered point cloud detected by the current data frame, and updating the motion track of the dynamic barrier;
the track prediction module is used for predicting the position of the dynamic obstacle by utilizing a track function;
the control module is used for controlling the other modules to execute instructions;
the elimination module, the clustering module, the convex hull extraction module, the feature extraction module, the data association module and the track prediction module are all electrically connected with the control module.
Compared with the prior art, the invention has the following advantages: according to the dynamic obstacle tracking method and system based on the sparse lidar data, the static obstacle lidar point cloud is filtered by using the grid map, and the extremely sparse point cloud is filtered by the remaining few static point clouds through a dbscan algorithm, so that the final filtering effect is enhanced; the point cloud is classified into an ellipse, a rectangle and a straight line in a fuzzy way by extracting the angle information of the convex hull of the point cloud, and then the correct point cloud position point is obtained by assisting the size of the point cloud fitting graph, so that the accuracy of data association is ensured; the characteristics of the nearest neighborhood and the multi-target hypothesis algorithm are integrated, the multi-target association algorithm is improved, and the data association work can be efficiently completed on the premise of ensuring the accuracy.
Detailed Description
The following examples are given for the detailed implementation and specific operation of the present invention, but the scope of the present invention is not limited to the following examples.
The embodiment provides a technical scheme: a dynamic obstacle tracking method based on sparse lidar data, as shown in fig. 1, includes the following steps:
the first step is as follows: eliminating static background
The data collected by the laser radar comprises static obstacles and dynamic obstacles, and for the tracking of the dynamic obstacles, the static obstacle point cloud is noise, and the part of the point cloud is to be removed. The general process of background elimination based on three-dimensional radar is as follows: firstly, determining a travelable area, then deleting a ground point cloud and a point cloud exceeding a certain height of the travelable area, and obtaining a residual point cloud which is an obstacle point cloud. This process can delete ground point clouds, overly high ambient point clouds but still have a partially static point cloud retention. The two-dimensional radar has a small data amount, and noise is reduced as much as possible in order to achieve a desired effect.
The specific processing procedure adopted in this embodiment is as follows:
1) and determining an acquisition plane, wherein the two-dimensional radar can only acquire information of one horizontal plane, and when the horizontal plane is determined, the height of a main obstacle must be considered, and the height of the general mine mobile equipment is 0.8-2.4 meters and the leg length of a pedestrian is generally 0.8-1.1 meters by looking up related data, so that the acquisition plane is set to be 0.8-1.0 meter.
2) And generating a template, and constructing a grid map by using a mapping function packet or converting an existing mine map into the grid map, wherein the grid map is divided into an obstacle layer, an expansion layer and a travelable layer.
3) Preprocessing, namely loading the built grid map, and accurately filtering static point cloud when the distance between the dynamic barrier and the static barrier is more than 0.1 m; when the distance between the dynamic barrier and the static barrier is 0-0.1 m, part of dynamic point cloud can be filtered due to the expansion layer, so that the mistaken deletion occurring here is reduced by reducing the size of the expansion layer, the thickness of the expansion layer is set to be 0.05 m in the embodiment, and the original data of the laser radar is received.
Since the data coordinate system collected by the lidar is referred to as "laser" and the static map coordinate system is referred to as "map", the lidar data is then converted to the map coordinate system. The point cloud data is then processed to remove illegal values such as inf and invalid values such as (0, 0) from the point cloud.
4) Filtering the point cloud, comparing the point cloud with a grid map to judge whether the point cloud is in a travelable layer, and if the point cloud is in the travelable layer, keeping the point cloud, otherwise, deleting the point cloud; the point cloud of the obstacle will float small in size because of the instability of the lidar data and is also considered a static obstacle for the point cloud at the dilated layer.
The created grid map is shown in fig. 2(a), the original point cloud is shown in fig. 2(b), after actual data acquisition and background elimination, the effect map is shown in fig. 2(c), and most of the static point cloud is filtered through background elimination. Even if a small part of static point cloud is still remained, the static point cloud remained after processing is distributed sparsely, and can be completely filtered through a subsequent clustering algorithm. The interference of static point cloud is eliminated, the data volume is further reduced, and the subsequent algorithm processing is quicker; and the obstacle can be more accurately tracked without static point cloud interference.
The second step is that: dynamic point cloud clustering
The dynamic point cloud contains data of a plurality of dynamic obstacles, and the point cloud has only coordinate information. In order to achieve tracking of dynamic obstacles, point clouds belonging to the same obstacle must be classified into one category. Therefore, comprehensive characteristics of a point cloud can be extracted to serve as characteristics of the dynamic obstacle. Two commonly used clustering algorithms DBSCAN and K-means are compared. k-means requires the number of clusters to be specified, k, and the initial cluster center has a large influence on the clustering. k-means classifies any point into a certain class and is sensitive to abnormal points. The DBSCAN can eliminate noise, a neighborhood distance threshold value eps and a sample number threshold value MinPts need to be appointed, and the cluster number can be automatically determined. Because the number of dynamic obstacles is uncertain and there is a significant difference between point clouds belonging to the same obstacle and point clouds belonging to different obstacles, the DBSCAN algorithm is selected for clustering in this embodiment.
DBSCAN is a density-based clustering algorithm that generally assumes that classes are determined by how closely the samples are distributed. The distance between the point clouds of the samples in the same category is close, namely the samples in the same category exist in a short distance around any sample in the category, the point clouds are divided into core points and boundary points by a clustering algorithm, and the core points are clustered frameworks. The algorithm has two core parameters Eps, MinPts. Eps is the boundary formula for the neighborhood between point clouds, as follows:
Ne={xi∈D|distance(xi,xj)<Eps} (1)
the distance between two points is less than Eps, then it is considered to be in the same neighborhood. In addition, MinPts is a parameter for determining the core point, xiRepresenting points in a point cloud, distance (x)i,yi) The Eps is classified into the same kind of point cloud by clustering algorithm according to Euclidean distance between point cloudsDistance threshold, D is range domain. The field in mathematics is defined as belonging to the neighborhood: the region within a given object radius e is called the neighborhood of e for the object.
The clustering process is as follows: firstly, counting the number of points in each point neighborhood, storing the number into pts attributes, then counting each point pts attributes, judging whether the number is greater than MinPts, if so, determining a core point, and storing the core point array; secondly, the core point array is traversed in a depth mode, and the core points in the neighborhood range of the current core point are connected in series to form a class; and finally, traversing all the boundary points, and merging the boundary points in the neighborhood of the core point into the core point class. The effect graph after clustering is shown in fig. 3, three obstacles are arranged in the view field, and two pedestrian obstacles and one vehicle-like obstacle are shown in fig. 3.
The result shows that the point clouds belonging to different dynamic obstacles can be divided into different clusters after being clustered by the DNSCAN algorithm. And the method has a filtering function on static obstacle point clouds which are not completely filtered, and the point clouds are few in number, are not distributed in a concentrated mode and cannot be classified. After clustering, the part of the point cloud is filtered by deleting the point cloud without classification.
The third step: convex hull extraction
After point cloud clustering, each class is used as a detected moving object, and moving object data belonging to different frames are associated to determine the track of the moving object. Before this, there is characteristic information for each class. The convex hull (covex hull) of the set of points Q refers to a minimum convex polygon, satisfying that the points in Q are either on the polygon sides or within them. The polygon represented by the line segment in fig. 5 is a convex hull of the point set Q ═ { p0, p 1.. p12 }. The contour shape of the clustered point cloud is the main characteristic of classification, and a convex hull of the clustered point cloud is obtained by using a gram scanning algorithm. The algorithm is based on the property of cross product, and the length | a × b | of the cross product can be interpreted as the area of the parallelogram formed when the two cross product vectors a, b share the starting point.
The cross product formula of the two-dimensional vector is as follows:
if p1Xp2 is less than zero, p1 to p2 are counterclockwise, and if p1Xp2 is greater than zero, p1 to p2 are clockwise.
And enveloping all point clouds in the same group in a polygonal form by the convex hull extracted by the graham algorithm. The convex hull reflects the outer contour information of the dynamic barrier, and then the geometric characteristics of the dynamic barrier are extracted.
The fourth step: feature extraction
The most critical to achieving tracking of dynamic obstacles is to associate the positions of the obstacles at different times into a group. The present embodiment provides a way to correlate data based on the observation of a two-dimensional point cloud. The main basis for the correlation data is the geometry of the dynamic obstacle. The data processing is divided into two steps: firstly, carrying out fuzzy classification on the obstacles into ellipses, rectangles and straight lines according to the extracted angle information of the convex hull; and then, fitting different types of point clouds, and extracting interested position points and geometric features.
The main moving objects in the mine environment are pedestrians and mine cars, the pedestrians are similar to an ellipse, and the mine cars can be classified into rectangular point clouds and linear point clouds when observed from different angles. Arbitrary point clouds can be classified into these three geometries. According to the fact, a calculation method divides the point cloud after clustering into three types of 'e' (ellipse), 'r' (rectangle) and 'l' (straight line).
Data obtained by the radar can only be point clouds of one direction of a moving object, as shown in fig. 4, the point clouds of one direction only reflect partial geometrical characteristics of an obstacle, and the most prominent geometrical characteristic is included angle information. For pedestrians, the point clouds in all directions are similar to circular arcs, and vehicles can be summarized as rectangles. The fuzzy classification of the point cloud according to the information of the included angle is shown in fig. 4. Point clouds like 4(a) are divided into ellipses, point clouds like 4(b) are divided into straight lines, and point clouds like 4(c) are divided into rectangles.
The angle information of the point cloud is obtained by convex hull, as shown in fig. 5.
And obtaining a group of convex package points of the point cloud after calculation of the graham algorithm. And observing and finding according to radar data of actual vehicles and pedestrians. The closest point to the lidar is typically the vertex of the angle. And counting angle information taking the closest point as a vertex, and taking the angle information as the angle characteristic of the point cloud. The specific treatment process is as follows:
1) and taking the point closest to the laser radar in the obtained convex hull array as a vertex.
2) And taking the point at the lower left corner in the convex hull array as a starting point, starting clockwise as an end point of one side of the angle, starting anticlockwise, taking the convex hull point as an end point of the other side, calculating the angle by using a formula, counting the maximum value of the angle and summing, and in the process of traversing all the convex hull points, when the end point is 0.05 m away from the vertex, considering the angle to be invalid. A large number of angle operation results are summarized, and the classification range of the angle pair clustering point clouds is shown in table 1:
TABLE 1 Angle Classification Standard Table
3) And obtaining the classification standard shown in the table 1 through angle statistics after the radar point cloud angle features of the pedestrians and the vehicle-like obstacles are extracted. Firstly, the average angle value is used as a basis for judgment, and if the average angle value is within the interval of 0.7-3.0, the maximum angle value is used as a basis, experiments prove that the accuracy of the method is about 90%.
4) After the type is determined, whether the point cloud data is a source vehicle or a pedestrian can be determined, and the point cloud is further processed according to different driving characteristics of the vehicle and the pedestrian.
And fitting different types of graphic point clouds by using different fitting formulas so as to calculate the set characteristics of the graphic point clouds. And (4) fitting the ellipse by using a formula (3) to obtain the center, the long axis, the short axis and the deflection angle of the ellipse. And (4) fitting a straight line by using a formula (4) to obtain the length, the coordinates of the starting point, the coordinates of the ending point and the coordinates of the central point. And obtaining coordinates of a center point, a length, a width and four corner points of the rectangle by using a rectangle fitting function provided by opencv, and then determining points representing positions according to differences of pedestrians and vehicles.
f=∑((xi-xc)2+(yi+yc)2-R2)2(3)
Wherein (x)i,yi) For the points of the fitted ellipse, A, B, C, D, E is the coefficients of the non-standard equation of the fitted ellipse;
wherein (x)i,yi) Is the locus point of the fitted straight line, a is the slope of the fitted straight line, b is the intercept of the fitted straight line, R2Summing the distance differences of the locus points and the fitted straight line;
and (3) processing the vehicle: as shown in FIG. 6, assuming a mine car is traveling, the corresponding lidar data will undergo three state changes, the first case is shown in FIG. 6(a), where the car is near the rectangular boundary formed by the point cloud on the head and near the radar side, the second case is shown in FIG. 6(b), where the car is near the straight boundary formed by the point cloud on the radar side, and the third case is shown in FIG. 6(c), where the car is near the rectangular boundary formed by the point cloud on the tail and near the radar side.
The present embodiment selects the right-angle point composed of the vehicle front end and the side near the radar side to represent the position of the vehicle, because the points at which the vehicle can most reflect the wheel profile information in this process are the right-angle point a at the vehicle front end and the right-angle point b at the vehicle rear end. These two points reflect the front-most and rear-most ends of the vehicle, respectively, and collectively reflect the sides of the vehicle. Then, the length len of the vehicle can be obtained after the straight line state of the vehicle is collected, and the position of the point a can be calculated according to the position of the point b according to the length len, namely the front end right-angle point can be obtained under three conditions. The process of estimating the front end right-angle point is shown in fig. 7. The method comprises the following steps:
1) and determining the driving direction of the vehicle, and performing vector difference according to the position of the rectangular central point of the current position of the vehicle and the position of the rectangular central point at the last moment. A vector a of the vehicle's direction of travel is obtained. If the current state is a straight line state, the difference between the starting point and the ending point of the straight line is respectively used as a vector A;
2) determining the running state of the vehicle, and obtaining a vector B by using the difference between the center point of the current fitted rectangle and the collected right-angle point;
3) and calculating an angle between the vector A and the vector B, and if the angle is more than 90 degrees, considering that the center point of the rectangle is in the third state before the right-angle point. If the central point of the rectangle is less than 90, the central point of the rectangle is considered to be a first state after the right-angle point;
4) in the third state, the right-angle point a is calculated by using the formulas (5) and (6).
Xa=Xb+len*cos(arctan(angle)) (5)
Xa=Xb+len*sin(arctan(angle)) (6)
And (3) processing the pedestrian: the center of the ellipse represents the position of the pedestrian. Because the geometric characteristics of the pedestrians are similar to an ellipse, the floor area of a single pedestrian is within 1 square meter, the size of the ellipse representing the pedestrians is small, and the distance between the center of the ellipse and the outline is short, the center of the ellipse represents the position of the obstacle of the pedestrian is feasible.
And obtaining dynamic obstacle type information and position information within an error allowable range through feature extraction, and then performing data association according to the obtained reliable information.
The fifth step: data association
After the above operation, the original point cloud data is converted into a characteristic graph as shown in table 2. The data association is to associate the tracked track with the clustering point cloud detected by the current data frame so as to update the motion track of the dynamic obstacle. The invention combines Nearest Neighbor (NN) and multi-target hypothesis tracking (MHT) algorithms. A multi-target association method based on the weight distance is provided.
TABLE 2 Point cloud characteristic information Table
Common data association algorithms include nearest neighbor algorithm and multi-target hypothesis tracking algorithm. The multi-target association mode which combines the characteristics of the two algorithms and takes the weight distance as the association basis is called as the weight distance algorithm. The weight distance algorithm gives different weights according to the quantitative characteristics of the point cloud in various aspects and the importance degree of the characteristics in data association. Therefore, the characteristics of the obstacle point cloud are comprehensively considered, and the probability calculation time is simplified.
Distance between obstacle tracking points; the width and length of the obstacle; the included angle between the rectangular boundary of the obstacle and the x coordinate axis; the angle between the rectangular boundary of the obstacle and the y coordinate axis. For the same obstacle, the geometrical size of the point cloud fitting may change at different distances in different directions, that is, the size factor may increase the error. Similarly, the two-dimensional radar sparse point cloud angle information is not stable enough. And finally, the point cloud weight takes the fuzzy classification type of the point cloud and the corrected position as an association basis.
The weight formula is as follows: weight ═ coef [0 ]. W [0] + coef [1] -W [1] (7)
The Coef [ ] array in weight formula (7) is the coefficient of each weight, W [0] is the type weight, if the same type value is 1, the different type value is-1; w1 is the distance weight, the point of the track prediction is the distance from the current frame point cloud, since the closer the distance, the higher the degree of association and the higher the weight. The distance weight is inversely related to the final weight. In the embodiment of the present invention, the (coefficient-distance) is used as the weighting distance.
Referring to the association strategy of the multi-target association algorithm, the track update matching process is discussed in cases as shown in fig. 8.
The matching process mainly considers the following three cases:
in the first case, a newly emerging obstacle is considered to be a newly emerging obstacle if its association weights with all trajectories are less than the successfully associated limit value wei _ limit. And establishing a new track. Since only one location point cannot predict the trajectory, the initial radius pre _ radius is defined to draw a circle as shown in fig. 8, and the distance between the point cloud location and the circle trajectory is taken as the basis for the next time.
In the second case. The obstacle is matched with the trajectory, and if the obstacle and the existing trajectory have the correlation value which is greater than the successful correlation limit value wei _ limit and is the maximum correlation value, the information of the trajectory is updated by the information provided by the obstacle. As there are instances of fuzzy classification errors. Different point cloud types may be included in the trajectory. And counting the number of different types of point clouds in the track during updating, wherein the track type is the type with the largest number. And updating the track type number, the track size and the track position. And the current obstacle information and the predicted track point information are obtained by adding weights according to the thought track position and the size of Kalman filtering.
In the third case, the obstacle disappears, some trajectories do not match the obstacle, and the trajectories are deleted.
And a sixth step: trajectory prediction
And after the characteristic graphs are clustered, storing the central coordinates of the characteristic graphs as track points. For more accurate description and prediction of the motion trajectory, a least squares polynomial curve is preferably used to fit each trajectory, and the formula is as follows:
A*X=Y(8)
wherein (x)i,yi) Is a locus point of a fitting cubic polynomial, a0、a1、a2、a3To fit coefficients of a cubic polynomial, R2Summing the distance differences of the locus points and the fitted curve;
and (4) bringing a set of trace points to solve the A parameter vector which minimizes the value of the formula (8). And (3) calculating a sufficient number (more than or equal to 4) of track points required by the track by using the polynomial curve least square method of the formula (9), and using a method of fitting a straight line by using the least square method of the formula (10) as a predicted track when the number of the acquired track points is less than 4.
Wherein (x)i,yi) Is a locus of a fitted straight line, a1Is the slope of the fitted line, a0Is the intercept of a fitted straight line, R2Difference in distance between locus point and fitted straight lineThe sum of (1);
the implementation of the track prediction is divided into straight line prediction and polynomial curve prediction, and the basic flow is that firstly, according to the derived fitting function, the x of the x value of the last track point is properly increasedpSubstituting into the formula to find ypCoordinate (x)p,yp) Namely the predicted track points.
xp=x[n]+(len)/(t*n)(11)
xp=x[n]+len/(t*n)*k (12)
Equation (11) is a straight line prediction xpIs calculated by the formula X [ n ]]The current track point is len, the sum of the increment absolute values of the x coordinate of the existing track point is len, t is an adjustable parameter, and n is the number of the existing track points. The embodiment estimates the possible x transformation degree at the current moment according to the average value of the x transformation degrees of the existing tracks. Equation (12) is a calculation equation of polynomial curve prediction xp, X [ n ]]And n, t and the meanings in the straight line prediction are correspondingly the same, len is the sum of Euclidean distances of the existing track points, and k is the slope of the current track. The curve prediction estimates the possible x transformation degree at the current moment by using the average Euclidean distance of the existing track, and the transformation direction of the curve is the tangential direction. The trajectory prediction effect graph is shown in fig. 9, where fig. 9(a) is a straight line-fitted trajectory graph and fig. 9(b) is a polynomial-fitted trajectory graph.
In order to verify the feasibility of the algorithm, a grAN _ SNhing map building algorithm is used for building a grid map of a laboratory, then the algorithm intercepts and captures laser radar data which are directly transmitted to a navigation module, and data processing is carried out to generate the obstacle track prediction point cloud. And transmitting the generated point cloud to a navigation module through a ros system framework. And then, receiving the track point cloud generated by the algorithm for navigation under the assistance of the track point cloud, wherein the navigation result is as follows: compared with the situation that the algorithm is not processed, the track point cloud generated by the algorithm can effectively assist the obstacle avoidance navigation function of the robot.
In summary, in the two sets of dynamic obstacle tracking methods based on sparse lidar data according to the embodiments, the grid map is used to filter the static obstacle lidar point cloud, and the remaining few static point clouds are filtered by the dbscan algorithm to obtain a very sparse point cloud, so that the final filtering effect is enhanced; the point cloud is classified into an ellipse, a rectangle and a straight line in a fuzzy way by extracting the angle information of the convex hull of the point cloud, and then the correct point cloud position point is obtained by assisting the size of the point cloud fitting graph, so that the accuracy of data association is ensured; the characteristics of the nearest neighborhood and the multi-target hypothesis algorithm are integrated, the multi-target association algorithm is improved, the data association work can be efficiently completed on the premise of ensuring the accuracy, and the method is worthy of being popularized and used.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.