You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
haltTree resets the tree status to IDLE which then in the tickRoot only breaks out of the inner loop, which is then restarted by the outer loop
NodeStatus Tree::tickRoot(TickOption opt, std::chrono::milliseconds sleep_time)
{
...
// Always run if IDLEwhile (status == NodeStatus::IDLE ||
(opt == TickOption::WHILE_RUNNING && status == NodeStatus::RUNNING))
{
...
// Inner loop. The previous tick might have triggered the wake-up// in this case, unless TickOption::EXACTLY_ONCE, we tick againwhile( opt != TickOption::EXACTLY_ONCE &&
status == NodeStatus::RUNNING &&
wake_up_->waitFor(std::chrono::milliseconds(0)) )
{
status = rootNode()->executeTick();
// Due to halt tree status is now IDLE, normal exiting operation would be SUCCESS or FAIL
}
...
}
return status;
}
The text was updated successfully, but these errors were encountered:
I agree and, funny coincidence, I was thinking about that this morning. But of course, since tickWhileRunning is blocking, the only way you can call haltTree is in another thread.
But I should cover this case!
About returning FAILED... that is another problem, since FAILING and HALTING are two different concepts.
I will address this in the next release. Fell free to suggest a PR if you have an idea
Yeah I understand is a pretty major API change, and that is why I originally suggested FAILED instead, but I also get your point that it is not each node that failed, (and can imagine could induce nasty side effects), so that status is only really relevant for the root node
haltTree
resets the tree status toIDLE
which then in thetickRoot
only breaks out of the inner loop, which is then restarted by the outer loopThe text was updated successfully, but these errors were encountered: