Skip to content

Commit

Permalink
smoother obstacle cost function
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Sep 23, 2024
1 parent 538ec8c commit ee38778
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mrpt_path_planning/src/algos/CostEvaluatorCostMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ CostEvaluatorCostMap::Ptr CostEvaluatorCostMap::FromStaticPointObstacles(
if (d < D)
{
const auto cost =
p.maxCost * std::pow(-0.99999 + 1. / (d / D), 0.1);
p.maxCost * std::pow(-0.99999 + 1. / (d / D), 0.4);
ASSERT_GE_(cost, .0);

double* cell = g.cellByIndex(cx, cy);
Expand All @@ -123,7 +123,8 @@ double CostEvaluatorCostMap::operator()(const MoveEdgeSE2_TPS& edge) const
double cost = .0;
size_t n = 0;

auto lambdaAddPose = [this, &cost, &n](const mrpt::math::TPose2D& p) {
auto lambdaAddPose = [this, &cost, &n](const mrpt::math::TPose2D& p)
{
const auto c = eval_single_pose(p);
ASSERT_GE_(c, .0);

Expand Down

0 comments on commit ee38778

Please sign in to comment.