Skip to content
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

fix(freespace_planning_algorithms): fix issue of astar search planner not reaching goal pose #6562

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions planning/freespace_planning_algorithms/src/astar_search.cpp
Original file line number Diff line number Diff line change
@@ -292,6 +292,17 @@ void AstarSearch::setPath(const AstarNode & goal_node)
// From the goal node to the start node
const AstarNode * node = &goal_node;

// push exact goal pose first
geometry_msgs::msg::PoseStamped pose;
pose.header = header;
pose.pose = local2global(costmap_, goal_pose_);

PlannerWaypoint pw;
pw.pose = pose;
pw.is_back = node->is_back;
waypoints_.waypoints.push_back(pw);

// push astar nodes poses
while (node != nullptr) {
geometry_msgs::msg::PoseStamped pose;
pose.header = header;