Framework for the analysis of crossing behaviour in the interaction between multiple pedestrians and an automated vehicle, from the perspective of one of the pedestrians using a crowdsourcing approach.
If you use the simulator for academic work please cite the following papers:
Alam, M. S., Dey, D., Martens, M.H., & Bazilinskyy, P. (2026). You’ll never walk alone: Inter-pedestrian distance, eHMIs, and crossing decisions in virtual reality.
Tested with Python 3.9.11 and the uv package manager.
Follow these steps to set up the project.
Step 1: Install uv. uv is a fast Python package and environment manager. Install it using one of the following methods:
macOS / Linux (bash/zsh):
curl -LsSf https://astral.sh/uv/install.sh | shWindows (PowerShell):
irm https://astral.sh/uv/install.ps1 | iexAlternative (if you already have Python and pip):
pip install uvStep 2: Fix permissions (if needed):t
Sometimes uv needs to create a folder under ~/.local/share/uv/python (macOS/Linux) or %LOCALAPPDATA%\uv\python (Windows).
If this folder was created by another tool (e.g. sudo), you may see an error like:
error: failed to create directory ... Permission denied (os error 13)To fix it, ensure you own the directory:
mkdir -p ~/.local/share/uv
chown -R "$(id -un)":"$(id -gn)" ~/.local/share/uv
chmod -R u+rwX ~/.local/share/uv# Create directory if it doesn't exist
New-Item -ItemType Directory -Force "$env:LOCALAPPDATA\uv"
# Ensure you (the current user) own it
# (usually not needed, but if permissions are broken)
icacls "$env:LOCALAPPDATA\uv" /grant "$($env:UserName):(OI)(CI)F"Step 3: After installing, verify:
uv --versionStep 4: Clone the repository:
git clone https://github.com/bazilinskyy/multiped
cd multipedStep 5: Ensure correct Python version. If you don’t already have Python 3.9.11 installed, let uv fetch it:
uv python install 3.9.11The repo should contain a .python-version file so uv will automatically use this version.
Step 6: Create and sync the virtual environment. This will create .venv in the project folder and install dependencies exactly as locked in uv.lock:
uv sync --frozenStep 7: Activate the virtual environment:
macOS / Linux (bash/zsh):
source .venv/bin/activateWindows (PowerShell):
.\.venv\Scripts\Activate.ps1Windows (cmd.exe):
.\.venv\Scripts\activate.batStep 8: Ensure that dataset are present. Place required datasets (including mapping.csv) into the data/ directory:
Step 9: Run the code:
python3 analysis.pyConfiguration of the project needs to be defined in multiped/config. Please use the default.config file for the required structure of the file. If no custom config file is provided, default.config is used. The config file has the following parameters:
mapping: CSV file that contains all data found in the videos.plotly_template: Template used to make graphs in the analysis.output: Directory where analysis results and intermediate output files will be saved.figures: Directory where final figures and plots are stored.data: Directory containing all raw and processed data files used in the analysis.intake_questionnaire: CSV file containing participant responses from the intake (pre-experiment) questionnaire.post_experiment_questionnaire: CSV file containing participant responses from the post-experiment questionnaire.always_analyse: Boolean toggle indicating whether existing cached analysis outputs should be ignored and regenerated.trigger_threshold: List of trigger thresholds used to binarise the pressure-sensitive controller trigger. Samples greater than the threshold are coded as unsafe, and samples at or below the threshold are coded as safe/no unsafe response.compare_trial: Reference trial against which all other trials are compared during t-tests in the analysis.kp_resolution: Time bin size, in milliseconds, used for storing keypress data, which controls the resolution of keypress event logs.yaw_resolution: Time bin size, in milliseconds, used for storing yaw (head rotation) data, controlling the resolution of HMD orientation data.smoothen_signal: Boolean toggle to enable or disable signal smoothing for data analysis.freq: Frequency parameter used by the One Euro Filter for signal smoothing.mincutoff: Minimum cutoff frequency for the One Euro Filter.beta: Beta value controlling the speed-versus-smoothness tradeoff in the One Euro Filter.font_family: Font family to be used in all generated figures for visual consistency.font_size: Font size to be applied to all text in generated figures.p_value: p-value threshold to be used for statistical significance testing (e.g., in t-tests).
Condition-wise relationship between trigger-based perceived crossing risk and Q2 across all inter-pedestrian distances and experimental factors.
Near (2–4 m) minus far (8–10 m) differences for perceived crossing risk and Q1–Q3 for each AV behaviour × eHMI status × co-pedestrian visibility context.
Equivalence test for the near (2–4 m) versus far (8–10 m) contrast in perceived crossing risk, shown overall and for each AV behaviour × eHMI status × co-pedestrian visibility context.
Within-participant and between-participant coefficients relating trigger-based perceived crossing risk to Q1, Q2, and Q3.
Trigger-based perceived crossing risk across inter-pedestrian distance, split by AV behaviour, eHMI status, and co-pedestrian visibility.
Self-reported distance influence (Q2, 0–100) across inter-pedestrian distance, split by AV behaviour, eHMI status, and co-pedestrian visibility.
Trigger-based perceived crossing risk across inter-pedestrian distance with AV behaviour shown in the legend and facets for eHMI status and co-pedestrian visibility.
Trigger-based perceived crossing risk across inter-pedestrian distance with eHMI status shown in the legend and facets for AV behaviour and co-pedestrian visibility.
Q2 across inter-pedestrian distance with AV behaviour shown in the legend and facets for eHMI status and co-pedestrian visibility.
Q2 across inter-pedestrian distance with eHMI status shown in the legend and facets for AV behaviour and co-pedestrian visibility.
Q1: self-reported influence of the co-pedestrian's behaviour on participants' decision to cross (0–100), split by AV behaviour, eHMI status, and co-pedestrian visibility.
Q2: self-reported influence of inter-pedestrian distance on participants' decision to cross (0–100), split by AV behaviour, eHMI status, and co-pedestrian visibility.
Q3: self-reported understanding of the vehicle's intention (0–100), split by AV behaviour, eHMI status, and co-pedestrian visibility.
Non-yielding trials with eHMI.
Non-yielding trials with no eHMI.
Co-pedestrian visible, eHMI, non-yielding trials.
Co-pedestrian visible, eHMI, yielding trials.
Co-pedestrian visible, no eHMI, non-yielding trials.
Co-pedestrian visible, no eHMI, yielding trials.
Co-pedestrian not visible, eHMI, non-yielding trials.
Co-pedestrian not visible, eHMI, yielding trials.
Co-pedestrian not visible, no eHMI, non-yielding trials.
Co-pedestrian not visible, no eHMI, yielding trials.
Ratio-based heatmap showing relationships between AV behaviour, eHMI status, and inter-pedestrian distance conditions.
Distance profiles for additional trigger-based features, including peak trigger, area under the curve, switch count, first press latency, and unsafe proportion, across the five inter-pedestrian distance levels.
Mixed model coefficients for the additional trigger features as a function of AV behaviour, eHMI status, co-pedestrian visibility, and inter-pedestrian distance.
Head yaw in non-yielding trials.
Head yaw in yielding trials with no eHMI.
Head yaw in yielding trials with eHMI.
Head yaw in non-yielding trials with no eHMI.
Head yaw in non-yielding trials with eHMI.
Co-pedestrian visible, eHMI, non-yielding trials.
Co-pedestrian visible, eHMI, yielding trials.
Co-pedestrian visible, no eHMI, non-yielding trials.
Co-pedestrian visible, no eHMI, yielding trials.
Co-pedestrian not visible, eHMI, non-yielding trials.
Co-pedestrian not visible, eHMI, yielding trials.
Co-pedestrian not visible, no eHMI, non-yielding trials.
Co-pedestrian not visible, no eHMI, yielding trials.
Yaw distribution when the co-pedestrian was visible, across all AV behaviour and eHMI status conditions.
Yaw distribution when the co-pedestrian was not visible, across all AV behaviour and eHMI status conditions.
Yaw distributions by co-pedestrian visibility and inter-pedestrian distance; 2 × 5 grid of conditions.
Age distribution of the participants.
Gender distribution of the participants.
Consent to participate in the study.
Understanding of instructions.
Experience with virtual reality.
Comfort with walking in dense traffic.
Effect of pedestrian presence on willingness to cross.
Primary mode of transportation.
Frequency of driving in the last 12 months.
Kilometres driven in the last 12 months.
Age at obtaining first driving licence.
Accidents in the last 3 years.
Self-reported tailgating frequency.
Willingness to communicate with other road users while crossing.
Trust in automated versus manually driven cars before the experiment.
Post-experiment rating of the influence of another pedestrian on willingness to cross.
Post-experiment rating of the effect of car type/eHMI on crossing decisions.
Trust in automated versus manually driven cars after the experiment.
Anxiety during the experiment.
Perceived realism of the experiment.
If you have any questions or suggestions, feel free to reach out to md_shadab_alam@outlook.com.








