CPE 471 Final Project - Cal Poly SAE Baja Simulator - Ryan Flatland


Overview

The Cal Poly Baja Simulator was designed to be a simple driving game replicating the dynamics of the real SAE Baja buggy designed and manufactured by Cal Poly mechanical engineers. The full Solidworks CAD assembly was used to create the .obj file used in this game.

The World

The world includes a cone course that the driver can navigate. This is meant to appear very similar to the maneuverability event of the SAE Baja Competition.


Details

The camera was locked into one of several locations, and travelled with the car. Additionally, the user could pitch and pan the view with scrolling - wherever the view is left after scrolling, it will stay there relative to the vehicle any time it turns.

Front View with cones

Hierarchical modelling was used extensively to make the wheels roll at the correct rate relative to the ground, as well as steer with the user input and the steering wheel. The user controls are made to feel similar to those that a real driver would have. Steer, throttle, and brake inputs all ramp up (at a mostly constant rate) when the corresponding keys are pressed, then return zero when released.

A significant focus of this project was the vehicle dynamics. I based the equations off of a combination of real world data from Cal Poly's Baja car and ground vehicle dynamics modelling equations from the ME 416 course. Having driven the actual car numerous times, the modelled dynamics seem to replicate the feel fairly well. The following equations were formulated to make the driving feel as realistic as possible:

Tractive Effort - The accelerating force when you press the gas pedal (based on car acceleration data)
Road Load - Rolling and aerodynamic resistance that will slow the roll of an unpowered car (based on real vehicle attributes)
Induced Drag due to steering - Cars slow down when steered. This was one of the equations that was manufactured to replicate the handling attributes of the real car.
Braking Force - The force slowing down the vehicle when brakes are applied. (Accepted modelling equations of ground vehicle dynamics)
Radius of curvature - The radius of a corner is a function of the steer angle and velocity. (Accepted modelling equations of ground vehicle dynamics)

I added some simple tile texturing for the ground in order to improve aesthetics rather than a solid colored ground. Each part on the car was given a material, and shaded using the Phong method.

UP: Gas Pedal
DOWN: Gas Pedal (reverse gear)
LEFT: Steer Left
RIGHT: Steer Right
SPACE: Push Brake Pedal

SCROLL
  • L/R - Pan view
  • UP/DOWN - Pitch view

    V: Change view
  • in car
  • front of car (can turn around and look at the front of it)
  • 3rd person behind car
    D: Change Display (I use the command line to output helpful info)
  • Lap time (resets every time you cross the start/finish line)
  • Speed, Throttle %, Brake %, Steering Angle, Longitudinal Acceleration
  • Breakdown of Longitudinal Acceleration