ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I think I can see now the origin of the problem. It is related to Boost included from outside ros. In fact I should have reported my full CMakeLists.txt in the question, but I was initially far from thinking the issue was in any how related...
In my CMakeLists.txt I included my own boost (latest version downloaded from source) like
SET (BOOST_DIR "/home/polar/soft/lib/boost/boost_1_61_0")
SET (BOOST_INCLUDEDIR "/home/polar/soft/lib/boost/boost_1_61_0/build/include")
SET (BOOST_LIBRARYDIR "/home/polar/soft/lib/boost/boost_1_61_0/build/lib")
FIND_PACKAGE(Boost 1.61.0 REQUIRED thread)
if (NOT Boost_FOUND)
message(FATAL_ERROR " Fatal error: Boost (version >= 1.55) required.")
else()
message(STATUS "Setting up BOOST")
message(STATUS " Includes - ${Boost_INCLUDE_DIRS}")
message(STATUS " Library - ${Boost_LIBRARY_DIRS}")
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
endif (NOT Boost_FOUND)
As such I got segmentation fault at image_transport::ImageTransport it(nh);
. However, after replacing the above CMake code with only
FIND_PACKAGE(Boost)
I no longer have that segmentation fault.
Thus another question, how to use the standalone Boost with ROS catkin??