Imitation Learning Model Training in Carla with DAgger
Clone the repo and build the environment
git clone --recursive https://github.com/resuldagdanov/carla-imitation-learning.git
cd carla
conda create -n carla python=3.7
pip3 install -r requirements.txt
conda activate carla
Merge all submodules
git submodule update --remote --merge
Download and setup CARLA 0.9.13
wget https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/CARLA_0.9.13.tar.gz
wget https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/AdditionalMaps_0.9.13.tar.gz
tar -xf CARLA_0.9.13.tar.gz
tar -xf AdditionalMaps_0.9.13.tar.gz
rm CARLA_0.9.13.tar.gz
rm AdditionalMaps_0.9.13.tar.gz
Open bashrc and include CARLA_ROOT, LEADERBOARD_ROOT, and SCENARIO_RUNNER_ROOT
export CARLA_ROOT=~/carla
export SCENARIO_RUNNER_ROOT=~/carla-imitation-learning/scenario_runner
export LEADERBOARD_ROOT=~/carla-imitation-learning/leaderboard
Open terminal in the folder where Carla 0.9.13 is installed.
./CarlaUE4.sh --world-port=2000 --resx=600 --resy=400 --quality-level=Epic -vulkan
Configure ./scripts/run_autopilot.sh
file !
chmod 777 -R *
./scripts/run_autopilot.sh
All training files are in ./imitation_agents/trainings/
and ./imitation_agents/networks/
NOTE: make sure to check out configurations folder (at ./imitation_agents/utils/
) before training an imitation learning model.
chmod 777 -R *
./scripts/imitation_training.sh
Models are saved inside ./checkpoints/models/
file.
Spin up a CARLA server (described above).
chmod 777 -R *
./scripts/leaderboard_evaluation.sh
- [track type]
./leaderboard/leaderboard/autoagents/agent_wrapper.py
line 183-184 has to be commented because for some reason leaderboard pops-upTrack.SENSORS != Track.SENSORS
logic.