Analysing trust in a traffic scene with an automated vehicle
This project defines a framework for the analysis of the level of trust in a traffic environment involving an automated vehicle. The jsPsych framework is used to for the frontend. In the description below, it is assumed that the repo is stored in the folder trust-crowdsourced
. Terminal commands lower assume macOS.
Setup
Tested with Python 3.9.12. To setup the environment run these two commands in a parent folder of the downloaded repository (replace /
with \
and possibly add --user
if on Windows):
pip install -e trust-crowdsourced
will setup the project as a package accessible in the environment.pip install -r trust-crowdsourced/requirements.txt
will install required packages.
Configuration of project
Configuration of the project needs to be defined in trust-crowdsourced/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:
appen_job
: ID of the appen job.num_stimuli
: number of stimuli in the study.num_stimuli_participant
: subset of stimuli in the study shown to each participant.allowed_min_time
: the cut-off for minimal time of participation for filtering.num_repeat
: number of times each stimulus is repeated.kp_resolution
: bin size in ms in which data is stored.allowed_stimulus_wrong_duration
: if the percentage of videos with abnormal length is above this value, exclude participant from analysis.allowed_mistakes_signs
: number of allowed mistakes in the questions about traffic signs.sign_answers
: answers to the questions on traffic signs.mask_id
: number for masking worker IDs in appen data.files_heroku
: files with data from heroku.file_appen
: file with data from appen.file_cheaters
: CSV file with cheaters for flagging.path_source
: path with source files for the stimuli from the Unity3D project.path_stimuli
: path consisting of all videos included in the survey.mapping_stimuli
: CSV file that contains all data found in the videos.plotly_template
: template used to make graphs in the analysis.
Preparation of stimuli
The source files of the video stimuli are outputted from Unity to config.path_source
. To prepare them for the crowdsourced setup python trust-crowdsourced/preparation/process_videos.py
. Videos will be outputted to config.path_stimuli
.
Troubleshooting
Troubleshooting setup
ERROR: trust-crowdsourced is not a valid editable requirement
Check that you are indeed in the parent folder for running command pip install -e trust-crowdsourced
. This command will not work from inside of the folder containing the repo.