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

Revision history [back]

click to hide/show revision 1
initial version

All right, I believe I have found the answer. I will explain it here as I do not find it obvious:

You should add RTT-MARSHALLING_LIBRARY to target_link_libraries in your CMakeLists.txt, right after ${OROCOS-RTT. Hence a basic working version of the CMakeLists.txt could look like:

cmake_minimum_required(VERSION 2.8.3)

project(hello-2-properties)

find_package(catkin REQUIRED COMPONENTS rtt_ros)

catkin_package(
  CATKIN_DEPENDS rtt_ros 
)

add_definitions(-DRTT_COMPONENT)
# Creates an orocos component HelloWorld
orocos_component(${PROJECT_NAME} HelloWorld.cpp) # ...you may add multiple source files
target_link_libraries(
    ${PROJECT_NAME}
    ${catkin_LIBRARIES}
    ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY} 
    ${USE_OROCOS_LIBRARIES}
    )

# Makes this an installable/usable package for other packages.
orocos_generate_package()

Note that the very same problem arises when linking against the scripting service. To tackle with this, simply replace RTT-MARSHALLING_LIBRARY by RTT-SCRIPTING_LIBRARY in the above example.

Cheers,

Antoine.