Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 25d94f3

Browse files
4swinvesteve
authored andcommittedApr 12, 2024
fix(freespace_planning_algorithms): fix issue of astar search planner not reaching goal pose (#6562)
fix(freespace_planning_algorithms): fix issue of freespace planner not reaching goal pose
1 parent a66b4d4 commit 25d94f3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
 

‎planning/freespace_planning_algorithms/src/astar_search.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,17 @@ void AstarSearch::setPath(const AstarNode & goal_node)
292292
// From the goal node to the start node
293293
const AstarNode * node = &goal_node;
294294

295+
// push exact goal pose first
296+
geometry_msgs::msg::PoseStamped pose;
297+
pose.header = header;
298+
pose.pose = local2global(costmap_, goal_pose_);
299+
300+
PlannerWaypoint pw;
301+
pw.pose = pose;
302+
pw.is_back = node->is_back;
303+
waypoints_.waypoints.push_back(pw);
304+
305+
// push astar nodes poses
295306
while (node != nullptr) {
296307
geometry_msgs::msg::PoseStamped pose;
297308
pose.header = header;

0 commit comments

Comments
 (0)
Please sign in to comment.