The package for Carla simulation of self-driving car.
Note: All instructions below is given for Ubuntu 18.04 or 20.04.
First create carla workspace folder e.g.:
mkdir ~/carla_workspace
cd carla_workspace
Than clone CarlaFSD
repository into this folder.
Open linux shell and install virtualenv as following:
sudo apt install virtualenv
sudo apt install python3.7
Create python3 virtualenv inide carla_workspace
folder as follows (tested with python 3.7):
virtualenv ~/carla_workspace/carla_venv -p python3.7
Activate virtualenv
source ~/carla_workspace/carla_venv/bin/activate
Install necessary requirements
cd ~/carla_workspace/CarlaFSD
pip install -r requirements.txt
If you want to deactivate virtualenvironment use:
deactivate
Go to the page with releases and upload latest release tar
archive for Linux and additional maps into ~/carla_workspace/archive
folder.
mkdir -p ~/carla_workspace/CARLA
tar -xvzf ~/carla_workspace/archive/CARLA_0.9.15.tar.gz -C ~/carla_workspace/CARLA
~/carla_workspace/CARLA/Import
and unpack as follows:
mv ~/carla_workspace/archive/AdditionalMaps_0.9.14.tar.gz ~/carla_workspace/CARLA/Import/
cd ~/carla_workspace/CARLA
bash ImportAssets.sh
pip install ~/carla_workspace/CARLA/PythonAPI/carla/dist/carla-0.9.15-cp37-cp37m-manylinux_2_27_x86_64.whl
pip install -r ~/carla_workspace/CARLA/PythonAPI/examples/requirements.txt
Install git lfs:
cd ~/carla_workspace/CarlaFSD
git lfs install
pull the lfs files by next command:
git lfs fetch
git pull origin main
Before strating any script below first run carla simulator by the following command:
cd ~/carla_workspace/CARLA
bash CarlaUE4.sh
This command should run simulator server.
Check medium blog for implementation details In order to run fisheye camera drive apply command:
source ~/carla_workspace/carla_venv/bin/activate
cd ~/carla_workspace/CarlaFSD
python -m carla_fsd.camera_fisheye.drive
Note: since we are not building package the run command should be invoked from CarlaFSD
folder.