Skip to content

Commit

Permalink
fix NavigateToPose onLoop current_path blackboard existance logic (ro…
Browse files Browse the repository at this point in the history
…s-navigation#4341)

Make it consistent with NavigateThroughPoses.
This was introduced when changing logic to remove
internal exception.

Signed-off-by: Mike Wake <[email protected]>
  • Loading branch information
aosmw committed Sep 13, 2024
1 parent 42a2cf8 commit 446a60d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nav2_bt_navigator/src/navigators/navigate_to_pose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ NavigateToPoseNavigator::onLoop()

// Get current path points
nav_msgs::msg::Path current_path;
[[maybe_unused]] auto res = blackboard->get(path_blackboard_id_, current_path);
if (current_path.poses.size() > 0u) {
auto res = blackboard->get(path_blackboard_id_, current_path);
if (res && current_path.poses.size() > 0u) {
// Find the closest pose to current pose on global path
auto find_closest_pose_idx =
[&current_pose, &current_path]() {
Expand Down

0 comments on commit 446a60d

Please sign in to comment.