Open TurtleZhong opened 7 years ago
This might be either an incomplete code or I don't remember which version I have pushed to github. I will upload a full working version soon but I don't know when because I am currently very busy working on other projects. feel free to fork it and, if you follow the MSCKF VIO Masters thesis from TUM, you will be able to fill the gaps.
Thanks anyway, I am learning VIO, and MSCKF is a good framework i think, I hope you can upload your full version and upload some test image or videos. I will try to realize the code by myself!
@anoopjk I have solved the complie error and successfully ran on my computer, Ubuntu 16.04, but only when comment the filter.stackingResidualsFeature(); in main.cpp. I check the code and found that it seems that the triangulation part haven't used in that function and the MSCKF update also haven't used. I am interested in VIO, and MSCKF is a good frame work to realize, but I haven't found the code according to the thesis (Monocular Visual Inertial Odometry on a Mobile Device). You code is perfect to learn the MSCKF. Can you give me some more instruction on VIO or sharing some demo videos with your code. Thank you~
ok, I need to know what's the current implementation upto and I will slowly start adding the missing parts to github. stay tuned
@TurtleZhong How is the effect of this project?How much is the scale of the test
@jixiedaima This project have not finished,so... if you are interested in MSCKF, you can refer this: https://github.com/KumarRobotics/msckf_vio
Hello, Thank you for sharing you code, when I test it, I found some error environment: 16.04, opencv:2.4.11, Eigen:3.3 Below are the log Scanning dependencies of target MSCKF [ 16%] Building CXX object CMakeFiles/MSCKF.dir/src/MSCKFUpdate.cpp.o /home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp: In member function ‘void MSCKF::augmentoldFeatures(std::vector, std::vector)’:
/home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:202:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=0; j< featuresIdx.size(); ++j)
^
/home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:206:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0; i < matches.size() ; ++i)
^
/home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp: In member function ‘void MSCKF::stackingResidualsFeature()’:
/home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:482:33: error: call to non-constexpr function ‘Eigen::Index Eigen::PlainObjectBase::cols() const [with Derived = Eigen::Matrix<double, -1, -1>; Eigen::Index = long int]’
Hxi.block<2,Hxi.cols()>(2j,0) = Hxij;
^
/home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:482:42: error: no matching function for call to ‘Eigen::Matrix<double, -1, -1>::block(long int, int)’
Hxi.block<2,Hxi.cols()>(2j,0) = Hxij;
^
In file included from /usr/include/eigen3/Eigen/src/Core/DenseBase.h:565:0,
from /usr/include/eigen3/Eigen/Core:344,
from /usr/include/eigen3/Eigen/Dense:1,
from /home/m/ws/src/msckf_test2/MSCKF_VIO/include/MSCKF.h:6,
from /home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:1:
/usr/include/eigen3/Eigen/src/Core/../plugins/BlockMethods.h:723:45: note: candidate: template<int BlockRows, int BlockCols> Eigen::Block<Derived, CRows, CCols> Eigen::DenseBase::block(Eigen::Index, Eigen::Index) [with int BlockRows = BlockRows; int BlockCols = BlockCols; Derived = Eigen::Matrix<double, -1, -1>]
inline Block<Derived, BlockRows, BlockCols> block(Index startRow, Index startCol)
^
/usr/include/eigen3/Eigen/src/Core/../plugins/BlockMethods.h:723:45: note: template argument deduction/substitution failed:
/home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:482:33: error: call to non-constexpr function ‘Eigen::Index Eigen::PlainObjectBase::cols() const [with Derived = Eigen::Matrix<double, -1, -1>; Eigen::Index = long int]’
Hxi.block<2,Hxi.cols()>(2j,0) = Hxij;
^
/home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:482:42: note: in template argument for type ‘int’
Hxi.block<2,Hxi.cols()>(2j,0) = Hxij;
^
In file included from /usr/include/eigen3/Eigen/src/Core/DenseBase.h:565:0,
from /usr/include/eigen3/Eigen/Core:344,
from /usr/include/eigen3/Eigen/Dense:1,
from /home/m/ws/src/msckf_test2/MSCKF_VIO/include/MSCKF.h:6,
from /home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:1:
/usr/include/eigen3/Eigen/src/Core/../plugins/BlockMethods.h:731:57: note: candidate: template<int BlockRows, int BlockCols> const Eigen::Block<const Derived, CRows, CCols> Eigen::DenseBase::block(Eigen::Index, Eigen::Index) const [with int BlockRows = BlockRows; int BlockCols = BlockCols; Derived = Eigen::Matrix<double, -1, -1>]
inline const Block<const Derived, BlockRows, BlockCols> block(Index startRow, Index startCol) const
^
/usr/include/eigen3/Eigen/src/Core/../plugins/BlockMethods.h:731:57: note: template argument deduction/substitution failed:
/home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:482:33: error: call to non-constexpr function ‘Eigen::Index Eigen::PlainObjectBase::cols() const [with Derived = Eigen::Matrix<double, -1, -1>; Eigen::Index = long int]’
Hxi.block<2,Hxi.cols()>(2j,0) = Hxij;
^
/home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:482:42: note: in template argument for type ‘int’
Hxi.block<2,Hxi.cols()>(2j,0) = Hxij;
^
In file included from /usr/include/eigen3/Eigen/src/Core/DenseBase.h:565:0,
from /usr/include/eigen3/Eigen/Core:344,
from /usr/include/eigen3/Eigen/Dense:1,
from /home/m/ws/src/msckf_test2/MSCKF_VIO/include/MSCKF.h:6,
from /home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:1:
/usr/include/eigen3/Eigen/src/Core/../plugins/BlockMethods.h:756:45: note: candidate: template<int BlockRows, int BlockCols> Eigen::Block<Derived, CRows, CCols> Eigen::DenseBase::block(Eigen::Index, Eigen::Index, Eigen::Index, Eigen::Index) [with int BlockRows = BlockRows; int BlockCols = BlockCols; Derived = Eigen::Matrix<double, -1, -1>]
inline Block<Derived, BlockRows, BlockCols> block(Index startRow, Index startCol,
^
/usr/include/eigen3/Eigen/src/Core/../plugins/BlockMethods.h:756:45: note: template argument deduction/substitution failed:
/home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:482:33: error: call to non-constexpr function ‘Eigen::Index Eigen::PlainObjectBase::cols() const [with Derived = Eigen::Matrix<double, -1, -1>; Eigen::Index = long int]’
Hxi.block<2,Hxi.cols()>(2j,0) = Hxij;
^
/home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:482:42: note: in template argument for type ‘int’
Hxi.block<2,Hxi.cols()>(2j,0) = Hxij;
^
In file included from /usr/include/eigen3/Eigen/src/Core/DenseBase.h:565:0,
from /usr/include/eigen3/Eigen/Core:344,
from /usr/include/eigen3/Eigen/Dense:1,
from /home/m/ws/src/msckf_test2/MSCKF_VIO/include/MSCKF.h:6,
from /home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:1:
/usr/include/eigen3/Eigen/src/Core/../plugins/BlockMethods.h:764:57: note: candidate: template<int BlockRows, int BlockCols> const Eigen::Block<const Derived, CRows, CCols> Eigen::DenseBase::block(Eigen::Index, Eigen::Index, Eigen::Index, Eigen::Index) const [with int BlockRows = BlockRows; int BlockCols = BlockCols; Derived = Eigen::Matrix<double, -1, -1>]
inline const Block<const Derived, BlockRows, BlockCols> block(Index startRow, Index startCol,
^
/usr/include/eigen3/Eigen/src/Core/../plugins/BlockMethods.h:764:57: note: template argument deduction/substitution failed:
/home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:482:33: error: call to non-constexpr function ‘Eigen::Index Eigen::PlainObjectBase::cols() const [with Derived = Eigen::Matrix<double, -1, -1>; Eigen::Index = long int]’
Hxi.block<2,Hxi.cols()>(2j,0) = Hxij;
^
/home/m/ws/src/msckf_test2/MSCKF_VIO/src/MSCKFUpdate.cpp:482:42: note: in template argument for type ‘int’
Hxi.block<2,Hxi.cols()>(2j,0) = Hxij;
^
CMakeFiles/MSCKF.dir/build.make:86: recipe for target 'CMakeFiles/MSCKF.dir/src/MSCKFUpdate.cpp.o' failed
make[2]: [CMakeFiles/MSCKF.dir/src/MSCKFUpdate.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/MSCKF.dir/all' failed
make[1]: [CMakeFiles/MSCKF.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2