CORB-SLAM
CORB-SLAM copied to clipboard
Can't build the project
It appears an error when I build the CORB-SLAM: /home/user/catkin_ws/src/CORB-SLAM/corbslam_client/include/Cache.h:20:45: fatal error: corbslam_client/corbslam_insert.h: No such file or directory.
But I can't find any file named "corbslam_insert.h" in the folder.
This file is the ROS service file which is generated when compile the corbslam_client project. You can see the CMakelist.txt file in the corbslam_client DIR for detail.
@lifunudt I read your paper, it's a nice work! When I try to compile your package, I came across the same problem:
/home/jun/Dropbox/catkin_ws/src/CORB-SLAM/corbslam_client/include/Cache.h:20:45: fatal error: corbslam_client/corbslam_insert.h: No such file or directory #include "corbslam_client/corbslam_insert.h"
May I ask how to fix the compilation problem?
Hi, I have successfully compiled the package @SamuelXingCheng @lifunudt .
The main thing is you should treat CORB-SLAM as the /catkin_ws/src
directory, that's to say, move all files in CORB-SLAM to your /catkin_ws/src directory. (Because, in corbslam_server/CMakeLists.txt, the author used CMAKE_SOURCE_DIR, the meaning of which is /catkin_ws/src
)
-
Before catkin_make your catkin_ws, do remember to build the
corbslam_client/Thirdparty/DBoW2
andcorbslam_client/Thirdparty/g2o
first. And buildcorbslam_client/Thirdparty/Pangolin
followed bysudo make install
. -
While compiling, first compile corbslam_client, then corbslam_server. Because corbslam_server depends on corbslam_client, under
catkin_ws
:catkin_make corbslam_client
catkin_make corbslam_server
catkin_make
-
If you came across pcl problem:
Fatal error: pcl/conversions.h: No such file or directory.
Install pcl first, refer to: http://pointclouds.org/downloads/linux.html. Then, if you installed pcl-1.7, remember to include /usr/include/pcl-1.7
in /corbslam_client/CMakeLists.txt. This line:
https://github.com/lifunudt/CORB-SLAM/blob/1f922b430345c9d7e1a172080817c2cd938f6a23/corbslam_client/CMakeLists.txt#L159
Done!
ps:
The commands in the readme.md file may be not accurate, it should be:
rosrun corbslam_server corbslam_server /YOUR/PATH/TO/ORB_SLAM2/Vocabulary/ORBvoc.txt /YOUR/PATH/TO/ORB_SLAM2/Examples/Stereo/KITTI00-02.yaml
rosrun corbslam_client corbslam_client_stereo_kitti /YOUR/PATH/TO/ORB_SLAM2/Vocabulary/ORBvoc.txt /YOUR/PATH/TO/ORB_SLAM2/Examples/Stereo/KITTI00-02.yaml /YOUR/PATH/TO/KITTI/DATASET/Odometry/data_odometry_gray/dataset/sequences/00 01
rosrun corbslam_client corbslam_client_stereo_kitti /YOUR/PATH/TO/ORB_SLAM2/Vocabulary/ORBvoc.txt /YOUR/PATH/TO/ORB_SLAM2/Examples/Stereo/KITTI00-02.yaml /YOUR/PATH/TO/KITTI/DATASET/Odometry/data_odometry_gray/dataset/sequences/00 02
...
But as soon as I rosrun a second client: rosrun corbslam_client corbslam_client_stereo_kitti
/YOUR/PATH/TO/ORB_SLAM2/Vocabulary/ORBvoc.txt /YOUR/PATH/TO/ORB_SLAM2/Examples/Stereo/KITTI00-02.yaml /YOUR/PATH/TO/KITTI/DATASET/Odometry/data_odometry_gray/dataset/sequences/00 01
rosrun corbslam_client corbslam_client_stereo_kitti /YOUR/PATH/TO/ORB_SLAM2/Vocabulary/ORBvoc.txt /YOUR/PATH/TO/ORB_SLAM2/Examples/Stereo/KITTI00-02.yaml /YOUR/PATH/TO/KITTI/DATASET/Odometry/data_odometry_gray/dataset/sequences/00 02
I receive this error:
OpenCV Error: Assertion failed (cn <= 4) in scalarToRawData, file /home/jun/libs/opencv-2.4.3/modules/core/src/matrix.cpp, line 843 terminate called after throwing an instance of 'cv::Exception' what(): /home/jun/libs/opencv-2.4.3/modules/core/src/matrix.cpp:843: error: (-215) cn <= 4 in function scalarToRawData
Aborted (core dumped)
@lifunudt May I ask how do you solve this problem? Thanks.
@junzhang2016 Maybe it's caused by the different OpenCV versions. You can change the error code lines from:
cv::Mat newTcw = cv::Mat::eye(4,4, newTcw.type()); to cv::Mat newTcw = cv::Mat::eye(4,4, oldTcw.type());
Hope that it can make sense.
@lifunudt Thanks, after modifying the code as you mentioned, it's working now.
By the way, currently, the package can be launched by reading images (the KITTI odometry dataset). Can we subscribe to ros topics directly, so that we can test the package with rosbag files.
Thanks.
You can change it to receive the ros topic as the original orb_slam2 does. And you should modify your own rosbag files to public the different client datasets to the particular corbslm client.
Thank you, @lifunudt . I will modify the file /corbslam_client/Examples/Stereo/stereo_kitti.cc
@lifunudt @junzhang2016 Hi, I use ubuntu16.04 and ros kinetic to run this code,but when loop detected,the server will crash,I don't know why
@wleigang I meet the same problem,did you solve it?
I’m sorry about that. I didn’t solve it.
XiaoyuShi6 [email protected]於 2020年3月25日 週三,上午10:01寫道:
@wleigang https://github.com/wleigang I meet the same problem,did you solve it?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lifunudt/CORB-SLAM/issues/4#issuecomment-603597875, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOTA72LPAFOXZE6KBAVLQDRJFQW5ANCNFSM4E7VKIZQ .
-- Sent from Gmail Mobile
Hi, I have successfully compiled the package @SamuelXingCheng @lifunudt .
The main thing is you should treat CORB-SLAM as the
/catkin_ws/src
directory, that's to say, move all files in CORB-SLAM to your /catkin_ws/src directory. (Because, in corbslam_server/CMakeLists.txt, the author used CMAKE_SOURCE_DIR, the meaning of which is/catkin_ws/src
)
- Before catkin_make your catkin_ws, do remember to build the
corbslam_client/Thirdparty/DBoW2
andcorbslam_client/Thirdparty/g2o
first. And buildcorbslam_client/Thirdparty/Pangolin
followed bysudo make install
.- While compiling, first compile corbslam_client, then corbslam_server. Because corbslam_server depends on corbslam_client, under
catkin_ws
:catkin_make corbslam_client
catkin_make corbslam_server
catkin_make
- If you came across pcl problem:
Fatal error: pcl/conversions.h: No such file or directory.
Install pcl first, refer to: http://pointclouds.org/downloads/linux.html. Then, if you installed pcl-1.7, remember to include
/usr/include/pcl-1.7
in /corbslam_client/CMakeLists.txt. This line: https://github.com/lifunudt/CORB-SLAM/blob/1f922b430345c9d7e1a172080817c2cd938f6a23/corbslam_client/CMakeLists.txt#L159Done!
ps: The commands in the readme.md file may be not accurate, it should be:
rosrun corbslam_server corbslam_server /YOUR/PATH/TO/ORB_SLAM2/Vocabulary/ORBvoc.txt /YOUR/PATH/TO/ORB_SLAM2/Examples/Stereo/KITTI00-02.yaml
rosrun corbslam_client corbslam_client_stereo_kitti /YOUR/PATH/TO/ORB_SLAM2/Vocabulary/ORBvoc.txt /YOUR/PATH/TO/ORB_SLAM2/Examples/Stereo/KITTI00-02.yaml /YOUR/PATH/TO/KITTI/DATASET/Odometry/data_odometry_gray/dataset/sequences/00 01
rosrun corbslam_client corbslam_client_stereo_kitti /YOUR/PATH/TO/ORB_SLAM2/Vocabulary/ORBvoc.txt /YOUR/PATH/TO/ORB_SLAM2/Examples/Stereo/KITTI00-02.yaml /YOUR/PATH/TO/KITTI/DATASET/Odometry/data_odometry_gray/dataset/sequences/00 02
...
Excuse me, I have some doubts about install process:
Before catkin_make your catkin_ws, do remember to build the corbslam_client/Thirdparty/DBoW2 and corbslam_client/Thirdparty/g2o first. And build corbslam_client/Thirdparty/Pangolin followed by sudo make install.
So are all commends listed bellow?
1.In DBow2 directory, mkdir build;cmake ..;make;sudo make install
2.In g2o directory, mkdir build;cmake ..;make;sudo make install
3.In pangolin directory, mkdir build;cmake ..;make;sudo make install
Actually I don't understand what you meant to build them
@lifunudt I read your paper, it's a nice work! When I try to compile your package, I came across the same problem:
/home/jun/Dropbox/catkin_ws/src/CORB-SLAM/corbslam_client/include/Cache.h:20:45: fatal error: corbslam_client/corbslam_insert.h: No such file or directory #include "corbslam_client/corbslam_insert.h"
May I ask how to fix the compilation problem?
Hello, I meet the same problem as what you mentioned according to your installing steps
/fatal error: corbslam_client/corbslam_insert.h: No such file or directory
#include "corbslam_client/corbslam_insert.h"
How do you solve it? It drive me crazy.
@SYSUHPK do you solve this problem, if yes, please help me, thank you. /fatal error: corbslam_client/corbslam_insert.h: No such file or directory #include "corbslam_client/corbslam_insert.h"
Sorry, I haven’t solved that.
gaotao19890725 [email protected]於 2020年8月10日 週一,上午11:09寫道:
@SYSUHPK https://github.com/SYSUHPK do you solve this problem, if yes, please help me, thank you.
/fatal error: corbslam_client/corbslam_insert.h: No such file or directory
#include "corbslam_client/corbslam_insert.h"
—
You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lifunudt/CORB-SLAM/issues/4#issuecomment-671143855, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOTA7ZX55FQNGJ3TI6HEE3R75QFZANCNFSM4E7VKIZQ .
-- Sent from Gmail Mobile