forked from epfl-lasa/crowdbot-evaluation-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexport_eval_all.sh
More file actions
76 lines (66 loc) · 2.43 KB
/
export_eval_all.sh
File metadata and controls
76 lines (66 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
# derived from https://stackoverflow.com/a/14203146/7961693
# sh export_eval_all.sh -e=py38cuda110 -t=0424_mds
# copy the snippets below after `conda init`
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/crowdbot/miniconda3/bin/conda' 'shell.bash' 'hook' 2>/dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/crowdbot/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/crowdbot/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/home/crowdbot/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# copy the snippets above after `conda init`
# database path
readonly ROSBAG_DATABASE=$(python3 parse_yaml.py ../data/data_path.yaml --get bagbase_dir)
readonly OUTPUT_DATABASE=$(python3 parse_yaml.py ../data/data_path.yaml --get outbase_dir)
for i in "$@"; do
case $i in
-e=* | --env=*)
ENVIRONMENT="${i#*=}"
shift # past argument=value
;;
-t=* | --type=*)
TYPE="${i#*=}"
shift # past argument=value
;;
*)
# unknown option
;;
esac
done
echo "CONDA ENVIRONMENT = ${ENVIRONMENT}"
echo "CONTROL TYPE = ${TYPE}"
conda activate ${ENVIRONMENT}
# conda info
echo "Number of rosbag in currnet control type:" $(ls -1 "${ROSBAG_DATABASE}/${TYPE}"/*".bag" | wc -l)
echo "########## Export pointcloud and lidar timestamp ##########"
python3 ../qolo/gen_lidar_from_rosbags.py --overwrite -f ${TYPE}
echo "########## Export qolo status ##########"
echo "##### commands2npy.py #####"
python3 ../qolo/commands2npy.py --overwrite -f ${TYPE}
echo "##### tfqolo2npy.py #####"
python3 ../qolo/tfqolo2npy.py --overwrite -f ${TYPE}
echo "##### twist2npy.py #####"
python3 ../qolo/twist2npy.py --overwrite -f ${TYPE}
echo "##### pose2d2npy.py #####"
python3 ../qolo/pose2d2npy.py --overwrite -f ${TYPE}
echo "########## Apply algorithms to extracted data ##########"
echo "##### gen_detection_res.py #####"
python3 ../qolo/gen_detection_res.py -f ${TYPE}
echo "##### gen_tracking_res.py #####"
python3 ../qolo/gen_tracking_res.py -f ${TYPE}
echo "########## Evaluate the performance ##########"
echo "##### eval_qolo_path.py #####"
python3 ../qolo/eval_qolo_path.py --overwrite -f ${TYPE}
echo "##### eval_qolo_ctrl.py #####"
python3 ../qolo/eval_qolo_ctrl.py --overwrite -f ${TYPE}
echo "##### eval_crowd.py #####"
python3 ../qolo/eval_crowd.py --overwrite -f ${TYPE}
echo "########## Finished!!! ##########"