Is it possible to run real-time applications in user space with OROCOS_TARGET=gnulinux?

I noticed that the ROS package version of the Orocos Toolchain comes
precompiled for gnulinux, though it is my understanding that LXRT is what
actually provides the real-time scheduling in user space.

Is it possible to run real-time applications in user space with Orocos RTT,
OCL, etc. built for gnulinux (instead of lxrt or xenomai)?

I was hoping I could do something like Example
6.1<http://www.orocos.org/stable/documentation/rtt/v2.x/doc-xml/orocos-components-manual.html#corelib-threads>in
the Orocos Components Manual, but grep could not find
makeHardRealtime()
anywhere in $PATH_TO_OROCOS_TOOLCHAIN/install/include .

Soo-Hyun Yoo

Is it possible to run real-time applications in user space with

Hi,

[...]
> Message: 1
> Date: Thu, 15 Dec 2011 06:25:16 -0500
> From: S Roderick <kiwi [dot] net [..] ...>
> Subject: Re: [Orocos-Dev] Is it possible to run real-time applications
>        in user space with OROCOS_TARGET=gnulinux?
> To: Sylvain Joyeux <sylvain [dot] joyeux [..] ...>
> Cc: Orocos-dev <orocos-dev [..] ...>
> Message-ID: <B4F2DEEC-58D4-486C-8088-5199AFDC64B0 [..] ...>
> Content-Type: text/plain; CHARSET=US-ASCII
>
> On Dec 15, 2011, at 04:56 , Sylvain Joyeux wrote:
>
>> On 12/15/2011 09:53 AM, Peter Soetens wrote:
>>>> Is it possible to run real-time applications in user space with Orocos RTT,
>>>> OCL, etc. built for gnulinux (instead of lxrt or xenomai)?
>>>
>>> People have fairly good results with preempt-rt kernels and SCHED_FIFO
>>> (ORO_SCHED_RT)
>> I can confirm that. We're running Rock on a system with posix MQ,
>> LinuxRT and a 1kHz control loop without any noticeable OS-induced latencies.
>
> +1 .... with the linux-rt package in Ubuntu at similar rates.

-1 :-)

I think the answer is that "it might be possible, but does not work
for any case/component". For instance, if you intend to use the
(staging) comedi device drivers, I can tell that (at least until a
year ago), this still resulted into latencies of several 100s of
milliseconds.

YMMV :-)

Klaas

Is it possible to run real-time applications in user space with

On Wed, Dec 14, 2011 at 7:56 PM, Soo-Hyun Yoo <yoos117 [..] ...> wrote:
> I noticed that the ROS package version of the Orocos Toolchain comes
> precompiled for gnulinux, though it is my understanding that LXRT is what
> actually provides the real-time scheduling in user space.

And Xenomai as well.

>
> Is it possible to run real-time applications in user space with Orocos RTT,
> OCL, etc. built for gnulinux (instead of lxrt or xenomai)?

People have fairly good results with preempt-rt kernels and SCHED_FIFO
(ORO_SCHED_RT)

>
> I was hoping I could do something like Example 6.1 in the Orocos Components
> Manual, but grep could not find makeHardRealtime() anywhere in
> $PATH_TO_OROCOS_TOOLCHAIN/install/include .

This is a doc mistake from v1.x RTT. makeHardRealtime is no longer
necessary since
we do this today by setting ORO_SCHED_RT for hard and setting
ORO_SCHED_OTHER for soft
real-time threads:

getActivity()->thread()->setScheduler(ORO_SCHED_RT);

But we mostly set this during deployment (xml or scripts) and not in C++ code.

Peter

Is it possible to run real-time applications in user space with

On Thu, Dec 15, 2011 at 12:53 AM, Peter Soetens <peter [..] ...>wrote:

> On Wed, Dec 14, 2011 at 7:56 PM, Soo-Hyun Yoo <yoos117 [..] ...> wrote:
> > I noticed that the ROS package version of the Orocos Toolchain comes
> > precompiled for gnulinux, though it is my understanding that LXRT is what
> > actually provides the real-time scheduling in user space.
>
> And Xenomai as well.
>
> >
> > Is it possible to run real-time applications in user space with Orocos
> RTT,
> > OCL, etc. built for gnulinux (instead of lxrt or xenomai)?
>
> People have fairly good results with preempt-rt kernels and SCHED_FIFO
> (ORO_SCHED_RT)
>
> >
> > I was hoping I could do something like Example 6.1 in the Orocos
> Components
> > Manual, but grep could not find makeHardRealtime() anywhere in
> > $PATH_TO_OROCOS_TOOLCHAIN/install/include .
>
> This is a doc mistake from v1.x RTT. makeHardRealtime is no longer
> necessary since
> we do this today by setting ORO_SCHED_RT for hard and setting
> ORO_SCHED_OTHER for soft
> real-time threads:
>
> getActivity()->thread()->setScheduler(ORO_SCHED_RT);
>
> But we mostly set this during deployment (xml or scripts) and not in C++
> code.
>

Awesome. I was able to set up what I think is a hard real-time process from
the deployer with the following commands:

import("component_type")
loadComponent("MyComponent", "component_type")
setActivity("MyComponent", 0.001, HighestPriority, ORO_SCHED_RT)

Soo-Hyun Yoo

> Peter
>

Is it possible to run real-time applications in user space with

On 12/15/2011 09:53 AM, Peter Soetens wrote:
>> Is it possible to run real-time applications in user space with Orocos RTT,
>> OCL, etc. built for gnulinux (instead of lxrt or xenomai)?
>
> People have fairly good results with preempt-rt kernels and SCHED_FIFO
> (ORO_SCHED_RT)
I can confirm that. We're running Rock on a system with posix MQ,
LinuxRT and a 1kHz control loop without any noticeable OS-induced latencies.

Is it possible to run real-time applications in user space with

On Dec 15, 2011, at 04:56 , Sylvain Joyeux wrote:

> On 12/15/2011 09:53 AM, Peter Soetens wrote:
>>> Is it possible to run real-time applications in user space with Orocos RTT,
>>> OCL, etc. built for gnulinux (instead of lxrt or xenomai)?
>>
>> People have fairly good results with preempt-rt kernels and SCHED_FIFO
>> (ORO_SCHED_RT)
> I can confirm that. We're running Rock on a system with posix MQ,
> LinuxRT and a 1kHz control loop without any noticeable OS-induced latencies.

+1 .... with the linux-rt package in Ubuntu at similar rates.