lsd_slam
lsd_slam copied to clipboard
error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive] Eigen::Map<const g2o::Vector7d> v(m);
when running LSD-slam on my laptop, I received these unexpected errors
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/htf/catkin_ws/src/third_parties/lsd_slam/lsd_slam_core/src/GlobalMapping/g2oTypeSim3Sophus.h:96:33: error: template argument 1 is invalid
Eigen::Map<const g2o::Vector7d> v(m);
^
/home/htf/catkin_ws/src/third_parties/lsd_slam/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/htf/catkin_ws/src/third_parties/lsd_slam/lsd_slam_core/src/GlobalMapping/g2oTypeSim3Sophus.h:97:38: error: no matching function for call to ‘Sophus::Sim3Group<double>::exp(int&)’
setMeasurement(Sophus::Sim3d::exp(v));
does anyone has encountered this problem? hope to get some clues, Thank you in advance.
Same here g++ 5.4
line 96 @ g2oTypeSim3Sophus.h
Eigen::Map<const g2o::Vector7d> v(m);
change to
Eigen::Map<const Eigen::Matrix<double, 7 ,1> > v(m);
@city22 's solution worked for me