Ask Your Question
7

what realtime patch should I use with ROS?

asked 2011-03-20 17:40:12 -0600

JonW gravatar image

updated 2014-01-28 17:09:23 -0600

ngrennan gravatar image

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.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
5

answered 2011-03-21 02:04:52 -0600

joq gravatar image

updated 2011-03-21 02:07:10 -0600

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 to create SCHED_FIFO threads.

edit flag offensive delete link more

Comments

Good point about decent real-time in vanilla. Thanks for the pointer to the limits file.
JonW gravatar imageJonW ( 2011-03-21 13:28:23 -0600 )edit
4

answered 2011-03-21 12:02:09 -0600

watts gravatar image

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.

edit flag offensive delete link more

Comments

Thanks for the link to the packages.
JonW gravatar imageJonW ( 2011-03-21 13:33:02 -0600 )edit
Is PR2 use hard real-time or soft real-time? Or in some case using hard and some for soft?
sam gravatar imagesam ( 2011-09-28 04:12:31 -0600 )edit
By the looks of things the rt kernel is hard realtime - http://www.ptxdist.org/software/linux-rt/debian_en.html
JonW gravatar imageJonW ( 2011-10-18 13:37:17 -0600 )edit
Is RTAI or Xenomai can has user interface,but other hard rt mechanisms like linux-rt don't?
sam gravatar imagesam ( 2011-10-19 14:37:01 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2011-03-20 17:40:12 -0600

Seen: 3,293 times

Last updated: Mar 21 '11