[openrtm-users 01480] Re: nameserver timer?

Geoffrey Biggs geoffrey.biggs @ aist.go.jp
2010年 11月 11日 (木) 08:28:17 JST


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



openrtm-users メーリングリストの案内