Skip to content

Commit

Permalink
Remove start clear (ros-navigation#4418)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMacenski authored and Marc-Morcos committed Jul 4, 2024
1 parent 6bbca65 commit 6184e68
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
6 changes: 0 additions & 6 deletions nav2_smac_planner/include/nav2_smac_planner/a_star.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,6 @@ class AStarAlgorithm
inline void populateExpansionsLog(
const NodePtr & node, std::vector<std::tuple<float, float, float>> * expansions_log);

/**
* @brief Clear Start
*/
void clearStart();


bool _traverse_unknown;
int _max_iterations;
int _max_on_approach_iterations;
Expand Down
16 changes: 0 additions & 16 deletions nav2_smac_planner/src/a_star.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,6 @@ bool AStarAlgorithm<NodeT>::areInputsValid()
}

// Note: We do not check the if the start is valid because it is cleared
clearStart();

return true;
}

Expand Down Expand Up @@ -484,20 +482,6 @@ unsigned int & AStarAlgorithm<NodeT>::getSizeDim3()
return _dim3_size;
}

template<>
void AStarAlgorithm<Node2D>::clearStart()
{
auto coords = Node2D::getCoords(_start->getIndex());
_costmap->setCost(coords.x, coords.y, nav2_costmap_2d::FREE_SPACE);
}

template<typename NodeT>
void AStarAlgorithm<NodeT>::clearStart()
{
auto coords = NodeT::getCoords(_start->getIndex(), _costmap->getSizeInCellsX(), getSizeDim3());
_costmap->setCost(coords.x, coords.y, nav2_costmap_2d::FREE_SPACE);
}

// Instantiate algorithm for the supported template types
template class AStarAlgorithm<Node2D>;
template class AStarAlgorithm<NodeHybrid>;
Expand Down

0 comments on commit 6184e68

Please sign in to comment.