Outils pour utilisateurs

Outils du site


multicolslam

MultiCol-SLAM sur github: https://github.com/urbste/MultiCol-SLAM

vidéo de démo: https://www.youtube.com/watch?v=ggZqsiePUq8

Installation

mkdir ~/multicolslam
cd ~/multicolslam
sudo apt-get install libglew-dev cmake
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake -DCPP11_NO_BOOST=1 ..
make -j

OpenCV 3.1 déjà installé ailleurs…

cd ~/multicolslam

Originellement: git clone https://github.com/urbste/MultiCol-SLAM.git MultiCol-SLAM

git clone https://github.com/bvandepo/MultiCol-SLAM.git MultiCol-SLAM
cd MultiCol-SLAM
chmod +x build.sh
./build.sh

Problèmes résolus sur le repository bvandepo, sauter ce chapitre

result.txt
In file included from /usr/include/c++/5/bits/stl_function.h:1128:0,
                 from /usr/include/c++/5/string:48,
                 from /usr/include/c++/5/random:40,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from /opt/ros/kinetic/include/opencv-3.1.0-dev/opencv2/core/base.hpp:53,
                 from /opt/ros/kinetic/include/opencv-3.1.0-dev/opencv2/core.hpp:54,
                 from /opt/ros/kinetic/include/opencv-3.1.0-dev/opencv2/opencv.hpp:48,
                 from /home/bvandepo/multicolslam/MultiCol-SLAM/src/cTracking.cpp:27:
/usr/include/c++/5/backward/binders.h:108:11: note: declared here
     class binder1st
           ^
In file included from /home/bvandepo/multicolslam/MultiCol-SLAM/src/g2o_MultiCol_sim3_expmap.cpp:20:0:
/home/bvandepo/multicolslam/MultiCol-SLAM/include/g2o_MultiCol_sim3_expmap.h:117:22: error: expected ‘)’ before ‘<’ token
    std::unordered_map<size_t, int>& kp_to_cam1,
                      ^
/home/bvandepo/multicolslam/MultiCol-SLAM/include/g2o_MultiCol_sim3_expmap.h:175:8: error: ‘unordered_map’ in namespace ‘std’ does not name a template type
   std::unordered_map<size_t, int> keypoint_to_cam1;
        ^
/home/bvandepo/multicolslam/MultiCol-SLAM/include/g2o_MultiCol_sim3_expmap.h:176:8: error: ‘unordered_map’ in namespace ‘std’ does not name a template type
   std::unordered_map<size_t, int> keypoint_to_cam2;
        ^
/home/bvandepo/multicolslam/MultiCol-SLAM/include/g2o_MultiCol_sim3_expmap.h: In member function ‘cv::Vec2d MultiColSLAM::VertexSim3Expmap_Multi::cam_map1(const Vector3d&, int) const’:
/home/bvandepo/multicolslam/MultiCol-SLAM/include/g2o_MultiCol_sim3_expmap.h:142:17: error: ‘keypoint_to_cam1’ was not declared in this scope
    int camIdx = keypoint_to_cam1.find(ptIdx)->second;
                 ^
/home/bvandepo/multicolslam/MultiCol-SLAM/include/g2o_MultiCol_sim3_expmap.h: In member function ‘cv::Vec2d MultiColSLAM::VertexSim3Expmap_Multi::cam_map2(const Vector3d&, int) const’:
/home/bvandepo/multicolslam/MultiCol-SLAM/include/g2o_MultiCol_sim3_expmap.h:153:17: error: ‘keypoint_to_cam2’ was not declared in this scope
    int camIdx = keypoint_to_cam2.find(ptIdx)->second;
                 ^
/home/bvandepo/multicolslam/MultiCol-SLAM/src/g2o_MultiCol_sim3_expmap.cpp: At global scope:
/home/bvandepo/multicolslam/MultiCol-SLAM/src/g2o_MultiCol_sim3_expmap.cpp:25:48: error: expected constructor, destructor, or type conversion before ‘(’ token
  VertexSim3Expmap_Multi::VertexSim3Expmap_Multi(
                                                ^

Pour déterminer sur quelle partie est le pb:

cat build.sh 

c'est la compile de multicol qui déconne, tout le reste ok….

EIGEN3_INCLUDE_DIR=$(pwd)/Eigen
export EIGEN3_INCLUDE_DIR
echo $(pwd)
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j

dans le ~/multicolslam/MultiCol-SLAM/CMakeLists.txt, j'ajoute:

cmake_minimum_required(VERSION 3.5)

et après IF(NOT DEFINED EIGEN_INCLUDE_DIR_HINTS)

MESSAGE("Using internal Eigen")

c'est bien la version interne d'eigen qui est utilisée…

Problème de compilation décrit par Antoine sur: https://github.com/urbste/MultiCol-SLAM/issues/1 Il dit de remplacer: std::unordered_map par std::tr1::unordered_map

cd ~/multicolslam/MultiCol-SLAM
grep -nRi  std::unordered_map  *
find . -name "*" -exec sed -i 's,std::unordered_map,std::tr1::unordered_map,g' {} \;
grep -nRi  std::tr1::unordered_map  *
make -j

Utilisation

L'éxecutable est dans

~/multicolslam/MultiCol-SLAM/Examples/Lafida/multi_col_slam_lafida

récupérer les données d'exemple:

cd ~/multicolslam
wget http://www2.ipf.kit.edu/%7Epcv2016/downloads/indoor_dynamic.zip
unzip indoor_dynamic.zip 
rm indoor_dynamic.zip 
cd MultiCol-SLAM

The executable multi_col_slam_lafida expects 4 paths. The first is the path to the vocabulary file. The second is the path to the settings file. The third is the path to the calibration files. The fourth is the path to the images. In our example, we could run MultiCol-SLAM:

./Examples/Lafida/multi_col_slam_lafida ./Examples/small_orb_omni_voc_9_6.yml  ./Examples/Lafida/Slam_Settings_indoor1.yaml ./Examples/Lafida/ /home/bvandepo/multicolslam/indoor_dynamic/

Visualisation 3D via Pangolin

https://github.com/stevenlovegrove/Pangolin

cd ~/multicolslam/Pangolin/build
make doc
cd doc/html
firefox index.html &

Todo

Rosification

Partir du programme d'exemple Examples/Lafida/mult_col_slam_lafida.cpp (200 lignes)

multicolslam.txt · Dernière modification : 2021/02/19 20:20 de 127.0.0.1