This is a code repository for RO47015 course at Delft University of Technology made in 2025 for physical human robot interaction (pHRI) experiment which compares haptic and visual assistance in boom crane operation task. The primary purpose of the data analysis pipeline is to investigate between-condition effects. The experiment is within-subject design.
The main data_analysis can be run using:
python3 src/data_analysis.py
It accepts an optional flag -d, --directory which is path to data/ directory.
To setup the environment use
pip install -e .
Using virtual environment is highly recommended.
Default data folder is ./data/. If data folder is passed with -d flag, the folder name does not matter.
Note: all functions here are overwriting in nature. Be careful with data.
data/
├── json_logs/
│ ├── excluded/
│ │ └── ...
│ ├── 01_0_20250101.json
│ ├── 01_1_20250101.json
│ └── ...
├── plots/
│ ├── plot_1.jpg
│ └── ...
├── results/
│ └── results_summary.xlsx
├── other/
│ ├── order.xlsx
│ └── ...
└── ...
- json_logs/ contains the raw data which is stored as
.jsonlogs for each participant. The file name has this form:participantID_condition_date.json. Excluded folder can be made to manage broken data. - plots/ contains all plots generated by the program.
- results/ contains results_summary.xlsx which has summary of all data analysis metrics. Each test is placed on a separate sheet in this file.
- order.xlsx contains the condition order for learning effect analysis.
There is a provided script that can check validity of data (with some limitations):
python3 src/check_data.py
Simple things in plots can be adjusted through plot_config.py, this includes axis labels, title etc. New configurations can be made and passed in data_analysis.py script. For more complex changes, they may need to be applied in plotting functions themselves in plot_essentials.py
The data is provided together with this repository in public release. The provided .zip file can be extracted into the repository and will produce results as per our paper. Note that the dataset has a different license than the code repository.
