An environment consists of a certain Python version and some packages. Consequently, if you want to develop or use applications with different Python or package version requirements, you need to set up different environments.
We are currently developing and supporting Python version 3.6.
In the following video, you can see a general overview of the Alpha Version Race simulation and the visualization of the HD Map.
Alpha Version Race
- Download the simulation track with high or low graphics quality:
Alpha Version Race - Quality High Windows x64
Alpha Version Race - Quality Low Windows x64
- Unzip the file.
- Open the unzipped folder and double click the AlphaVersionRace.exe file to start the simulation.
NOTE 1: If it´s the first time you are running Skoods simulations, you will see the message: "Would you like to use car simulation? Choose no to use quadrotor simulation." Press Yes to continue.
- In the simulation, Press
F1
to see the list of commands available.
NOTE 2: The simulation will create a folder called AirSim/ in your Documents/ folder. Inside it, you can find a new file called settings.json
. You will learn more about this file later on. Also, if you activate the Recording mode by pressing R
, new files will be added to this same folder.
- Drive the car around using the arrows. Press
0
and;
to see data from virtual sensors. - Press
Alt + F4
to exit.
The open source Anaconda Distribution is the fastest and easiest way to do Python, data science and machine learning on Linux, Windows, and Mac OS X. It's the industry standard for developing, testing, and training on a single machine.
- Download and install the latest version: https://www.anaconda.com/download/
VIDEO TUTORIAL: Python - Install Anaconda, Jupyter Notebook, Spyder on Windows 10
Navigate to the folder containing the spec-file.txt
and run:
conda create --name skoods36 --file spec-file.txt
After installing Anaconda, Open the Anaconda Prompt app from the Start Menu and follow the instructions:
- To create a new environment, type:
conda create -n skoods36 python=3.6
- When conda asks you to proceed, type
y
:
proceed ([y]/n)?
- After this process, check if the environment was created. To see a list of all of your environments, run::
conda info --envs
Activate the Environment: Every time you want to control the car using the API, you must first activate the skoods36 environment.
- In your Anaconda Prompt, run:
activate skoods36
Install Additional Packages: PIP is a package manager for Python packages, or modules if you like. A package contains all the files you need for a module and modules are Python code libraries you can include in your project.
- First, upgrade PIP itself:
pip install --upgrade pip
- Then, follow the instructions to install 3 additional packages. This may need you to run Anaconda Prompt as Administrator:
pip install msgpack-rpc-python
pip install airsim
pip install pynput
NOTE: If you use more Python packages in your code, make sure to install them with the environment activated.
Before running the code, we must add a file that will define the initial settings of the simulation.
- Clone or download this repo to your local machine.
- Create a new folder in the Documents folder called AirSim (if it´s not already there, because the first time you run the simulation, it will be created).
- Navigate to the JSON_examples/ folder, copy and paste the
settings.json
file to the new folder:
/Documents/AirSim/settings.json
NOTE: If you run the simulation .exe, the file will be automatically created. Know more about the settings.json
in the Microsoft Airsim project page.
- Open the Anaconda Prompt and activate the skoods36 environment:
activate skoods36
- Double click the AlphaVersionRace.exe file to start the simulation (press
Alt+Tab
to go back to the Desktop). - Navigate to the test/ folder and run the
hello_skoods.py
file:
python hello_skoods.py
NOTE: You will see the car moving around the track.
- Press
Alt+F4
to exit.
Visual Studio Code combines the simplicity of a source code editor with powerful developer tooling.
I like to use Visual Studio Code to work on my projects. You can run Python code and change Conda Environments directly from the app.
- Download: https://code.visualstudio.com/download
MORE INFO: