Skip to content

MarcherGA/AutonomousVehicle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutonomousVehicle

Description:

Autonomous Vehicle Simulator, including driving along pre made route, object detection, and monitor logging all the detected objects details.

thumbnail

Setup

Requirements:

  • Unity 2022.3.13f1 (other versions are not tested)

Steps:

Build (Simulation):

  • Create Build folder In inside the project folder, If not already created
  • Create Simulation folder inside Build folder
  • In Unity Editor, Select File -> Build Settings
  • In Platforms window, Select Windows, Mac, Linux (tested on Windows only) from Platforms
  • Select your platform on Target Platform Dropdown list
  • Check Scenes/Simulation in Scenes In Build and uncheck other scenes
  • Press Build And Run and select Simulation folder
  • The build will be inside Build/Simulation, and will run automatically

Build (Monitor):

  • Create Build folder In inside the project folder, If not already created
  • Create Monitor folder inside Build folder
  • In Unity Editor, Select File -> Build Settings
  • In Platforms window, Select Windows, Mac, Linux (tested on Windows only) from Platforms
  • Select your platform on Target Platform Dropdown list
  • Check Scenes/Monitor in Scenes In Build and uncheck other scenes
  • Press Build And Run and select Monitor folder
  • The build will be inside Build/Monitor, and will run automatically

Code Design

Simulation

  • SimulationManager - Manages the simulation, manipulating the simulation components according to user input
  • SimulationManagerUI - Manages the user interface for the simulation
  • AutonomousVehicle - Conrols the movement of the test car, moving it along a set of waypoints
  • ObjectDetector - Attached to a camera, detecting entities visible and within the camera's frustum. Requires detectable entities to have a collider, and be on a selected Detection Layer, using their tag for categorizing
  • DetectionObserver - Observes an ObjectDetector and sends detection data via UDP

Monitor

  • MessageDisplay - Manages the display of messages in a scroll view.
  • UDPDetectedEntityObserver - Inherits UDPMessageObserver, checks if message is Detected Entity message, and displays it using MessageDisplay if so

UDP Communication

  • UDPSender - Sends UDP messages to a remote endpoint, getting the target IP address and Port from config
  • UDPReciever - Receives UDP messages and invokes an event when data is received, getting the target Port from config
  • UDPMessageObserver - Abstract class representing observer which listenes to UDP messages, and use it

Config

  • ConfigLoader - Loads configuration data from a JSON file
  • ConfigData - Respresents Config structure

Attributions

"SimplePoly City" package - https://assetstore.unity.com/packages/3d/environments/simplepoly-city-low-poly-assets-58899

About

Autonomous Vehicle With Object Detector Sensor Simulation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published