-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from rpng/test2004
Update to maplab 2.0 and Ubuntu 20.04 Docker
- Loading branch information
Showing
14 changed files
with
412 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: ROS 1 Workflow | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
|
||
jobs: | ||
build_2004: | ||
name: "ROS1 Ubuntu 20.04" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Code Checkout | ||
uses: actions/checkout@v2 | ||
- name: Reconfigure git to use HTTP authentication | ||
run: | | ||
git config --global url."https://github.com/".insteadOf [email protected]: && | ||
git config --global url."https://".insteadOf git:// | ||
- name: Create Workspace and Docker Image | ||
run: | | ||
export REPO=$(basename $GITHUB_REPOSITORY) && | ||
cd $GITHUB_WORKSPACE/.. && mkdir src/ && cd src/ && | ||
git clone https://github.com/rpng/open_vins.git && | ||
git clone https://github.com/ethz-asl/maplab.git --recursive && | ||
cd .. && mv $REPO/ src/ && mkdir $REPO/ && mv src/ $REPO/ && cd $REPO/ && | ||
docker build -t ov_maplab -f $GITHUB_WORKSPACE/src/$REPO/Dockerfile_ros1_20_04 . | ||
- name: Run Build in Docker | ||
run: > | ||
docker run -t --mount type=bind,source=$GITHUB_WORKSPACE,target=/catkin_ws ov_maplab /bin/bash -c | ||
"cd /catkin_ws | ||
&& catkin init | ||
&& catkin config --merge-devel | ||
&& catkin config --extend /opt/ros/noetic | ||
&& catkin build ov_maplab" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# setup ros environment | ||
# ensure you have already built the workspace! | ||
source "/catkin_ws/devel/setup.bash" -- | ||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
vi_map_folder_paths: | ||
- /datasets/euroc_mav/maplab/V1_01_easy | ||
- /datasets/euroc_mav/maplab/V1_02_medium | ||
- /datasets/euroc_mav/maplab/V1_03_difficult | ||
- /datasets/euroc_mav/maplab/V2_01_easy | ||
- /datasets/euroc_mav/maplab/V2_02_medium | ||
- /datasets/euroc_mav/maplab/V2_03_difficult | ||
commands: | ||
- load --map_folder=<CURRENT_VIMAP_FOLDER> | ||
- retriangulate_landmarks | ||
- v --vis_color_by_mission | ||
- optvi --ba_num_iterations=5 -ba_visualize_every_n_iterations=1 | ||
- retriangulate_landmarks | ||
- loopclosure_all_missions | ||
- optvi --ba_num_iterations=5 -ba_visualize_every_n_iterations=1 | ||
- retriangulate_landmarks | ||
- loopclosure_all_missions | ||
- optvi --ba_num_iterations=30 -ba_visualize_every_n_iterations=5 | ||
- evaluate_landmark_quality | ||
- remove_bad_landmarks | ||
- save --map_folder=<CURRENT_VIMAP_FOLDER>_result | ||
- export_to_openvins --overwrite --export_path=<CURRENT_VIMAP_FOLDER>_result | ||
- export_trajectory_to_csv --overwrite --export_path=<CURRENT_VIMAP_FOLDER>_result | ||
- keyframe_heuristic | ||
- v --vis_color_by_mission | ||
- save --map_folder=<CURRENT_VIMAP_FOLDER>_result_keyframed | ||
- export_to_openvins --overwrite --export_path=<CURRENT_VIMAP_FOLDER>_result_keyframed | ||
- export_trajectory_to_csv --overwrite --export_path=<CURRENT_VIMAP_FOLDER>_result_keyframed | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
vi_map_folder_paths: | ||
- /datasets/rpng_plane/maplab/table_01 | ||
- /datasets/rpng_plane/maplab/table_02 | ||
- /datasets/rpng_plane/maplab/table_03 | ||
- /datasets/rpng_plane/maplab/table_04 | ||
- /datasets/rpng_plane/maplab/table_05 | ||
- /datasets/rpng_plane/maplab/table_06 | ||
- /datasets/rpng_plane/maplab/table_07 | ||
- /datasets/rpng_plane/maplab/table_08 | ||
commands: | ||
- load --map_folder=<CURRENT_VIMAP_FOLDER> | ||
- retriangulate_landmarks | ||
- v --vis_color_by_mission | ||
- optvi --ba_num_iterations=5 -ba_visualize_every_n_iterations=1 | ||
- retriangulate_landmarks | ||
- loopclosure_all_missions | ||
- optvi --ba_num_iterations=5 -ba_visualize_every_n_iterations=1 | ||
- retriangulate_landmarks | ||
- loopclosure_all_missions | ||
- optvi --ba_num_iterations=30 -ba_visualize_every_n_iterations=5 | ||
- evaluate_landmark_quality | ||
- remove_bad_landmarks | ||
- save --map_folder=<CURRENT_VIMAP_FOLDER>_result | ||
- export_to_openvins --overwrite --export_path=<CURRENT_VIMAP_FOLDER>_result | ||
- export_trajectory_to_csv --overwrite --export_path=<CURRENT_VIMAP_FOLDER>_result | ||
- keyframe_heuristic | ||
- v --vis_color_by_mission | ||
- save --map_folder=<CURRENT_VIMAP_FOLDER>_result_keyframed | ||
- export_to_openvins --overwrite --export_path=<CURRENT_VIMAP_FOLDER>_result_keyframed | ||
- export_trajectory_to_csv --overwrite --export_path=<CURRENT_VIMAP_FOLDER>_result_keyframed | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
#============================================================= | ||
#============================================================= | ||
#============================================================= | ||
|
||
# dataset locations | ||
bagnames=( | ||
"V1_01_easy" | ||
"V1_02_medium" | ||
"V1_03_difficult" | ||
"V2_01_easy" | ||
"V2_02_medium" | ||
"V2_03_difficult" | ||
) | ||
|
||
#============================================================= | ||
#============================================================= | ||
#============================================================= | ||
|
||
big_start_time="$(date -u +%s)" | ||
|
||
# Loop through all datasets | ||
for i in "${!bagnames[@]}"; do | ||
|
||
# start timing | ||
start_time="$(date -u +%s)" | ||
|
||
# run our ROS launch file (note we send console output to terminator) | ||
roslaunch ov_maplab serial.launch \ | ||
max_cameras:="2" \ | ||
use_stereo:="true" \ | ||
config:="euroc_mav" \ | ||
dataset:="${bagnames[i]}" \ | ||
dolivetraj:="true" &> /dev/null | ||
|
||
# print out the time elapsed | ||
end_time="$(date -u +%s)" | ||
elapsed="$(($end_time-$start_time))" | ||
echo "BASH: ${bagnames[i]} - vio took $elapsed seconds"; | ||
|
||
done | ||
|
||
# start timing | ||
start_time="$(date -u +%s)" | ||
|
||
# run our maplab batch processing command | ||
rosrun maplab_console batch_runner --batch_control_file=src/ov_maplab/scripts/commands_eurocmav.yaml | ||
|
||
# print out the time elapsed | ||
end_time="$(date -u +%s)" | ||
elapsed="$(($end_time-$start_time))" | ||
echo "BASH: full maplab opt took $elapsed seconds"; | ||
|
||
# fix our permissions... | ||
sudo chmod -R 777 /datasets/euroc_mav/maplab/ | ||
sudo chown -R patrick /datasets/euroc_mav/maplab/ | ||
|
||
# print out the time elapsed | ||
big_end_time="$(date -u +%s)" | ||
big_elapsed="$(($big_end_time-$big_start_time))" | ||
echo "BASH: script took $big_elapsed seconds in total!!"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/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 | ||
|
||
#============================================================= | ||
#============================================================= | ||
#============================================================= | ||
|
||
# dataset locations | ||
bagnames=( | ||
"table_01" | ||
"table_02" | ||
"table_03" | ||
"table_04" | ||
"table_05" | ||
"table_06" | ||
"table_07" | ||
"table_08" | ||
) | ||
|
||
#============================================================= | ||
#============================================================= | ||
#============================================================= | ||
|
||
big_start_time="$(date -u +%s)" | ||
|
||
# Loop through all datasets | ||
for i in "${!bagnames[@]}"; do | ||
|
||
# start timing | ||
start_time="$(date -u +%s)" | ||
|
||
# run our ROS launch file (note we send console output to terminator) | ||
roslaunch ov_maplab serial.launch \ | ||
max_cameras:="1" \ | ||
use_stereo:="true" \ | ||
config:="rpng_plane" \ | ||
dataset:="${bagnames[i]}" \ | ||
dolivetraj:="true" &> /dev/null | ||
|
||
# print out the time elapsed | ||
end_time="$(date -u +%s)" | ||
elapsed="$(($end_time-$start_time))" | ||
echo "BASH: ${bagnames[i]} - vio took $elapsed seconds"; | ||
|
||
done | ||
|
||
# start timing | ||
start_time="$(date -u +%s)" | ||
|
||
# run our maplab batch processing command | ||
rosrun maplab_console batch_runner --batch_control_file=src/ov_maplab/scripts/commands_rpngplane.yaml | ||
|
||
# print out the time elapsed | ||
end_time="$(date -u +%s)" | ||
elapsed="$(($end_time-$start_time))" | ||
echo "BASH: full maplab opt took $elapsed seconds"; | ||
|
||
# fix our permissions... | ||
sudo chmod -R 777 /datasets/rpng_plane/maplab/ | ||
sudo chown -R patrick /datasets/rpng_plane/maplab/ | ||
|
||
# print out the time elapsed | ||
big_end_time="$(date -u +%s)" | ||
big_elapsed="$(($big_end_time-$big_start_time))" | ||
echo "BASH: script took $big_elapsed seconds in total!!"; |
Oops, something went wrong.