bayes-filters-lib
bayes-filters-lib copied to clipboard
Cannot call non-cost methods from `predictedMeasure` of `MeasurementModel` class
Hi all,
I implemented a class that inherits from the MeasurementModel class, so I have my own implementation of the method predictedMeasure https://github.com/robotology/bayes-filters-lib/blob/6dd9c397cfc2615819bb1cb3431cf931dddf3cf8/src/BayesFilters/include/BayesFilters/MeasurementModel.h#L38 but I cannot call non-cost methods inside being the method predictedMeasure const.
I don't find a solution to this problem and I'm opening this issue to ask if it is possible to make the method predictedMeasure non-const, or if anyone has a different solution. Thank you.
cc @xEnVrE
Hi @isorrentino,
thanks for pointing this out.
The original idea behind this choice is that the predictedMeasure method should evaluate, more or less like a pure function, the value of the measurement function $h(x)$ given the state $x$ without side effects.
Can you better describe the use case such that we can maybe find an alternative solution? Thank you