Skip to content

Commit

Permalink
fix(autoware_probabilistic_occupancy_grid_map): fix functionConst (#8289
Browse files Browse the repository at this point in the history
)

fix:functionConst

Signed-off-by: kobayu858 <[email protected]>
  • Loading branch information
kobayu858 authored Aug 4, 2024
1 parent 19a1550 commit f3dfbaf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,17 @@ struct dempsterShaferOccupancy
}

// calc conflict factor K
double calcK(const dempsterShaferOccupancy & other)
double calcK(const dempsterShaferOccupancy & other) const
{
return (occupied * other.empty + empty * other.occupied);
}
// calc sum of occupied probability mass
double calcOccupied(const dempsterShaferOccupancy & other)
double calcOccupied(const dempsterShaferOccupancy & other) const
{
return occupied * other.occupied + occupied * other.unknown + unknown * other.occupied;
}
// calc sum of empty probability mass
double calcEmpty(const dempsterShaferOccupancy & other)
double calcEmpty(const dempsterShaferOccupancy & other) const
{
return empty * other.empty + empty * other.unknown + unknown * other.empty;
}
Expand Down Expand Up @@ -240,7 +240,7 @@ struct dempsterShaferOccupancy
}

// get occupancy probability via Pignistic Probability
double getPignisticProbability() { return occupied + unknown / 2.0; }
double getPignisticProbability() const { return occupied + unknown / 2.0; }
};

/**
Expand Down

0 comments on commit f3dfbaf

Please sign in to comment.