Skip to content

Commit c24d609

Browse files
committed
fix(freespace_planning_algorithms): fix issue of freespace planner not reaching goal pose
1 parent 56ad4b4 commit c24d609

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)