Pure pursuit trajectory tracking algorithm

At present, I have a small trailer and need to use the pure pursuit algorithm, so after reading the blog of the Great God, I compiled this article, and first provided the link of the Great God

The Pure Pursuit algorithm was first used for differential wheel chassis cars, and now it has been adapted for use in Ackerman chassis motion model vehicles (Ackerman motion model is not mentioned here). First of all, in the previous figure, the
Insert picture description here
PP algorithm takes the center of the rear axle of the vehicle as the tangent point, and the longitudinal body of the vehicle as the tangent. By controlling the front wheel angle, the vehicle passes through the target waypoint in a circular arc, ld l_dldIndicates the distance from the center of the current rear axle of the vehicle to the target point, α \alphaα represents the heading angle deviation between the current vehicle and the target waypoint.
According to the law of sine,
ldsin (2 α) = R sin (π 2 − α) \frac{l_d}{sin(2\alpha)} = \frac{R}{sin(\frac{\pi}{2} -\alpha)}s i n ( 2 α )ld=s i n (2Fr.a )R
After simplification,
ldsin α = 2 R \frac{l_d}{sin\alpha}=2Rs i n αld=2 R
can also be expressed as
k = 2 sin α ldk=\frac{2sin\alpha}{l_d}k=ld2sinα
In the formula, k = 1 / R k=1/Rk=1 / R is the arc of the Ackerman motion model vehicle, then the front wheel angleδ \delta[delta] expression is:
[delta] = arctan ⁡ (K L) \ Delta = \ arctan (kL)d=arctan(kL)
L L L is the wheelbase of the vehicle. In summary,
δ (t) = arctan ⁡ 2 L sin (α (t)) ld \delta(t)=\arctan\frac{2Lsin(\alpha(t))}{ l_d}δ ( t )=arctanld2Lsin(α(t))
At ttAt time t , know the angle between the vehicle body and the target pointα (t) \alpha(t)The forward-looking distance between α ( t ) and the target waypointld l_dldIn the case, the wheelbase of the vehicle is a fixed value LLL , the above formula can be used to calculate the current vehicle front wheel deflection control amountα \alphaα .
In order to facilitate subsequent calculations, define a new quantityel e_lel, Which represents the lateral error between the current position of the vehicle and the target point of the vehicle, thus:
sin (α) = elld sin(\alpha)=\frac{e_l}{l_d}s i n ( α )=ldel
The arc calculation can be expressed as:
k = 2 ld 2 elk=\frac{2}{l^2_d}e_lk=ld22el
It can be seen that the essence of the PP algorithm is similar to a horizontal P controller, the coefficient PPP is2 ld 2 \frac{2}{l^2_d}ld22, This PPThe P coefficient is affected by the parameterld l_dldTherefore, a new problem is introduced. How to select the forward-looking distance is the key to the PP algorithm. Generally speaking, the PP algorithm in Autoware is to make the forward-looking distance the current vehicle speed multiplied by a proportional coefficient. Choose a different foresight distance at the moment.
The PP algorithm is actually more suitable for the motion tracking of the differential wheel car. In the Ackerman model, it is not very suitable to use, especially when the speed of the vehicle changes greatly. How to choose the forward looking distance is a big problem. If the selected distance is too short, it will cause the trajectory to fail to converge, and the lateral control of the vehicle will diverge. If the selected distance is too long, it will cause insufficient vehicle cornering.

Guess you like

Origin blog.csdn.net/qq_24649627/article/details/114582464