Skip to content

Latest commit

 

History

History
77 lines (55 loc) · 2.67 KB

README.md

File metadata and controls

77 lines (55 loc) · 2.67 KB

stanford-carla-toolbox

A toolbox for the Carla Simulator.

This toolbox is a collection of useful C++, Python and Julia wrappers for working with the Carla Simulator and other autonomous driving libraries and packages.

Prerequisites

These are the required prerequisites necessary for using the toolbox. A list of general requirements and well as extras for the desired coding language.

  • Carla Simulator (0.9.7)
  • Python (3.5) - Carla only provides API binaries for Python 3.5.
  • Julia (1.2+)

Carla

The code has been verified to work with version 0.9.7 of the Carla simulator. For more information on using the Carla simulator, please visit the Carla documentation, forum, Discord server and GitHub page.

Python

The toolbox extensively utilizes the Carla PythonAPI for interacting with the Carla simulator.

Julia

The Julia codebase for this toolbox has only been tested directly for version 1.3 of Julia. Since Carla doesn't provide direct Julia support, this wrapper currently uses their provided Python API. Please make sure your environment is setup to load the Carla provided .egg file.

  • AutomotiveSimulator.jl
  • PyCall.jl

Using the Toolbox

In order to use the toolbox, you must first have the above prerequisites installed on your system and follow the instructions provided in "Setting Up Your Environment".

Before running any code that uses the toolbox, we must have a instance of the Carla server running. Open a terminal with the appropriate environment and run:

~/Simulators/Carla-0.9.7/./CarlaUE4.sh

Next, open another terminal (or tab) with the appropriate environment and run your code using the toolbox. Below is a simple Julia program that will connect to a running Carla server and spawn a vehicle in the simulator.

julia --project=~/Development/VirtualEnvironments/Julia/sct-testing \
~/Development/stanford-carla-toolbox/examples/spawn-vehicle.jl

This example only provides a brief look at the functionality of the toolbox. For further examples, look under the examples directory.

The same idea can be applied to the Python examples.

python ~/Development/stanford-carla-toolbox/python/examples/spawn_vehicle.py