Skip to content

Commit a4bba54

Browse files
SteveMacenskiSakshayMahna
authored andcommitted
Halt recovery action when main action succeeds to reset status (ros-navigation#5027)
* Halt recovery action when main action succeeds to reset status Signed-off-by: Steve Macenski <[email protected]> * Update nav2_behavior_tree/plugins/control/recovery_node.cpp Signed-off-by: Steve Macenski <[email protected]> --------- Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: Sakshay Mahna <[email protected]>
1 parent 02c40f0 commit a4bba54

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nav2_behavior_tree/plugins/control/recovery_node.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ BT::NodeStatus RecoveryNode::tick()
5252

5353
case BT::NodeStatus::SUCCESS:
5454
// reset node and return success when first child returns success
55+
// also halt the recovery action as the main action is successful, reset its state
56+
ControlNode::haltChild(1);
5557
halt();
5658
return BT::NodeStatus::SUCCESS;
5759

0 commit comments

Comments
 (0)