Skip to content

Commit a8b417b

Browse files
author
Takumi Ito
committed
modify astar for standalone running
move clearNoe() from setMap to makePlan(). Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>
1 parent 987a847 commit a8b417b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

planning/freespace_planning_algorithms/src/astar_search.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,7 @@ AstarSearch::AstarSearch(
129129
void AstarSearch::setMap(const nav_msgs::msg::OccupancyGrid & costmap)
130130
{
131131
AbstractPlanningAlgorithm::setMap(costmap);
132-
133-
clearNodes();
134-
132+
135133
x_scale_ = costmap_.info.height;
136134
graph_.reserve(100000);
137135
}
@@ -142,6 +140,8 @@ bool AstarSearch::makePlan(
142140
start_pose_ = global2local(costmap_, start_pose);
143141
goal_pose_ = global2local(costmap_, goal_pose);
144142

143+
clearNodes();
144+
145145
if (!setStartNode()) {
146146
return false;
147147
}

0 commit comments

Comments
 (0)