Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odometry term using covariance instead of information matrix #38

Open
cy-goh opened this issue Feb 18, 2021 · 0 comments
Open

odometry term using covariance instead of information matrix #38

cy-goh opened this issue Feb 18, 2021 · 0 comments

Comments

@cy-goh
Copy link

cy-goh commented Feb 18, 2021

In track.cpp, you are defining the odometry constraint's noise,

    Matrix3d Ak = Matrix3d::Identity();
    Matrix3d Bk = Matrix3d::Identity();
    Ak.block<2, 1>(0, 2) = Phi_ik * Vector2d(-odork[1], odork[0]);
    Bk.block<2, 2>(0, 0) = Phi_ik;
    Eigen::Map<Matrix3d, RowMajor> Sigmak(preSE2.cov);
    Matrix3d Sigma_vk = Matrix3d::Identity();
    Sigma_vk(0, 0) = (Config::ODO_X_NOISE * Config::ODO_X_NOISE);
    Sigma_vk(1, 1) = (Config::ODO_Y_NOISE * Config::ODO_Y_NOISE);
    Sigma_vk(2, 2) = (Config::ODO_T_NOISE * Config::ODO_T_NOISE);
    Matrix3d Sigma_k_1 = Ak * Sigmak * Ak.transpose() + Bk * Sigma_vk * Bk.transpose();
    Sigmak = Sigma_k_1;

and when loading the graph into g2o at map.cpp, you used covariance instead of information matrix

            Eigen::Map<Eigen::Matrix3d, RowMajor> info(meas.cov);
            addEdgeSE2(optimizer, Vector3D(meas.meas), i, id1, info); 

In my opinion, the following changes should be made

Sigmak = Sigma_k_1.inverse();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant