I remember I answered a similar question time ago from another user. It seems a popular question xD.
From the point of view of control, it is okei to use this _expression_ since when the angle is big (he vehicle still converges to the desired behavior, and when it is small is a very good approximation (so we save some computations).
What I don't seem to understand is the following lines
float carrot_angle =
dist_carrot / abs_radius;
carrot_angle = Min(carrot_angle,
M_PI / 4);
carrot_angle = Max(carrot_angle,
M_PI / 16);
Specifically, I was expecting some kind of atan function
used for the computation of "carrot_angle". How could the
ratio itself be an angle? I wonder if this is a bug that is
somewhat masked by the Min/Max bounding in the next two lines.