Concerning the residual printing, I just saw that this is a bug within the pose sensor class, where the value is only stored locally but not written to the residual_ member variable.
Thus thank you for pointing this out, will be providing a fix soon.
@antithing recently pointed out that within the pose sensor class, the calculated residual is not stored within the member variable of the inherited
UpdateSensorAbsClass
: https://github.com/aau-cns/mars_lib/blob/18e9a924733efbb97de76328e1713b13153e9634/source/mars/include/mars/sensors/pose/pose_sensor_class.h#L202-L204Thus an access from outside the update function to the last residual is not possible.
This issue might also effect other sensor classes.
_The issue was originally posted by @mascheiber in https://github.com/aau-cns/mars_lib/issues/9#issuecomment-1695657895_