We provide nine different safe driving environments in metadrive, named as: SafeMetaDrive-{Road}{Vehicle}-v0
,
where {Road} includes three different levels for self-driving cars: easy, medium, hard, {Vehicle} includes four different levels of surrounding traffic: sparse, mean, dense.
# set up metadrive
git clone --recursive https://github.com/HenryLHH/metadrive_clean.git
cd metadrive_clean/metadrive_clean
pip3 install -e .
# set up data collector
cd ../
pip3 install -e .
import gym
import metadrive.fsrl_metadrive
env = gym.make("SafeMetaDrive-easysparse-v0")
bash run_collect.sh [your_env_name]
e.g.
bash run_collect.sh SafeMetaDrive-harddense-v0
bash run_visualize.sh [your_env_name]
e.g.
bash run_collect.sh SafeMetaDrive-harddense-v0
The cost-reward plot will be saved in figs/
folder.