HKUST-Aerial-Robotics / VINS-Mono

A Robust and Versatile Monocular Visual-Inertial State Estimator
GNU General Public License v3.0
5.02k stars 2.1k forks source link

Question about Marginalization factor's residual #160

Open guofengw opened 6 years ago

guofengw commented 6 years ago

I found that in your MarginalizationFactor, the residual computing in the Evaluate function is like below: Eigen::Map(residuals, n) = marginalization_info->linearized_residuals + marginalization_info->linearized_jacobians * dx;

But if i just set Eigen::Map(residuals, n) = dx, it is also OK! Even set the residuals equal to 0 is also OK!

This confuse me a bit, so my question is that how is your residual figure out? could you give some details about this part? Thank you!

qintonguav commented 6 years ago

I guess you test it with EuRoC dataset.

In EuRoC, the measurements are of high quality. Even if you don't use marginalization factor, it can also achieve a good performance only in a local window without any history information.

If you use other general data, you may know the effect of marginalization factor.

stihuangyuan commented 6 years ago

@qintonguav @guofengw if existing parameter after marginalization global size not equal local size, when compute prior error, do we need to compute jacobian as linearized_jacobians * derivative local by global?