rubengooj / stvo-pl

Stereo Visual Odometry by combining point and line segment features
GNU General Public License v3.0
222 stars 96 forks source link

Error in compiling with "make" #no build.sh #8

Open sauvikchdhry opened 7 years ago

sauvikchdhry commented 7 years ago

Hello, I am trying to compile stVO-PL to get 6dof for my drone. I referred to your ReadMe and that there is no "build.sh". Compiling using "make" throws error:

/home/drone/StVO-PL/src/sceneRepresentation.cpp:308:17: error: no match for ‘operator=’ (operand types are ‘mrpt::poses::CPose3D’ and ‘mrpt::math::TPose3D’)

     pose_gt = TPose3D(v_auxgt(0),v_auxgt(1),v_auxgt(2),v_auxgt(3),v_auxgt(4),v_auxgt(5));

I have installed mrpt lib properly (include files are in default place). Also tried declaring 'pose_gt' as type TPose3D and vice versa, still couldn't compile.

Any sort of help is appreciated.

rubengooj commented 7 years ago

Hi, I just add the build.sh document. As for your error, I think you are using an older version of the MRPT, could you change that line for this one?

pose_gt = CPose3D(TPose3D(v_auxgt(0),v_auxgt(1),v_auxgt(2),v_auxgt(3),v_auxgt(4),v_auxgt(5)));

I think the new version allows the casting between CPose3D and TPose3D, but the older ones doesn't.

Best

sauvikchdhry commented 7 years ago

I did try CPose3D, and it threw some other error. As for the older version of MRPT, i will recheck once. Because compiling MRPT from github repo, throws some error too. [not dependency error but seems like some issue with the repo itself]. Anyways, i will further update you after trying out with build.sh.

Thanks

rubengooj commented 7 years ago

If you are about to compile the MRPT from sources, it is strongly recommended to carefully read the following instructions:

http://www.mrpt.org/Building_and_Installing_Instructions

Let me know if you find some more difficulties when installing the library (you can email me if you prefer).

xmupamizq commented 6 years ago

@rubengooj

**Hi, I have met some question when I run your source code of pl-slam,please.

question as follows: pl-slam/src/voScene.cpp: In member function ‘bool voScene::updateScene(std::list<StVO::PointFeature>)’: /home/zhuquan/pl-slam/src/voScene.cpp:559:17: error: no match for ‘operator=’ (operand types are ‘mrpt::poses::CPose3D’ and ‘mrpt::math::TPose3D’) pose_gt = TPose3D(v_auxgt(0),v_auxgt(1),v_auxgt(2),v_auxgt(3),v_auxgt(4),v_auxgt(5)); ^ /home/zhuquan/pl-slam/src/voScene.cpp:559:17: note: candidates are: In file included from /usr/include/mrpt/opengl/include/mrpt/opengl/CRenderizable.h:15:0, from /usr/include/mrpt/opengl/include/mrpt/opengl.h:15, from /home/zhuquan/pl-slam/include/voScene.h:25, from /home/zhuquan/pl-slam/src/voScene.cpp:22: /usr/include/mrpt/base/include/mrpt/poses/CPose3D.h:72:20: note: mrpt::poses::CPose3D& mrpt::poses::CPose3D::operator=(const mrpt::poses::CPose3D&) class BASE_IMPEXP CPose3D : public CPose, public mrpt::utils::CSerializable ^ /usr/include/mrpt/base/include/mrpt/poses/CPose3D.h:72:20: note: no known conversion for argument 1 from ‘mrpt::math::TPose3D’ to ‘const mrpt::poses::CPose3D&’ /usr/include/mrpt/base/include/mrpt/poses/CPose3D.h:72:20: note: mrpt::poses::CPose3D& mrpt::poses::CPose3D::operator=(mrpt::poses::CPose3D&&) /usr/include/mrpt/base/include/mrpt/poses/CPose3D.h:72:20: note: no known conversion for argument 1 from ‘mrpt::math::TPose3D’ to ‘mrpt::poses::CPose3D&&’ /home/zhuquan/pl-slam/src/mapHandler.cpp: In member function ‘bool PLSLAM::MapHandler::loopClosureOptimizationEssGraphG2O()’: /home/zhuquan/pl-slam/src/mapHandler.cpp:3933:77: 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); ^ /home/zhuquan/pl-slam/src/mapHandler.cpp:3933:77: note: candidate is: In file included from /usr/local/include/g2o/core/block_solver.h:199:0, from /home/zhuquan/pl-slam/include/mapHandler.h:35, from /home/zhuquan/pl-slam/src/mapHandler.cpp:22: /usr/local/include/g2o/core/block_solver.hpp:40:1: note: 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/zhuquan/pl-slam/src/mapHandler.cpp:3934:101: error: no matching function for call to ‘g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(g2o::BlockSolver_6_3&)’ g2o::OptimizationAlgorithmLevenberg solver = new g2o::OptimizationAlgorithmLevenberg(solver_ptr); ^ /home/zhuquan/pl-slam/src/mapHandler.cpp:3934:101: note: candidate is: In file included from /home/zhuquan/pl-slam/include/mapHandler.h:41:0, from /home/zhuquan/pl-slam/src/mapHandler.cpp:22: /usr/local/include/g2o/core/optimization_algorithm_levenberg.h:47:16: note: g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(std::unique_ptr) 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_ptr’ /home/zhuquan/pl-slam/src/mapHandler.cpp:4044:59: warning: ‘g2o::SE3Quat g2o::VertexSE3::estimateAsSE3Quat() const’ is deprecated (declared at /usr/local/include/g2o/types/slam3d/vertex_se3.h:117) [-Wdeprecated-declarations] g2o::SE3Quat Tiw_corr = v_se3->estimateAsSE3Quat(); ^ /home/zhuquan/pl-slam/src/mapHandler.cpp: In member function ‘bool PLSLAM::MapHandler::loopClosureOptimizationCovGraphG2O()’: /home/zhuquan/pl-slam/src/mapHandler.cpp:4160:77: 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); ^ /home/zhuquan/pl-slam/src/mapHandler.cpp:4160:77: note: candidate is: In file included from /usr/local/include/g2o/core/block_solver.h:199:0, from /home/zhuquan/pl-slam/include/mapHandler.h:35, from /home/zhuquan/pl-slam/src/mapHandler.cpp:22: /usr/local/include/g2o/core/block_solver.hpp:40:1: note: 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/zhuquan/pl-slam/src/mapHandler.cpp:4161:101: error: no matching function for call to ‘g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(g2o::BlockSolver_6_3&)’ g2o::OptimizationAlgorithmLevenberg solver = new g2o::OptimizationAlgorithmLevenberg(solver_ptr); ^ /home/zhuquan/pl-slam/src/mapHandler.cpp:4161:101: note: candidate is: In file included from /home/zhuquan/pl-slam/include/mapHandler.h:41:0, from /home/zhuquan/pl-slam/src/mapHandler.cpp:22: /usr/local/include/g2o/core/optimization_algorithm_levenberg.h:47:16: note: g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(std::unique_ptr) 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_ptr’ /home/zhuquan/pl-slam/src/mapHandler.cpp:4273:59: warning: ‘g2o::SE3Quat g2o::VertexSE3::estimateAsSE3Quat() const’ is deprecated (declared at /usr/local/include/g2o/types/slam3d/vertex_se3.h:117) [-Wdeprecated-declarations] g2o::SE3Quat Tiw_corr = v_se3->estimateAsSE3Quat(); ^ make[2]: [CMakeFiles/plslam.dir/src/voScene.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[2]: [CMakeFiles/plslam.dir/src/mapHandler.cpp.o] Error 1 make[1]: [CMakeFiles/plslam.dir/all] Error 2 make: [all] Error 2 And my mrpt version is 1.5,what about you?

zjudmd1015 commented 6 years ago

Hey Ruben, what do you mean by 'older version of the MRPT'? Can you explicitly say which version of MRPT is compatible?