Skip to content

Commit

Permalink
chore(freespace_planning_algorithm): modify A* script for standalone …
Browse files Browse the repository at this point in the history
…running (autowarefoundation#7070)

* modify astar for standalone running
move clearNoe() from setMap to makePlan().

Signed-off-by: Takumi Ito <[email protected]>

* small modification

Signed-off-by: Takumi Ito <[email protected]>

* run pre-commit

Signed-off-by: Takumi Ito <[email protected]>

---------

Signed-off-by: Takumi Ito <[email protected]>
Co-authored-by: Takumi Ito <[email protected]>
  • Loading branch information
TakumIto and Takumi Ito authored Jul 4, 2024
1 parent dabf104 commit cd16a80
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,7 @@ void AstarSearch::setMap(const nav_msgs::msg::OccupancyGrid & costmap)
{
AbstractPlanningAlgorithm::setMap(costmap);

clearNodes();

x_scale_ = costmap_.info.height;
graph_.reserve(100000);
}

bool AstarSearch::makePlan(
Expand All @@ -143,6 +140,9 @@ bool AstarSearch::makePlan(
start_pose_ = global2local(costmap_, start_pose);
goal_pose_ = global2local(costmap_, goal_pose);

clearNodes();
graph_.reserve(100000);

if (!setStartNode()) {
return false;
}
Expand Down

0 comments on commit cd16a80

Please sign in to comment.