BehaviorTree / BehaviorTree.ROS2

BehaviorTree.CPP utilities to work with ROS2
Apache License 2.0
144 stars 59 forks source link

Add the ability for ros actions nodes to get access to the action result even on failure #79

Open JayHerpin opened 2 months ago

JayHerpin commented 2 months ago

The current implementation assumes that if the Ros Action is aborted or otherwise fails that the result returned from the action server is not meaningful. However,there are some cases where that is not true. Consider nav2/action/NavgiateThroughPoses which has an error code in the result. That error code is basically only applicable when the action fails!

The proposed implementation maintains API compatibility. If the user cares about the result, they can implement the newly added virtual method.

Note that result is nullopt on any code paths where a result is not available.