Carla Simulator

Installation

Talha Hanif Butt
1 min readDec 20, 2020

Quick start

Set up the Debian repository in the system.

sudo apt-key adv — keyserver keyserver.ubuntu.com — recv-keys DB53A429E64554FC &&
sudo add-apt-repository “deb [trusted=yes] http://dist.carla.org/carla-0.9.7/ all main”

Install CARLA and check for the installation in the /opt/ folder.

sudo apt-get update
sudo apt-get install carla-simulator
cd /opt/carla-simulator

Import additional assets

For every release there are other packages containing additional assets and maps, such as Additional_Maps_0.9.9.2 for CARLA 0.9.9.2, which contains Town06, Town07, and Town10. These are stored separatedly to reduce the size of the build, so they can only be run after these packages are imported.

./ImportAssets.sh

Running CARLA

cd bin
./CarlaUE4.sh

If on closing carla, system freezes, then use:

./CarlaUE4.sh -opengl

A window containing a view over the city will pop up. This is the spectator view. To fly around the city use the mouse and WASD keys (while clicking). The server simulator is now running and waiting for a client to connect and interact with the world.
Now it is time to start running scripts. The following example will spawn some life into the city:

cd PythonAPI/examples
python3 spawn_npc.py

References

--

--

Talha Hanif Butt

PhD Student -- Signal and Systems Engineering, Halmstad University, Volvo Trucks http://pk.linkedin.com/in/talhahanifbutt