Added jfr2018 docker image to reproduce kitti/euroc/tum results from the corresponding paper

This commit is contained in:
matlabbe
2018-12-29 17:15:36 -05:00
parent 6bd9dd55b7
commit a909461535
10 changed files with 649 additions and 8 deletions

View File

@@ -24,7 +24,7 @@ RUN cd gtsam && \
git checkout 4.0.0-alpha2 && \ git checkout 4.0.0-alpha2 && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \
cmake -DMETIS_SHARED=ON -DGTSAM_BUILD_STATIC_LIBRARY=OFF -DGTSAM_BUILD_TESTS=OFF -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DCMAKE_BUILD_TYPE=Release .. && \ cmake -DMETIS_SHARED=ON -DGTSAM_BUILD_STATIC_LIBRARY=OFF -DGTSAM_USE_SYSTEM_EIGEN=ON -DGTSAM_BUILD_TESTS=OFF -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DCMAKE_BUILD_TYPE=Release .. && \
make -j$(nproc) && \ make -j$(nproc) && \
make install && \ make install && \
cd && \ cd && \
@@ -36,7 +36,7 @@ RUN cd g2o && \
git checkout 20170730_git && \ git checkout 20170730_git && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \
cmake -DBUILD_LGPL_SHARED_LIBS=ON -DG2O_BUILD_APPS=OFF -DG2O_BUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release .. && \ cmake -DBUILD_LGPL_SHARED_LIBS=ON -DG2O_BUILD_APPS=OFF -DBUILD_WITH_MARCH_NATIVE=OFF -DG2O_BUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release .. && \
make -j$(nproc) && \ make -j$(nproc) && \
make install && \ make install && \
cd && \ cd && \

View File

@@ -24,7 +24,7 @@ RUN cd gtsam && \
git checkout 4.0.0-alpha2 && \ git checkout 4.0.0-alpha2 && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \
cmake -DMETIS_SHARED=ON -DGTSAM_BUILD_STATIC_LIBRARY=OFF -DGTSAM_BUILD_TESTS=OFF -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DCMAKE_BUILD_TYPE=Release .. && \ cmake -DMETIS_SHARED=ON -DGTSAM_BUILD_STATIC_LIBRARY=OFF -DGTSAM_USE_SYSTEM_EIGEN=ON -DGTSAM_BUILD_TESTS=OFF -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DCMAKE_BUILD_TYPE=Release .. && \
make -j$(nproc) && \ make -j$(nproc) && \
make install && \ make install && \
cd && \ cd && \
@@ -36,7 +36,7 @@ RUN cd g2o && \
git checkout 20170730_git && \ git checkout 20170730_git && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \
cmake -DBUILD_LGPL_SHARED_LIBS=ON -DG2O_BUILD_APPS=OFF -DG2O_BUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release .. && \ cmake -DBUILD_LGPL_SHARED_LIBS=ON -DG2O_BUILD_APPS=OFF -DBUILD_WITH_MARCH_NATIVE=OFF -DG2O_BUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release .. && \
make -j$(nproc) && \ make -j$(nproc) && \
make install && \ make install && \
cd && \ cd && \

230
docker/jfr2018/Dockerfile Normal file
View File

@@ -0,0 +1,230 @@
# Image: introlab3it/rtabmap:jfr2018
FROM ubuntu:16.04
# Install build dependencies
RUN apt-get update && apt-get install -y \
libsqlite3-dev \
libpcl-dev \
git \
cmake \
libproj-dev \
libqt5svg5-dev \
libfreenect-dev \
libopenni2-dev \
libyaml-cpp-dev \
software-properties-common
WORKDIR /root/
# OpenCV (use version <= 3.1.0 for rtabmap 0.16.3 for a solvePnpRansac issue where we have worst ransac performance on newer opencv versions)
RUN git clone https://github.com/opencv/opencv_contrib.git && \
cd opencv_contrib && \
git checkout tags/3.1.0 && \
cd && \
git clone https://github.com/opencv/opencv.git && \
cd opencv && \
git checkout tags/3.1.0 && \
mkdir build && \
cd build && \
cmake -DOPENCV_EXTRA_MODULES_PATH=/root/opencv_contrib/modules -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF .. && \
make -j4 && \
make install && \
cd && \
rm -rf opencv opencv_contrib
# Install ROS to build other odometry approaches (depending on ROS)
# install packages
RUN apt-get update && apt-get install -q -y \
dirmngr \
gnupg2 \
lsb-release \
&& rm -rf /var/lib/apt/lists/*
# setup keys
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116
# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list
# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
python-rosdep \
python-rosinstall \
python-vcstools \
&& rm -rf /var/lib/apt/lists/*
# setup environment
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
# bootstrap rosdep
RUN rosdep init \
&& rosdep update
# install ros packages
ENV ROS_DISTRO kinetic
RUN apt-get update && apt-get install -y \
ros-kinetic-ros-core=1.3.2-0* \
&& rm -rf /var/lib/apt/lists/*
# install ROS dependencies
RUN apt-get update && apt-get install -y ros-kinetic-tf ros-kinetic-pcl-ros ros-kinetic-eigen-conversions ros-kinetic-tf-conversions ros-kinetic-random-numbers ros-kinetic-image-transport libblas-dev liblapack-dev libsuitesparse-dev libvtk6.2 libyaml-cpp-dev wget libgoogle-glog-dev libatlas-base-dev ros-kinetic-sophus ros-kinetic-octomap libglew-dev
# Clone dependencies
RUN mkdir -p catkin_ws/src
WORKDIR /root/catkin_ws/src
RUN /bin/bash -c '. /opt/ros/${ROS_DISTRO}/setup.bash; catkin_init_workspace'
RUN git clone https://github.com/tum-vision/dvo_slam.git && cd dvo_slam && git checkout kinetic-devel && rm dvo_slam/package.xml && rm dvo_benchmark/package.xml && rm dvo_ros/package.xml
RUN git clone https://github.com/srv/viso2.git && cd viso2 && git checkout kinetic
RUN git clone https://github.com/KumarRobotics/msckf_vio.git && cd msckf_vio && git checkout a9386c5 && wget https://gist.githubusercontent.com/matlabbe/f2518d7427e7f6740af2110e540b1f2b/raw/900a76b0a6741e172e76722e07c0aae50d3b94f3/msckf_vio_a9386c5_ros_commented.patch && git apply --ignore-space-change --ignore-whitespace msckf_vio_a9386c5_ros_commented.patch
RUN git clone https://github.com/srv/libfovis.git && cd libfovis && git checkout db2fc39451e59317cf8486d92085da1c8e414785
RUN git clone https://github.com/ros-perception/vision_opencv.git && cd vision_opencv && git checkout kinetic
RUN git clone https://github.com/laboshinl/loam_velodyne.git && cd loam_velodyne && git checkout a4c364a677647f2a35831439032dc5a58378b3fd
WORKDIR /root
RUN git clone https://github.com/ethz-asl/okvis.git && cd okvis && git checkout 1dce9129f22dd4d21d944788cd9da3a4341586aa && wget https://gist.githubusercontent.com/matlabbe/383be55b5cb682fea217d45ef9a37ef8/raw/3dfc07f3b0b21d07c090f4bb81950f013163f9cf/okvis_1dce912_marchnative_disabled.patch && git apply --ignore-space-change --ignore-whitespace okvis_1dce912_marchnative_disabled.patch
RUN git clone https://github.com/introlab/rtabmap.git && cd rtabmap && git checkout 0.16.3 && wget https://gist.githubusercontent.com/matlabbe/54c69e8c1008d2b3c237f335cb8a6c99/raw/1dc18f66930be3257ab6d93e80a4ce87d0f110bf/rtabmap-0.16.3-euroc-tool-fix.patch && git apply --ignore-space-change --ignore-whitespace rtabmap-0.16.3-euroc-tool-fix.patch
RUN git clone https://github.com/stevenlovegrove/Pangolin.git
RUN git clone https://github.com/raulmur/ORB_SLAM2.git && cd ORB_SLAM2 && wget https://gist.githubusercontent.com/matlabbe/c10403c5d44af85cc3585c0e1c601a60/raw/48adf04098960d86ddf225f1a8c68af87bfcf56e/orbslam2_f2e6f51_marchnative_disabled.patch && git apply --ignore-space-change --ignore-whitespace orbslam2_f2e6f51_marchnative_disabled.patch
# for dvo, TBB is required (docker related issue)
# Download and install TBB
ENV TBB_RELEASE 2018_U2
ENV TBB_VERSION 2018_20171205
ENV TBB_DOWNLOAD_URL https://github.com/01org/tbb/releases/download/${TBB_RELEASE}/tbb${TBB_VERSION}oss_lin.tgz
ENV TBB_INSTALL_DIR /opt
RUN wget ${TBB_DOWNLOAD_URL} && \
tar -C ${TBB_INSTALL_DIR} -xf tbb${TBB_VERSION}oss_lin.tgz && \
rm tbb${TBB_VERSION}oss_lin.tgz && \
sed -i "s%SUBSTITUTE_INSTALL_DIR_HERE%${TBB_INSTALL_DIR}/tbb${TBB_VERSION}oss%" ${TBB_INSTALL_DIR}/tbb${TBB_VERSION}oss/bin/tbbvars.* && \
echo "source ${TBB_INSTALL_DIR}/tbb${TBB_VERSION}oss/bin/tbbvars.sh intel64" >> ~/.bashrc
RUN cd okvis && \
mkdir build && \
cd build && \
cmake .. && \
make -j3 && \
make install && \
mv /usr/local/lib/CMake/* /usr/local/lib/cmake/.
# Pangolin needed for ORB_SLAM2
RUN cd Pangolin && \
mkdir build && \
cd build && \
cmake .. && \
make -j3 && \
make install && \
cd && \
rm -rf Pangolin
RUN cd ORB_SLAM2 && \
cd Thirdparty/DBoW2 && \
mkdir build && \
cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
make -j3 && \
rm -rf * && \
cd ../../g2o && \
mkdir build && \
cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
make -j3 && \
rm -rf * && \
cd ../../../ && \
cd Vocabulary && \
tar -xf ORBvoc.txt.tar.gz && \
cd .. && \
mkdir build && \
cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
make -j3 && \
rm -rf *
RUN mv okvis/config/config_fpga_p2_euroc.yaml .
RUN mv ORB_SLAM2/Vocabulary/ORBvoc.txt .
# Catkin_make
WORKDIR /root/catkin_ws
RUN /bin/bash -c '. /opt/ros/${ROS_DISTRO}/setup.bash;. ${TBB_INSTALL_DIR}/tbb${TBB_VERSION}oss/bin/tbbvars.sh intel64; catkin_make -j3 -DCMAKE_BUILD_TYPE=Release; rm -rf build;'
ENV LD_LIBRARY_PATH /root/ORB_SLAM2/lib:/root/ORB_SLAM2/Thirdparty/g2o/lib:/root/ORB_SLAM2/Thirdparty/DBoW2/lib:/root/okvis/build/lib:/root/catkin_ws/devel/lib:/opt/ros/kinetic/lib:$LD_LIBRARY_PATH
ENV PATH /root/catkin_ws/devel/bin:/opt/ros/kinetic/bin:$PATH
ENV ORB_SLAM2_ROOT_DIR /root/ORB_SLAM2
WORKDIR /root
# g2o should be rebuilt to link on csparse installed system-wide (for rtabmap 0.17.4 build below)
RUN git clone https://github.com/RainerKuemmerle/g2o.git
RUN rm -r /usr/local/include/EXTERNAL /usr/local/include/g2o
RUN rm -r /usr/local/lib/libg2o_*
RUN cd g2o && \
git checkout 20170730_git && \
mkdir build && \
cd build && \
cmake -DBUILD_LGPL_SHARED_LIBS=ON -DG2O_BUILD_APPS=OFF -DBUILD_WITH_MARCH_NATIVE=OFF -DG2O_BUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release .. && \
make -j3 && \
make install && \
cd && \
rm -r g2o
# GTSAM
RUN git clone https://bitbucket.org/gtborg/gtsam.git
RUN cd gtsam && \
git checkout 4.0.0-alpha2 && \
mkdir build && \
cd build && \
cmake -DMETIS_SHARED=ON -DGTSAM_BUILD_STATIC_LIBRARY=OFF -DGTSAM_USE_SYSTEM_EIGEN=ON -DGTSAM_BUILD_TESTS=OFF -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DCMAKE_BUILD_TYPE=Release .. && \
make -j$(nproc) && \
make install && \
cd && \
rm -r gtsam
# libpointmatcher
RUN git clone https://github.com/ethz-asl/libnabo.git
#commit Apr 25 2018
RUN cd libnabo && \
git checkout 7e378f6765393462357b8b74d8dc8c5554542ae6 && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release .. && \
make -j$(nproc) && \
make install && \
cd && \
rm -r libnabo
RUN git clone https://github.com/ethz-asl/libpointmatcher.git
#commit Jan 19 2018
RUN cd libpointmatcher && \
git checkout 00004bd41e44a1cf8de24ad87e4914760717cbcc && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release .. && \
make -j$(nproc) && \
make install && \
cd && \
rm -r libpointmatcher
# Build RTAB-Map (using standard g2o, then a version for orbslam2, which uses its own g2o version)
RUN cp -r rtabmap rtabmap_os2 && cp -r rtabmap rtabmap_msckf && cp -r rtabmap rtabmap_loam
RUN cd rtabmap && \
cd build && \
cmake -DWITH_G2O=ON .. && \
make -j3 && \
make install && \
rm -rf * && \
ldconfig
RUN cd rtabmap_os2 && \
cd build && \
cmake -DWITH_G2O=OFF .. && \
make -j3 && \
rm -rf *
# rtabmap is crashing if LOAM and MSCKF dependencies are used at the same time, so split them
RUN /bin/bash -c '. /root/catkin_ws/devel/setup.bash; cd rtabmap_loam ; git checkout tools/EurocDataset/main.cpp ;git checkout 0.17.4 ;cd build ;cmake -DWITH_MSCKF_VIO=OFF -DWITH_LOAM=ON -DWITH_G2O=ON -DWITH_FOVIS=OFF -DWITH_DVO=OFF -DWITH_OKVIS=OFF -DWITH_VISO2=OFF .. ;make -j3 ;rm -rf *'
RUN /bin/bash -c '. /root/catkin_ws/devel/setup.bash; cd rtabmap_msckf ; git checkout tools/EurocDataset/main.cpp ;git checkout 0.17.4 ;cd build ;cmake -DWITH_MSCKF_VIO=ON -DWITH_LOAM=OFF -DWITH_G2O=ON -DWITH_FOVIS=OFF -DWITH_DVO=OFF -DWITH_OKVIS=OFF -DWITH_VISO2=OFF .. ;make -j3 ;rm -rf *'
RUN echo "source /root/catkin_ws/devel/setup.bash" >> ~/.bashrc
WORKDIR /root

47
docker/jfr2018/README.md Normal file
View File

@@ -0,0 +1,47 @@
Docker image used to reproduce all results for KITTI, EuRoC and TUM datasets of the following paper:
* M. Labbé and F. Michaud, “RTAB-Map as an Open-Source Lidar and Visual SLAM Library for Large-Scale and Long-Term Online Operation,” in Journal of Field Robotics, accepted, 2018. ([pdf](https://introlab.3it.usherbrooke.ca/mediawiki-introlab/images/7/7a/Labbe18JFR_preprint.pdf)) ([Wiley](https://doi.org/10.1002/rob.21831))
Pull image:
```bash
$ docker pull introlab3it/rtabmap:jfr2018
```
or create the image with the `Dockerfile` provided in this directory:
```bash
$ cd rtabmap/docker/jfr2018
$ docker build -t introlab3it/rtabmap:jfr2018 .
```
Make sure to extract datasets in a subfolder called `datasets` relative to scripts in this folder (you can copy the scripts outside rtabmap source directory for convenience). The testing folder tree should look like this:
```bash
datasets/kitti/devkit
datasets/kitti/dataset/sequences/00
datasets/kitti/dataset/sequences/01
datasets/kitti/dataset/sequences/...
datasets/euroc/MH_01_easy
datasets/euroc/V1_01_easy
datasets/euroc/...
datasets/tum/rgbd_dataset_freiburg1_desk
datasets/tum/rgbd_dataset_freiburg3_long_office_household
datasets/tum/...
run_all.sh
run_kitti_datasets.sh
run_euroc_datasets.sh
run_tum_datasets.sh
```
Process all datasets, results will be written to subfolders `results/euroc`, `results/kitti` and `results/tum`:
```bash
./run_all.sh
```
WARNING: processing all datasets with all different odometry approaches can require more than 10 hours to process. You can comment some configurations in [run_all.sh](https://github.com/introlab/rtabmap/blob/master/docker/jfr2018/run_all.sh) if you are interested in just one odometry approach or one database. A single sequence can be tested like this too:
```bash
# Processing only sequence 07 of the kitti dataset with F2M odometry approach
./run_kitti_datasets.sh f2m 0 0 07
```
Show all results:
```bash
$ rtabmap-report --scale results
```

33
docker/jfr2018/run_all.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
# docker pull introlab3it/rtabmap:jfr2018
mkdir -p results/kitti
./run_kitti_datasets.sh f2m 0 0
./run_kitti_datasets.sh f2f 11 0
./run_kitti_datasets.sh s2m 0 1
./run_kitti_datasets.sh s2s 1 1
./run_kitti_datasets.sh fovis 2 0
./run_kitti_datasets.sh viso2 3 0
./run_kitti_datasets.sh os2 5 0
./run_kitti_datasets.sh loam 7 1
mkdir -p results/tum
./run_tum_datasets.sh f2m 0
./run_tum_datasets.sh f2f 11
./run_tum_datasets.sh fovis 2
./run_tum_datasets.sh dvo 4
./run_tum_datasets.sh os2 5
mkdir -p results/euroc
./run_euroc_datasets.sh f2m 0 0
./run_euroc_datasets.sh f2f 11 0
./run_euroc_datasets.sh os2 5 0
./run_euroc_datasets.sh msckf 88 0
./run_euroc_datasets.sh fovis 2 0
./run_euroc_datasets.sh viso2 3 0
./run_euroc_datasets.sh okvis 66 0

View File

@@ -0,0 +1,119 @@
#!/bin/bash
PWD=$(pwd)
DATASET_ROOT_PATH='/root/datasets/euroc'
EUROC_RESULTS_PATH='/root/results/euroc'
LIST=( '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')
STRATEGY=0
OUTPUT="test"
DISP=0
if [ $# -eq 4 ]
then
OUTPUT=$1
STRATEGY=$2
DISP=$3
LIST=($4)
elif [ $# -eq 3 ]
then
OUTPUT=$1
STRATEGY=$2
DISP=$3
else
echo "Usage: run_euroc_datasets.sh \"output name\" \"odom strategy: 0=f2m 1=f2f 11=f2f_optflow 2=fovis 3=viso2 4=dvo 5=orbslam2 6=okvis(rect) 66=okvis(raw) 8=msckf_vio(rect) 88=msckf_vio(raw)\" \"Disparity: 0 or 1\" [sequence]"
exit
fi
F2F_params=""
if [ $STRATEGY -eq 11 ] # F2F optical flow
then
STRATEGY=1
F2F_params="--Vis/CorType 1 --Vis/MinInliers 20 --RGBD/OptimizeMaxError 0"
fi
if [ $STRATEGY -eq 1 ] # F2F
then
F2F_params="--Odom/KeyFrameThr 0.6 $F2F_params"
fi
if [ $DISP -eq 1 ]
then
F2F_params="--disp --StereoBM/NumDisparities 32 --StereoBM/UniquenessRatio 5 $F2F_params"
else
F2F_params="--exposure_comp $F2F_params"
fi
if [ $STRATEGY -eq 66 ] # okvis raw images
then
STRATEGY=6
F2F_params="--raw $F2F_params"
fi
if [ $STRATEGY -eq 6 ] # okvis
then
F2F_params="--Odom/GuessMotion false --OdomOKVIS/ConfigPath ./config_fpga_p2_euroc.yaml $F2F_params"
fi
if [ $STRATEGY -eq 88 ] # msckf_vio raw images
then
STRATEGY=8
F2F_params="--raw $F2F_params"
fi
if [ $STRATEGY -eq 8 ] # msckf_vio
then
F2F_params="--Odom/GuessMotion false $F2F_params"
fi
# Select rtabmap built with os2 support or not
TOOL_PREFIX="/usr/local/bin"
if [ $STRATEGY -eq 5 ]
then
TOOL_PREFIX="/root/rtabmap_os2/bin"
elif [ $STRATEGY -eq 8 ]
then
TOOL_PREFIX="/root/rtabmap_msckf/bin"
fi
RTABMAP_RGBD_TOOL="docker run -v $PWD/datasets/EuRoC:$DATASET_ROOT_PATH -v $PWD/results/euroc:$EUROC_RESULTS_PATH -i -t --rm introlab3it/rtabmap:jfr2018 $TOOL_PREFIX/rtabmap-euroc_dataset"
if [ $STRATEGY -eq 6 ]
then
xhost +
RTABMAP_RGBD_TOOL="docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $PWD/datasets/EuRoC:$DATASET_ROOT_PATH -v $PWD/results/euroc:$EUROC_RESULTS_PATH -i -t --rm introlab3it/rtabmap:jfr2018 $TOOL_PREFIX/rtabmap-euroc_dataset"
fi
echo $RTABMAP_RGBD_TOOL
for d in "${LIST[@]}"
do
V203_params=""
if [ "$d" == "V2_03_difficult" ]
then
if [[ $STRATEGY -eq 0 || $STRATEGY -eq 1 ]]
then
V203_params="--Vis/MinInliers 10 --Vis/PnPReprojError 3"
fi
fi
taskset 0x1 $RTABMAP_RGBD_TOOL \
--Rtabmap/PublishRAMUsage true\
--RGBD/LinearUpdate 0\
--RGBD/AngularUpdate 0\
--RGBD/ProximityBySpace false\
--Rtabmap/DetectionRate 2\
--Kp/FlannRebalancingFactor 1.0\
--Odom/Strategy $STRATEGY\
--Mem/STMSize 30\
--Mem/UseOdomFeatures false \
--Mem/BinDataKept false \
--Rtabmap/CreateIntermediateNodes false\
$V203_params\
$F2F_params\
--OdomORBSLAM2/VocPath /root/ORBvoc.txt\
--OdomORBSLAM2/ThDepth 35\
--OdomORBSLAM2/MaxFeatures 1200\
--output "$EUROC_RESULTS_PATH/$d"\
--output_name $OUTPUT\
--quiet\
$DATASET_ROOT_PATH/$d
done
# For V2_03_difficult: --Vis/MinInliers 10 --disp StereoBM/NumDisparities 32 --StereoBM/UniquenessRatio 5 --Vis/PnPReprojError 3

View File

@@ -0,0 +1,125 @@
#!/bin/bash
PWD=$(pwd)
KITTI_ROOT_PATH='/root/datasets/kitti'
KITTI_RESULTS_PATH='/root/results/kitti'
LIST=('00' '01' '02' '03' '04' '05' '06' '07' '08' '09' '10')
#LIST=('11' '12' '13' '14' '15' '16' '17' '18' '19' '20' '21')
STRATEGY=0
REG=0
OUTPUT="test"
if [ $# -eq 4 ]
then
OUTPUT=$1
STRATEGY=$2
REG=$3
LIST=($4)
elif [ $# -eq 3 ]
then
OUTPUT=$1
STRATEGY=$2
REG=$3
else
echo "Usage: run_tum_datasets.sh \"output name\" \"odom strategy: 0=f2m 1=f2f 11=f2f_optflow 2=fovis 3=viso2 4=dvo 5=orbslam2 7=LOAM\" \"reg strategy: 0=vis 1=icp-point2point 11=icp-point2plane\" [sequence]"
exit
fi
F2F_params=""
if [ $STRATEGY -eq 11 ]
then
STRATEGY=1
F2F_params="--Vis/CorType 1"
fi
if [ $STRATEGY -eq 1 ]
then
F2F_params="--Odom/KeyFrameThr 0.6 $F2F_params"
fi
if [ $STRATEGY -eq 3 ]
then
F2F_params=" $F2F_params"
fi
SCAN=""
if [[ $REG -eq 1 || $REG -eq 11 ]]
then
if [ $REG -eq 11 ]
then
REG=1
if [ $STRATEGY -eq 7 ]
then
SCAN="--Mem/LaserScanVoxelSize 0.5 --Mem/LaserScanNormalK 10 --scan_voxel 0.0"
else
SCAN="--scan_k 10 --scan_voxel 0.5"
fi
SCAN="--Icp/PointToPlane true --Icp/Iterations 5 --Odom/ScanKeyFrameThr 0.6 $SCAN"
else
if [ $STRATEGY -eq 7 ]
then
SCAN="--Mem/LaserScanVoxelSize 0.5 --scan_voxel 0.0"
else
SCAN="--scan_voxel 0.5"
fi
SCAN="--Icp/PointToPlane false --Icp/Iterations 10 --Odom/ScanKeyFrameThr 0.8 $SCAN"
fi
SCAN="--scan --Reg/Strategy $REG --OdomF2M/ScanMaxSize 10000 --OdomF2M/ScanSubtractRadius 0.5 --Odom/LOAMSensor 2 --Icp/MaxTranslation 2 --Icp/Epsilon 0.0001 --Icp/MaxCorrespondenceDistance 1.5 --Icp/CorrespondenceRatio 0.01 --Icp/PM true --Icp/PMOutlierRatio 0.7 --Icp/PMMatcherKnn 3 --Icp/PMMatcherEpsilon 1 $SCAN"
fi
# Select rtabmap built with os2 support or not
TOOL_PREFIX="/usr/local/bin"
if [ $STRATEGY -eq 5 ]
then
TOOL_PREFIX="/root/rtabmap_os2/bin"
elif [ $STRATEGY -eq 7 ]
then
TOOL_PREFIX="/root/rtabmap_loam/bin"
fi
RTABMAP_KITTI_TOOL="docker run -v $PWD/datasets/KITTI:$KITTI_ROOT_PATH -v $PWD/results/kitti:$KITTI_RESULTS_PATH -i -t --rm introlab3it/rtabmap:jfr2018 $TOOL_PREFIX/rtabmap-kitti_dataset"
echo $RTABMAP_KITTI_TOOL
for d in "${LIST[@]}"
do
taskset 0x1 $RTABMAP_KITTI_TOOL \
--Rtabmap/PublishRAMUsage true\
--Vis/MaxFeatures 1500\
--RGBD/LinearUpdate 0\
--RGBD/AngularUpdate 0\
--RGBD/ProximityBySpace false\
--Rtabmap/DetectionRate 2\
--Kp/MaxFeatures 750\
--Kp/FlannRebalancingFactor 1.0\
--GFTT/QualityLevel 0.01\
--GFTT/MinDistance 7\
--OdomF2M/MaxSize 3000\
--Rtabmap/CreateIntermediateNodes true\
--Odom/Strategy $STRATEGY\
$F2F_params \
--OdomORBSLAM2/VocPath /root/ORBvoc.txt\
--OdomORBSLAM2/ThDepth 40\
--OdomORBSLAM2/Fps 10\
--OdomORBSLAM2/MaxFeatures 2000\
--OdomViso2/MatchNmsN 7\
--OdomViso2/MatchRadius 300\
--FAST/Threshold 12\
--Mem/STMSize 30\
--Mem/UseOdomFeatures false \
--Mem/BinDataKept false \
$SCAN \
--gt $KITTI_ROOT_PATH"/devkit/cpp/data/odometry/poses/$d.txt"\
--output "$KITTI_RESULTS_PATH/$d"\
--output_name $OUTPUT\
--quiet\
$KITTI_ROOT_PATH/dataset/sequences/$d
done
# ORB_SLAM2:
# 0-2: --OdomORBSLAM2/ThDepth 35
# 3-12: --OdomORBSLAM2/ThDepth 40 (default)
# 0-3: --FAST/Threshold 20 (default)
# 4-12: --FAST/Threshold 12 --OdomORBSLAM2/ThDepth 40
# --OdomORBSLAM2/MaxFeatures 2000
#

View File

@@ -0,0 +1,86 @@
#!/bin/bash
PWD=$(pwd)
RGBD_ROOT_PATH='/root/datasets/tum'
RGBD_RESULTS_PATH='/root/results/tum'
LIST=( 'rgbd_dataset_freiburg1_desk' 'rgbd_dataset_freiburg1_desk2' 'rgbd_dataset_freiburg1_room' 'rgbd_dataset_freiburg2_desk' 'rgbd_dataset_freiburg2_xyz' 'rgbd_dataset_freiburg3_long_office_household' 'rgbd_dataset_freiburg3_nostructure_texture_near_withloop_validation')
# more: 'rgbd_dataset_freiburg1_360' 'rgbd_dataset_freiburg1_plant' 'rgbd_dataset_freiburg1_rpy' 'rgbd_dataset_freiburg1_teddy' 'rgbd_dataset_freiburg2_360_hemisphere' 'rgbd_dataset_freiburg2_large_no_loop' 'rgbd_dataset_freiburg2_large_with_loop' 'rgbd_dataset_freiburg1_floor'
# Got Lost: 'rgbd_dataset_freiburg1_floor' (at 11 seconds end), 'rgbd_dataset_freiburg3_teddy'
STRATEGY=0
OUTPUT="test"
if [ $# -eq 3 ]
then
OUTPUT=$1
STRATEGY=$2
LIST=($3)
elif [ $# -eq 2 ]
then
OUTPUT=$1
STRATEGY=$2
else
echo "Usage: run_tum_datasets.sh \"output name\" \"odom strategy: 0=f2m 1=f2f 11=f2f_optflow 2=fovis 3=viso2 4=dvo 5=orbslam2\" [sequence]"
exit
fi
F2F_params=""
if [ $STRATEGY -eq 11 ]
then
STRATEGY=1
F2F_params="--Vis/CorType 1"
fi
if [ $STRATEGY -eq 1 ]
then
F2F_params="--Odom/KeyFrameThr 0.6 $F2F_params"
fi
if [[ $STRATEGY -eq 2 || $STRATEGY -eq 4 ]]
then
F2F_params="--RGBD/OptimizeMaxError 0 $F2F_params"
fi
# Select rtabmap built with os2 support or not
TOOL_PREFIX="/usr/local/bin"
if [ $STRATEGY -eq 5 ]
then
TOOL_PREFIX="/root/rtabmap_os2/bin"
fi
RTABMAP_RGBD_TOOL="docker run -v $PWD/datasets/tum:$RGBD_ROOT_PATH -v $PWD/results/tum:$RGBD_RESULTS_PATH -i -t --rm introlab3it/rtabmap:jfr2018 $TOOL_PREFIX/rtabmap-rgbd_dataset"
echo $RTABMAP_RGBD_TOOL
# no --disp with 01?
for d in "${LIST[@]}"
do
DETECTION_RATE=2
if [[ "$d" == "rgbd_dataset_freiburg1_desk" || "$d" == "rgbd_dataset_freiburg1_desk2" ]]
then
DETECTION_RATE=4
fi
taskset 0x1 $RTABMAP_RGBD_TOOL \
--Rtabmap/PublishRAMUsage true\
--RGBD/LinearUpdate 0\
--RGBD/AngularUpdate 0\
--Rtabmap/DetectionRate $DETECTION_RATE\
--Kp/FlannRebalancingFactor 1.0\
--Odom/Strategy $STRATEGY\
--Mem/STMSize 30\
--Mem/UseOdomFeatures false \
--Mem/BinDataKept false \
--Rtabmap/CreateIntermediateNodes false\
$F2F_params\
--OdomORBSLAM2/VocPath /root/ORBvoc.txt\
--OdomFovis/MinFeaturesForEstimate 10\
--output "$RGBD_RESULTS_PATH/$d"\
--output_name $OUTPUT\
--quiet\
$RGBD_ROOT_PATH/$d
done
#--Odom/Strategy 1\
#--Vis/CorType 1\

View File

@@ -13,6 +13,7 @@ RUN apt-get update && apt-get install -y \
libqt5svg5-dev \ libqt5svg5-dev \
libfreenect-dev \ libfreenect-dev \
libopenni2-dev \ libopenni2-dev \
libyaml-cpp-dev \
software-properties-common software-properties-common
WORKDIR /root/ WORKDIR /root/
@@ -23,7 +24,7 @@ RUN cd gtsam && \
git checkout 4.0.0-alpha2 && \ git checkout 4.0.0-alpha2 && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \
cmake -DMETIS_SHARED=ON -DGTSAM_BUILD_STATIC_LIBRARY=OFF -DGTSAM_BUILD_TESTS=OFF -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DCMAKE_BUILD_TYPE=Release .. && \ cmake -DMETIS_SHARED=ON -DGTSAM_BUILD_STATIC_LIBRARY=OFF -DGTSAM_USE_SYSTEM_EIGEN=ON -DGTSAM_BUILD_TESTS=OFF -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DCMAKE_BUILD_TYPE=Release .. && \
make -j$(nproc) && \ make -j$(nproc) && \
make install && \ make install && \
cd && \ cd && \
@@ -35,7 +36,7 @@ RUN cd g2o && \
git checkout 20170730_git && \ git checkout 20170730_git && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \
cmake -DBUILD_LGPL_SHARED_LIBS=ON -DG2O_BUILD_APPS=OFF -DG2O_BUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release .. && \ cmake -DBUILD_LGPL_SHARED_LIBS=ON -DG2O_BUILD_APPS=OFF -DBUILD_WITH_MARCH_NATIVE=OFF -DG2O_BUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release .. && \
make -j$(nproc) && \ make -j$(nproc) && \
make install && \ make install && \
cd && \ cd && \

View File

@@ -24,7 +24,7 @@ RUN cd gtsam && \
git checkout 4.0.0-alpha2 && \ git checkout 4.0.0-alpha2 && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \
cmake -DMETIS_SHARED=ON -DGTSAM_BUILD_STATIC_LIBRARY=OFF -DGTSAM_BUILD_TESTS=OFF -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DCMAKE_BUILD_TYPE=Release .. && \ cmake -DMETIS_SHARED=ON -DGTSAM_BUILD_STATIC_LIBRARY=OFF -DGTSAM_USE_SYSTEM_EIGEN=ON -DGTSAM_BUILD_TESTS=OFF -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DCMAKE_BUILD_TYPE=Release .. && \
make -j$(nproc) && \ make -j$(nproc) && \
make install && \ make install && \
cd && \ cd && \
@@ -36,7 +36,7 @@ RUN cd g2o && \
git checkout 20170730_git && \ git checkout 20170730_git && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \
cmake -DBUILD_LGPL_SHARED_LIBS=ON -DG2O_BUILD_APPS=OFF -DG2O_BUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release .. && \ cmake -DBUILD_LGPL_SHARED_LIBS=ON -DG2O_BUILD_APPS=OFF -DBUILD_WITH_MARCH_NATIVE=OFF -DG2O_BUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release .. && \
make -j$(nproc) && \ make -j$(nproc) && \
make install && \ make install && \
cd && \ cd && \