|
From: Hector C. <hec...@gm...> - 2016-02-25 22:35:11
|
Dear PLEXIL support team,
I have been working for few months in the implementation in the control
layer of an autonomous farming robot. I already implemented an adapter to
connect a Plexil’s plan with the robot’s hardware, and it worked great.
However, today I’m facing a problem with the Wait action. I have some
actions that should perform periodically, so, based on the documentation
and examples included in the ‘temporal’ folder, I included an action that
is repeated every N seconds. The problem: the action is repeated a
different number of times each time it’s executed. Some times the plan is
completed, and sometimes the plan execution get stuck in a ‘Wait’ execution:
[Node:transition]Transitioning 'Wait__3' from INACTIVE to WAITING at
1456438554.29645 <//1456438554.29645>
[Node:transition]Transitioning 'Wait__3' from WAITING to EXECUTING at
1456438554.29645 <//1456438554.29645>
[Node:clock]Node 'Wait__3' started at 1456438554.29645 <//1456438554.29645>
<— Execution stuck indefinitely
I wrote this basic plan to analyse the problem:
Command pprint (...);
CountIteration:
{
Boolean continue=true;
Duration delay = Duration ("PT0.5S");
Duration tolerance = Duration ("PT0.1S");
Integer stepsCount=0;
PeriodicIteration:
{
Repeat continue;
stepsCount=stepsCount+1;
pprint ("steps Performed: ", stepsCount);
Sequence{
Delay:{
Wait (delay*2),tolerance;
}
ConditionallyEndIteration:
{
Skip stepsCount<20;
continue = false;
pprint ("Ending periodic iteration");
}
}
}
}
In my test environment (Mac OSX / Plexil 4.0.1), only sometimes the plan is
finished. Most of the times, the plan get stuck randomly at different
points (stepsCount=2, stepsCount=9…).
Could you please tell me… am I doing something wrong?… Any advice is really
welcome!
Sincerely yours,
Héctor Cadavid
|