Skip to content

Commit

Permalink
planner_cspace: fix goal unreachable condition (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
at-wat authored Mar 18, 2021
1 parent 2272cf0 commit 0f64e30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion planner_cspace/src/planner_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,9 @@ class Planner3dNode
}
const Astar::Vec s_rough(s[0], s[1], 0);

if (cost_estim_cache_[s_rough] == std::numeric_limits<float>::max())
// If goal gets occupied, cost_estim_cache_ is not updated to reduce
// computational cost for clearing huge map. In this case, cm_[e] is 100.
if (cost_estim_cache_[s_rough] == std::numeric_limits<float>::max() || cm_[e] >= 100)
{
status_.error = planner_cspace_msgs::PlannerStatus::PATH_NOT_FOUND;
ROS_WARN("Goal unreachable.");
Expand Down

0 comments on commit 0f64e30

Please sign in to comment.