kevin-george / lsd_slam

LSD-SLAM
GNU General Public License v3.0
47 stars 38 forks source link

Linking error #16

Closed vyi closed 5 years ago

vyi commented 5 years ago

I'm on Ubuntu 16.04, and ROS-Kinetic. Following the steps given in wiki, I end up with following linking error :

/home/vivek/ros_files/catkin_ws/devel/lib/liblsdslam.so: undefined reference to 'g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(g2o::Solver*)'

The solver mentioned in the error log : OptimizationAlgorithmLevenberg(g2o::Solver*) Is being used in KeyFrameGraph.cc (reproduced below)


       typedef g2o::BlockSolver_7_3 BlockSolver;
        typedef g2o::LinearSolverCSparse<BlockSolver::PoseMatrixType> LinearSolver;
        LinearSolver* solver = new LinearSolver();
        BlockSolver* blockSolver = new BlockSolver(solver);
        g2o::OptimizationAlgorithmLevenberg* algorithm = new g2o::OptimizationAlgorithmLevenberg(blockSolver);
vyi commented 5 years ago

I solved this issue by using system g2o instead of ROS supplied g2o version.