FREA
1.0.0
2024-09-05
令人兴奋的消息! FREA 被 CoRL 2024 接受用于口头报告??!2024-08-10
探索我们的项目页面,现在住在这里?!2024-08-10
代码现已发布!2024-06-05
我们的论文在Arxiv上可用?!该存储库包含论文的实现。
FREA:以可行性为指导生成具有合理对抗性的安全关键场景
陈克宇1 , 雷宇恒2 , 程浩1 , 吴浩然1 , 孙文超1 , 郑四发1
1清华大学车辆与交通学院2香港大学
如果您觉得我们的工作有用,请给我们一颗星?!
? FREA 将可行性作为指导,以生成对抗性但 AV 可行、安全关键的场景。
推荐系统:Ubuntu 20.04或22.04
第1步:安装Carla(推荐0.9.13)
第二步:设置conda环境
conda create -n frea python=3.8
conda activate frea
第 3 步:将此 git 存储库克隆到适当的文件夹中
git clone [email protected]:CurryChen77/FREA.git
步骤 4:进入 repo 根文件夹并安装软件包:
cd FREA
pip install -r requirements.txt
pip install -e .
# Launch CARLA
./CarlaUE4.sh -prefernvidia -RenderOffScreen -carla-port=2000
# Launch in another terminal
python scripts/run.py --agent_cfg expert.yaml --scenario_cfg standard_train.yaml --mode collect_feasibility_data
# Merge data
python frea/feasibility/unify_offline_data.py
要使用我们论文中的离线数据集,请从此处下载并将它们放入feasibility
文件夹中。
# Train optimal feasible value function of AV
python train_feasibility.py
# Launch CARLA
./CarlaUE4.sh -prefernvidia -RenderOffScreen -carla-port=2000
# Train FREA
python scripts/run.py --agent_cfg expert.yaml --scenario_cfg fppo_adv_train.yaml --mode train_scenario
# Launch CARLA
./CarlaUE4.sh -prefernvidia -RenderOffScreen -carla-port=2000
# Train FPPO-RS
python scripts/run.py --agent_cfg expert.yaml --scenario_cfg fppo_rs_train.yaml --mode train_scenario
# Launch CARLA
./CarlaUE4.sh -prefernvidia -RenderOffScreen -carla-port=2000
# Train PPO
python scripts/run.py --agent_cfg expert.yaml --scenario_cfg ppo_train.yaml --mode train_scenario
# Launch CARLA
./CarlaUE4.sh -prefernvidia -RenderOffScreen -carla-port=2000
# Train FREA
python scripts/run.py --agent_cfg ppo.yaml --scenario_cfg fppo_adv_train.yaml --mode train_agent
# Launch CARLA
./CarlaUE4.sh -prefernvidia -RenderOffScreen -carla-port=2000
# Train FREA
python scripts/run.py --agent_cfg ppo.yaml --scenario_cfg standard_train.yaml --mode train_agent
# Launch CARLA
./CarlaUE4.sh -prefernvidia -windowed -carla-port=2000
# Evaluation FREA
python scripts/run.py --agent_cfg expert.yaml --scenario_cfg FPPO_adv_eval.yaml --mode eval --eval_mode analysis
# Launch CARLA
./CarlaUE4.sh -prefernvidia -windowed -carla-port=2000
# Evaluation FREA
python scripts/run.py --agent_cfg expert.yaml --scenario_cfg FPPO_adv_eval.yaml --mode eval --eval_mode render
确保评估已完成并将结果保存在文件夹中。
# Process the recorded data
python eval_analysis/process_data/process_all_data.py
# Plot the evaluation result
python eval_analysis/plot_data/plot_evaluation_result.py
# Launch CARLA
./CarlaUE4.sh -prefernvidia -windowed -carla-port=2000
# Set world spectator
python scripts/run.py --agent_cfg expert.yaml --scenario_cfg standard_eval.yaml --mode eval -sp
# Launch CARLA
./CarlaUE4.sh -prefernvidia -windowed -carla-port=2000
# Visualize AV route
python scripts/run.py --agent_cfg expert.yaml --scenario_cfg standard_eval.yaml --mode eval -viz_route
# Launch CARLA
./CarlaUE4.sh -prefernvidia -windowed -carla-port=2000
# Visualize BEV map
python scripts/run.py --agent_cfg expert.yaml --scenario_cfg FPPO_adv_eval.yaml --mode eval --eval_mode render
如果您发现我们的论文有用,请通过以下方式引用我们:
@inproceedings{
chen2024frea,
title={{FREA}: Feasibility-Guided Generation of Safety-Critical Scenarios with Reasonable Adversariality},
author={Keyu Chen and Yuheng Lei and Hao Cheng and Haoran Wu and Wenchao Sun and Sifa Zheng},
booktitle={8th Annual Conference on Robot Learning},
year={2024},
url={https://openreview.net/forum?id=3bcujpPikC}
}
该实现基于多个存储库中的代码。我们衷心感谢作者的出色工作。