6.2. Kinematics for Driving#
Cars are more complex than differential drive robots: they cannot turn in place, and they typically have front-wheel steering.
![Splash image with steampunk autonomous car](_images/S62-Autonomous_Vehicle_with_LIDAR_and_cameras-06.jpg)
In this section we introduce a kinematic model for cars. Unlike the differential drive robots of the previous chapter, cars have four wheels, two of which are used for steering, and two of which are used to induce linear motion (either the two rear or two front wheels, except in the case of four-wheel drive vehicles). Therefore, we might choose to model the car as having two inputs: a steering angle and an acceleration. While this might be a more accurate physical model, we will use a slightly simplified model, in which the forward speed and turning rate are the inputs. Unless the car is traveling at high speed, or experiencing large accelerations, this model is accurate enough for most purposes.
6.2.1. Car kinematics#
We will assume that our car has front-wheel steering, and that forward velocity is achieved by actuation of the rear wheels. We assign a body-attached frame to the car with origin at the midpoint of the rear axle and \(x\)-axis pointing forward, as shown in the figure below. If the tires roll without slipping, the instantaneous velocity of the car is always in the direction of the body-attached \(x\)-axis. We denote the forward speed by \(v_\mathrm{car}\) (note that \(v_\mathrm{car}\) denotes the scalar speed of the car, and not the car velocity, which is a vector quantity).
![](https://github.com/gtbook/robotics/blob/main/Figures6/car1.png?raw=1)
At first glance, it may appear that the two front wheels have the same orientation w.r.t. the car frame. This is not the case, however. As the origin of the car frame traces out a curve in the plane, in order for all wheels to roll without slipping, their instantaneous velocities must be tangent to a set of circles that share a common origin, called the center of the turning circle. For the rear wheels, because they share a common axle and maintain a fixed orientation w.r.t. the car frame, the axle coincides with the radius of concentric circles, and each of the rear wheels has instantaneous velocity that is perpendicular to this radius. For the front wheels, the inner wheel follows a circle with smaller radius than the outside wheel.
This kind of steering for the front wheels is called Ackermann steering, as illustrated in the figure above. The physical mechanism required to implement Ackermann steering is slightly complex, but happily we can model the system by using a single virtual wheel placed at the midpoint between the two front wheels, rolling in a direction perpendicular to the line from the center of the turning circle to this midpoint. We denote by \(\phi\) the angle from the car \(x\)-axis to the forward direction of this virtual wheel, as shown in the figure below.
![](https://github.com/gtbook/robotics/blob/main/Figures6/car2.png?raw=1)
The configuration of the car can be represented as \(q = (x,y,\theta, \phi)\), in which \(x,y\) denotes the position of the origin of the car frame, \(\theta\) denotes the orientation of car frame (the angle from the world \(x\)-axis to the car frame \(x\)-axis), and \(\phi\) denotes the steering angle. The inputs to the car are
\(u_1= v_\mathrm{car}\), the linear speed of the car, and
\(u_2 = \dot{\phi}\), the turning rate of the virtual front wheel.
![](https://github.com/gtbook/robotics/blob/main/Figures6/car3.png?raw=1)
6.2.2. Differential Kinematics#
The differential kinematics for the car are specified as an equation, \(\dot{q} = f(q, u_1, u_2)\). The first two components, \(\dot{x}\) and \(\dot{y}\) are straightforward functions of \(v_\mathrm{car}\) and \(\theta\)
The steering angle is also straightforward:
Note that using this model, we cannot directly control the car’s orientation \(\theta\). We cannot even directly choose the steering angle \(\phi\). We have direct control only over \(\dot{\phi}\).
The equation for \(\dot{\theta}\) is slightly more complex. From the figure below, we observe the following
Combining these to eliminate \(v_\mathrm{wheel}\) we obtain
Now, using \(L \dot{\theta} = v_\mathrm{tangent}\) (where \(L\) is the baseline distance between front and rear axles), we obtain
Collecting these terms together, we can write the differential kinematics in matrix form as:
![](https://github.com/gtbook/robotics/blob/main/Figures6/car4.png?raw=1)