Skip to content

Commit cd16a80

Browse files
TakumItoTakumi Ito
and
Takumi Ito
authored
chore(freespace_planning_algorithm): modify A* script for standalone running (#7070)
* modify astar for standalone running move clearNoe() from setMap to makePlan(). Signed-off-by: Takumi Ito <takumi.ito@tier4.jp> * small modification Signed-off-by: Takumi Ito <takumi.ito@tier4.jp> * run pre-commit Signed-off-by: Takumi Ito <takumi.ito@tier4.jp> --------- Signed-off-by: Takumi Ito <takumi.ito@tier4.jp> Co-authored-by: Takumi Ito <takumi.ito@tier4.jp>
1 parent dabf104 commit cd16a80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

planning/autoware_freespace_planning_algorithms/src/astar_search.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,7 @@ void AstarSearch::setMap(const nav_msgs::msg::OccupancyGrid & costmap)
131131
{
132132
AbstractPlanningAlgorithm::setMap(costmap);
133133

134-
clearNodes();
135-
136134
x_scale_ = costmap_.info.height;
137-
graph_.reserve(100000);
138135
}
139136

140137
bool AstarSearch::makePlan(
@@ -143,6 +140,9 @@ bool AstarSearch::makePlan(
143140
start_pose_ = global2local(costmap_, start_pose);
144141
goal_pose_ = global2local(costmap_, goal_pose);
145142

143+
clearNodes();
144+
graph_.reserve(100000);
145+
146146
if (!setStartNode()) {
147147
return false;
148148
}

0 commit comments

Comments
 (0)