Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMAC Planner: Treating "inscribed" costs not as collision anymore #2464

Merged
merged 1 commit into from
Jul 20, 2021
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
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