Knowledge base for errors and how to fix them. Based on errors I encountered while compiling my fork, the fork by kevin george and the fork by TUM-Vision
Change the float x,y,z;
in the files to double x,y,z;
g2o::OptimizationAlgorithmLevenberg
uninstall ros-melodic-libg2o
using sudo apt purge ros-melodic-libg2o
and then run sudo rm -r /usr/local/lib/libg2o* /usr/local/include/g2o /usr/local/lib/g2o /usr/local/bin/g2o*
to remove all the g2o stuff that is left
Then install the g2o c++03
again
In the CMakeList.txt change Eigen
with Eigen3
'int' enum Status
Rename Status
to status
https://github.com/opencv/opencv/pull/7148/commits/7810bcd4bd4e6cae06e191fbb8a0c7e369b03120
Do all these step
msg
directory under lsd_slam_viewer
into lsd_slam_core
lsd_slam_viewer
in the IOWrapper/ROS/ROSOutput3DWrapper.cpp
file with lsd_slam_core
add_dependencies(viewer lsd_slam_viewer_generate_messages_cpp)
in lsd_slam_viewer/CMakelists.txt
under the add_executeable
linemessage_generation
to the list of find_package(catkin REQUIRED COMPONENTS)
add_message_files(DIRECTORY msg FILES keyframeMsg.msg keyframeGraphMsg.msg) generate_messages(DEPENDENCIES)
above the line stating generate_dynamic_reconfigure_options
add_dependencies(live_slam lsd_slam_core_generate_messages_cpp)
under the add_executeable
lineClone and compile g2o yourself
mkdir build
cd build
cmake ..
make
Many error messages like the one below in the g2oTypeSim3Sophus.h file
Change line 96 in g2oTypeSim3Sophus.h from Eigen::Map<const g2o::Vector7d> v(m);
to Eigen::Map<const Eigen::Matrix<double, 7 ,1> > v(m);
Install version c++03 from the link below as the latest one changed a few things. Still works with the fix for base_vertex.h not found
as written above.
https://github.com/felixendres/g2o/tree/c++03
Add ${catkin_INCLUDE_DIRS}
to the include_directories
in the CMakeList.txt.
/usr/bin/ld: cannot find -lcsparse
csparse
file with sudo find / -name "*csparse*"
/usr/local/lib/libg2o_solver_csparse.so
csparse
we just found to the location it is missing in with command sudo ln -s {where it is} {where to link it}
and
Don't mix the obsolete C api with the C++ api. Use cv::Point
instead of cvPoint
, and cv::FONT_HERSHEY_SIMPLEX
instead of CV_FONT_HERSHEY_SIMPLEX
and
most other that have something with cv
or CV_
at the front
Don't mix the obsolete C api with the C++ api. Use cv::Point
instead of cvPoint
, and cv::FONT_HERSHEY_SIMPLEX
instead of CV_FONT_HERSHEY_SIMPLEX
, e.g.:
This occured when running catkin_make
to make lsd_slam
Add this at the top of the CMakeList.txt
Also replace csparse
and cxsparse
in the target_linked_libraries
with ${CSPARSE_INCLUDE_DIR}
liblsdslam.so: Warning: undefined reference to ***
Will most Likely accure when applying the fix for "catkin_make » /usr/bin/ld: cannot find -lcsparse"
"Warnung: undefinerter Verweis auf xxx"
=> "Warning: undefined reference to xxx
Install libsuitesparse-dev
before compiling g2o
Download Eigen 3.2.5
but don't install it.
Put it in a folder and remember the path.
Go into the CMakeList.txt
of lsd_slam_core
and add set(EIGEN3_INCLUDE_DIR "{PATH}")
above the block include_directories(...
Change CV_
to cv::COLOR_
like this: cv::COLOR_GRAY2RGB