2026-03Explore our project page, now live here🔗!2026-02ForSim is accepted by ICRA 2026🎉🎉!2026-02Our paper is available on arXiv📄!
This repository contains the implementation of the paper.
ForSim: Stepwise Forward Simulation for Traffic Policy Fine-Tuning
Keyu Chen1 , Wenchao Sun1, Hao Cheng1, Zheng Fu1, Sifa Zheng1
1School of Vehicle and Mobility, Tsinghua University
If you find our work useful, Please give us a star 🌟!
💫 ForSim achieves high-fidelity traffic simulation by combining stepwise closed-loop trajectory propagation with physical dynamics for multimodal diversity and interaction-aware agent updates for realistic behavioral consistency.
- training code
- initial repo & paper
Recommended system: Ubuntu 20.04 or 22.04
Step 1: Install Carla
mkdir carla
cd carla
wget https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/CARLA_0.9.15.tar.gz
tar -xvf CARLA_0.9.15.tar.gz
cd Import && wget https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/AdditionalMaps_0.9.15.tar.gz
cd .. && bash ImportAssets.sh
export CARLA_ROOT=YOUR_CARLA_PATH
echo "$CARLA_ROOT/PythonAPI/carla/dist/carla-0.9.15-py3.7-linux-x86_64.egg" >> YOUR_CONDA_PATH/envs/YOUR_CONDA_ENV_NAME/lib/python3.7/site-packages/carla.pth # python 3.8 also works well, please set YOUR_CONDA_PATH and YOUR_CONDA_ENV_NAMEStep 2: Setup conda environment
conda create -n forsim python=3.8
conda activate forsimStep 3: Clone this git repo in an appropriate folder
git clone git@github.com:CurryChen77/ForSim.git
cd ForSimStep 4: Install packages
pip install -r requirements.txt
pip install -e .- Carla Map Data
| Name | Google Drive | Approx. Size | Storage Place |
|---|---|---|---|
| HD Map Data | Link | 714 MB | Folder |
| Speed Limits Data | Link | 79 MB | Folder |
- AV Checkpoint
| AV Name | Google Drive | Approx. Size | Storage Place |
|---|---|---|---|
| PlanT_medium | Link | 695 MB | Folder |
- CBV Checkpoint
| CBV Name | Google Drive | Approx. Size | Storage Place |
|---|---|---|---|
| Pluto | Link | 51.4 MB | Folder |
Parallel execution of Python scripts is allowed as long as each script is assigned a different CUDA_VISIBLE_DEVICES.
# Train forsim pluto
CUDA_VISIBLE_DEVICES=0 python scripts/run.py --ego_cfg pdm_lite.yaml --cbv_cfg forsim_pluto.yaml --mode train_cbvConfigure forward simulator
# Train forsim pluto
CUDA_VISIBLE_DEVICES=0 python scripts/run.py --ego_cfg pdm_lite.yaml --cbv_cfg forsim_pluto.yaml --mode train_cbv -s 0 -exp 'step_pred_greedy' datamodule.fwd_sim.name='step_tracker' datamodule.fwd_sim.others_rollout='pred'
# Eval forsim pluto
CUDA_VISIBLE_DEVICES=0 python scripts/run.py --ego_cfg pdm_lite.yaml --cbv_cfg forsim_pluto.yaml --mode eval --render -rep 1 -s 0 -exp 'step_pred_greedy' -pre_exp 'step_pred_greedy'Multiple Runs for Resume (Carla will crash for some reasons in Fine-tuning)
bash scripts/run_multi.sh \
-t 3 \ # max try
-e pdm_lite.yaml \ # ego file
-c forsim_pluto.yaml \ # cbv file
-m train_cbv \ # run mode (train_cbv, train_ego, eval, collect_data)
-r 2 \ # scenario repeat time
-s 0 \ # random seed
-g 0 \ # GPU_ID
-v # render or not# Eval forsim pluto
CUDA_VISIBLE_DEVICES=0 python scripts/run.py --ego_cfg pdm_lite.yaml --cbv_cfg forsim_pluto.yaml --mode eval -rep 1- Plot Speed and Acceleration Distribution
python tools/plot/plot_distribution.py- Plot Evaluation Results
python tools/plot/plot_eval_results.py# Eval forsim pluto
CUDA_VISIBLE_DEVICES=0 python scripts/run.py --ego_cfg pdm_lite.yaml --cbv_cfg forsim_pluto.yaml --mode eval --render -rep 1 # add --renderIf you find our paper useful, please kindly cite us via:
@misc{chen2026forsimstepwiseforwardsimulation,
title={ForSim: Stepwise Forward Simulation for Traffic Policy Fine-Tuning},
author={Keyu Chen and Wenchao Sun and Hao Cheng and Zheng Fu and Sifa Zheng},
year={2026},
eprint={2602.01916},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2602.01916},
}This implementation is based on code from several repositories. We sincerely thank the authors for their awesome work.
