Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion nav2_navfn_planner/src/navfn_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,9 @@ NavfnPlanner::getPlanFromPotential(

planner_->setStart(map_goal);

int path_len = planner_->calcPath(costmap_->getSizeInCellsX() * 4);
const int& max_cycles = (costmap_->getSizeInCellsX() >= costmap_->getSizeInCellsY()) ? (costmap_->getSizeInCellsX() * 4) : (costmap_->getSizeInCellsY() * 4);
Comment thread
justinIRBT marked this conversation as resolved.
Outdated

int path_len = planner_->calcPath(max_cycles);
if (path_len == 0) {
return false;
}
Expand Down