Ask Your Question
1

Is it possible to easily use ros realtime tools outside of the pr2_controller_manager?

asked 2013-01-24 13:08:25 -0600

mkillpack gravatar image

updated 2013-06-05 03:15:11 -0600

130s gravatar image

I'm trying to get data from a ROS node at 100 Hz. Unfortunately, although the average is 100 Hz, it degrades sometimes to 25 Hz for a few samples. This wouldn't be a problem if it happened occasionally, but it happens about every 7th sample. My questions are as follows:

1)Is there a way to make the publishing more regular with standard ROS/Linux methods? (higher priority?)

2)Would using the ros realtime tools help at all and if so, can they be used without being run in the pr2_controller_manager?

Looking over documentation and other questions on this forum, it just isn't clear if the ros realtime tools can be used without having to modify the pr2_controller_manager for my specific robot.

I'm aware that orocos rtt is another option and I am already using it for a different part of the same controller. Any thoughts or suggestions would be very much appreciated. Thanks.

EDIT: As a side note, even without using a real-time kernel, if I use orocos rtt components, I get much less jitter and more determinism in my loop (they must be doing good things with the threading and priorities). I'm wondering if the benefit of using the ros realtime tools is the same even without having to install a patched kernel.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-01-24 14:09:19 -0600

Thomas gravatar image

The regularity of your controller is mainly due to the fact that your kernel scheduling strategy is different so in that sense using realtime_tools will not help you.

But otherwise, I have been using the real-time publishers in my non-PR2 related controller without any trouble in the sense that this piece of code is quite simple and just rely on threading to make publishing non-blocking. So I have this code running in both an alternative Linux RT OS (compared to the one used by PR2) and in simulation on my desktop computer with the usual kernel Ubuntu provides.

So if your goal is to have better performances by having a non-blocking publisher then yes it will help but as far as "regularity" goes depending on your code it may or may not help.

Note: realtime_tools package really have nothing to do with PR2 in fact, it could be as well merged into roscpp without any problem so you won't have to touch the pr2_controller_manager to use this package.

edit flag offensive delete link more

Comments

I guess I was under the misconception that it was the pr2_controller_manager that was enforcing realtime on the controllers if you have a real-time kernel. Thanks.

mkillpack gravatar imagemkillpack ( 2013-01-25 02:27:14 -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

1 follower

Stats

Asked: 2013-01-24 13:08:25 -0600

Seen: 533 times

Last updated: Jan 25 '13