[openrtm-users 01458] nameserver timer?

3 個の投稿 / 0 new
最終投稿
root
オフライン
Last seen: 3日 9時間 前
登録日: 2009-06-23 14:31
[openrtm-users 01458] nameserver timer?

Hello...I'm a new OpenRTM user so apologise if this is too trivial a question... I'm trying to build an application where I have several rtm components on the same nameserver but running on different computers. I would like to be able to transfer timed data between the components using a single clock signal... My question is whether openrtm provides any kind of clock signal that can be shared by all the components running in the same nameserver... If so, how do I get the clock signal?... If not I would like to ask you what would be the best way to do it within the openrtm framework...
thanks in advance...cheers...hugo-- -----------------------------------------------Hugo Gravato Marques, AI Lab, University of Zürich
web: http://privatewww.essex.ac.uk/~hgmarq/

未定義
root
オフライン
Last seen: 3日 9時間 前
登録日: 2009-06-23 14:31
[openrtm-users 01465] nameserver timer?

Hi Hugo,

OpenRTM provides complete control over the execution of components, so
what you want to do is possible. You need to use an externally triggered
execution context for each component that should run off the clock
signal. Have a look at the ExtTrigExecutionContext included in OpenRTM.
You need to use the tick() method (available locally or as a CORBA
interface from OpenRTM.idl) to notify the contexts of a tick. A very
good example of it in use can be seen in the OpenHRP3 simulator, which
uses it to provide a simulated clock running at a different rate to a
real clock. If the CORBA interface doesn't meet your needs, you can
copy the ExtTrigExecutionContext source and add an alternative method of
broadcasting the tick (e.g. FIFOs or shared memory or a plain old TCP
signal).

By the way, this works across components running anywhere, whether or
not they are registered on the same name server. Registering on a name
server is just for finding running components; it does not place any
restrictions on how those components interact.

Geoff

On 10/11/10 00:24, Hugo Gravato Marques wrote:
>
> Hello...
>
> I'm a new OpenRTM user so apologise if this is too trivial a question...
>
> I'm trying to build an application where I have several rtm components
> on the same nameserver but running on different computers. I would like
> to be able to transfer timed data between the components using a single
> clock signal... My question is whether openrtm provides any kind of
> clock signal that can be shared by all the components running in the
> same nameserver... If so, how do I get the clock signal?... If not I
> would like to ask you what would be the best way to do it within the
> openrtm framework...
>
> thanks in advance...
>
> cheers...
> hugo

root
オフライン
Last seen: 3日 9時間 前
登録日: 2009-06-23 14:31
[openrtm-users 01480] nameserver timer?

Hi Hugo,

On 10/11/10 20:50, Hugo Gravato Marques wrote:
>
> Hi Geoffrey...
>
> I had a look at the ExtTrigExecutionContext... but I think that does not
> suit my needs (either I misunderstood you or you misunderstood me)... I
> don't want to synchronise my components... In fact I want them running
> asynchronously and at different frequencies... what I want is to be able
> to pass data through them stamping the data with the timestamp
> corresponding to a global clock signal... So, if I use the components
> all in a single computer this is trivial because the clock of the
> computer is shared among all the components... but this is not valid if
> the components are running in different computers... What I was
> wondering is whether openRTM has provides a global clock to all the
> components (e.g. a clock for all the components running in the same
> nameserver)...

Sorry, you're right, I misunderstood you.

OpenRTM does not provide any kind of built-in global clock signal. If
you want one, you need to add an input port to each component to receive
the clock signal, and create a component to broadcast it over an output
port (or add such a port to one of the components).

However, you will quickly run into problems with synchronisation due to
network delays (unless you happen to have a real-time network handy).
The best method to get synchronised time across multiple computers is to
use NTP, which will handle the network delays and clock skews for you.
If you're on Linux, here's a good reference, including how to make one
computer the server and the rest clients:

http://en.gentoo-wiki.com/wiki/NTP

If you're on Windows or Mac, they both have controls for synching to NTP
servers in their clock settings.

Once you have NTP running and the computers' clocks are synchronised,
each component can simply use the local computer time.

Geoff

コメントを投稿するにはログインまたはユーザー登録を行ってください

ダウンロード

最新バージョン : 2.0.1-RELESE

統計

Webサイト統計
ユーザ数:2210
プロジェクト統計
RTコンポーネント307
RTミドルウエア35
ツール22
文書・仕様書2

Choreonoid

モーションエディタ/シミュレータ

OpenHRP3

動力学シミュレータ

OpenRTP

統合開発プラットフォーム

産総研RTC集

産総研が提供するRTC集

TORK

東京オープンソースロボティクス協会

DAQ-Middleware

ネットワーク分散環境でデータ収集用ソフトウェアを容易に構築するためのソフトウェア・フレームワーク