ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Issues with librgbdtools and g2o compilation.

asked 2015-05-23 14:16:10 -0500

Tanmay gravatar image

Hey,

I am trying to compile ccny_rgbd_tools (master branch) on ROS Hydro, ubuntu 12.04. (After struggling with http://answers.ros.org/question/20969... ).

I run the rosdep install command, and it installs libg2o. (ros-hydro-libg2o). Then I get these errors:

Linking CXX shared library lib/librgbdtools.so
make[3]: Leaving directory /home/tanmay/hydro_workspace/sisl_sandbox/ccny_rgbd_tools/lib_rgbdtools/rgbdtools_git/build' [ 87%] Built target rgbdtools make[3]: Entering directory/home/tanmay/hydro_workspace/sisl_sandbox/ccny_rgbd_tools/lib_rgbdtools/rgbdtools_git/build'
Scanning dependencies of target global_cloud_align
make[3]: Leaving directory /home/tanmay/hydro_workspace/sisl_sandbox/ccny_rgbd_tools/lib_rgbdtools/rgbdtools_git/build' make[3]: Entering directory/home/tanmay/hydro_workspace/sisl_sandbox/ccny_rgbd_tools/lib_rgbdtools/rgbdtools_git/build'
[ 93%] Building CXX object CMakeFiles/global_cloud_align.dir/apps/global_cloud_align.cpp.o
Linking CXX executable bin/global_cloud_align
lib/librgbdtools.so: error: undefined reference to 'g2o::get_monotonic_time()'
lib/librgbdtools.so: error: undefined reference to 'cs_di_sfree'
lib/librgbdtools.so: error: undefined reference to 'cs_di_schol'
lib/librgbdtools.so: error: undefined reference to 'cs_di_amd'
lib/librgbdtools.so: error: undefined reference to 'cs_di_free'
lib/librgbdtools.so: error: undefined reference to 'cs_di_calloc'
lib/librgbdtools.so: error: undefined reference to 'cs_di_pinv'
lib/librgbdtools.so: error: undefined reference to 'cs_di_symperm'
lib/librgbdtools.so: error: undefined reference to 'cs_di_etree'
lib/librgbdtools.so: error: undefined reference to 'cs_di_post'
lib/librgbdtools.so: error: undefined reference to 'cs_di_counts'
lib/librgbdtools.so: error: undefined reference to 'cs_di_spfree'
lib/librgbdtools.so: error: undefined reference to 'cs_di_malloc'
lib/librgbdtools.so: error: undefined reference to 'cs_di_cumsum'
lib/librgbdtools.so: error: undefined reference to 'cs_di_nfree'

When I remove libg2o and run rosmake --pre-clean, it cannot find some header files. I tried manually including these, but it still comes up as errors.

[ 87%] Building CXX object CMakeFiles/rgbdtools.dir/src/graph/keyframe_graph_solver_g2o.cpp.o
In file included from /home/tanmay/hydro_workspace/sisl_sandbox/ccny_rgbd_tools/lib_rgbdtools/rgbdtools_git/src/graph/keyframe_graph_solver_g2o.cpp:24:0:
/home/tanmay/hydro_workspace/sisl_sandbox/ccny_rgbd_tools/lib_rgbdtools/rgbdtools_git/include/rgbdtools/graph/keyframe_graph_solver_g2o.h:27:39: fatal error: g2o/core/sparse_optimizer.h: No such file or directory

Any suggestions as to how I can solve this inconsistency, guys? @idryanov

Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-06-02 14:05:12 -0500

Tanmay gravatar image

Hello everyone,

I managed to successfully compile the package. Here is what was going wrong -

The issue was primarily with the linking of the libraries in CMake, and with dependencies / paths of the libraries installed. I first went through CMake documentation thoroughly, especially using external libraries with and without existing cmake modules. I then set the variables that FIND_PACKAGE is supposed to set (for example, G2O_INCLUDE_DIR, SUITEPARSE_INCLUDE_DIR, etc.), accordingly.

I also explicitly linking cxsparse and some of the G2O libraries with my executables, since they weren't getting linked (by the looks of it), using target_link (${G2O_LIBRARIES}), etc. I really advise anyone facing similar issues to go through how Cmake works (in fact, it should be recommended to all ROS users).

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-05-23 14:16:10 -0500

Seen: 1,161 times

Last updated: Jun 02 '15