initial commit

This commit is contained in:
2022-08-05 08:23:25 +03:00
commit 5ecdc6abcf
387 changed files with 3010095 additions and 0 deletions

115
ov_msckf/scripts/run_ros_eth.sh Executable file
View File

@@ -0,0 +1,115 @@
#!/usr/bin/env bash
# Source our workspace directory to load ENV variables
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source ${SCRIPT_DIR}/../../../../devel/setup.bash
#=============================================================
#=============================================================
#=============================================================
# estimator configurations
modes=(
"mono"
"binocular"
"stereo"
)
# dataset locations
bagnames=(
"V1_01_easy"
"V1_02_medium"
"V1_03_difficult"
"V2_01_easy"
"V2_02_medium"
"V2_03_difficult"
"MH_01_easy"
"MH_02_easy"
"MH_03_medium"
"MH_04_difficult"
"MH_05_difficult"
)
# how far we should start into the dataset
# this can be used to skip the initial sections
bagstarttimes=(
"0"
"0"
"0"
"0"
"0"
"0"
"40"
"35"
"10"
"17"
"18"
)
# location to save log files into
save_path1="/home/chuchu/test_ov/openvins_pra/exp_euroc/algorithms"
save_path2="/home/chuchu/test_ov/openvins_pra/exp_euroc/timings"
bag_path="/home/chuchu/datasets/euroc_mav/"
#=============================================================
#=============================================================
#=============================================================
# Loop through all modes
for h in "${!modes[@]}"; do
# Loop through all datasets
for i in "${!bagnames[@]}"; do
# Monte Carlo runs for this dataset
# If you want more runs, change the below loop
for j in {00..04}; do
# start timing
start_time="$(date -u +%s)"
filename_est="$save_path1/ov_2.4_${modes[h]}/${bagnames[i]}/${j}_estimate.txt"
filename_time="$save_path2/ov_2.4_${modes[h]}/${bagnames[i]}/${j}_timing.txt"
# number of cameras
if [ "${modes[h]}" == "mono" ]
then
temp1="1"
temp2="true"
fi
if [ "${modes[h]}" == "binocular" ]
then
temp1="2"
temp2="false"
fi
if [ "${modes[h]}" == "stereo" ]
then
temp1="2"
temp2="true"
fi
# run our ROS launch file (note we send console output to terminator)
roslaunch ov_msckf serial.launch \
max_cameras:="$temp1" \
use_stereo:="$temp2" \
config:="euroc_mav" \
bag:="$bag_path/${bagnames[i]}.bag" \
bag_start:="${bagstarttimes[i]}" \
dosave:="true" \
path_est:="$filename_est" \
dotime:="true" \
dolivetraj:="true" \
path_time:="$filename_time" &> /dev/null
# print out the time elapsed
end_time="$(date -u +%s)"
elapsed="$(($end_time-$start_time))"
echo "BASH: ${modes[h]} - ${bagnames[i]} - run $j took $elapsed seconds";
done
done
done

View File

@@ -0,0 +1,116 @@
#!/usr/bin/env bash
# Source our workspace directory to load ENV variables
source /home/patrick/workspace/catkin_ws_ov/devel/setup.bash
#=============================================================
#=============================================================
#=============================================================
# estimator configurations
modes=(
"mono"
"binocular"
"stereo"
)
# dataset locations
bagnames=(
"circle"
"circle_fast"
"circle_head"
"infinite"
"infinite_fast"
"infinite_head"
"rotation"
"rotation_fast"
"square"
"square_fast"
"square_head"
)
# how far we should start into the dataset
# this can be used to skip the initial sections
bagstarttimes=(
"0"
"0"
"0"
"0"
"0"
"0"
"0"
"0"
"0"
"0"
"0"
)
# location to save log files into
save_path1="/home/patrick/github/pubs_data/pgeneva/2020_openvins_2.3.1/exp_kaistvio/algorithms"
save_path2="/home/patrick/github/pubs_data/pgeneva/2020_openvins_2.3.1/exp_kaistvio/timings"
bag_path="/media/patrick/RPNG\ FLASH\ 3/KAIST_VIO"
#=============================================================
#=============================================================
#=============================================================
# Loop through all modes
for h in "${!modes[@]}"; do
# Loop through all datasets
for i in "${!bagnames[@]}"; do
# Monte Carlo runs for this dataset
# If you want more runs, change the below loop
for j in {00..04}; do
# start timing
start_time="$(date -u +%s)"
filename_est="$save_path1/ov_2.3.3_${modes[h]}/${bagnames[i]}/${j}_estimate.txt"
filename_time="$save_path2/ov_2.3.3_${modes[h]}/${bagnames[i]}/${j}_timing.txt"
# number of cameras
if [ "${modes[h]}" == "mono" ]
then
temp1="1"
temp2="true"
fi
if [ "${modes[h]}" == "binocular" ]
then
temp1="2"
temp2="false"
fi
if [ "${modes[h]}" == "stereo" ]
then
temp1="2"
temp2="true"
fi
# run our ROS launch file (note we send console output to terminator)
roslaunch ov_msckf pgeneva_ros_kaistvio.launch \
max_cameras:="$temp1" \
use_stereo:="$temp2" \
bag:="$bag_path/${bagnames[i]}.bag" \
bag_start:="${bagstarttimes[i]}" \
dosave:="true" \
path_est:="$filename_est" \
dotime:="true" \
path_time:="$filename_time" &> /dev/null
# print out the time elapsed
end_time="$(date -u +%s)"
elapsed="$(($end_time-$start_time))"
echo "BASH: ${modes[h]} - ${bagnames[i]} - run $j took $elapsed seconds";
done
done
done

104
ov_msckf/scripts/run_ros_tumvi.sh Executable file
View File

@@ -0,0 +1,104 @@
#!/usr/bin/env bash
# Source our workspace directory to load ENV variables
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source ${SCRIPT_DIR}/../../../../devel/setup.bash
#=============================================================
#=============================================================
#=============================================================
# estimator configurations
modes=(
"mono"
"binocular"
"stereo"
)
# dataset locations
bagnames=(
"dataset-room1_512_16"
"dataset-room2_512_16"
"dataset-room3_512_16"
"dataset-room4_512_16"
"dataset-room5_512_16"
"dataset-room6_512_16"
)
# how far we should start into the dataset
# this can be used to skip the initial sections
bagstarttimes=(
"0"
"0"
"0"
"0"
"0"
"0"
)
# location to save log files into
save_path1="/home/chuchu/test_ov/openvins_pra/exp_tum/algorithms"
save_path2="/home/chuchu/test_ov/openvins_pra/exp_tum/timings"
bag_path="/home/chuchu/datasets/tum_vi"
#=============================================================
#=============================================================
#=============================================================
# TODO: Still need to test all, see how to get imu threshold in
# Loop through all modes
for h in "${!modes[@]}"; do
# Loop through all datasets
for i in "${!bagnames[@]}"; do
# Monte Carlo runs for this dataset
# If you want more runs, change the below loop
for j in {00..04}; do
# start timing
start_time="$(date -u +%s)"
filename_est="$save_path1/ov_2.4_${modes[h]}/${bagnames[i]}/${j}_estimate.txt"
filename_time="$save_path2/ov_2.4_${modes[h]}/${bagnames[i]}/${j}_timing.txt"
# number of cameras
if [ "${modes[h]}" == "mono" ]
then
temp1="1"
temp2="true"
fi
if [ "${modes[h]}" == "binocular" ]
then
temp1="2"
temp2="false"
fi
if [ "${modes[h]}" == "stereo" ]
then
temp1="2"
temp2="true"
fi
# run our ROS launch file (note we send console output to terminator)
roslaunch ov_msckf serial.launch \
max_cameras:="$temp1" \
use_stereo:="$temp2" \
config:="tum_vi" \
bag:="$bag_path/${bagnames[i]}.bag" \
bag_start:="${bagstarttimes[i]}" \
dosave:="true" \
path_est:="$filename_est" \
dotime:="true" \
dolivetraj:="true" \
path_time:="$filename_time" &> /dev/null
# print out the time elapsed
end_time="$(date -u +%s)"
elapsed="$(($end_time-$start_time))"
echo "BASH: ${modes[h]} - ${bagnames[i]} - run $j took $elapsed seconds";
done
done
done

View File

@@ -0,0 +1,180 @@
#!/usr/bin/env bash
# Source our workspace directory to load ENV variables
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source ${SCRIPT_DIR}/../../../../devel/setup.bash
#=============================================================
#=============================================================
#=============================================================
# estimator configurations
modes=(
"mono"
"binocular"
"stereo"
)
# dataset locations
bagnames=(
# "indoor_forward_3_snapdragon_with_gt" # bag needs to end early as there is a hard landing
"indoor_forward_5_snapdragon_with_gt"
"indoor_forward_6_snapdragon_with_gt"
"indoor_forward_7_snapdragon_with_gt"
"indoor_forward_9_snapdragon_with_gt"
"indoor_forward_10_snapdragon_with_gt"
"indoor_45_2_snapdragon_with_gt"
"indoor_45_4_snapdragon_with_gt"
# "indoor_45_9_snapdragon_with_gt" # problem one, seems to fail part way in due to freefalling
"indoor_45_12_snapdragon_with_gt"
"indoor_45_13_snapdragon_with_gt"
"indoor_45_14_snapdragon_with_gt"
# "outdoor_forward_1_snapdragon_with_gt"
# "outdoor_forward_3_snapdragon_with_gt"
# "outdoor_forward_5_snapdragon_with_gt"
# "outdoor_45_1_snapdragon_with_gt"
)
# what sensor configuration each dataset has
# 0: indoor forward facing
# 1: indoor 45 degree downward facing
# 2: outdoor forward facing
# 3: outdoor 45 degree downward facing
sensorconfig=(
# indoor forward
# "0" # bag needs to end early as there is a hard landing
"0"
"0"
"0"
"0"
"0"
# indoor 45 degree
"1"
"1"
# "1" # problem one, seems to fail part way in due to freefalling
"1"
"1"
"1"
# outdoor forward and 45
# "2"
# "2"
# "2"
# "3"
)
# how far we should start into the dataset
# this can be used to skip the initial sections
bagstarttimes=(
# indoor forward
# "25"
"0"
"0"
"0"
"0"
"0"
# indoor 45 degree
"0"
"0"
# "17" # problem one, seems to fail part way in due to freefalling
"0"
"0"
"0"
# outdoor forward and 45
# "0"
# "0"
# "41"
# "21"
)
# threshold for variance to detect if the unit has moved yet
imuthreshold=(
# indoor forward
# "5.0"
"0.5"
"0.5"
"0.5"
"0.5"
"0.5"
# indoor 45 degree
"0.5"
"0.5"
# "4.0" # problem one, seems to fail part way in due to freefalling
"0.5"
"0.5"
"0.5"
# outdoor forward and 45
# "0.5"
# "0.5"
# "4.0"
# "4.0"
)
# location to save log files into
save_path1="/home/patrick/github/pubs_data/pgeneva/2020_openvins_2.4/exp_uzhfpv/algorithms"
save_path2="/home/patrick/github/pubs_data/pgeneva/2020_openvins_2.4/exp_uzhfpv/timings"
bag_path="/media/patrick/RPNG\ FLASH\ 2/uzhfpv_newer"
#=============================================================
#=============================================================
#=============================================================
# Loop through all modes
for h in "${!modes[@]}"; do
# Loop through all datasets
for i in "${!bagnames[@]}"; do
# Monte Carlo runs for this dataset
# If you want more runs, change the below loop
for j in {00..04}; do
# start timing
start_time="$(date -u +%s)"
filename_est="$save_path1/ov_2.4_${modes[h]}/${bagnames[i]}/${j}_estimate.txt"
filename_time="$save_path2/ov_2.4_${modes[h]}/${bagnames[i]}/${j}_timing.txt"
# number of cameras
if [ "${modes[h]}" == "mono" ]
then
temp1="1"
temp2="true"
fi
if [ "${modes[h]}" == "binocular" ]
then
temp1="2"
temp2="false"
fi
if [ "${modes[h]}" == "stereo" ]
then
temp1="2"
temp2="true"
fi
# run our ROS launch file (note we send console output to terminator)
roslaunch ov_msckf pgeneva_ros_uzhfpv.launch \
max_cameras:="$temp1" \
use_stereo:="$temp2" \
bag:="$bag_path/${bagnames[i]}.bag" \
bag_start:="${bagstarttimes[i]}" \
sensor_config:="${sensorconfig[i]}" \
init_imu_thresh:="${imuthreshold[i]}" \
dosave:="true" \
path_est:="$filename_est" \
dotime:="true" \
path_time:="$filename_time" &> /dev/null
# print out the time elapsed
end_time="$(date -u +%s)"
elapsed="$(($end_time-$start_time))"
echo "BASH: ${modes[h]} - ${bagnames[i]} - run $j took $elapsed seconds";
done
done
done

View File

@@ -0,0 +1,74 @@
#!/usr/bin/env bash
# Source our workspace directory to load ENV variables
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source ${SCRIPT_DIR}/../../../../devel/setup.bash
#=============================================================
#=============================================================
#=============================================================
# datasets
datasets=(
"udel_gore"
# "udel_arl"
# "udel_gore_zupt"
# "tum_corridor1_512_16_okvis"
)
# If we want to calibrate parameters
sim_do_calibration=(
"false"
"true"
)
# If we want to perturb the initial state values
sim_do_perturbation=(
"false"
"true"
)
# location to save log files into
save_path_est="/home/chuchu/test_ov/openvins_pra/sim_calib/algorithms"
save_path_gt="/home/chuchu/test_ov/openvins_pra/sim_calib/truths"
#=============================================================
# Start the Monte Carlo Simulations
#=============================================================
# Loop through the datasets
for h in "${!datasets[@]}"; do
# Loop through if we want to calibrate
for m in "${!sim_do_calibration[@]}"; do
# Loop through if we want to perturb
for n in "${!sim_do_perturbation[@]}"; do
# Monte Carlo runs for this dataset
for j in {00..02}; do
filename_est="$save_path_est/calib_${sim_do_calibration[m]}/perturb_${sim_do_perturbation[n]}/${datasets[h]}/estimate_$j.txt"
filename_gt="$save_path_gt/${datasets[h]}.txt"
#===============================================
# Start Monte Carlo Simulations
#===============================================
start_time="$(date -u +%s)"
roslaunch ov_msckf simulation.launch \
seed:="$((10#$j + 1))" \
dataset:="${datasets[h]}.txt" \
sim_do_calibration:="${sim_do_calibration[m]}" \
sim_do_perturbation:="${sim_do_perturbation[n]}" \
dosave_pose:="true" \
path_est:="$filename_est" \
path_gt:="$filename_gt" &> /dev/null
end_time="$(date -u +%s)"
elapsed="$(($end_time-$start_time))"
echo "BASH: ${datasets[h]} - calib_${sim_do_calibration[m]} - perturb_${sim_do_perturbation[n]} - run $j took $elapsed seconds";
#===============================================
#===============================================
done
done
done
done

View File

@@ -0,0 +1,66 @@
#!/usr/bin/env bash
# Source our workspace directory to load ENV variables
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source ${SCRIPT_DIR}/../../../../devel/setup.bash
#=============================================================
#=============================================================
#=============================================================
# datasets
datasets=(
"udel_gore"
# "udel_arl"
# "udel_gore_zupt"
# "tum_corridor1_512_16_okvis"
)
# number of cameras
cameras=(
"1"
"2"
"3"
"4"
)
# location to save log files into
save_path_est="/home/cc/test/openvins_pra/sim_cam/algorithms"
save_path_gt="/home/cc/test/openvins_pra/sim_cam/truths"
#=============================================================
# Start Monte-Carlo Simulations
#=============================================================
# Loop through datasets
for h in "${!datasets[@]}"; do
# Loop through number of cameras we want to use
for i in "${!cameras[@]}"; do
# Monte Carlo runs for this dataset
for j in {00..02}; do
# start timing
start_time="$(date -u +%s)"
# our filename
filename_est="$save_path_est/ov_v23_cam${cameras[i]}/${datasets[h]}/estimate_$j.txt"
filename_gt="$save_path_gt/${datasets[h]}.txt"
# run our ROS launch file (note we send console output to terminator)
roslaunch ov_msckf simulation.launch \
seed:="$((10#$j + 1))" \
max_cameras:="${cameras[i]}" \
dataset:="${datasets[h]}.txt" \
dosave_pose:="true" \
path_est:="$filename_est" \
path_gt:="$filename_gt" &> /dev/null
# print out the time elapsed
end_time="$(date -u +%s)"
elapsed="$(($end_time-$start_time))"
echo "BASH: ${datasets[h]} - ${cameras[i]} - run $j took $elapsed seconds";
done
done
done

85
ov_msckf/scripts/run_sim_rep.sh Executable file
View File

@@ -0,0 +1,85 @@
#!/usr/bin/env bash
# Source our workspace directory to load ENV variables
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source ${SCRIPT_DIR}/../../../../devel/setup.bash
#=============================================================
#=============================================================
#=============================================================
# datasets
datasets=(
# "udel_gore"
"udel_arl"
# "udel_gore_zupt"
# "tum_corridor1_512_16_okvis"
)
# estimator configurations
usefej=(
"false"
"true"
)
# feature representations
representations=(
"GLOBAL_3D"
"GLOBAL_FULL_INVERSE_DEPTH"
"ANCHORED_3D"
"ANCHORED_FULL_INVERSE_DEPTH"
"ANCHORED_MSCKF_INVERSE_DEPTH"
"ANCHORED_INVERSE_DEPTH_SINGLE"
)
# location to save log files into
save_path_est="/home/cc/test/openvins_pra/sim_representations/algorithms"
save_path_gt="/home/cc/test/openvins_pra/sim_representations/truths"
#=============================================================
# Start Monte-Carlo Simulations
#=============================================================
# Loop through datasets
for m in "${!datasets[@]}"; do
# Loop through if use fej or not
for h in "${!usefej[@]}"; do
# Loop through all representations
for i in "${!representations[@]}"; do
# Monte Carlo runs for this dataset
for j in {00..09}; do
# start timing
start_time="$(date -u +%s)"
# filename change if we are using fej
if [ "${usefej[h]}" == "true" ]
then
temp="_FEJ"
else
temp=""
fi
filename_est="$save_path_est/${representations[i]}$temp/${datasets[m]}/estimate_$j.txt"
filename_gt="$save_path_gt/${datasets[m]}.txt"
# run our ROS launch file (note we send console output to terminator)
roslaunch ov_msckf simulation.launch \
seed:="$((10#$j + 1))" \
dataset:="${datasets[m]}.txt" \
fej:="${usefej[h]}" \
feat_rep:="${representations[i]}" \
dosave_pose:="true" \
path_est:="$filename_est" \
path_gt:="$filename_gt" &> /dev/null
# print out the time elapsed
end_time="$(date -u +%s)"
elapsed="$(($end_time-$start_time))"
echo "BASH: ${datasets[m]} - ${usefej[h]} - ${representations[i]} - run $j took $elapsed seconds";
done
done
done
done