-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
fixed gicp guess handling #989
Conversation
Does it fix #754 ? |
Yes it does |
Then would you be so kind as to integrate the test unit as well? |
I took a look into the commit and it looks weird. The bunny test cloud is just 0.1m size. Why is the test giving a (20, -8, 1) to challenge it? |
@VictorLamoine any comments? I think you are the original author of that line. |
I used a very big distance to make sure that one iteration could not get close to a perfect alignment. |
I tried this PR against that test case and it failed:
Looking inside the code, I found it rather strange how the final transformation matrix is computed: final_transformation_.topLeftCorner (3,3) = previous_transformation_.topLeftCorner (3,3) * guess.topLeftCorner (3,3);
final_transformation_(0,3) = previous_transformation_(0,3) + guess(0,3);
final_transformation_(1,3) = previous_transformation_(1,3) + guess(1,3);
final_transformation_(2,3) = previous_transformation_(2,3) + guess(2,3); Though if replaced with matrix multiplication, the final fitness score only increases. |
I did some experiments but still havn't get final conclusion yet. One un-confirmed observation is:
I don't know why this happen. But it may be the reason for this test case to fail, which is not related to the input guess. Also, I noticed that the second registration should not re-use the first gicp instance, as some member variables seem not re-initialized. @taketwo I agree that the |
I got the testcase passed when by setting |
I think this deserves a little bit of cleaning but otherwise the problem is solved right? |
@VictorLamoine I think so |
#1147
|
cdb15df
to
5bc058e
Compare
// final_transformation_.topLeftCorner (3,3) = previous_transformation_.topLeftCorner (3,3) * guess.topLeftCorner (3,3); | ||
// final_transformation_(0,3) = previous_transformation_(0,3) + guess(0,3); | ||
// final_transformation_(1,3) = previous_transformation_(1,3) + guess(1,3); | ||
// final_transformation_(2,3) = previous_transformation_(2,3) + guess(2,3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason for keeping these commented? Why not simply remove them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for some reason the static equivalent methode raises an error
I am not sure what this means. Maybe a Eigen template problem at some versions, but anyway I am removing these comments.
Note: incorporated changes from #972 |
@prclibo Can you clean up the commit so that we can incorporate it in 1.8.1? Thank you |
Also, please squash your last 4 commits into a single one, basically only the commits in which you're the corresponding author. |
@SergioRAgostinho OK I am newbie to rebase and I think I messed it up=( Any suggestions?
|
Whoops! This never happened to me before. Here's some options based on Google's first results. |
Another idea:
|
Backup your work first (create an other branch) 😉 |
…to reveal the error
further fix gicp tests and gicp final_transformation computation noted by @taketwo removed unused code Author: Bo Li
@SergioRAgostinho @VictorLamoine thanks for the help! It seems fixed and I hope I didn't miss anything. |
Denote final transformation result Y=X_guess. Gicp should either 1) optimize X from identity by comparing guess_source and target or 2) optimize Y starting from X by comparing source and target. Current GICP code messes these two approaches. In
computeTransformation
, it usesbase_transformation_ = guess
as the start of the optimization but useoutput = guess * source
as the source cloud.This PR fixed it to approach 1).