Simulator Setup
Donkeycar also has a simulated environment available if real-world resources are unavailable to you.
This page is for those who wish to complete this project, but do not have access to a physical car and raspberry pi. Below, you will find the steps to set up the Donkeycar simulator on your own computer. After the simulator is set up and you are able to drive around the virtual environment and collect data, you can skip to Collecting Data to complete the rest of the project. From this point on, treat your own computer where you run the simulation as if it is the raspberry pi in the rest of the instructions. This means that if the instructions say to run a command on the Pi, run it on your own computer. You should still have access to a regular Chameleon instance if you want to train your model in a reasonable time. To reserve your Chameleon instance, go to Reserving your Pi on Chi@Edge, click the link to the Trovi artifact, and only run the reserve_baremetal script, not the one to reserve the Pi. Setting up the simulator is also needed for an extension of this project: reinforcement learning.
Warning: Make sure to have python 3.10 installed because 3.9 does not work.
Simulator Set-up and Configuration
Create a directory in the root called projects
Note: make sure you have python installed
Inside of this directory, clone the donkeycar repository
Note: this should create a donkeycar directory inside of the projects directory
Change to donkeycar directory and set it up
Installation for Linux and Windows
Installation for Mac
Download and unzip the simulator for the host pc
Go to the latest release and click the zip file for your operating system
Unzip the contents
Remember the location and find the absolute file path of the executable file
Note: on Mac, it will download a zip, unzip it and inside of the file is a .app file, two-finger click it and click “Show Package Contents”
Set aside the path which should look akin to: “/Users/kylezheng/Downloads/DonkeySimMac/donkey_sim.app/Contents/MacOS/donkey_sim”
Clone the donkeycar gym repo in projects and set it up
Note: creates gym-donkeycar directory inside of the projects directory
Installation for Windows and Linux:
Installation for Mac:
Creating donkey application
File configuration for Donkeycar gym and Simulator
Use this keyboard shortcut: control + w. Type “gym” and press enter.
Find the area that reads:
Uncomment all three lines by deleting the # at the beginning of the lines
Change the lines to read:
Inside of the <> is the absolute file path for the executable set aside in Step 5
Sample Data:
Here is some sample data collected from multiple tracks within the simulator. This can optionally be used in place of your own data to speed up the project or make comparisons.
Last updated