ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
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).