Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Adding unit test for PnP solver #170

Merged
merged 2 commits into from
Nov 14, 2019
Merged

Adding unit test for PnP solver #170

merged 2 commits into from
Nov 14, 2019

Conversation

MikiyaShibuya
Copy link
Collaborator

The current PnP solver takes care of coordinates or some vector as arrays.
So, I will replace them to Eigen::Vectors.

Firstly, I added a unit test to check if the solver estimates camera-pose correctly.

Copy link
Collaborator

@shinsumicco shinsumicco left a comment

Choose a reason for hiding this comment

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

Thank you for the helpful PR!!
We'd like to enhance test codes for the convenience of SLAM learners.

Could you check my comments and give me your thoughts?

else
return x;
}
double angle_of_rot(const Mat33_t& rot) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can be replaced with norm of converter::to_angle_axis(rot) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is possible. I missed that function.

Comment on lines 49 to 50
cv::KeyPoint kp;
keypts.push_back(kp);
Copy link
Collaborator

@shinsumicco shinsumicco Nov 13, 2019

Choose a reason for hiding this comment

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

Can be replaced as follows?

        keypts.emplace_back(cv::KeyPoint{});

And could you insert the comment which states the default value of octave contained in cv::KeyPoint is 0 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, your suggestion is more efficient.

@shinsumicco shinsumicco marked this pull request as ready for review November 13, 2019 10:03
@MikiyaShibuya MikiyaShibuya changed the title PnP solver code refactoring which replaces array to Eigen::Vector Adding unit test for PnP solver Nov 13, 2019
Copy link
Collaborator

@shinsumicco shinsumicco left a comment

Choose a reason for hiding this comment

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

Thank you for making the revisions.
Could you remove the unused function if you don't plan on using it in the future?


using namespace openvslam;

double clamp(const double x, const double min_val, const double max_val) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This function is not used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The function is no longer used. I removed it.

@shinsumicco
Copy link
Collaborator

LGTM. Thanks!

@shinsumicco shinsumicco merged commit a0bdf71 into xdspacelab:develop Nov 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants