Skip to content

Commit

Permalink
Update footprint iif changed (#4193)
Browse files Browse the repository at this point in the history
Signed-off-by: Brice <brice.renaudeau@gmail.com>
  • Loading branch information
BriceRenaudeau authored and SteveMacenski committed Apr 4, 2024
1 parent 14d73de commit c18a19d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
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 @@ -62,6 +62,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 @@ -283,6 +283,10 @@ nav_msgs::msg::Path SmacPlannerHybrid::createPlan(
}

// 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
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 @@ -243,6 +243,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

0 comments on commit c18a19d

Please sign in to comment.