BtActionNode does not crash bt_navigator upon timing out when calling action server#2377
Closed
paucarre wants to merge 6 commits intoros-navigation:foxy-develfrom
Closed
BtActionNode does not crash bt_navigator upon timing out when calling action server#2377paucarre wants to merge 6 commits intoros-navigation:foxy-develfrom
paucarre wants to merge 6 commits intoros-navigation:foxy-develfrom
Conversation
added 2 commits
May 28, 2021 15:59
Member
|
This fails to build on CI and the developer has not been responsive on the ticket comments #2376 to finding a solution. I am closing this PR but definitely open to continuing the conversation and reopening it if there is a response. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Basic Info
Description of contribution in a few bullet points
BtActionNodes do not crashBT enginenorros2 nodesholding them, as when there is a problem when calling anaction serveraBT::NodeStatus::FAILUREis returned instead of throwing an exception.BtActionNodefails, it is able to run a recovery mechanism, integral inBTframework.ros2 daemonis no longer corrupted being unable to discoverbt_navigatorros2 nodeafter relaunchaction serversDescription of documentation updates required from your changes
Future work that may be required in bullet points
return BT::NodeStatus::FAILURE+log errorinstead of throwing an exception forBT nodesBT Nodescan fail, and are meant to allow this, using recovery actions as mechanism resolve these situations. For that, theBT Enginedoes need theBT Nodeto return aBT::NodeStatus::FAILURE. Throwing exceptions, will break all the recovery mechanisms the BT provide as theros2 nodeandbt enginewill be compromised. See also next point below for details.tick()I have seen BT Nodes that when compulsory inputs are not provided, the node crashes in the constructor at runtime. This will not only crash the whole
BT engineandros2 node, but there is actually nothing wrong at all by aBT Nodenot having values for compulsory inputs during class constructor. These inputs can be published on theblackboardby otherbt nodes( for instance theSetBlackboardnode). This will take place after the node construction.It is therefore not meaningful to get values of inputs in the constructor as it's in the
tick()method when they shall be loaded.BT Nodesdo not necessarily have static inputs, they are dynamic by design by means of using theblackboard.Whether a
BT Nodehas compulsory inputs is a check that needs to be done in thetick()method. And then there is the question as to what to do when these are not provided. From my POV a nice error log together with returning aBT::NodeStatus::FAILUREis the right way to do it (not crashing the wholebt_navigatorusing exceptions).For Maintainers: