Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class AnalyticExpansion
* @brief Sets the collision checker and costmap to use in expansion validation
* @param collision_checker Collision checker to use
*/
void setCollisionChecker(GridCollisionChecker * & collision_checker);
void setCollisionChecker(GridCollisionChecker * collision_checker);

/**
* @brief Attempt an analytic path completion
Expand Down
2 changes: 1 addition & 1 deletion nav2_smac_planner/src/analytic_expansion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ AnalyticExpansion<NodeT>::AnalyticExpansion(

template<typename NodeT>
void AnalyticExpansion<NodeT>::setCollisionChecker(
GridCollisionChecker * & collision_checker)
GridCollisionChecker * collision_checker)
{
_collision_checker = collision_checker;
}
Expand Down
1 change: 1 addition & 0 deletions nav2_smac_planner/src/collision_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ void GridCollisionChecker::setFootprint(
return;
}

oriented_footprints_.clear();
oriented_footprints_.reserve(angles_.size());
double sin_th, cos_th;
geometry_msgs::msg::Point new_pt;
Expand Down
4 changes: 4 additions & 0 deletions nav2_smac_planner/src/smac_planner_hybrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ nav_msgs::msg::Path SmacPlannerHybrid::createPlan(
}

// Set collision checker and costmap information
_collision_checker.setFootprint(
Comment thread
BriceRenaudeau marked this conversation as resolved.
_costmap_ros->getRobotFootprint(),
_costmap_ros->getUseRadius(),
findCircumscribedCost(_costmap_ros));
_a_star->setCollisionChecker(&_collision_checker);

// Set starting point, in A* bin search coordinates
Expand Down
4 changes: 4 additions & 0 deletions nav2_smac_planner/src/smac_planner_lattice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ nav_msgs::msg::Path SmacPlannerLattice::createPlan(
std::unique_lock<nav2_costmap_2d::Costmap2D::mutex_t> lock(*(_costmap->getMutex()));

// Set collision checker and costmap information
_collision_checker.setFootprint(
_costmap_ros->getRobotFootprint(),
_costmap_ros->getUseRadius(),
findCircumscribedCost(_costmap_ros));
_a_star->setCollisionChecker(&_collision_checker);

// Set starting point, in A* bin search coordinates
Expand Down