ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

what realtime patch should I use with ROS?

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

JonW gravatar image

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

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

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

joq gravatar image

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

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


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

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

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:

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


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

Question Tools



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

Seen: 4,052 times

Last updated: Mar 21 '11