lsd_slam icon indicating copy to clipboard operation
lsd_slam copied to clipboard

Error when trying to 'make'

Open 9friday opened this issue 6 years ago • 1 comments

I have a 64-bit laptop running Ubuntu 17.10. I want to run LSD-SLAM directly on a live videostream without the ROS dependencies. I git cloned this repo, then inside the 'src' folder, created a 'build' folder and ran 'cmake ../' inside the 'build' folder from the terminal. I got this:

-- Boost version: 1.62.0 -- Found the following Boost libraries: -- thread -- filesystem -- system -- chrono -- date_time -- atomic -- Configuring done -- Generating done -- Build files have been written to: /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/build

After this, I ran sudo make. Then I got this error:

` [ 3%] Building CXX object CMakeFiles/lsdslam.dir/DataStructures/Frame.cpp.o In file included from /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/DataStructures/FramePoseStruct.h:23:0, from /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/DataStructures/Frame.h:26, from /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/DataStructures/Frame.cpp:21: /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/GlobalMapping/g2oTypeSim3Sophus.h: In member function ‘virtual bool lsd_slam::EdgeSim3::setMeasurementData(const double*)’: /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/GlobalMapping/g2oTypeSim3Sophus.h:96:20: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive] Eigen::Map<const g2o::Vector7d> v(m); ^~~ /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/GlobalMapping/g2oTypeSim3Sophus.h:96:33: error: template argument 1 is invalid Eigen::Map<const g2o::Vector7d> v(m); ^ /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/GlobalMapping/g2oTypeSim3Sophus.h:96:38: error: invalid conversion from ‘const double*’ to ‘int’ [-fpermissive] Eigen::Map<const g2o::Vector7d> v(m); ^ /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/GlobalMapping/g2oTypeSim3Sophus.h:97:38: error: no matching function for call to ‘Sophus::Sim3Group::exp(int&)’ setMeasurement(Sophus::Sim3d::exp(v)); ^ In file included from /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/util/SophusUtil.h:23:0, from /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/DataStructures/Frame.h:22, from /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/DataStructures/Frame.cpp:21: /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/thirdparty/Sophus/sophus/sim3.hpp:418:27: note: candidate: static const Sophus::Sim3Group<typename Eigen::internal::traits<T>::Scalar> Sophus::Sim3GroupBase<Derived>::exp(const Tangent&) [with Derived = Sophus::Sim3Group; typename Eigen::internal::traits<T>::Scalar = double; Sophus::Sim3GroupBase<Derived>::Tangent = Eigen::Matrix<double, 7, 1>] const Sim3Group<Scalar> exp(const Tangent & a) { ^~~ /home/username/Downloads/lsd_slam_jserv/lsd_slam-master/lsd_slam_core/src/thirdparty/Sophus/sophus/sim3.hpp:418:27: note: no known conversion for argument 1 from ‘int’ to ‘const Tangent& {aka const Eigen::Matrix<double, 7, 1>&}’ CMakeFiles/lsdslam.dir/build.make:62: recipe for target 'CMakeFiles/lsdslam.dir/DataStructures/Frame.cpp.o' failed make[2]: *** [CMakeFiles/lsdslam.dir/DataStructures/Frame.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/lsdslam.dir/all' failed make[1]: *** [CMakeFiles/lsdslam.dir/all] Error 2 Makefile:83: recipe for target 'all' failed

`

I have installed all the dependencies listed on the original LSD-SLAM repo. I haven't installed ROS because I want to use the program without ROS.

I would be extremely grateful if someone could help me out.

9friday avatar Apr 21 '18 19:04 9friday

Were you able to fix this? I'm facing the same problem

sadidaa avatar Jun 17 '18 17:06 sadidaa