Skip to content

bazilinskyy/multiped

Repository files navigation

Multi-pedestrian interaction with automated vehicle

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.

Citation

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.

Getting started

Python Version Package Manager: uv

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 | sh

Windows (PowerShell):

irm https://astral.sh/uv/install.ps1 | iex

Alternative (if you already have Python and pip):

pip install uv

Step 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:

macOS / Linux

mkdir -p ~/.local/share/uv
chown -R "$(id -un)":"$(id -gn)" ~/.local/share/uv
chmod -R u+rwX ~/.local/share/uv

Windows

# 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 --version

Step 4: Clone the repository:

git clone https://github.com/bazilinskyy/multiped
cd multiped

Step 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.11

The 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 --frozen

Step 7: Activate the virtual environment:

macOS / Linux (bash/zsh):

source .venv/bin/activate

Windows (PowerShell):

.\.venv\Scripts\Activate.ps1

Windows (cmd.exe):

.\.venv\Scripts\activate.bat

Step 8: Ensure that dataset are present. Place required datasets (including mapping.csv) into the data/ directory:

Step 9: Run the code:

python3 analysis.py

Configuration of project

Configuration 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).

crossing_risk_vs_Q2_scatter Condition-wise relationship between trigger-based perceived crossing risk and Q2 across all inter-pedestrian distances and experimental factors.

near_minus_far_crossing_risk_vs_Q123 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_near_far_crossing_risk 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_between_crossing_risk_coefficients Within-participant and between-participant coefficients relating trigger-based perceived crossing risk to Q1, Q2, and Q3.

crossing_risk_full_factorial Trigger-based perceived crossing risk across inter-pedestrian distance, split by AV behaviour, eHMI status, and co-pedestrian visibility.

Q2_full_factorial Self-reported distance influence (Q2, 0–100) across inter-pedestrian distance, split by AV behaviour, eHMI status, and co-pedestrian visibility.

crossing_risk_full_factorial_legend_yielding 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.

crossing_risk_full_factorial_legend_eHMI 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_full_factorial_legend_yielding Q2 across inter-pedestrian distance with AV behaviour shown in the legend and facets for eHMI status and co-pedestrian visibility.

Q2_full_factorial_legend_eHMI Q2 across inter-pedestrian distance with eHMI status shown in the legend and facets for AV behaviour and co-pedestrian visibility.

q1_behaviour_of_the_other_pedestrian 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_distance_between_pedestrians 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_intention_of_the_vehicle Q3: self-reported understanding of the vehicle's intention (0–100), split by AV behaviour, eHMI status, and co-pedestrian visibility.

Trigger press from the participant

kp_all_y Yielding trials.

kp_all_ny Non-yielding trials.

kp_e1_y Yielding trials with eHMI.

kp_e1_ny Non-yielding trials with eHMI.

kp_e0_y Yielding trials with no eHMI.

kp_e0_ny Non-yielding trials with no eHMI.

kp_p1_e1_ny Co-pedestrian visible, eHMI, non-yielding trials.

kp_p1_e1_y Co-pedestrian visible, eHMI, yielding trials.

kp_p1_e0_ny Co-pedestrian visible, no eHMI, non-yielding trials.

kp_p1_e0_y Co-pedestrian visible, no eHMI, yielding trials.

kp_p2_e1_ny Co-pedestrian not visible, eHMI, non-yielding trials.

kp_p2_e1_y Co-pedestrian not visible, eHMI, yielding trials.

kp_p2_e0_ny Co-pedestrian not visible, no eHMI, non-yielding trials.

kp_p2_e0_y Co-pedestrian not visible, no eHMI, yielding trials.

heatmap Ratio-based heatmap showing relationships between AV behaviour, eHMI status, and inter-pedestrian distance conditions.

trigger_feature_distance_profiles 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.

trigger_feature_model_coefficients Mixed model coefficients for the additional trigger features as a function of AV behaviour, eHMI status, co-pedestrian visibility, and inter-pedestrian distance.

Head movement from the participant

all_yaw_values_with_yielding Head yaw in yielding trials.

all_yaw_values_without_yielding Head yaw in non-yielding trials.

yaw_no_ehmi_yielding Head yaw in yielding trials with no eHMI.

yaw_ehmi_yielding Head yaw in yielding trials with eHMI.

yaw_no_ehmi_non_yielding Head yaw in non-yielding trials with no eHMI.

yaw_ehmi_non_yielding Head yaw in non-yielding trials with eHMI.

yaw_visible_ehmi_non_yielding Co-pedestrian visible, eHMI, non-yielding trials.

yaw_visible_ehmi_yielding Co-pedestrian visible, eHMI, yielding trials.

yaw_visible_no_ehmi_non_yielding Co-pedestrian visible, no eHMI, non-yielding trials.

yaw_visible_no_ehmi_yielding Co-pedestrian visible, no eHMI, yielding trials.

yaw_not_visible_ehmi_non_yielding Co-pedestrian not visible, eHMI, non-yielding trials.

yaw_not_visible_ehmi_yielding Co-pedestrian not visible, eHMI, yielding trials.

yaw_not_visible_no_ehmi_non_yielding Co-pedestrian not visible, no eHMI, non-yielding trials.

yaw_not_visible_no_ehmi_yielding Co-pedestrian not visible, no eHMI, yielding trials.

yaw_hist_co_pedestrian_visible Yaw distribution when the co-pedestrian was visible, across all AV behaviour and eHMI status conditions.

yaw_hist_co_pedestrian_not_visible Yaw distribution when the co-pedestrian was not visible, across all AV behaviour and eHMI status conditions.

yaw_hist_visibility_distance Yaw distributions by co-pedestrian visibility and inter-pedestrian distance; 2 × 5 grid of conditions.

Participant responses

age_distribution Age distribution of the participants.

gender_distribution Gender distribution of the participants.

consent Consent to participate in the study.

instructions Understanding of instructions.

seeing_aids Use of seeing aids.

hearing Hearing problems.

vr_experience Experience with virtual reality.

comfort_traffic Comfort with walking in dense traffic.

pedestrian_presence_willingness Effect of pedestrian presence on willingness to cross.

transport Primary mode of transportation.

driving_frequency Frequency of driving in the last 12 months.

driving_km Kilometres driven in the last 12 months.

licence_age Age at obtaining first driving licence.

accidents Accidents in the last 3 years.

tailgating Self-reported tailgating frequency.

road_user_communication Willingness to communicate with other road users while crossing.

trust_av_intake Trust in automated versus manually driven cars before the experiment.

pedestrian_influence_post Post-experiment rating of the influence of another pedestrian on willingness to cross.

car_type_effect_post Post-experiment rating of the effect of car type/eHMI on crossing decisions.

trust_av_post Trust in automated versus manually driven cars after the experiment.

stress Stress during the experiment.

anxiety Anxiety during the experiment.

realism Perceived realism of the experiment.

overall_experience Overall experience rating.

Contact

If you have any questions or suggestions, feel free to reach out to md_shadab_alam@outlook.com.

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors