Skip to content

Commit

Permalink
Remove dead code from navfn planner (#1682)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMacenski committed May 5, 2020
1 parent e7ad135 commit b2c1661
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions nav2_navfn_planner/src/navfn_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,39 +273,6 @@ NavfnPlanner::smoothApproachToGoal(
plan.poses.push_back(goal_copy);
}

bool
NavfnPlanner::computePotential(const geometry_msgs::msg::Point & world_point)
{
// make sure to resize the underlying array that Navfn uses
planner_->setNavArr(
costmap_->getSizeInCellsX(),
costmap_->getSizeInCellsY());

planner_->setCostmap(costmap_->getCharMap(), true, allow_unknown_);

unsigned int mx, my;
if (!worldToMap(world_point.x, world_point.y, mx, my)) {
return false;
}

int map_start[2];
map_start[0] = 0;
map_start[1] = 0;

int map_goal[2];
map_goal[0] = mx;
map_goal[1] = my;

planner_->setStart(map_start);
planner_->setGoal(map_goal);

if (use_astar_) {
return planner_->calcNavFnAstar();
}

return planner_->calcNavFnDijkstra();
}

bool
NavfnPlanner::getPlanFromPotential(
const geometry_msgs::msg::Pose & goal,
Expand Down

0 comments on commit b2c1661

Please sign in to comment.