Giter Site home page Giter Site logo

Can't build the project about corb-slam HOT 15 OPEN

lifunudt avatar lifunudt commented on September 14, 2024
Can't build the project

from corb-slam.

Comments (15)

lifunudt avatar lifunudt commented on September 14, 2024 1

@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.

from corb-slam.

lifunudt avatar lifunudt commented on September 14, 2024

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.

from corb-slam.

junzhang2016 avatar junzhang2016 commented on September 14, 2024

@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?

from corb-slam.

junzhang2016 avatar junzhang2016 commented on September 14, 2024

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)

  1. 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.

  2. 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

  3. 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:

/usr/local/include/pcl-1.8

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

...

from corb-slam.

junzhang2016 avatar junzhang2016 commented on September 14, 2024

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.

from corb-slam.

junzhang2016 avatar junzhang2016 commented on September 14, 2024

@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.

from corb-slam.

lifunudt avatar lifunudt commented on September 14, 2024

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.

from corb-slam.

junzhang2016 avatar junzhang2016 commented on September 14, 2024

Thank you, @lifunudt . I will modify the file /corbslam_client/Examples/Stereo/stereo_kitti.cc

from corb-slam.

wleigang avatar wleigang commented on September 14, 2024

@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

screenshot from 2018-12-06 18-29-42

from corb-slam.

XiaoyuShi6 avatar XiaoyuShi6 commented on September 14, 2024

@wleigang I meet the same problem,did you solve it?

from corb-slam.

SamuelXingCheng avatar SamuelXingCheng commented on September 14, 2024

from corb-slam.

SYSUHPK avatar SYSUHPK commented on September 14, 2024

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)

  1. 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.
  2. 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
  3. 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:

/usr/local/include/pcl-1.8

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

...

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

from corb-slam.

SYSUHPK avatar SYSUHPK commented on September 14, 2024

@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.

from corb-slam.

gaotao19890725 avatar gaotao19890725 commented on September 14, 2024

@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"

from corb-slam.

SamuelXingCheng avatar SamuelXingCheng commented on September 14, 2024

from corb-slam.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.