-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_opencda.txt
55 lines (33 loc) · 1.32 KB
/
setup_opencda.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# setup steps
# activate conda in shell
eval "$(/opt/miniconda3/bin/conda shell.bash hook)"
# go to OpenCDA folder
cd /opt/OpenCDA/
# create your own conda environment
conda env create -f environment.yml
conda activate opencda
# install dependencies
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.8 -c pytorch -c conda-forge
pip install poetry
poetry install
run the following
----
CARLA_HOME=/opt/carla/
CARLA_VERSION=0.9.12
CARLA_EGG_FILE=${CARLA_HOME}/PythonAPI/carla/dist/carla-"${CARLA_VERSION}"-py3.7-linux-x86_64.egg
CACHE=${PWD}/cache
mkdir -p "$CACHE"
cp $CARLA_EGG_FILE $CACHE
unzip "${CACHE}"/carla-"${CARLA_VERSION}"-py3.7-linux-x86_64.egg -d "${CACHE}"/carla-"${CARLA_VERSION}"-py3.7-linux-x86_64
SETUP_PY=${PWD}/scripts/setup.py
cp "$SETUP_PY" "${CACHE}"/carla-"${CARLA_VERSION}"-py3.7-linux-x86_64/
# should already be in the conda environment from before
pip install -e ${CACHE}/carla-"${CARLA_VERSION}"-py3.7-linux-x86_64
----
then re-run this
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.8 -c pytorch -c conda-forge
# run simulation
first run carla sim in /opt/carla which is CarlaUE4.sh
then run an example from OpenCDA i.e.
python opencda.py -t platoon_joining_2lanefree_carla -v 0.9.12 --apply_ml
listof examples in opencda/scenario_testing/