Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

floriandejonckheere/abo-autonomic-systems-carla

Repository files navigation

Autonomic Systems and Software (IT00CE05)

This repository contains the CARLA simulation project for the Autonomic Systems and Software course (IT00CE05).

Demonstration

The presentation can be found in presentation..

Several short demonstration video's of various scenario's were recorded:

Setup

Download the CARLA simulator v0.9.4 from Github and extract the files into the repository directory. Install Anaconda/Miniconda 3, and create a new Python 3.7 environment.

conda create -n carla python=3.7
conda activate carla

Install the Python requirements.

pip install -r requirements

Run the CarlaUE4.exe binary to start the simulation server, and run the Python scripts in the repository.

python manual_control.py

Usage

Run the manual_control.py script to control the vehicle in the simulation. Append --help to see the available options.

python manual_control.py

Run the spawn_custom_npc.py script to spawn a number of autonomic vehicles in the simulation. Append --help to see the available options.

python spawn_custom_npc.py

Run the ai_test.py script to test the AI controller. Append --help to see the available options.

python ai_test.py

# Test a specific scenario (see game/scenarios for available scenarios)
python ai_test.py --scenario MilestoneOne

# Enable debug window
python ai_test.py --debug

# Let spectator camera follow the vehicle
python ai_test.py --follow

Run the extract_graph.py script to extract the navigation graph from the map.

python extract_graph.py

Extracting the planned paths requires modifying the Navigator class. See the note at the end of the extract_graph.py file for more information.

Troubleshooting

When running any Python script:

ImportError: DLL load failed: The named module can't be found

Add Anaconda/Miniconda to your PATH (System Properties > Environment variables).

%ANACONDA_HOME%
%ANACONDA_HOME%\Library\mingw-w64\bin
%ANACONDA_HOME%\Library\usr\bin
%ANACONDA_HOME%\Library\bin
%ANACONDA_HOME%\Scripts
%ANACONDA_HOME%\bin

When running manual_control.py:

...
    mono = default_font if default_font in fonts else fonts[0]
IndexError: list index out of range

Modify the file and replace line 374:

# Replace
mono = default_font if default_font in fonts else fonts[0]

# With
mono = 'consolas'

License

This repository is released under the MIT License.

About

Project for the Autonomic Systems and Software course (IT00CE05)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published