Skip to content

A driving simulator for the dean of civil engineering at CSUS

Notifications You must be signed in to change notification settings

pwntatochip/drivingsimulator

Repository files navigation

Traffic Sim

Traffic Sim Logo

Drivingsimulator or TrafficSim is a project started by the chair of Civil Engineering at CSUS, Dr. Ghazan Khan. It is a VR driving simulator developed in Unreal Engine 5.1.1 for the purposes of studying driver behavior in different traffic scenarios. The simulation is designed to be operated with the Oculus Quest 2 headset and the Logitech G920 driving peripherals, but it can also be completely controlled through mouse and keyboard.

This application has been developed by TryToTry, a CSUS Computer Science senior project team. This project has been in active development by multiple senior project teams prior to TryToTry and may be developed by other teams in the future.

Contributors

Credits to the developers at team TryToTry: Derek Dilger, derekdilger@csus.edu Christian Ross, cjross@csus.edu Tim O'Keefe, timokeefe@csus.edu Ada Mir Raga, adamirraga@csus.edu Drew Bruggman, drewbruggman@csus.edu David Damiano, ddamiano@csus.edu Alec Halici, ahalici@csus.edu Gerrit Beamesderfer, gbeamesderfer@csus.edu

Features

  • Realistic driving physics: Experience authentic vehicle dynamics and handling
  • Multiple environments: Explore different driving environments with our freeway, highway, and city maps
  • AI traffic system: Encounter intelligent AI-controlled vehicles with realistic traffic behvior based on real world data
  • Variable weather: Drive in various environmental conditions such as rain, snow, wind, dust for a more dynamic experience
  • Traffic hazards: Avoid hazards such as animals crossing the road, traffic cones, accidents, and more
  • VR support: Immerse yourself further with virtual reality support for compatible devices

Getting Started

Prerequisites

  • Unreal Engine 5.1.1 installed on your machine
  • Campatible hardware for VR support (if using VR)
  • Capable computer to run simulation

Installation

  1. Clone the repository to your local machine
  2. Download zip files https://drive.google.com/drive/folders/1k0AOF5my0YDM_6b9p3FLuTJvPV-oGEd0
  3. Replace 'Content' and 'Plugins' folders in the local git repo with the same folders in the newly downloaded zip files.
    • Make sure not to removed the 'Our Files' folder in the 'Content' folder of the git repo
    • The 'Content' and 'Plugins' folders in the zips contain assets too large to commit to github
  4. Open the local git repo and right click the Unreal Engine Project File named 'TrafficSimUE5' with the blue Unreal Engine logo
  5. Select "Generate Visual Studio project files"
  6. Open the project in Unreal Engine 5.1.1
  7. Run the simulation

Usage

  • Use the 'WASD' keys to control the vehicle or the steering wheel and pedals if you are using them
  • Select any of the options menus on the top of the screen to see relevant information, change simulator settings, or to record and log information

UI Changes

Main Menu

image image

Settings

image image image image Traffic Sim Settings - Live View Traffic Sim Settings - Settings Traffic Sim Settings - Logging View Traffic Sim Settings - Map Menu Traffic Sim Settings - Controls

Testing

Unit tests can be run within unreal engine's editor. https://www.unrealengine.com/en-US The version is 5.1.1. Future versions may work as unreal tries for forwards compatibility. This tutorial is the best explanation of how to test systematically. https://www.youtube.com/watch?v=f4LpDXjFgVQ

Most testing we conducted involved testing 'from the perspective of a user'. I.e., if a feature that relies on 400 functions works, then it's not necessary to test the 400 functions individually.

Developer Instructions

For the steering wheel orientation, this library may be useful: https://github.com/cengizozel/logidrivepy

About

A driving simulator for the dean of civil engineering at CSUS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published