Skip to content

Commit f3dfbaf

Browse files
authored
fix(autoware_probabilistic_occupancy_grid_map): fix functionConst (#8289)
fix:functionConst Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
1 parent 19a1550 commit f3dfbaf

File tree

1 file changed

+4
-4
lines changed
  • perception/autoware_probabilistic_occupancy_grid_map/lib/fusion_policy

1 file changed

+4
-4
lines changed

Diff for: perception/autoware_probabilistic_occupancy_grid_map/lib/fusion_policy/fusion_policy.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -202,17 +202,17 @@ struct dempsterShaferOccupancy
202202
}
203203

204204
// calc conflict factor K
205-
double calcK(const dempsterShaferOccupancy & other)
205+
double calcK(const dempsterShaferOccupancy & other) const
206206
{
207207
return (occupied * other.empty + empty * other.occupied);
208208
}
209209
// calc sum of occupied probability mass
210-
double calcOccupied(const dempsterShaferOccupancy & other)
210+
double calcOccupied(const dempsterShaferOccupancy & other) const
211211
{
212212
return occupied * other.occupied + occupied * other.unknown + unknown * other.occupied;
213213
}
214214
// calc sum of empty probability mass
215-
double calcEmpty(const dempsterShaferOccupancy & other)
215+
double calcEmpty(const dempsterShaferOccupancy & other) const
216216
{
217217
return empty * other.empty + empty * other.unknown + unknown * other.empty;
218218
}
@@ -240,7 +240,7 @@ struct dempsterShaferOccupancy
240240
}
241241

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

246246
/**

0 commit comments

Comments
 (0)