Skip to content

Commit

Permalink
Improving stability of action feedback (ros-navigation#4225)
Browse files Browse the repository at this point in the history
* Improving stability of feedback

* Adding Nsv through poses
  • Loading branch information
SteveMacenski authored and Quasi Developers committed Oct 22, 2024
1 parent 81ffb4e commit 96f546c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion nav2_bt_navigator/src/navigators/navigate_through_poses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ NavigateThroughPosesNavigator::onLoop()
try {
// Get current path points
nav_msgs::msg::Path current_path;
res = blackboard->get(path_blackboard_id_, current_path);
if (!blackboard->get(path_blackboard_id_, current_path) || current_path.poses.size() == 0u) {
// If no path set yet or not meaningful, can't compute ETA or dist remaining yet.
throw std::exception();
}

// Find the closest pose to current pose on global path
auto find_closest_pose_idx =
Expand Down
5 changes: 4 additions & 1 deletion nav2_bt_navigator/src/navigators/navigate_to_pose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ NavigateToPoseNavigator::onLoop()
try {
// Get current path points
nav_msgs::msg::Path current_path;
[[maybe_unused]] auto res = blackboard->get(path_blackboard_id_, current_path);
if (!blackboard->get(path_blackboard_id_, current_path) || current_path.poses.size() == 0u) {
// If no path set yet or not meaningful, can't compute ETA or dist remaining yet.
throw std::exception();
}

// Find the closest pose to current pose on global path
auto find_closest_pose_idx =
Expand Down

0 comments on commit 96f546c

Please sign in to comment.