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_workspaceThan 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_workspacefolder 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:
deactivateGo to the page with releases and upload latest release tar archive for Linux and additional maps into ~/carla_workspace/archive folder.
- Create floder to extract:
mkdir -p ~/carla_workspace/CARLA- Unpack tar archive (tested for carla 0.9.15 version):
tar -xvzf ~/carla_workspace/archive/CARLA_0.9.15.tar.gz -C ~/carla_workspace/CARLA- Move the package with additional maps into
~/carla_workspace/CARLA/Importand unpack as follows:
mv ~/carla_workspace/archive/AdditionalMaps_0.9.14.tar.gz ~/carla_workspace/CARLA/Import/
cd ~/carla_workspace/CARLA
bash ImportAssets.sh- Finally install carla into python environment:
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 installpull the lfs files by next command:
git lfs fetch
git pull origin mainBefore 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.driveNote: since we are not building package the run command should be invoked from CarlaFSD folder.