mohammedari / RealtimePeriodicExecutionContext

Realtime periodic execution context for OpenRTM 1.1.0 which runs on RT-PREEMPT linux kernel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RealtimePeriodicExecutionContext

Realtime modded periodic execution context (EC) for OpenRTM-aist 1.1.0.

When RT component is activated, this EC set scheduling policy of the working thread to realtime. This EC drives RT components periodically with lower latency (typically under 50us) under RT-PREEMPT patched Linux.

Build Environment

This source repository contains a project of Eclipse CDT. Please install it and build source code.

This source code depends on OpenRTM-aist. Please install OpenRTM-aist 1.1.0 C++ distribution package from official page.

This EC could be built under normal linux environment. However realtime performance could be obtained under RT-PREEMPT Linux. Please install RT-PREEMPT kernel such as Abogani realtime kernel ppa.

Using in RT components

Basically the same as ART execution context case (Japanse document).

First, modify *.Comp.cpp file and rebuild your RT component.
Please add line

manager->load("RealtimePeriodicExecutionContext.so", "RealtimePeriodicExecutionContextInit");

before setting module init procedure code setModuleInitProc(MyModuleInit).

Second, modify rtc.conf.
Please add execution context configuration lines.

exec_cxt.periodic.type: RealtimePeriodicExecutionContext
exec_cxt.periodic.rate: 1000

Third, run your EC with super user permission.
Changing scheduling policy requires super user permission. Please run RT components with sudo option or by root.

Lisence

Copyright © 2013 Kazuyuki Arimatsu
Licensed under the GNU Lesser General Public License.

About

Realtime periodic execution context for OpenRTM 1.1.0 which runs on RT-PREEMPT linux kernel

License:GNU Lesser General Public License v3.0


Languages

Language:C++ 100.0%