TimerComponent

Hi,

I would like to use the TimerComponent in my state machine. I looked at the
API and saw different methods, commands that all seem to do the same thing.

I however can't find out how to use it. Is there somewhere some extra
information on how to use the TimerComponent?

I already tried the command wait, but it does not seem to be executed:

wait(1,1.0)
Got :wait(1,1.0)

In Task Timer[R]. (Status of last Command : queued )
(type 'ls' for context info) :

The Status does not change into busy or true or anything, if i try to execute
a second command i get:

In Task Timer[R]. (Status of last Command : queued )
(type 'ls' for context info) :wait(1,2.0)
Got :wait(1,2.0)
Warning : previous command is not yet processed by Processor.

My component is running however. I am missing something here, I just don't
know what.

Ruben

TimerComponent

On Wednesday 11 February 2009 14:26:07 Ruben Smits wrote:
> Hi,
>
> I would like to use the TimerComponent in my state machine. I looked at the
> API and saw different methods, commands that all seem to do the same thing.
>
> I however can't find out how to use it. Is there somewhere some extra
> information on how to use the TimerComponent?
>
> I already tried the command wait, but it does not seem to be executed:
>
> wait(1,1.0)
> Got :wait(1,1.0)
>
> In Task Timer[R]. (Status of last Command : queued )
> (type 'ls' for context info) :
>
> The Status does not change into busy or true or anything, if i try to
> execute a second command i get:
>
> In Task Timer[R]. (Status of last Command : queued )
> (type 'ls' for context info) :wait(1,2.0)
> Got :wait(1,2.0)
> Warning : previous command is not yet processed by Processor.

That is a bug. the command did not get processed because the Timer::loop()
function never returns into updateHook(). In essence, the TimerComponent can
not process commands nor events. So wait and waitFor are useless (until this
is fixed). The other functions (methods) should work, but you have to subscribe
to the timeout event of the TimerComponent.

Peter

Ruben Smits's picture

TimerComponent

If anyone is interested, I attached a deployer configuration file (test.xml) and
orocos statemachine script (FSM.osd) that shows how to use the TimerComponent
in a statemachine.

If the attached FSM is activated, it will go to the final state after 10 s.

Ruben

On Wednesday 11 February 2009 14:43:05 Peter Soetens wrote:
> On Wednesday 11 February 2009 14:26:07 Ruben Smits wrote:
> > Hi,
> >
> > I would like to use the TimerComponent in my state machine. I looked at
> > the API and saw different methods, commands that all seem to do the same
> > thing.
> >
> > I however can't find out how to use it. Is there somewhere some extra
> > information on how to use the TimerComponent?
> >
> > I already tried the command wait, but it does not seem to be executed:
> >
> > wait(1,1.0)
> > Got :wait(1,1.0)
> >
> > In Task Timer[R]. (Status of last Command : queued )
> > (type 'ls' for context info) :
> >
> > The Status does not change into busy or true or anything, if i try to
> > execute a second command i get:
> >
> > In Task Timer[R]. (Status of last Command : queued )
> > (type 'ls' for context info) :wait(1,2.0)
> > Got :wait(1,2.0)
> > Warning : previous command is not yet processed by Processor.
>
> That is a bug. the command did not get processed because the Timer::loop()
> function never returns into updateHook(). In essence, the TimerComponent
> can not process commands nor events. So wait and waitFor are useless (until
> this is fixed). The other functions (methods) should work, but you have to
> subscribe to the timeout event of the TimerComponent.
>
> Peter
> --
> Peter Soetens -- FMTC -- <http://www.fmtc.be>

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm