Skip to content

Commit

Permalink
setStatus(BT::NodeStatus::IDLE) removed (ros-navigation#1602)
Browse files Browse the repository at this point in the history
the removed code has no effect at all: the status of a node will be its returned value!.

In general, you never set your status to IDLE, unless halted.
  • Loading branch information
facontidavide authored Mar 20, 2020
1 parent 951a2bb commit 19e5b41
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,12 @@ class BtActionNode : public BT::CoroActionNode
switch (result_.code) {
case rclcpp_action::ResultCode::SUCCEEDED:
on_success();
setStatus(BT::NodeStatus::IDLE);
return BT::NodeStatus::SUCCESS;

case rclcpp_action::ResultCode::ABORTED:
setStatus(BT::NodeStatus::IDLE);
return BT::NodeStatus::FAILURE;

case rclcpp_action::ResultCode::CANCELED:
setStatus(BT::NodeStatus::IDLE);
return BT::NodeStatus::SUCCESS;

default:
Expand Down

0 comments on commit 19e5b41

Please sign in to comment.