Problem when building with rosbuild
I am trying to build my project using rosbuild and when I remove the rosbuild_init() it works. Here it goes the CMakeList.txt
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
set(CMAKE_CXX_STANDARD 11)
rosbuild_init()
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
set( TISCAMERA_DIR /home/victor/driverless/tiscamera)
message( ${TISCAMERA_DIR} )
if(NOT IS_DIRECTORY
"${TISCAMERA_DIR}/examples/cpp/common"
)
message(FATAL_ERROR "Error : TISCAMERA_DIR not set to tiscamera directory. Please correct CMakeLists.txt." )
return() endif()
find_package(PkgConfig REQUIRED)
find_package(OpenCV REQUIRED)
rosbuild_add_boost_directories()
pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0 gstreamer-app-1.0 gstreamer-video-1.0)
pkg_check_modules(TCAMLIB tcam)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${TISCAMERA_DIR}/examples/cpp/common
${GSTREAMER_INCLUDE_DIRS}
${TCAM_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS})
rosbuild_add_executable(stereo_driver_node src/stereo_cam_driver_node.cpp ${TISCAMERA_DIR}/examples/cpp/common/tcamcamera.cpp)
target_link_libraries(stereo_driver_node ${TCAMLIB_LIBRARIES} ${GSTREAMER_LIBRARIES} ${OpenCV_LIBS})
rosbuild_link_boost(stereo_driver_node thread signals system)
install(TARGETS stereo_driver_node RUNTIME DESTINATION bin)
The problem is that gstreamer callbacks don't get triggered when I compile with rosbuild but they do when I remove the the rosbuild_init() macro.
Thank you.
This is obviously not an answer, but I'm curious as to why you still want / need to use
rosbuild
in Kinetic. Are you using an old driver/package that hasn't been ported to Catkin? Porting is relatively straightforward, so unless you really want to solve therosbuild
issue, might be easier.