[Documentation] [TitleIndex] [WordIndex

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

Usage

To set up communication between RTT and ROS:

Generate the RTT typekit

You need to generate an Orocos typekit for the ROS messages you want to use. Here is the option you have to use an existing typekit, or to generate yours :

  • 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 using the rtt_create_msgs script, available in rtt_ros_integration. Lets say you have a ROS package named MyPkg in which a custom message is defined. To create the typekit for MyPkg:

rosrun rtt_ros_integration create_rtt_msgs MyPkg

This will create the package rtt_MyPkg with typekits for your custom ROS messages.

Use the typekit in your C++ code

Imagine the Orocos package in which you want to add the message is OrocosPkg, and you want to use the messages MsgName from you MyPkg package.

You have to edit OrocosPkg/manifest.xml to add the following line :

  <depend package="rtt_MyPkg"/>

In doing so, you will depend indirectly on rtt_ros_integration.

In order to use MsgName in your component, include the message headers to your OrocosPkg C++ code :

#include <MyPkg/typekit/MsgName.h>

Then, you may fill in or read out the ROS Message in your components.

Adapt your deployment files

Deploying OROCOS components can be done either using .xml or .ops file formats

.ops deployment script

  • Import the ROS plugin :

import("OrocosPkg")
  • Add a ConnPolicy structure to your RTT deployer configuration for each topic you want to suscribe :

var ConnPolicy cp;
cp.transport = 3; // ROS == 3
cp.name_id = "/topic_name"; // ros topic
  • Link you RTT Components Port to the ConnPolicy structure you just set up:

stream("YourComponentName.YourRTTPortName", cp ) 

.xml deployment script

  • 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.

Usage

To set up communication between RTT and ROS:

Generate the RTT typekit

You need to generate an Orocos typekit for the ROS messages you want to use. Here is the option you have to use an existing typekit, or to generate yours :

  • 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 using the rtt_create_msgs script, available in rtt_ros_integration. Lets say you have a ROS package named MyPkg in which a custom message is defined. To create the typekit for MyPkg:

rosrun rtt_ros_integration create_rtt_msgs MyPkg

This will create the package rtt_MyPkg with typekits for your custom ROS messages.

Use the typekit in your C++ code

Imagine the Orocos package in which you want to add the message is OrocosPkg, and you want to use the messages MsgName from you MyPkg package.

You have to edit OrocosPkg/manifest.xml to add the following line :

  <depend package="rtt_MyPkg"/>

In doing so, you will depend indirectly on rtt_ros_integration.

In order to use MsgName in your component, include the message headers to your OrocosPkg C++ code :

#include <MyPkg/typekit/MsgName.h>

Then, you may fill in or read out the ROS Message in your components.

Adapt your deployment files

Deploying OROCOS components can be done either using .xml or .ops file formats

.ops deployment script

  • Import the ROS plugin :

import("OrocosPkg")
  • Add a ConnPolicy structure to your RTT deployer configuration for each topic you want to suscribe :

var ConnPolicy cp;
cp.transport = 3; // ROS == 3
cp.name_id = "/topic_name"; // ros topic
  • Link you RTT Components Port to the ConnPolicy structure you just set up:

stream("YourComponentName.YourRTTPortName", cp ) 

.xml deployment script

  • 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.

With the ROS electric release, the orocos_toolchain_ros stack has been split up into 5 different stacks, and the rtt_ros_integration package has become a stack. Check out orocos_toolchain_ros/electric for more information.

Installation

Ubuntu

sudo aptitude install ros-electric-rtt-ros-integration

Compiling from source

Clone the repository using

git clone http://git.mech.kuleuven.be/robotics/rtt_ros_integration.git
rosmake rtt_ros_integration

Upgrade from diamondback

Upgrading from diamondback involves changes of package names and removing the old libraries. A script automating this upgrade is available in the new rtt_rosnode package. To run it:

rosrun rtt_rosnode rtt-upgrade-2.5 <package_dir>

Using ROS messages in Orocos components

To set up communication between RTT and ROS:

You need to generate an Orocos typekit for the ROS messages you want to use. Here is the option you have to use an existing typekit, or to generate yours :

  • rtt_std_msgs is such a typekit for std_msgs - other typekits for the most commonly used ROS messages are available in the rtt_common_msgs and rtt_ros_comm stacks.

  • other typekits can be generated using the rtt_create_msgs script, available in rtt_rosnode. Lets say you have a ROS package named MyPkg in which a custom message is defined. To create the typekit for MyPkg:

rosrun rtt_rosnode create_rtt_msgs MyPkg

This will create the package rtt_MyPkg with typekits for your custom ROS messages.

Use the typekit in your C++ code

Imagine the Orocos package in which you want to add the message is OrocosPkg, and you want to use the messages from you MyPkg package.

You have to edit OrocosPkg/manifest.xml to add the following line :

  <depend package="rtt_MyPkg"/>

In doing so, you will depend indirectly on rtt_rosnode.

In order to use the messages defined in MyPkg in your OROCOS component, include the message headers to your OrocosPkg C++ code :

#include <MyPkg/typekit/MsgName.h>

Then, you may fill in or read out the ROS Message in your components.

Creating and deploying Orocos components

First, you create an Orocos component package, instead of a plain ROS package. Once compiled, deploying OROCOS components can be done either using .xml or .ops file formats.

Creating an Orocos component

See the Orocos Component Builder's Manual, but in short:

rosrun ocl orocreate-pkg my_component_pkg component
cd my_component_pkg
rosmake

A template/dummy component will be built. Now proceed deploying it.

.ops deployment script

Start the Orocos deployer with

rosrun ocl deployer-gnulinux [-s scriptname.ops]

There you get a prompt where you can

  • Import component definitions using the Orocos package name (directory name) :

import("rtt_rosnode") // makes this process a ROS node
import("my_component_pkg")
loadComponent("YourComponentName","My_component_pkg")
// See DeploymentComponent Manual for creating a component using 'loadComponent'
  • Stream your component's data to a ROS topic:

stream("YourComponentName.YourRTTPortName", ros.topic("/topic_name")) 

.xml deployment script

Start the Orocos deployer with

rosrun ocl deployer-gnulinux -s xmlfile.xml
  • Import the Orocos component definitions and add a ConnPolicy structure to your RTT deployer configuration

<simple name="Import" type="string"><value>rtt_rosnode</value></simple>
<simple name="Import" type="string"><value>my_component_pkg</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 Application

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

Installation

Ubuntu

sudo apt-get install ros-fuerte-rtt-ros-integration

Compiling from source

Clone the repository using

git clone http://git.mech.kuleuven.be/robotics/rtt_ros_integration.git -b fuerte
rosmake rtt_ros_integration

Using ROS messages in Orocos components

To set up communication between RTT and ROS:

You need to generate an Orocos typekit for the ROS messages you want to use. Here is the option you have to use an existing typekit, or to generate yours :

  • rtt_std_msgs is such a typekit for std_msgs - other typekits for the most commonly used ROS messages are available in the rtt_common_msgs and rtt_ros_comm stacks.

  • other typekits can be generated using the rtt_create_msgs script, available in rtt_rosnode. Lets say you have a ROS package named MyPkg in which a custom message is defined. To create the typekit for MyPkg:

rosrun rtt_rosnode create_rtt_msgs MyPkg

This will create the package rtt_MyPkg with typekits for your custom ROS messages.

Use the typekit in your C++ code

Imagine the Orocos package in which you want to add the message is OrocosPkg, and you want to use the messages from you MyPkg package.

You have to edit OrocosPkg/manifest.xml to add the following line :

  <depend package="rtt_MyPkg"/>

In doing so, you will depend indirectly on rtt_rosnode.

In order to use the messages defined in MyPkg in your OROCOS component, include the message headers to your OrocosPkg C++ code :

#include <MyPkg/typekit/MsgName.h>

Then, you may fill in or read out the ROS Message in your components.

Creating and deploying Orocos components

First, you create an Orocos component package, instead of a plain ROS package. Once compiled, deploying OROCOS components can be done either using .xml or .ops file formats.

Creating an Orocos component

See the Orocos Component Builder's Manual, but in short:

rosrun ocl orocreate-pkg my_component_pkg component
cd my_component_pkg
rosmake

A template/dummy component will be built. Now proceed deploying it.

.ops deployment script

Start the Orocos deployer with

rosrun ocl deployer-gnulinux [-s scriptname.ops]

There you get a prompt where you can

  • Import component definitions using the Orocos package name (directory name) :

import("rtt_rosnode") // makes this process a ROS node
import("my_component_pkg")
loadComponent("YourComponentName","My_component_pkg")
// See DeploymentComponent Manual for creating a component using 'loadComponent'
  • Stream your component's data to a ROS topic:

stream("YourComponentName.YourRTTPortName", ros.topic("/topic_name")) 

.xml deployment script

Start the Orocos deployer with

rosrun ocl deployer-gnulinux -s xmlfile.xml
  • Import the Orocos component definitions and add a ConnPolicy structure to your RTT deployer configuration

<simple name="Import" type="string"><value>rtt_rosnode</value></simple>
<simple name="Import" type="string"><value>my_component_pkg</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 Application

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

Contents

Please see the external documentation for rtt_ros_integration on GitHub: https://github.com/orocos/rtt_ros_integration/blob/hydro-devel/README.md


2024-11-30 17:54