Skip to content

Commit

Permalink
SMAC Planner: Treating "inscribed" costs not as collision anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-schulz committed Jul 20, 2021
1 parent 21a44bc commit 6f3437d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions nav2_costmap_2d/src/footprint_collision_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ double FootprintCollisionChecker<CostmapT>::footprintCost(const Footprint footpr
y0 = y1;

// if in collision, no need to continue
if (footprint_cost == static_cast<double>(INSCRIBED_INFLATED_OBSTACLE) ||
footprint_cost == static_cast<double>(LETHAL_OBSTACLE))
{
if (footprint_cost == static_cast<double>(LETHAL_OBSTACLE)) {
return footprint_cost;
}
}
Expand All @@ -101,9 +99,7 @@ double FootprintCollisionChecker<CostmapT>::lineCost(int x0, int x1, int y0, int
}

// if in collision, no need to continue
if (line_cost == static_cast<double>(INSCRIBED_INFLATED_OBSTACLE) ||
line_cost == static_cast<double>(LETHAL_OBSTACLE))
{
if (line_cost == static_cast<double>(LETHAL_OBSTACLE)) {
return line_cost;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class GridCollisionChecker
}

// if occupied or unknown and not to traverse unknown space
return footprint_cost_ >= INSCRIBED;
return footprint_cost_ >= OCCUPIED;
} else {
// if radius, then we can check the center of the cost assuming inflation is used
footprint_cost_ = costmap_->getCost(
Expand Down

0 comments on commit 6f3437d

Please sign in to comment.