on
Vehicle Kinematic Model
$\dot{x}_c = v \cos{(\theta + \beta)}$
$\dot{y}_c = v \sin{(\theta + \beta)}$
$\dot{\theta} = \frac{v \cos{\beta} \tan{\delta}}{L}$
$\dot{\delta} = \omega$
$\beta = \tan^{-1}(\frac{l_r \tan{\delta}}{L})$
where the inputs are the bicycle speed $v$ and steering angle rate $\omega$. The input can also directly be the steering angle $\delta$ rather than its rate in the simplified case. The Python model will allow us both implementations. In order to create this model, it’s a good idea to make use of Python class objects. This allows us to store the state variables as well as make functions for implementing the bicycle kinematics. The bicycle begins with zero initial conditions, has a maximum turning rate of 1.22 rad/s, a wheelbase length of 2m, and a length of 1.2m to its center of mass from the rear axle. From these conditions, we initialize the Python class as follows: