Motion buffer corner case
That's the outcome of a discussion between @jsola and Elena (intern at pal). It seems that if the motion buffer size is less than 2 then the covariance matrix is singular, hence the need for a little perturbation.
Merge request reports
Activity
@jsola Can you please review, since I wasn't there I'm not 100% sure to grasp the whole issue/fix.
added 1 commit
- 8a15ccd3 - avoid singular matrix from small motion buffer
I cannot merge this PR for the following reason:
The constant
0.0001
in linestd::abs(0.0001*_data(0))*Eigen::MatrixXs::Identity(delta_cov_size_,delta_cov_size_);
is hardcoded. Instead, this value should be read from a YAML file, via one over these two options:- a sigma value specific of the sensor, in
SensorOdom2DParams.yaml
, which is transferred to the processor at (1.a) installation time (seeProblem.installProcessor()
) or at (1.b) construction time. - a sigma value specific of the processor, in
ProcessorOdom2DParams.yaml
.
The sigma values are then used as in e.g.
non_meas_noise_var = non_meas_noise_std^2 // this can be done at construction time
std::abs(non_meas_noise_var*_data(0))*Eigen::MatrixXs::Identity(delta_cov_size_,delta_cov_size_);
We've had already several issues with hardcoded covariances matrix in wolf. Normally, they have been put there to avoid singularity in a number of situations. But it's never a good idea to have hardcoded values because when the application changes they might be not well suited.
Please see if you can improve on this. A new comment here and I will have it a second look.
Edited by Joan Solà Ortega- a sigma value specific of the sensor, in
I am checking the options to fix this MR
@artivis , is this MR associated to files you did not submit to wolf for any reason? I have to change the API for the
ProcessorOdom2D
class to add an extra parameter.