1. 程式人生 > >Ubuntu16.04編譯王京大神VIORB過程中遇到的問題

Ubuntu16.04編譯王京大神VIORB過程中遇到的問題

前言

這兩天遇到了先後遇到了,
1. rosbuild_ws下面編譯通過程式碼,但是無法執行程式,無法跑資料庫的尷尬局面;
2. rosbuild_ws下面同時存在LearnVIORB和另外一個基於此的程式碼的時候,ros路徑的問題;
3. 然後rosbuild_ws徹底不工作的問題;
4. ~/.zshrc系列設定的問題;
5. 然後索性把rosbuild_ws下面的東西先拷貝出來。在catkin_ws下面編譯!
這次記錄了在這個下面編譯VIORB的過程中先後遇到的問題,記錄一下!
——————————————————————————————————————————————————————

問題一:

編譯過程中出現YOU MIXED DIFFERENT NUMERIC TYPES等等錯誤,就是說顯示的是各種看起來讓人不舒服的<>這種括號裡面亂七八糟的東西,因為之前單獨編譯ORB-SLAM的時候也遇到過,就一下子解決了
【解決辦法】
Step1:
在LearnVIORB專案下,進入到Thirdparty/g2o/g2o/solvers目錄下面:
Step2:
用vim或者gedit修改linear_solver_eigen.h檔案;
具體的修改的內容:

//1.找到下面這一行:
typedef Eigen::PermutationMatrix<Eigen::Dynamic
, Eigen::Dynamic, SparseMatrix::Index> PermutationMatrix; //2.把上面找到的這一行修改為: typedef Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic, int> PermutationMatrix;

簡而言之,上面其實就是把<>裡面的SparseMatrix::Index換成int而已

Step3:
儲存退出重新編譯。

然後在編譯的過程中我又遇到了這樣的問題:
————————————————————————————————————————————————————————

問題二:

OpenCV版本的問題,LearnVIORB 提供的是OpenCV 2.x.x的版本,具體的我忘記了,
但是在編譯的過程中總是走到開始編譯 VIO部分60%部分的時候報錯然後就失敗了!!!
【解決辦法】
這個比較簡單,不一一列舉了!
簡單的說就是把 LearnVIORB下面的 CMakeList.txt和Examples/ROS/VIO_ORB下面的CMakeList.txt中的find package()都改成相應的版本,順便還要在之前新增:
set( OpenCV_DIR "/usr/local/opencv3.2.0/share/OpenCV")
這裡我以自己安裝opencv3的地址為例,記住是每個CMakeListx.txt都要進行這樣的操作~

好了,這下VIORB的VIO的部分能夠編譯到100%了,但是又出現瞭如下的新的問題:
——————————————————————————————————————————————————————

問題三:

報錯資訊:
基本就是各種undefined reference to XXX
看得我就很生氣!很生氣!

Scanning dependencies of target VIO
[ 66%] Building CXX object CMakeFiles/VIO.dir/src/MsgSync/MsgSynchronizer.cpp.o
[ 66%] Building CXX object CMakeFiles/VIO.dir/src/ros_vio.cc.o
[100%] Linking CXX executable ../VIO
CMakeFiles/VIO.dir/src/ros_vio.cc.o: In function `bool rosbag::Bag::readField<unsigned int>(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, std::string const&, bool, unsigned int*) const':
ros_vio.cc:(.text._ZNK6rosbag3Bag9readFieldIjEEbRKSt3mapISsSsSt4lessISsESaISt4pairIKSsSsEEERS6_bPT_[_ZNK6rosbag3Bag9readFieldIjEEbRKSt3mapISsSsSt4lessISsESaISt4pairIKSsSsEEERS6_bPT_]+0x25): undefined reference to `rosbag::Bag::checkField(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, std::string const&, unsigned int, unsigned int, bool) const'
CMakeFiles/VIO.dir/src/ros_vio.cc.o: In function `ros::SubscriptionCallbackHelperT<boost::shared_ptr<sensor_msgs::Imu_<std::allocator<void> > const> const&, void>::deserialize(ros::SubscriptionCallbackHelperDeserializeParams const&)':
ros_vio.cc:(.text._ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11sensor_msgs4Imu_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE[_ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11sensor_msgs4Imu_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE]+0x6f7): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/VIO.dir/src/ros_vio.cc.o: In function `boost::shared_ptr<sensor_msgs::Imu_<std::allocator<void> > > rosbag::Bag::instantiateBuffer<sensor_msgs::Imu_<std::allocator<void> > >(rosbag::IndexEntry const&) const':
ros_vio.cc:(.text._ZNK6rosbag3Bag17instantiateBufferIN11sensor_msgs4Imu_ISaIvEEEEEN5boost10shared_ptrIT_EERKNS_10IndexEntryE[_ZNK6rosbag3Bag17instantiateBufferIN11sensor_msgs4Imu_ISaIvEEEEEN5boost10shared_ptrIT_EERKNS_10IndexEntryE]+0x3ab): undefined reference to `rosbag::Bag::readField(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, std::string const&, bool, std::string&) const'
ros_vio.cc:(.text._ZNK6rosbag3Bag17instantiateBufferIN11sensor_msgs4Imu_ISaIvEEEEEN5boost10shared_ptrIT_EERKNS_10IndexEntryE[_ZNK6rosbag3Bag17instantiateBufferIN11sensor_msgs4Imu_ISaIvEEEEEN5boost10shared_ptrIT_EERKNS_10IndexEntryE]+0x3c5): undefined reference to `rosbag::Bag::readField(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, std::string const&, bool, std::string&) const'
ros_vio.cc:(.text._ZNK6rosbag3Bag17instantiateBufferIN11sensor_msgs4Imu_ISaIvEEEEEN5boost10shared_ptrIT_EERKNS_10IndexEntryE[_ZNK6rosbag3Bag17instantiateBufferIN11sensor_msgs4Imu_ISaIvEEEEEN5boost10shared_ptrIT_EERKNS_10IndexEntryE]+0x3df): undefined reference to `rosbag::Bag::readField(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, std::string const&, bool, std::string&) const'
CMakeFiles/VIO.dir/src/ros_vio.cc.o: In function `boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > > rosbag::Bag::instantiateBuffer<sensor_msgs::Image_<std::allocator<void> > >(rosbag::IndexEntry const&) const':
ros_vio.cc:(.text._ZNK6rosbag3Bag17instantiateBufferIN11sensor_msgs6Image_ISaIvEEEEEN5boost10shared_ptrIT_EERKNS_10IndexEntryE[_ZNK6rosbag3Bag17instantiateBufferIN11sensor_msgs6Image_ISaIvEEEEEN5boost10shared_ptrIT_EERKNS_10IndexEntryE]+0x3ab): undefined reference to `rosbag::Bag::readField(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, std::string const&, bool, std::string&) const'
ros_vio.cc:(.text._ZNK6rosbag3Bag17instantiateBufferIN11sensor_msgs6Image_ISaIvEEEEEN5boost10shared_ptrIT_EERKNS_10IndexEntryE[_ZNK6rosbag3Bag17instantiateBufferIN11sensor_msgs6Image_ISaIvEEEEEN5boost10shared_ptrIT_EERKNS_10IndexEntryE]+0x3c5): undefined reference to `rosbag::Bag::readField(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, std::string const&, bool, std::string&) const'
CMakeFiles/VIO.dir/src/ros_vio.cc.o:ros_vio.cc:(.text._ZNK6rosbag3Bag17instantiateBufferIN11sensor_msgs6Image_ISaIvEEEEEN5boost10shared_ptrIT_EERKNS_10IndexEntryE[_ZNK6rosbag3Bag17instantiateBufferIN11sensor_msgs6Image_ISaIvEEEEEN5boost10shared_ptrIT_EERKNS_10IndexEntryE]+0x3df): more undefined references to `rosbag::Bag::readField(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, std::string const&, bool, std::string&) const' follow
CMakeFiles/VIO.dir/src/ros_vio.cc.o: In function `main':
ros_vio.cc:(.text.startup+0x5f): undefined reference to `ros::init(int&, char**, std::string const&, unsigned int)'
ros_vio.cc:(.text.startup+0x216): undefined reference to `ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)'
ros_vio.cc:(.text.startup+0x4c0): undefined reference to `rosbag::Bag::open(std::string const&, unsigned int)'
ros_vio.cc:(.text.startup+0x55e): undefined reference to `rosbag::TopicQuery::TopicQuery(std::vector<std::string, std::allocator<std::string> > const&)'
ros_vio.cc:(.text.startup+0x6db): undefined reference to `rosbag::MessageInstance::getMD5Sum() const'
ros_vio.cc:(.text.startup+0x799): undefined reference to `rosbag::MessageInstance::getMD5Sum() const'
ros_vio.cc:(.text.startup+0xd35): undefined reference to `cv_bridge::toCvShare(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, std::string const&)'
ros_vio.cc:(.text.startup+0x124b): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
ros_vio.cc:(.text.startup+0x13e3): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
ros_vio.cc:(.text.startup+0x1455): undefined reference to `cv_bridge::toCvShare(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, std::string const&)'
ros_vio.cc:(.text.startup+0x19c8): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
ros_vio.cc:(.text.startup+0x1e38): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/VIO.dir/src/ros_vio.cc.o: In function `ros::SubscriptionCallbackHelperT<boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, void>::deserialize(ros::SubscriptionCallbackHelperDeserializeParams const&)':
ros_vio.cc:(.text._ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE[_ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE]+0x5b9): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/VIO.dir/src/MsgSync/MsgSynchronizer.cpp.o: In function `ORBVIO::MsgSynchronizer::getRecentMsgs(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const>&, std::vector<boost::shared_ptr<sensor_msgs::Imu_<std::allocator<void> > const>, std::allocator<boost::shared_ptr<sensor_msgs::Imu_<std::allocator<void> > const> > >&)':
MsgSynchronizer.cpp:(.text+0x19ab): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
MsgSynchronizer.cpp:(.text+0x1b24): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
CMakeFiles/VIO.dir/src/MsgSync/MsgSynchronizer.cpp.o:MsgSynchronizer.cpp:(.text+0x1bf5): more undefined references to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' follow
collect2: error: ld returned 1 exit status
CMakeFiles/VIO.dir/build.make:268: recipe for target '../VIO' failed
make[2]: *** [../VIO] Error 1
CMakeFiles/Makefile2:163: recipe for target 'CMakeFiles/VIO.dir/all' failed
make[1]: *** [CMakeFiles/VIO.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Launch file in Examples/ROS/ORB_VIO/launch.
Modify the configuration file config/euroc.yaml
Run as: roslaunch ORB_VIO testeuroc.launch

【解決辦法】

嘗試1:

參考https://github.com/ANYbotics/grid_map/issues/159
採取方式:把gcc的版本從4.8切換到5.4
結果:VIO只走到33%,還不如剛剛了,出現了更多的undefined的東西,而且pangolin也不對經了!
難道我剛剛加的東西有問題???

嘗試2:

採取措施:在嘗試1的基礎上,把CMakeList.txt中的我新增的部分,include_directories()裡面的東西取消掉
結果:VIO的編譯達到了100%,說明還是有效果的,但是還是出現瞭如下報錯資訊:
基本上看起來都是第三方庫的原因了,說明還是有進步的,起碼有繼續一個一個修改的慾望了!明天繼續!
對哦,我懷疑現在的問題是c++11標準的問題,明天該CMakeLists.txt中的c++11標準部分,直接啟用這個試試 !

[  0%] Built target rospack_genmsg_libexe
[  0%] Built target rosbuild_precompile
Scanning dependencies of target VIO
[ 66%] Building CXX object CMakeFiles/VIO.dir/src/ros_vio.cc.o
[ 66%] Building CXX object CMakeFiles/VIO.dir/src/MsgSync/MsgSynchronizer.cpp.o
[100%] Linking CXX executable ../VIO
../../../../lib/libORB_SLAM2.so: undefined reference to `DBoW2::FORB::toString[abi:cxx11](cv::Mat const&)'
../../../../lib/libORB_SLAM2.so: undefined reference to `pangolin::CreateWindowAndBind(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, pangolin::Params const&)'
../../../../lib/libORB_SLAM2.so: undefined reference to `pangolin::CreatePanel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../../../lib/libORB_SLAM2.so: undefined reference to `pangolin::BindToContext(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
../../../../lib/libORB_SLAM2.so: undefined reference to `g2o::writeCCSMatrix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, int const*, int const*, double const*, bool)'
../../../../lib/libORB_SLAM2.so: undefined reference to `pangolin::Split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char)'
../../../../lib/libORB_SLAM2.so: undefined reference to `DBoW2::FORB::fromString(cv::Mat&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/VIO.dir/build.make:268: recipe for target '../VIO' failed
make[2]: *** [../VIO] Error 1
CMakeFiles/Makefile2:163: recipe for target 'CMakeFiles/VIO.dir/all' failed
make[1]: *** [CMakeFiles/VIO.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Launch file in Examples/ROS/ORB_VIO/launch.
Modify the configuration file config/euroc.yaml
Run as: roslaunch ORB_VIO testeuroc.launch

嘗試3:

採取措施:CMakeLists.txt中的c++11標準直接進行,不搞那些判斷的語句了!註釋掉試試!
把之前的註釋掉!,只保留
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
結果:失敗,但是VIO的編譯還是能夠走到100%的,心塞塞

報錯和剛剛一毛一樣,說明這樣的修改無效!
繼續新的嘗試~~

嘗試4:

採取措施:
(猜測還是OpenCV的問題???)
Step1:修改set(CMAKE_CXXFLAGS)
Step2:set( CMAKE_CXX_FLAGS "-std=c++11 -O3" )
Step3:進入Thirdparty中,把BDOW和G2O下面的build都刪掉然後重新編譯!

結果:

-- Build files have been written to: /home/hri/catkin_ws/src/LearnVIORB/Examples/ROS/ORB_VIO/build
[  0%] Built target rospack_genmsg_libexe
[  0%] Built target rosbuild_precompile
[ 66%] Building CXX object CMakeFiles/VIO.dir/src/MsgSync/MsgSynchronizer.cpp.o
[ 66%] Building CXX object CMakeFiles/VIO.dir/src/ros_vio.cc.o
[100%] Linking CXX executable ../VIO
../../../../lib/libORB_SLAM2.so: undefined reference to `pangolin::CreateWindowAndBind(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, pangolin::Params const&)'
../../../../lib/libORB_SLAM2.so: undefined reference to `pangolin::CreatePanel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../../../lib/libORB_SLAM2.so: undefined reference to `pangolin::BindToContext(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
../../../../lib/libORB_SLAM2.so: undefined reference to `pangolin::Split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char)'
collect2: error: ld returned 1 exit status
CMakeFiles/VIO.dir/build.make:268: recipe for target '../VIO' failed
make[2]: *** [../VIO] Error 1
CMakeFiles/Makefile2:163: recipe for target 'CMakeFiles/VIO.dir/all' failed
make[1]: *** [CMakeFiles/VIO.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Launch file in Examples/ROS/ORB_VIO/launch.
Modify the configuration file config/euroc.yaml
Run as: roslaunch ORB_VIO testeuroc.launch

分析:關於BOW和g2o的undefined的報錯都沒有了,說明採取的措施的第三步奏效了,
那麼也就是說Pangolin可能需要重新編譯一下???

再進行嘗試:

嘗試5:

回頭看了一下,發現關於Pangolin的報錯是從我把gcc/g++的版本從4.8切換到5.4之後才產生的,所以,我是不是要用gcc/g++5.4的形態對pangolin重新進行一次編譯?
採取措施:恢復之前的註釋掉的關於c++11標準的東西再編譯一遍!(和預想的一樣,派出了c++11標準的么蛾子!)
想法:set()一下Pangolin的標頭檔案的路徑!應該就是這裡的問題了吧!

// --在CMakeLists.txt中新增一下
set( Pangolin_DIR "/usr/local/include/pangolin")

結果:編譯都無法通過,說明我新增的是錯的,對cmake一無所知!!!
重新新增一下路徑
set(pangolin/display)
結果:也不行,VIO的編譯通過不了
繼續嘗試:
set( Pangolin_DIR “/home/hri/ThirdParty/Pangolin-master/CMakeModules”)

結果:還是失敗!

我覺得因該是得重新裝Pangolin了

嘗試6:

分析:網上搜了一下關於undefined reference的報錯的帖子,裡面都提到了gcc/g++的相關東西,我就在想是不是因為之前環境都是用gcc/g++4.8來弄的,但是這次的ros環境下的東西我又都是在5.4版本下面弄得(前面說了4.8的時候ros上會報錯很多),那麼就打算重新安裝一下pangolin, 在gcc/g++5.4版本下編譯!
採取措施:
刪掉之前的Pangolin的編譯包,/usr/下面那些關於上個版本pangolin的餘孽殘黨不用去管,重新編譯的時候會覆蓋掉之前那些東西的!
具體方法:
Pangolin的github地址:
https://github.com/stevenlovegrove/Pangolin
下載後正常編譯就好了!

然後再編譯VIORB的程式碼,順利通過如下:

Scanning dependencies of target ORB_SLAM2
[ 11%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/LocalMapping.cc.o
[ 11%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/System.cc.o
[ 23%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/LoopClosing.cc.o
[ 23%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/ORBextractor.cc.o
[ 23%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/ORBmatcher.cc.o
[ 11%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Tracking.cc.o
[ 26%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Converter.cc.o
[ 30%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/FrameDrawer.cc.o
[ 34%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/MapPoint.cc.o
[ 38%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/KeyFrameDatabase.cc.o
[ 42%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/KeyFrame.cc.o
[ 50%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/IMU/imudata.cpp.o
[ 46%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Sim3Solver.cc.o
[ 53%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Map.cc.o
[ 57%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/MapDrawer.cc.o
[ 61%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Frame.cc.o
[ 65%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/IMU/NavState.cpp.o
[ 69%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/PnPsolver.cc.o
[ 73%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Viewer.cc.o
[ 76%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/IMU/so3.cpp.o
[ 80%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Initializer.cc.o
[ 84%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/IMU/configparam.cpp.o
[ 88%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/Optimizer.cc.o
[ 92%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/IMU/IMUPreintegrator.cpp.o
[ 96%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/IMU/g2otypes.cpp.o
[100%] Linking CXX shared library ../lib/libORB_SLAM2.so
[100%] Built target ORB_SLAM2
Build ROS node ...
mkdir: cannot create directory ‘build’: File exists
[rosbuild] Building package ORB_VIO
[rosbuild] using multiarch 'x86_64-linux-gnu' for finding Boost
-- Using CATKIN_DEVEL_PREFIX: /home/hri/catkin_ws/src/LearnVIORB/Examples/ROS/ORB_VIO/build/devel
-- Using CMAKE_PREFIX_PATH: /home/hri/catkin_ws/devel;/opt/ros/kinetic
-- This workspace overlays: /home/hri/catkin_ws/devel;/opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Skip enable_testing() for dry packages
-- Using CATKIN_TEST_RESULTS_DIR: /home/hri/catkin_ws/src/LearnVIORB/Examples/ROS/ORB_VIO/build/test_results
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- Found gtest sources under '/usr/src/gmock': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.14
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
[rosbuild] Including /opt/ros/kinetic/share/roslisp/rosbuild/roslisp.cmake
[rosbuild] Including /opt/ros/kinetic/share/roscpp/rosbuild/roscpp.cmake
[rosbuild] Including /opt/ros/kinetic/share/rospy/rosbuild/rospy.cmake
Build type: Release
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hri/catkin_ws/src/LearnVIORB/Examples/ROS/ORB_VIO/build
[  0%] Built target rospack_genmsg_libexe
[  0%] Built target rosbuild_precompile
[ 33%] Linking CXX executable ../VIO
[100%] Built target VIO

Launch file in Examples/ROS/ORB_VIO/launch.
Modify the configuration file config/euroc.yaml
Run as: roslaunch ORB_VIO testeuroc.launch

好了!開始在這個上面做點工作吧,希望我可以!

___________________________分割線_________________________________

接下來就是把程式跑起來:
按照github上的東西,造yaml裡的結果儲存也設定了,資料庫路徑也設定了,但是出現了:一閃就退出的現象?報錯如下:

*** Error in `/home/hri/catkin_ws/src/LearnVIORB/Examples/ROS/ORB_VIO/VIO': free(): invalid pointer: 0x000000000c4880b0 ***

還有這個:

[VIO-1] process has died [pid 3777, exit code -6, cmd /home/hri/catkin_ws/src/LearnVIORB/Examples/ROS/ORB_VIO/VIO /home/hri/catkin_ws/src/LearnVIORB/Examples/ROS/ORB_VIO/../../../Vocabulary/ORBvoc.bin /home/hri/catkin_ws/src/LearnVIORB/Examples/ROS/ORB_VIO/../../../config/euroc.yaml __name:=VIO __log:=/home/hri/.ros/log/869870f0-b26a-11e8-97c8-e4f89cfbde4d/VIO-1.log].
log file: /home/hri/.ros/log/869870f0-b26a-11e8-97c8-e4f89cfbde4d/VIO-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

參考了下這個,可能說是記憶體不夠了!我重啟一下試試看看有沒有作用,因為我直接輸入roscore的時候也顯示:

Done checking log file disk usage. Usage is <1GB.