Common steering constants and calculations. More...
|static double||angle_to_yaw (double v, float angle)|
|static float||steering_angle (float v, float y)|
|const float||steer_speed_min = 3.8|
Common steering constants and calculations.
|static double Steering::angle_to_yaw||(||double||v,|
Determine yaw rate (in radians/second) for a given speed and steering angle (in degrees). Inverse of steering_angle().
Definition at line 69 of file steering.h.
|static float Steering::steering_angle||(||float||v,|
Determine steering angle (in degrees) for a given speed and yawrate.
This computation is based on a simplified "bicycle model" of vehicle steering geometery. We ignore the slightly different angles of the two front wheels, abstracting them into a single wheel at the midline of the vehicle (like a bicycle or tricycle).
Consider a radius from the center of the vehicle's turning circle to the midpoint of the rear axle. The vehicle's wheelbase is at a right angle to this radius, since the rear wheels do not pivot. The hypotenuse of this right triangle is the slightly longer distance from the midpoint of the front axle back to the center of the circle. As long as the wheels do not slip, the acute angle between the radius and the hypotenuse will be equal to the angle of the front wheel relative to the midline of the vehicle.
Thus, the tangent of the steering angle is the wheelbase (w) divided by the radius (r). We estimate r from the desired yawspeed (y), assuming a constant velocity (v):
y = (2*pi radians) / (2*pi*r/v seconds) y = v/r radians/second r = v/y
Definition at line 53 of file steering.h.
|const double Steering::maximum_yaw|
Definition at line 75 of file steering.h.
|const float Steering::steer_speed_min = 3.8|
Definition at line 26 of file steering.h.