A simple simulation of the bicycle model using Qt.
- Qt Creator 4.8.1
- Qt 5.12.1
- GNU Make 3.82.90
- Defined vehicle paramaters
- X position.
- Y position.
- Wheelbase, which is the distance between the centers of the front and back wheels.
- Theta, which is the orientation of the vehicle.
- Steering angle.
- Velocity, which in this project is set as a constant number.
- Implemented WASD Controls
- On keypress W -> Set max positive velocity to go forward.
- On keypress S -> Set max negative velocity to go backward.
- On keypress A -> Set max positive steering angle to go left.
- On keypress D -> Set max negative steering angle to go right.
- On Keyrelease W or S -> Reset the velocity to zero.
- On Keyrelease A or D -> Reset the Steerng angle to zero.
- Update X position, Y position and theta every 20 msec based on vehicle paramaters set by the keyboard inputs.
- Delta(X) = Velocity * cos(Theta).
- Delta(Y) = Velocity * sin(Theta).
- Delta(Theta) = (Velocity / Wheelbase) * tan(Steering angle).
- Set the new paramater to old paramaters + deltas.