-
Create conda environment frarl with necesssary packages.
conda env create -f environment.yml conda activate frarl pip install git+https://github.com/openai/baselines.git
-
Download and install MATLAB
-
Install MATLAB engine for Python
- Open MATLAB and run following commands in MATLAB shell:
cd (fullfile(matlabroot,'extern','engines','python')) pwd
- In terminal, navigate to path of the matlab engine acquired in the previous step
cd <path_of_matlab_engine>
- Check path to created conda environment
conda info -- env
- Install MATLAB engine in conda environment
conda activate frarl python setup.py build --build-base="<path_to_home_directory>" install --prefix="<path_to_conda_env>"
using <path_to_conda_env> as the build-base results in an error to copy the file, with the message that the name of the file is too long
-
Download MATLAB dependencies
- Return to frarl directory
mkdir staliro_imports && cd staliro_imports
-
Download S-Taliro here
-
Download MatlabBGL here
-
Download Core_py2matlab here
-
Test if MATLAB engine install successfully and install S-Taliro
python import matlab.engine as me eng = me.start_matlab() eng.cd('trunk/') eng.setup_staliro(nargout=0)
-
Extract HighD data
- Request HighD dataset from here and replace the path to dataset in
/algorithms/highD/get_highd_data.py
python ./algorithms/highD/get_highd_data.py
- Request HighD dataset from here and replace the path to dataset in
-
Install simulator
cd simulator pip install -e .
- Test
python ./gym_car_acc/test/test_car_sim.py
-
Run script to reproduce our results
cd algorithms ./run_ppo2_group.sh