Skip to content

Commit

Permalink
Merge branch 'main' into reload_xml_master
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Huemer <[email protected]>
  • Loading branch information
huemerj authored Mar 22, 2024
2 parents c897973 + 1ef462e commit d78c0f3
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,13 @@ BtActionServer<ActionT>::BtActionServer(
if (!node->has_parameter("action_server_result_timeout")) {
node->declare_parameter("action_server_result_timeout", 900.0);
}

if (!node->has_parameter("overwrite_xml")) {
node->declare_parameter("overwrite_xml", false);
}
if (!node->has_parameter("wait_for_service_timeout")) {
node->declare_parameter("wait_for_service_timeout", 1000);
}

std::vector<std::string> error_code_names = {
"follow_path_error_code",
Expand Down
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(
_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

0 comments on commit d78c0f3

Please sign in to comment.