Revision 30 as of 2011-02-09 12:58:11

Clear message

Only released in EOL distros:  

orocos_toolchain_ros: log4cpp | ocl | orogen | rtt | rtt_gems | rtt_ros_integration | rtt_ros_integration_example | rtt_ros_integration_geometry_msgs | rtt_ros_integration_nav_msgs | rtt_ros_integration_sensor_msgs | rtt_ros_integration_std_msgs | rtt_ros_param | rtt_ros_service | rtt_rospack | rtt_tf | rtt_typelib | typelib | utilmm | utilrb

Package Summary

rtt_ros_integration provides an RTT plugin to add a ROS node to the RTT process, and the necessary template files and cmake macros for automatic rtt typekit and transport generation from ROS msg files

rtt_ros_integration: rtt_ros_integration_example | rtt_rosnode | rtt_rospack

Package Summary

This stack contains all software necessary to build systems using both Orocos and ROS infrastructures. It depends on the Orocos Toolchain. The rtt_rosnode package allows easy communication between Orocos components and ROS nodes.

rtt_ros_integration: rtt_ros_integration_example | rtt_rosnode | rtt_rospack

Package Summary

This stack contains all software necessary to build systems using both Orocos and ROS infrastructures. It depends on the Orocos Toolchain. The rtt_rosnode package allows easy communication between Orocos components and ROS nodes.

rtt_ros_integration: rtt_actionlib | rtt_dynamic_reconfigure | rtt_ros | rtt_ros_msgs | rtt_rosclock | rtt_roscomm | rtt_rosdeployment | rtt_rosnode | rtt_rospack | rtt_rosparam | rtt_tf

Package Summary

This stack contains all software necessary to build systems using both Orocos and ROS infrastructures

rtt_ros_integration: rtt_actionlib | rtt_dynamic_reconfigure | rtt_ros | rtt_ros_msgs | rtt_rosclock | rtt_roscomm | rtt_rosdeployment | rtt_rosnode | rtt_rospack | rtt_rosparam | rtt_tf

Package Summary

This stack contains all software necessary to build systems using both Orocos and ROS infrastructures

rtt_ros_integration: rtt_actionlib | rtt_dynamic_reconfigure | rtt_ros | rtt_ros_msgs | rtt_rosclock | rtt_roscomm | rtt_rosdeployment | rtt_rosnode | rtt_rospack | rtt_rosparam | rtt_tf

Package Summary

This stack contains all software necessary to build systems using both Orocos and ROS infrastructures

rtt_ros_integration: rtt_actionlib | rtt_dynamic_reconfigure | rtt_ros | rtt_ros_msgs | rtt_rosclock | rtt_roscomm | rtt_rosdeployment | rtt_rosnode | rtt_rospack | rtt_rosparam | rtt_tf

Package Summary

This stack contains all software necessary to build systems using both Orocos and ROS infrastructures

rtt_ros_integration: rtt_actionlib | rtt_dynamic_reconfigure | rtt_ros | rtt_ros_msgs | rtt_rosclock | rtt_roscomm | rtt_rosdeployment | rtt_rosnode | rtt_rospack | rtt_rosparam | rtt_tf

Package Summary

This stack contains all software necessary to build systems using both Orocos and ROS infrastructures

Contents

  1. Usage
  2. Example

Usage

To set up communication between RTT and ROS:

  • Generate the RTT typekit for the ROS message you want to use:
    • rtt_ros_integration_std_msgs is such a typekit for std_msgs - other typekits for the most commonly used ROS messages are included as well.

    • other typekits can be generated by adding the following code in your CMakeLists.txt

rosbuild_include(rtt_ros_integration GenerateRTTtypekit)
ros_generate_rtt_typekit(MsgPackageName)
  • Add the dependency on rtt_ros_integration and your MsgPackageName in your manifest and export the include folder as compiler flags:

  <depend package="rtt_ros_integration"/>
  <depend package="MsgPackageName"/>

  <export>
    <cpp cflags="-I${prefix}/include"/>
  </export>

IMPORTANT: if the message depends on other non std_msgs, you have to generate the typekit for those messages as well! The compile process will complain it cannot find the corresponding message header files otherwise.

  • Include the message header in your RTT component:

#include <MsgPackageName/MsgName>

to fill in or read out the ROS Message in your C++ code.

  • Import the ROS plugin and add a ConnPolicy structure to your RTT deployer configuration

<simple name="Import" type="string"><value>rtt_ros_integration</value></simple>
<struct name="ROSConMsg" type="ConnPolicy">
  <simple name="transport" type="short"><value>3</value></simple><!-- 3 means ROS --/>
  <simple name="name_id" type="string"><value>topic_name</value></simple>
</struct>
  • Link you RTT Components Port to the ConnPolicy structure you just set up:

<struct name="Ports" type="PropertyBag">
  <simple name="YourRTTPortName" type="string"><value> RosConMsg </value></simple>
</struct>

Done, your RTT component can now connects its ports to ROS topics! To test, start a ROS::master, deploy your component and investigate the published nodes with rxgraph

Example

The rtt_ros_integration_example package contains an example RTT component to demonstrate the use of this package.