0
$\begingroup$

Rosanswers logo

ROS and Orocos are both capable of running realtime priority threads. What Realtime patch is the preferred method for realtime under Ubuntu?

Userspace support for RTAI and Xenomai are both available in repos, but there does not seem to be corresponding kernels available. I would prefer to use a prebuilt kernel if possible to simplify repeatability.


Originally posted by JonW on ROS Answers with karma: 586 on 2011-03-20

Post score: 7

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

That depends on the real-time requirements of your system: both response times and ability to tolerate occasional lapses.

Vanilla Linux kernels provide good real-time performance these days. Unless your system requires very low response times or very hard guarantees, I recommend sticking with the stock kernel until measurements reveal a need for something more.

If hard real-time is needed, the simplest Ubuntu upgrade path is probably to install the linux-rt kernel, with Ingo Molnar's real time preemption patch.

In either case, you probably need to set some PAM variables in /etc/security/limits to [grant non-root users permission](https://help.ubuntu.com/community/UbuntuStudioPreparation#Real-Time Support) to create SCHED_FIFO threads.


Originally posted by joq with karma: 25443 on 2011-03-21

This answer was ACCEPTED on the original site

Post score: 5


Original comments

Comment by JonW on 2011-03-21:
Good point about decent real-time in vanilla. Thanks for the pointer to the limits file.

$\endgroup$
0
$\begingroup$

Rosanswers logo

The PR2 kernel uses a linux-rt kernel, version 2.6.31-10-rt. We have patched it to resolve a iptables problem. We have noticed occasional kernel panics when running on the PR2, but this is the best RT kernel we have found.

You can download the kernel, with headers, from the PR2 repo: http://packages.ros.org/pr2/ubuntu/

A related package in the same repo, "pr2-grant", has a set capability program to allow non-root users to run realtime programs.

pr2-grant ./my_realtime_prog arg1 arg2 ...

Outside the PR2, these packages are completely unsupported, but you may find them useful.


Originally posted by watts with karma: 584 on 2011-03-21

This answer was NOT ACCEPTED on the original site

Post score: 4


Original comments

Comment by sam on 2011-10-19:
Is RTAI or Xenomai can has user interface,but other hard rt mechanisms like linux-rt don't?

Comment by JonW on 2011-10-18:
By the looks of things the rt kernel is hard realtime - http://www.ptxdist.org/software/linux-rt/debian_en.html

Comment by sam on 2011-09-28:
Is PR2 use hard real-time or soft real-time? Or in some case using hard and some for soft?

Comment by JonW on 2011-03-21:
Thanks for the link to the packages.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.