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

WIP constraints with precision matrix #5

Open
wants to merge 13 commits into
base: knight
Choose a base branch
from

Conversation

catskul
Copy link

@catskul catskul commented Nov 20, 2019

No description provided.

@catskul catskul added the WIP Work in Progress label Nov 20, 2019
@catskul catskul force-pushed the feat-precision-matrix-for-constraints branch from 4face2d to af3711a Compare November 22, 2019 22:01
@catskul catskul requested a review from ajakhotia November 27, 2019 20:09
@catskul
Copy link
Author

catskul commented Nov 27, 2019

About to push a bunch of changes so might make sense to wait on review.

@catskul
Copy link
Author

catskul commented Nov 27, 2019

I'll have to clean up that history before cartographer people would accept.

@catskul
Copy link
Author

catskul commented Nov 27, 2019

I remembered that cartographer used to have a weight matrix but dumped it a long time ago. It appears they were using if or a different purpose though the original paper appears to endorse the use of covariance in the constraint for improved accuracy.

https://github.com/googlecartographer/cartographer/pull/309/files
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.231.1772&rep=rep1&type=pdf

auto row_major_jacobian = Eigen::Matrix<double, Eigen::Dynamic, 3, Eigen::RowMajor>(point_cloud.size(), 4);
auto jacobianPtr = row_major_jacobian.data(); // for use to create fake array of jacobians

costFunction->Evaluate(parameter_blocks.data(), residuals.data(), &jacobianPtr);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not of any concern here, but there is also problem.Evaluate method that can populate residuals and jacobians using the final solution. FYI

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't use that one because the problem still has the seed in it. As far as I've read removing a cost function can mess up the jacobians.

ceres::Solver::Summary unused_summary;
Eigen::Matrix3d seedless_precision;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May consider initializing to zeros here. Ceres also uses sparse matrices(sometimes) and depending on the implementation, there may be a condition in which the Evaluate may only assign to the non-zero entries of the matrix leaving garbage value for the zero entries.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. Good catch. Will do.

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

Successfully merging this pull request may close these issues.

2 participants