The goal of this project is to construct an algorithm which is capable of stopping an autonomous vehicle. The algorithm should be capable of stopping the vehicle in an optimal manner; for example, it should come to a smooth stop when able or come to a quick stop in an emergency. Here is the zombi robot for which this will be developed:
Ideally, we would like this work to be generally applicable, not just to zombi.
To remove the need for the physical vehicle, we will simulate stopping the vehicle within Unity. To get started with Unity, download Unity Hub.
To manage the massive files that inevitably come alongside Unity, we will be managing collaboration on the project through USU Box.
Go to https://unity.com/download which is the Unity downloads page. Scroll down slightly to the title that says Create with Unity in three steps. Then in the section labeled, 1. Download the Unity Hub, click on the blue text that says Download for Windows.
When the download is complete, select it from the downloads menu at the bottom of your screen.
You will then see a pop-up that asks if you want to allow this app to make changes to your device. Select yes.
You will then see a pop-up with a licensing agreement. Select I Agree.
You can then select the location for the installation. If you desire, you can change the location. Otherwise, select install.
You will see your final pop-up. Make sure that the Run Unity Hub box is checked. Then press Finish.
A pop up will then appear. Click Skip Installation in the bottom right corner.
Select installs from the menu on the left.
Then click the blue button that says Install Editor.
Select the Archive tab.
Click on the blue text that says download archive.
You will be taken to the Unity downloads archive. Scroll down and select the tab for Unity 2020.x.
Then scroll down to Unity 2020.3.29f1. Click the corresponding green button that says Unity Hub.
The installation will then begin and when it is complete you will see a popup that asks if you want to allow this app to make changes to your device. Select yes.
If you are not connected to the USU network, you will need to connect to the USU VPN. Go to https://usu.service-now.com/aggies?id=kb_article_view&sysparm_article=KB0011477&sys_kb_id=fb3eb5d2b8834100bd5c10e091b7dbf3&spa=1 and follow the installation instructions for the VPN.
Git lfs uses a separate server for easier managing of large files.
Visit https://git-lfs.github.io/ to download. On Linux, you likely just need to install the git-lfs package from your distro's repository.
In the windows search bar, search for the command prompt. Click on the Command Prompt app to open it.
Type in git lfs install and press enter.
You know this is installed properly if you type in git lfs version then press enter and are shown the version rather than an error message.
Make sure you are connected to the USU VPN.
Open the command prompt. To clone the project on your desktop type in cd Desktop and press enter, otherwise, navigate to the location where you would like to clone the project. Then type git clone mater@129.123.24.8:urgentstop.git UrgentStopSimulation and press enter. Wait for the cloning process to finish.
You will then be prompted to give a password. Type in spot and then press enter.
Return to the Unity hub and select the Projects tab from the lefthand menu.
Click the arrow next to the open button. Then click on the option Add Project From Disk.
Navigate to the directory where you cloned the project. If you followed the steps shown in previous steps, the directory is on the desktop and is named UrgentStopSimulation. Select the folder and then press the Add Project button.
Double click on the project in the Unity hub to open it in the Unity editor. It will take some time to load, but the project will then open in Unity.
In the Unity Editor there is a list of assets in the bottom left corner, select Scenes.
Double click on Scene.
Then click the play button arrow at the top of the screen to start the simulation.
Select the parameters for the simulation:
- Car mass: The mass of the vehicle (USU's Zombi)
- Terrain: The type of ground desired to test stopping
- Stopping Distance: The distance in meters the obstacle will be from the vehicle
Then press the Start Simulation button.
Initially, the zombi will be getting up to top speed. Note that the obstacle will not appear in the simulation until the vehicle has reached top speed (about 4.5 m/s). The HUD displays the zombi current speed, the mass of the vehicle, the terrain friction, and the stopping distance to the obstacle.
Once top speed is reached, the distance to obstacle countdown will begin.
And the zombi will come to a stop.
Navigate to where you cloned the project on your computer.
Unzip the contents of the zipped urgentstop build folder.
If needed, in the newly unzipped folder, open the directory named urgentstop build.
Double click the executable file UrgentStop.
Select the parameters for the simulation:
- Car mass: The mass of the vehicle (USU's Zombi)
- Terrain: The type of ground desired to test stopping
- Stopping Distance: The distance in meters the obstacle will be from the vehicle
Press the Start Simulation button to run the simulation.
Initially, the zombi will be getting up to top speed. Note that the obstacle will not appear in the simulation until the vehicle has reached top speed (about 4.5 m/s). The HUD displays the zombi current speed, the mass of the vehicle, the terrain friction, and the stopping distance to the obstacle.
Once top speed is reached, the distance to obstacle countdown will begin, and zombi will slow down until it stops.
From here, you can either press the restart button in the HUD to reset the simulation or press the escape key on your keyboard to exit the application.





























