Orocos Toolchain 2.5 Release Series Changes, New Features, and Fixes

Open RObot COntrol Software

Table of Contents

1. Upgrading from RTT 1.x to Toolchain 2.x
2. Caveats
3. ROS Users
4. Improvements
4.1. Building
4.2. TaskContext and Services
4.3. Data Types, Toolkits and Typekits
4.4. Operating Systems
4.5. Orocos scripting
5. Orocos Component Library (OCL)
5.1. Lua scripting
5.2. TimerComponent
5.3. Deployment
5.4. Reporting
1. About Orocos

This document provides a quick overview of what changed between the Orocos Toolchain 2.4 and version 2.5.

1. Upgrading from RTT 1.x to Toolchain 2.x

Please consult the online wiki for all available information about the 1.x to 2.x transition: The Road to RTT 2.0. The Real-Time Toolkit is no longer released as a single entity, but as part of a complete set of tools and libraries for creating real-time applications. See also the changes documents of the previous major releases:

2. Caveats

  • This release is binary incompatible with RTT 2.4.x. You need to recompile the whole toolchain and all your applications in order to use this release.


    Take care that all previously built components and plugins in the <install>/lib/orocos directory and subdirectories are removed, since the plugin loader may not find older versions. Especially on 'ROS' systems, which have such files in their <packagename>/lib/ directory.

  • You can only attach one callback to an EvenPort, during the addEventPort() function call. If you need multiple call-backs, you need to call these yourself from the function you've provided to addEventPort(). In this regard, the port->getNewDataOnPortEvent() call has been removed. You can enable it by defining ORO_SIGNALLING_PORTS in the cmake configuration step, but this feature will be removed eventually.

3. ROS Users

  • The Orocos Toolchain 2.5.x will only be released in ROS Electric. This comes with a major overhaul of the Electric ROS integration packages of RTT. The ROS Wiki contains the necessary upgrade steps you need to take to migrate existing code to the new ROS package structure. ROS Wiki on rtt_ros_integration.

  • The Orocos-ROS integration and the Orocos Toolchain are available as Ubuntu packages from

    http://packages.ros.org/ros/ubuntu distroname main

    . See ROS Wiki on installing ROS.

4. Improvements

4.1. Building

  • Switching between OROCOS_TARGET configurations is now more robust. In environments where multiple OROCOS_TARGET are possible (for example xenomai/gnulinux), the OROCOS_TARGET environment variable can be set and will be picked up by the UseOrocos.cmake macros.

  • ROS_ROOT is no longer influencing your build, unless you're in a ROS_PACKAGE_PATH In 2.4, the build system would switch to ROS-style if the user had defined the ROS_ROOT environment variable. In 2.5, the build system will only switch if the package being built is a ROS package, ie, it is underneath the ROS_PACKAGE_PATH.

    This allows better integration with AutoProj.

  • ROS package builds no longer install in a <package>/install subdirectory All Orocos Toolchain ROS packages now install in the <orocos-toolchain>/install directory. As such both ROS and non-ROS builds have the same directory layout. You can still use 'rosrun' to run an OCL program, since these are still available in the package as well.

    This allows better integration with AutoProj.

  • RTT builds with clang++ 2.9 This allows you to speed up RTT builds significantly.

    This allows better integration with AutoProj.

4.2. TaskContext and Services

  • An important fix was applied when two or more output ports were connected to one input port, which led to dropping data samples from time to time.

4.3. Data Types, Toolkits and Typekits

  • The Typekits now support fixed size arrays better. Especially, there is no need anymore for having one typekit for each size of an array. The ROS fixed-size array implementation in Electric makes use of this feature.

    For this, there was some class-reordering in the TypeInfo hierarchy, but it should remain transparant for existing users.

4.4. Operating Systems

  • There were the usual fixes for new compilers or header locations for all Operating Systems: Linux, Mac OS-X and Win32.

  • The CPU affinity Thread function for Xenomai is implemented but not yet stable. We are delving into this but already provide it to allow more testing.

  • Xenomai threads now run with a default stack size of 128kb, instead of 32kb. This may still be too little if you have scripts which load scripts or have heavy stack use. In that case, use the Thread::setStackSize function before creating a new Thread/Activity.

  • The Xenomai main() thread now runs with priority 0 instead of 10. Since this is the thread which is doing all the setup work, it shouldn't have defaulted to a real-time priority.

  • There have been a bunch of patches for Mac OS-X, but more testing is still necessary.

4.5. Orocos scripting

  • RTT script functions can now be decorated with 'global', 'local' and 'export'. 'local' is the default and keeps a function local to the scripting service. 'export' attaches the script function to the interface of the component it belongs to. 'global' puts the function in the GlobalService, such that other scripts in other components can use it directly, without the need to refer to a component.

5. Orocos Component Library (OCL)

5.1. Lua scripting

  • Consult the LuaCookbook for the latest changes

  • The TLSF branch of Lua has been merged, which will allow hard real-time script execution in the near future. Further minor releases will pollish this feature more.

  • Your scripts have now access to the RTT globals using the


    table. These are the scheduler types, data flow & operations return codes and constants for initializing ConnectionPolicy objects.

5.2. TimerComponent

  • The TimerComponent was changed to have one port for each timer ID as well in addition to one port for all timer ID's. This avoid spurious wake-ups (triggers and calls of updateHook() ) of components waiting for timer events on event ports.

    You are advised to update your deployment to make use of the new timer ports.

5.3. Deployment

  • The Deployment XML format now also accepts an 'Affinity' field which allows to specify a CPU mask on which the thread may run. There is a new operation called 'setActivityOnCPU' which takes an affinity parameter as well.

    NOTE: this function is still experimental and not yet stable on Xenomai.

5.4. Reporting

  • The reporting component has been rewritten such that it behaves consistently. When being periodic, it will sample all input ports at the frequency it runs. When being triggered, it will log the ports which have new data.

1. About Orocos

Please send your Orocos questions to orocos-users at lists.mech.kuleuven.be .

These pages are maintained by the Orocos team.

For questions related to the use of the Orocos Software, please consult these web pages and the Orocos RTT manuals. If that fails, the orocos-dev at lists.mech.kuleuven.be mailing list might help. Please send comments on these web pages and the development of Orocos to our developer mailing list at orocos-dev at lists.mech.kuleuven.be . All of our lists have public archives ( dev public archive ) .

Copyright (C) The SourceWorks

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.