Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant find function from the g2o package when compiling dvo_slam #64

Open
geoeo opened this issue Aug 28, 2018 · 1 comment
Open

cant find function from the g2o package when compiling dvo_slam #64

geoeo opened this issue Aug 28, 2018 · 1 comment

Comments

@geoeo
Copy link

geoeo commented Aug 28, 2018

Hello,

Apparently the function headers of g2o have changed since dvo_slam was published?
Can anybody confirm or deny this? / Had this problem?

The compile error is:

/home/marc/Workspace/ROS/tum_ros/src/dvo_slam/dvo_slam/src/keyframe_graph.cpp: In constructor ‘dvo_slam::internal::KeyframeGraphImpl::KeyframeGraphImpl()’:
/home/marc/Workspace/ROS/tum_ros/src/dvo_slam/dvo_slam/src/keyframe_graph.cpp:140:5: error: no matching function for call to ‘g2o::BlockSolver<g2o::BlockSolverTraits<6, 3> >::BlockSolver(dvo_slam::internal::KeyframeGraphImpl::LinearSolver*)’
     )));
     ^
In file included from /usr/local/include/g2o/core/block_solver.h:199:0,
                 from /home/marc/Workspace/ROS/tum_ros/src/dvo_slam/dvo_slam/src/keyframe_graph.cpp:48:
/usr/local/include/g2o/core/block_solver.hpp:40:1: note: candidate: g2o::BlockSolver<Traits>::BlockSolver(std::unique_ptr<typename Traits::LinearSolverType>) [with Traits = g2o::BlockSolverTraits<6, 3>; typename Traits::LinearSolverType = g2o::LinearSolver<Eigen::Matrix<double, 6, 6> >]
 BlockSolver<Traits>::BlockSolver(std::unique_ptr<LinearSolverType> linearSolver)
 ^
/usr/local/include/g2o/core/block_solver.hpp:40:1: note:   no known conversion for argument 1 from ‘dvo_slam::internal::KeyframeGraphImpl::LinearSolver* {aka g2o::LinearSolverEigen<Eigen::Matrix<double, 6, 6> >*}’ to ‘std::unique_ptr<g2o::LinearSolver<Eigen::Matrix<double, 6, 6> >, std::default_delete<g2o::LinearSolver<Eigen::Matrix<double, 6, 6> > > >’

Do I have to roll back my g2o verison?

@geoeo geoeo changed the title cant find function from the g2o package when compilong dvo_slam cant find function from the g2o package when compiling dvo_slam Aug 28, 2018
@RigerLee
Copy link

If you use the latest g2o, the following codes should work :
Modify codes below // g2o setup

std::unique_ptr<BlockSolver::LinearSolverType> linearSolver = g2o::make_unique<LinearSolver>();
std::unique_ptr <BlockSolver> block_solver ( new BlockSolver( std::move(linearSolver)) );
keyframegraph_.setAlgorithm(
    new g2o::OptimizationAlgorithmDogleg(
        std::move(block_solver)
    )
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants