|
From: Sebastian R. <seb...@go...> - 2011-01-31 17:45:23
|
Hi,
I am testing a the PlannerInterface.
Setting a goal and driving there is okay (with Stage and Player wavefront driver).
But I never get acknowledged when the goal is done.
My code is as follows:
if (((javaclient3.PlannerInterface) device).isDataReady()) {
// request recent planner data
ppd = ((javaclient3.PlannerInterface) device).getData ();
...
// Check if goal is achieved
if (ppd.getDone() == new Integer(1).byteValue())
isDone = true; // <== IT NEVER REACHES HERE
else
isDone = false;
}
What I see is that in the PlannerInterface needs to be called to update the planner data:
public synchronized void readData (PlayerMsgHdr header) {
...
switch (header.getSubtype ()) {
case PLAYER_PLANNER_DATA_STATE: {
That does happen when the Planner Device is idle, i.e. no goal is set. But as soon as I set a goal
this function is called less and less again until no call at all is made and hence the isDone flag is never set.
I can set a Position in parallel (in the Playernav utility) though and the function comes back to life again.
I am using PlayerClient in PUSH mode.
Why is there no more planner data refresh after setting a goal?
Any suggestions?
Sebastian
|