MultiCol-SLAM
MultiCol-SLAM copied to clipboard
build failling on ubunutu 16.04
I am trying to build your code on ubuntu 16.04 and it is failing with In file included from /home/poine/work/multicol/MultiCol-SLAM/src/g2o_MultiCol_sim3_expmap.cpp:20:0: /home/poine/work/multicol/MultiCol-SLAM/include/g2o_MultiCol_sim3_expmap.h:117:22: error: expected ‘)’ before ‘<’ token std::unordered_map<size_t, int>& kp_to_cam1, ^ /home/poine/work/multicol/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;
It looks like there is an issue with the std::unordered_map template. I am using poine@nina ~/work/multicol/MultiCol-SLAM/build $ gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609
Any idea?
Thanks in advance
Hi,
I can't reproduce your error. Just compiled MultiCol-SLAM in a virtual box with a clean Ubuntu 16.04 installation and the build instructions from the Readme.md and it works fine. Compiler is gcc (Ubuntu 5.4.0-6ubuntu1-16.04.02) 5.4.0 20160609.
Cheers, Steffen
Hi Steffen
I agree that it is a weird error. I'm kind of a noob in C++, but from what I understand std::unordered_map should be available with -std=c++11 Anyway, I manage to get past this error by replacing every std::unordered_map with std::tr1::unordered_map in your code.
I then stumbled on another error with eigen/g2o [...] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:682:32: required from ‘Derived& Eigen::PlainObjectBase<Derived>::_set(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::Matrix<long int, -1, 1, 0, -1, 1>; Derived = Eigen::Matrix<int, -1, 1>]’ /usr/include/eigen3/Eigen/src/Core/Matrix.h:225:24: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::Matrix<long int, -1, 1, 0, -1, 1>; _Scalar = int; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int MaxCols = 1]’ /usr/include/eigen3/Eigen/src/Core/PermutationMatrix.h:367:17: required from ‘Eigen::PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, IndexType>& Eigen::PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, IndexType>::operator=(const Eigen::PermutationBase<OtherDerived>&) [with Other = Eigen::PermutationMatrix<-1, -1, long int>; int SizeAtCompileTime = -1; int MaxSizeAtCompileTime = -1; StorageIndex = int]’ /home/poine/work/multicol/MultiCol-SLAM/ThirdParty/g2o/g2o/solvers/linear_solver_eigen.h:68:18: required from ‘void g2o::LinearSolverEigen<MatrixType>::CholeskyDecomposition::analyzePatternWithPermutation(g2o::LinearSolverEigen<MatrixType>::SparseMatrix&, const PermutationMatrix&) [with MatrixType = Eigen::Matrix<double, 7, 7, 0, 7, 7>; g2o::LinearSolverEigen<MatrixType>::SparseMatrix = Eigen::SparseMatrix<double, 0>; g2o::LinearSolverEigen<MatrixType>::PermutationMatrix = Eigen::PermutationMatrix<-1, -1, long int>]’ /home/poine/work/multicol/MultiCol-SLAM/ThirdParty/g2o/g2o/solvers/linear_solver_eigen.h:195:9: required from ‘void g2o::LinearSolverEigen<MatrixType>::computeSymbolicDecomposition(const g2o::SparseBlockMatrix<MatrixType>&) [with MatrixType = Eigen::Matrix<double, 7, 7, 0, 7, 7>]’ /home/poine/work/multicol/MultiCol-SLAM/ThirdParty/g2o/g2o/solvers/linear_solver_eigen.h:100:37: required from ‘bool g2o::LinearSolverEigen<MatrixType>::solve(const g2o::SparseBlockMatrix<MatrixType>&, double, double) [with MatrixType = Eigen::Matrix<double, 7, 7, 0, 7, 7>]’ /home/poine/work/multicol/MultiCol-SLAM/src/cOptimizerLoopStuff.cpp:515:1: required from here /usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: error: static assertion failed: YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY #define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
From what I understand, it would be an int/vs long int issue in permutation matrices index ?
I managed to get the code to build by commenting line 69 in linear_solver_eigen.h //m_Pinv = permutation; but it's obviously not a great idea (althoug this code might not be ran, as a trace i put just after it never shows).
Anyway, I am now able to run your code on the example you provided. I see output in the console
Start processing sequence ... Images in the sequence: 734
---Feature Extraction (35ms) - ImageId: 0--- init done ---Feature Extraction (29ms) - ImageId: 1--- ---matching time (34)--- nr:4297 ---Feature Extraction (23ms) - ImageId: 2--- ---matching time (34)--- nr:3871 ---Feature Extraction (24ms) - ImageId: 3--- ---matching time (37)--- nr:3723 ---Feature Extraction (22ms) - ImageId: 4--- ---matching time (37)--- nr:3628 ---Feature Extraction (21ms) - ImageId: 5--- ---matching time (36)--- nr:3591 ---Feature Extraction (25ms) - ImageId: 6--- ---matching time (34)--- nr:3484 ---Feature Extraction (25ms) - ImageId: 7--- ---matching time (35)--- nr:3428 ---Feature Extraction (24ms) - ImageId: 8--- ---matching time (38)--- nr:3357 ---Feature Extraction (23ms) - ImageId: 9--- ---matching time (41)--- nr:3327 ---Feature Extraction (25ms) - ImageId: 10--- ---matching time (36)--- nr:3330 ---Feature Extraction (24ms) - ImageId: 11--- ---matching time (35)--- nr:3195 ---Feature Extraction (24ms) - ImageId: 12--- ---matching time (35)--- nr:3204 ---Feature Extraction (22ms) - ImageId: 13--- ---matching time (35)--- nr:3193 ---Feature Extraction (25ms) - ImageId: 14--- ---matching time (35)--- nr:3152 ---Feature Extraction (24ms) - ImageId: 15--- ---matching time (34)--- nr:3162 ---Feature Extraction (24ms) - ImageId: 16--- ---matching time (34)--- nr:3103 ---Feature Extraction (21ms) - ImageId: 17--- ---Feature Extraction (21ms) - ImageId: 18--- ---Feature Extraction (21ms) - ImageId: 19--- Finished Map Point Creation (340)_ ---Feature Extraction (22ms) - ImageId: 20---
I also see feature being drawn on the images, but nothing drawn in the map. I will try building in a fresh VM as you suggest. Are you using a 64bit version?
Best Regards
Poine
If you don't see anything just click on the "Follow Camera" button twice. I haven't tuned the OpenGL settings. I will do that and commit the adjusted values. And yes you will have to use a 64bit OS .
Thanks for the tips. It now displays correctly. Last night i tried to build your code on a fresh Ubuntu 16.04 in a VM and it worked well. I still have to figure why it failed on my native install. There are differences as it is using a binary package for opencv3 provided by ROS and the native Eigen.
Thanks again
Poine
On Oct 10, 2016 8:30 AM, "Steffen Urban" [email protected] wrote:
If you don't see anything just click on the "Follow Camera" button twice. I haven't tuned the OpenGL settings. I will do that and commit the adjusted values.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/urbste/MultiCol-SLAM/issues/1#issuecomment-252544506, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGTzww98MH8-S_dvOaxrlp-AeB8Acjbks5qydujgaJpZM4KRCFJ .
Great! Yeah maybe those packages provided by the external third party libraries cause those issues.
I'll figure it and let you know. My next goal is to run your code in a gazebo simulation. I'll keep you posted about it.
On Oct 10, 2016 8:43 AM, "Steffen Urban" [email protected] wrote:
Great! Yeah maybe those packages provided by the external third party libraries cause those issues.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/urbste/MultiCol-SLAM/issues/1#issuecomment-252545602, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGTz-CCwrDtub98YXZ7SUpTCOU5UPnTks5qyd5zgaJpZM4KRCFJ .