Welcome to my custom setup for the Carla simulator!
Before diving in, if you're new to Carla, make sure to visit the Carla Simulator Quick Start Guide for an overview.
My setup revolves around using the latest Carla distributions directly from the source. While the version available in Ubuntu 20 repositories is typically 13, I prefer version 15 for its updated features. However, version 13 works just fine for most cases.
To get started, head over to the Carla Releases Page and download the appropriate version for your needs. The crucial file is the binary distribution.
Once downloaded, extract the files using the TAR command in your terminal:
tar -xzvf <carla_file.tar.gz>
Grab a cup of coffee while you wait for the extraction process to complete!
After extraction, it's time to test your Carla setup. Use the following command to run Carla:
./CarlaUE4.sh -quality-level=Low -ResX=360 -ResY=240
- 'quality-level': Adjusts the graphic quality.
- 'ResX': Sets the window resolution along the x-axis.
- 'ResY': Sets the window resolution along the y-axis.
Additional arguments you can use:
- 'benchmak': Sets Carla to benchmark mode for performance metrics.
- 'fps=X ':Adjusts the frames per second (replace X with your desired FPS).
Carla Simulator is written in Python 3.7 and can be interacted with using its Python API.
Navigate to the PythonAPI folder within your Carla directory (typically ~/Carla/PythonAPI). Here, you'll find essential files for communication:
- utils: Contains important files like config.py to change the town settings.
- carla: Check the dist folder here if you encounter import issues with the Carla module.
- examples: Explore this folder for ready-to-use examples (although sometimes they may have issues).
cd ~/Carla/PythonAPU/examples
ls
Run any of the examples. For instance, to run manual_control.py, execute:
python manual_control.py
For a demonstration of Carla in action, check out my demo here!