-
Notifications
You must be signed in to change notification settings - Fork 47
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
Vector 4D not defined in the scope #1
Comments
I was able to resolve this by comparing with the new |
@matt-deboer I still cannot figure out how did you solve this problem. Can you explain more in details, please? |
@zhangjun-xyz Did you sloved it, I meet it too and do not know what it is meaning. thank you |
@Zedzou Sorry I don't focus on this project for a long time. But as a reminder I guess it's caused by wrong g2o version. You can check it. Hope this can help you. :) |
|
I got several error message in pnpl.cpp. It seems that after the line
typedef Eigen::Matrix<double,6,1,Eigen::ColMajor> Vector6D;
Vector4D 3D 2D shoule also be defined.
After I fixed this, I got problems with the API of G2O. So I changed to link an early version G2O, and it is OK now.
/home/rick/SLAMProjects/PnPL/src/pnpl.cpp: In function ‘void PnPL(const std::vector<cv::Point3_ >&, const std::vector<cv::Point_ >&, const std::vector<cv::Vec<float, 6> >&, const std::vector<cv::Vec<float, 4> >&, const cv::Mat&, cv::Mat&, cv::Mat&)’:
/home/rick/SLAMProjects/PnPL/src/pnpl.cpp:143:78: error: no matching function for call to ‘g2o::BlockSolver<g2o::BlockSolverTraits<6, 3> >::BlockSolver(g2o::BlockSolver<g2o::BlockSolverTraits<6, 3> >::LinearSolverType*&)’
g2o::BlockSolver_6_3 * solver_ptr = new g2o::BlockSolver_6_3(linearSolver);
^
In file included from /usr/local/include/g2o/core/block_solver.h:199:0,
from /home/rick/SLAMProjects/PnPL/src/pnpl.cpp:4:
/usr/local/include/g2o/core/block_solver.hpp:40:1: note: candidate: g2o::BlockSolver::BlockSolver(std::unique_ptr) [with Traits = g2o::BlockSolverTraits<6, 3>; typename Traits::LinearSolverType = g2o::LinearSolver<Eigen::Matrix<double, 6, 6, 0> >]
BlockSolver::BlockSolver(std::unique_ptr linearSolver)
^
/usr/local/include/g2o/core/block_solver.hpp:40:1: note: no known conversion for argument 1 from ‘g2o::BlockSolver<g2o::BlockSolverTraits<6, 3> >::LinearSolverType* {aka g2o::LinearSolver<Eigen::Matrix<double, 6, 6, 0> >}’ to ‘std::unique_ptr<g2o::LinearSolver<Eigen::Matrix<double, 6, 6, 0> >, std::default_delete<g2o::LinearSolver<Eigen::Matrix<double, 6, 6, 0> > > >’
/home/rick/SLAMProjects/PnPL/src/pnpl.cpp:144:101: error: no matching function for call to ‘g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(g2o::BlockSolver_6_3&)’
g2o::OptimizationAlgorithmLevenberg* solver = new g2o::OptimizationAlgorithmLevenberg(solver_ptr);
^
In file included from /home/rick/SLAMProjects/PnPL/src/pnpl.cpp:7:0:
/usr/local/include/g2o/core/optimization_algorithm_levenberg.h:47:16: note: candidate: g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(std::unique_ptrg2o::Solver)
explicit OptimizationAlgorithmLevenberg(std::unique_ptr solver);
^
/usr/local/include/g2o/core/optimization_algorithm_levenberg.h:47:16: note: no known conversion for argument 1 from ‘g2o::BlockSolver_6_3* {aka g2o::BlockSolver<g2o::BlockSolverTraits<6, 3> >*}’ to ‘std::unique_ptrg2o::Solver’
CMakeFiles/demo_pnpl.dir/build.make:86: recipe for target 'CMakeFiles/demo_pnpl.dir/src/pnpl.cpp.o' failed
make[2]: *** [CMakeFiles/demo_pnpl.dir/src/pnpl.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/demo_pnpl.dir/all' failed
make[1]: *** [CMakeFiles/demo_pnpl.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: