wiki:WikiStart/Toolchain/RTPlatforms

For Linux with the RT patchset, nothing special is required

For Xenomai, you have to realize that:

  • gdb is not accessible to the Xenomai tasks
  • doing non-RT things in a Xenomai tasks leads to primary-to-secondary domains switches which is expensive, so avoid that.

Xenomai Setup

One usually compiles RTT two times: one time for gnulinux and one time for xenomai, so that it is possible to use both. Autoproj currently does not support this, so you will have do to one of the two compilations manually. The second compilation should be installed in the same prefix as the overall autoproj prefix (i.e. install/)

For which target each oroGen project should be compiled is defined by the #orocos_target attribute on the autobuild tasks. Pick the "default" target using the global autoproj configuration option (the "the target operating system for Orocos/RTT (gnulinux or xenomai)" question) and then override this for the packages that you want to deploy on the other target by adding

setup_package("my/orogen/package") do |pkg|
  pkg.orocos_target = "xenomai"
end

to autoproj/overrides.rb

Linux RT Setup

In order to be able to use the realtime scheduler as your regular user, you will have to edit /etc/security/limits.conf and add the following two lines

* soft rtprio 99
* hard rtprio 99

Replace the star at the beginning either by your username or a group using the "@group" notation. See the comments at the top of the file for details.

Deployment

There is the need for two things to run as a RT-task:

  • to be compiled for the RT OS that you chose
  • to be deployed as a realtime task

The second point requires you to create a manual deployment (automatic deployments always deploy as non-RT). Each RT task needs to be deployed with a priority and on the realtime scheduler with

deployment "controller" do
  task("can0", "canbus::Task").
    priority(80).
    realtime
end

Finally, you need to restrict yourself to RT-friendly transports to connect your components (i.e. local connections or Posix message queues). In general, as a starting point, it is advised to use local connections -- i.e. to deploy all RT tasks in the same process.

NOTE It is possible to use CORBA in a mixed RT/non-RT setup. The usage of CORBA will have NO influence on the RT tasks. Obviously, since CORBA is not realtime, you should not use it to connect two RT tasks, that's all.

Last modified 5 years ago Last modified on 12/17/13 12:34:34