Skip to content

Commit

Permalink
fixes the issue when the decorator goes to idle state (ros-navigation…
Browse files Browse the repository at this point in the history
…#4300)

Signed-off-by: PRP <padhupradheep@gmail.com>
Signed-off-by: enricosutera <enricosutera@outlook.com>
  • Loading branch information
padhupradheep authored and enricosutera committed May 19, 2024
1 parent 6b5aa28 commit c3a19d8
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,11 @@ inline BT::NodeStatus PathLongerOnApproach::tick()
getInput("prox_len", prox_len_);
getInput("length_factor", length_factor_);

if (!BT::isStatusActive(status())) {
// Reset the starting point since we're starting a new iteration of
// PathLongerOnApproach (moving from IDLE to RUNNING)
first_time_ = true;
if (first_time_ == false) {
if (old_path_.poses.back() != new_path_.poses.back()) {
first_time_ = true;
}
}

setStatus(BT::NodeStatus::RUNNING);

// Check if the path is updated and valid, compare the old and the new path length,
Expand Down

0 comments on commit c3a19d8

Please sign in to comment.