Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dead code from navfn planner #1682

Merged
merged 1 commit into from
May 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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