VISHUN Design Document

VISHUN™ – Autonomous Vehicle Simulator

Version: / 0.9
Version date: / October 24, 2018
Author(s): / Jeff Moser
Rob Yost
Miguel Nieves
John Bell
John Miller

Synopsis

This document contains detailed design documentation for the Autonomous Vehicle Senior Design project codenamed “VISHUN”.

Document Control

Status: / Draft
Owned By: / Jeff Moser –
Distribution: / VISHUN Team
Jeff Salvage ()

Document History

Version: / Date: / Description: / Who
0.1 / February 21, 2005 / Outlined sections and determined topics to be defined in the next draft. / Everyone
0.5 / March 8, 2005 / Added baseline design decisions and diagrams defined during group meetings. Added Interface graphics. / Jeff Moser
Miguel Nieves
0.9 / March 14, 2005 / Added AI and Path finding Info, defined basic sections, finished class diagram. / Jeff Moser

Table of Contents

1Introduction

1.1Purpose

1.2Scope

1.3Design Goals

1.4References – Still be compiled

1.5Definitions, Acronyms, and Abbreviations – Still being compiled

2Design Overview

2.1Description of problem

2.2Technologies used

2.3Application Overview

2.4Context diagram

2.5Use Case Diagrams – Still being designed

3User Interface

3.1Overview

3.2Interface Specifications

3.2.1Foresight

3.2.2Simulation Window

3.2.3Status Window

3.2.4Hindsight

3.3Interface implementation

3.4Interface Sequence Diagram

4Environment Variables

4.1Maps

4.2Vehicles

4.3Waypoints

5System Architecture

5.1Overview

5.2Component Interactivity Diagram

5.3Directory Structure

5.4File Specifications

5.5Vehicle Sensor Logic

5.6Logic

5.7Data Processing

5.8Class interactivity diagrams

5.8.1User Interface and Application Control

5.8.2Artificial Intelligence Components

5.8.3Havok and Vehicle Components

1Introduction

1.1Purpose

The purpose of this document is to create a design for the technologies and architecture of VISHUN. It illustrates the functional and technical design issues associated with the application and serves as a foundation for the implantation of the application.

1.2Scope

The document provides a complete written design of the VISHUN Autonomous Vehicle Simulator with specific concentration on how the functional and non-functional requirements set forth in the Requirements Documentation will be implemented.

The design of this application is presented in written description with accompanying UML or diagrams depending on what the material dictates. All classes are both diagrammed and described in table form detailing methods, attributes, dependencies, and implementation language. All user interfaces are presented as close to final design as possible.

Please note this document does not describe a working system and may contain assumptions, whose validity will be proved during the implementation phase. This document will be updated to reflect these changes as they are found

1.3Design Goals

VISHUN is designed primarily to be a test base for AI algorithms related to path finding and collision avoidance. In addition our goals in designing this application are as follows:

  • Ease of use – since we are going to rely on outside testing and outside interaction for a lot of our feedback, it is important that the application has a clean easy to use interface.
  • Performance – VISHUN is intended to be the only application running on the system, but the intension is to have a simulation that performs in realistic time, to simulate real world driving.
  • Extensibility – The possibilities with this technology are endless. We want to ensure that it is possible to build on this system and improve it.

1.4References – Still be compiled

Vision Requirements Document Version 1.0

1.5Definitions, Acronyms, and Abbreviations – Still being compiled

2Design Overview

2.1Description of problem

VISHUN is an autonomous vehicle simulator developed for the purpose of defining and testing an autonomous brain and situation management engine in a low cost, rapid turnaround environment. VISHUN allows not only for robust and effective path finding in a 3D world, but also allows for that technology to be perfected before it is implemented in a vehicle. The VISHUN team feels that this method of software prototyping could be the answer to the problems found in hardware implementations of autonomous vehicles to date.

2.2Technologies used

VISHUN is developed using C++ and C# languages as well as the Havok Game Dynamics SDK. Havok is a 3D environment and physics simulation engine that is used in some of the most visually stunning and realistic games available today. Havok has been used in such popular games as Half-life 2, Medal of Honor, Ghost Recon 2, and Max Payne 2. VISHUN uses Havok to provide the realistic physics and motion to simulate a real world vehicle.

In addition to the development environments, the VISHUN vehicle uses several implemented components to collect and process information about the world around it, allowing it to understand its environment and react accordingly. These components are as follows:

  • Range-Finding – A laser sensor with a range of 1000 meters that returns the distance of the first object it touches. VISHUN uses range finders mounted all over the outside of the vehicle to see small objects and inclines in the path of travel as well as determining overhead clearance.
  • LADAR – LADAR is used to see and place objects in 3-Dimensional space. VISHUN uses LADAR to see “the big picture” of the environment around it. The LADAR sensors on the VISHUN vehicle are mounted in a cluster on the roof and allow the vehicle to see 360 degrees around it, and up to 1000 meters away perpendicular to the ground it travels on.
  • GPS – VISHUN uses a GPS system to determine its location in the 3D world. Paired with the location of its assigned destination, it knows the direction it needs to travel in to get there.
  • Situation Management – The situation management engine is part of the vehicles Artificial Intelligence (AI). It takes input from the car’s sensors interprets it, and stores the possible paths the vehicle can take.
  • Path Finding – The path finding component is also part of the vehicles AI. It takes all possible paths discovered by the Situation Management component, analyzes and ranks them, and determines what action the vehicle is going to take.

2.3Application Overview

The VISHUN application is presented to the user as four major parts:

  • VISHUN Foresight – Presents the user with an initial screen where they can define the environment variables which will directly influence the simulation. Choices include cars, maps, and placement of waypoints. The Foresight is described in detail in Foresight.
  • VISHUN Simulation Window – The VISHUN simulation window is a slightly modified version of the Havok simulation window which includes changes to the way the world is presented and the way the user interacts with the simulation. The simulation window is where the user can view the autonomous vehicle simulation taking place. The simulation window is described in more detail in Simulation Window.
  • VISHUN Status Window – The VISHUN status window is available to the user concurrently with the VISHUN simulation window. The status window shows real time statistics regarding the vehicles sensors, speed, decisions, as well as system resources. Having this information readily available shows the user that VISHUN is not just magic – actual real time decisions are being made at all times. The status window also allows VISHUN solutions developers to troubleshoot problems in AI and path finding. For more information on the status window please see Status Window.
  • VISHUN Hindsight – After the simulation has completed, the VISHUN hindsight window shows the user statistics about the simulation. For more information on Hindsight, please see Hindsight.

2.4Context diagram

This diagram shows a very high level user interaction process with the application.

2.5Use Case Diagrams – Still being designed

3User Interface

3.1Overview

The majority of user interaction in the application occurs both before and after the simulation. During the simulation the user cannot interact with the vehicle at all, thus making the car completely autonomous. User interaction takes place in simulation setup or VISHUN Foresight and the results window or VISHUN Hindsight. During the simulation, the user only has options to change the camera view, pause the simulation, or export current simulation data to a log file.

3.2Interface Specifications

This section defines the different interfaces, describes each of the interfaces components and shows roughly what each interface will look like.

3.2.1Foresight

Foresight is the name of the VISHUN setup window. In this window the user selects options dealing with the simulation.

3.2.2Simulation Window

The simulation window is where the magic of the VISHUN simulation takes place. The window will display the vehicle inside of the 3D world navigating from point to point, viewed from a variety of camera angles the user controls.

This window is given as an example of what the VISHUN simulation window will look like. The map in this image is not one of the maps included with the application.

3.2.3Status Window

The status window is displayed at the same time as the simulation window, and is primarily for the more advanced user who wants to see exactly what the car is doing at any given time. The status window contains the status of the range finders and LADAR, as well as some statistics about the current simulation.

3.2.4Hindsight

The hindsight window is displayed after the simulation is completed. It displays to the user statistics regarding the simulation and provides the option to either restart the same simulation, create a new simulation, or export a log file containing the ending data.

3.3Interface implementation

VISHUN Foresight, Hindsight, and the Status window will all be developed using C#. The simulation window is a component of the Havok SDK and is therefore written in C++ (the language Havok is written in. No changes will be made to the graphics engine that is used in the simulation window; however, changes will be made to the way the window is displayed and what is displayed on in.

3.4Interface Sequence Diagram

This diagram shows how the interfaces interact and the sequence in which each interface is presented to the user.

4Environment Variables

There are several variables that are used to determine the environment and course of the VISHUN simulation. Each of these variables is defined from the VISHUN Foresight window prior to the simulation. This section defines the choices and attributes of these values.

4.1Maps

For the purpose of this application, maps are defined as 3D world environments that the VISHIN vehicle exists in. By default there are five maps available to the user. Each map will differ in terrain and difficulty to provide the best possible range of example environments for the VISHUN Vehicle. Maps consist of Havok Environment file (HKE), an image file, a name, and a set of minimum and maximum sizes. To simplify the specification and importing of maps into the simulation, a header file has been defined that contains all of this data. The format of the header file is as follows:

Map Header Files (*.map)
Map HKE / Path
Image / Path to JPEG
Map Name / String
World x Min / Float
World x Max / Float
World y Min / Float
World y Max / Float
Image x Min / Float
Image x Max / Float
Image y Min / Float
Image y Max / Float
Map Breakdown / Char Array
[image x max]
[image y max]

A user can also add, remove, or modify maps; however, this should only be done by advanced users who understand all of the attributes of maps and how they relate to the 3D simulation. These tasks are performed as follows (Note: tools are not provided for any of these tasks):

  • Adding Maps – A map can be added by creating an Image file, a Map HKE, and a map header file. The completed pieces are then put into their associated directories as defined in Directory Structure.
  • Modifying Maps – A map can be modified either by editing the flat files directly (except maps) or by using a 3D design application (for images) and Havok supplied tools (for HKEs). The completed pieces are then put into their associated directories as defined in Directory Structure.
  • Deleting Maps – Maps can be removed from the application by simply deleting (or moving) the map header file from the maps directory. To remove all associated pieces the image file and HKE for the map must be deleted as well.

4.2Vehicles

Vehicles in VISHUN are simulated using actual vehicles specifications which Havok interprets and reacts on accordingly. Vehicles consist of a Havok Environment file for vehicles, a Havok vehicle file, defined names of key components, and an attitude file which specifies autonomous tendencies of the vehicle during the simulation. To simplify the specification and importing of vehicles into the simulation, a header file has been defined that contains all of this data. The format of the header file is as follows:

Car Header Files (*.car)
Car Name / String
Chassis Name / String
Wheel Name / String
Car HKE / Path
Car HKV / Path
Attitude File / Path

A user can also add, remove, or modify vehicles; however, this should only be done by advanced users who understand all of the attributes of vehicles and how they relate to the 3D simulation. These tasks are performed as follows (Note: tools are not provided for any of these tasks):

  • Adding Vehicles – A map can be added by creating an HKV file (using the Havok vehicle tool or by copying and modifying an existing HKV), a Vehicle HKE, and a vehicle header file. The completed pieces are then put into their associated directories as defined in Directory Structure.
  • Modifying Vehicles – A vehicle can be modified either by editing the flat files directly (except HKEs) or by using a 3D design application (for images) and Havok supplied tools (for HKEs). The completed pieces are then put into their associated directories as defined in Directory Structure.
  • Deleting Vehicles – Vehicles can be removed from the application by simply deleting (or moving) the vehicle header file from the vehicle directory. To remove all associated pieces the HKV and HKE for the vehicle must be deleted as well.

4.3Waypoints

Waypoints consist of one start location and any number of destinations so long as destinations do not overlap on the map. Every simulation must have exactly one start location and at least one destination location. During the simulation, destination locations are sought after by the vehicle in the order in which they are placed on the map.

5System Architecture

5.1Overview

The VISHUN application consists of three major parts: the Havok simulation, the vehicle and its components, and the artificial intelligence brain. To simplify communications between these components, as well as between the different languages used, standard sockets are used.

This diagram shows the communication between each of the major parts of the VISHUN application. All communication between these parts is done using standard sockets.

5.2Component Interactivity Diagram

This diagram shows all of the components of the application and how they interact with one another. It also shows the flow of information from one component to the next.

5.3Directory Structure

This diagram shows the directory structure that is used for the VISHUN application. In the diagram, folders are displayed in green and file categories in blue.

5.4File Specifications

There are several different file types used in this application, they are as follows:

  • HKE – Havok environment file. This file contains specifications for the Havok environment. Its format is proprietary to Havok.
  • HKV – Havok vehicle file. This file contains specifications for the Havok vehicles. Its format is proprietary to Havok.
  • CAR – Files with a CAR extension are Vehicle header files. The format and details of these files can be found in Vehicles.
  • MAP – Files with a MAP extension are Map header files. The format and details of these files can be found in Maps.
  • SIMULATE.INI – This file contains the basic info necessary to start the simulation, including a path to the HKE and HKV defaults to use, and the names of the chassis and wheels. Its format is as follows:

simulate.ini
HKE / Path
HKV / Path
Chassis Name / String
Wheel Name / String

5.5Vehicle Sensor Logic

The VISHUN Vehicle has two types of sensors that it uses to observe the world around it; these sensors are LADAR and Range Finders.

  • LADAR – The LADAR system on our vehicle allows it to see 1000 meters away in any given direction. To simulate this technology we use an object called a phantom body. A phantom body is a 3d object that while existing in the 3d world cannot be seen by the user of the simulation. It is an object that is attached to the car that knows when it comes in contact with another foreign object. It tells the car’s AI brain that it is in range of a foreign object and that it should react accordingly. The LADAR system on our vehicle will not always be on in all directions however, instead it will adjust size and shape based on speed and direction of turn – this will not only serve to create a more realistic vehicle, but also save on system resources allowing the vehicle to dedicate more time on its autonomous decisions.
  • Range Finder – A range finder functions in a similar way to the Vehicles LADAR, except that it returns a distance of a single point up to 1000 meters away. Range finders are implemented in a similar manner to LADAR as a phantom body attached to the vehicle. The major differences are that Range Finders will dynamically change size when they come in contact with an object in order to provide an accurate distance to that object.

5.6Class interactivity diagrams

5.6.1User Interface and Application Control

5.6.2Artificial Intelligence Components