Skip to content

adding the fixes for navigate through poses terminating pre-maturely #5203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

padhupradheep
Copy link
Member

@padhupradheep padhupradheep commented May 28, 2025


Basic Info

Info Please fill out this column
Ticket(s) this addresses #4304
Primary OS tested on Ubuntu
Robotic platform tested on (Steve's Robot, gazebo simulation of Tally, hardware turtlebot)
Does this PR contain AI generated software? (no)

Description of contribution in a few bullet points

Thanks to @anath93 for the contribution.

This still needs to be tested.

Description of documentation updates required from your changes

Description of how this change was tested


Future work that may be required in bullet points

For Maintainers:

  • Check that any new parameters added are updated in docs.nav2.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists

Signed-off-by: Pradheep <[email protected]>
@padhupradheep padhupradheep marked this pull request as draft May 28, 2025 15:23
Copy link

codecov bot commented May 28, 2025

Codecov Report

Attention: Patch coverage is 96.87500% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...avigator/src/navigators/navigate_through_poses.cpp 91.66% 1 Missing ⚠️
Files with missing lines Coverage Δ
...bt_navigator/navigators/navigate_through_poses.hpp 100.00% <ø> (ø)
.../nav2_bt_navigator/navigators/navigate_to_pose.hpp 100.00% <ø> (ø)
...2_bt_navigator/src/navigators/navigate_to_pose.cpp 84.84% <100.00%> (+1.51%) ⬆️
...ller/include/nav2_controller/controller_server.hpp 100.00% <ø> (ø)
nav2_controller/src/controller_server.cpp 85.64% <100.00%> (+0.24%) ⬆️
...avigator/src/navigators/navigate_through_poses.cpp 88.39% <91.66%> (+0.15%) ⬆️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't think this really works. What happens if the final goal is literally the same pose as an intermediary pose? There would be not difference in the angle.

I think something like what was done in #4789 is the better approach by not just looking at the pose, but also the path related to that pose. Generally speaking, I think this can be closed, this approach is not viable and the reworks would be essentially a ground-up restart. If we want to work on something like this, it should be via building on or completing #4789

@@ -137,6 +144,15 @@ NavigateThroughPosesNavigator::goalCompleted(
result->waypoint_statuses = std::move(waypoint_statuses);
}

inline double createYawFromQuat(const geometry_msgs::msg::Quaternion & orientation)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tf2 Utils has a function that does this getYaw

Comment on lines +203 to +205
if (curr_dist < curr_min_dist &&
abs(orient_diff) < orient_angle_rad)
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (curr_dist < curr_min_dist &&
abs(orient_diff) < orient_angle_rad)
{
if (curr_dist < curr_min_dist && abs(orient_diff) < orient_angle_rad) {

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]() {
[&current_pose, &current_path, &orient_angle_rad]() {
size_t closest_pose_idx = 0;
double curr_min_dist = std::numeric_limits<double>::max();
for (size_t curr_idx = 0; curr_idx < current_path.poses.size(); ++curr_idx) {
double curr_dist = nav2_util::geometry_utils::euclidean_distance(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead we could check for the distance not just on XY but XY,Yaw so it would be 3D.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants