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

Add IncrementalICP #1202

Merged
merged 2 commits into from
Apr 14, 2015
Merged

Add IncrementalICP #1202

merged 2 commits into from
Apr 14, 2015

Conversation

v4hn
Copy link
Contributor

@v4hn v4hn commented Apr 1, 2015

This is a standard use of ICP and in this lab we've implemented it
at least three times (probably more often...). To avoid having to think
about which way to multiply the delta with the old transform
and to clean up a bit of code, I propose to merge this into PCL to
use it directly.

@jspricke
Copy link
Member

jspricke commented Apr 2, 2015

Hi v4hn, could you please adopt this to the style guide (spaces in front of parenthesis)..
Otherwise +1 from me.

@v4hn v4hn force-pushed the incremental_icp branch 3 times, most recently from d9299e5 to 9da16cd Compare April 2, 2015 13:13
@v4hn
Copy link
Contributor Author

v4hn commented Apr 2, 2015 via email

registerCloud (const PointCloudConstPtr& cloud, const Matrix4& delta_estimate = Matrix4::Identity ());

/** \brief Get estimated transform between the last two registered clouds */
inline Matrix4
Copy link
Member

Choose a reason for hiding this comment

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

Do not return fixed-size vectorizable Eigen objects by value. Rather add an output (reference) argument. Same for the other function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know this is a common pattern in PCL,
but it also makes usage more cumbersome imho.

Where the explicit return of the type allows to write
'''f( iicp.getDeltaTransform() )'''
your version requires
'''Matrix4 delta; iicp.getDeltaTransform(delta); f( delta )'''
We're talking about 64 bytes of data here, which might
have to be copied once iff the compiler ignores the
inline keyword and needs the explicit return value.

If you require it, I can change it,
but I consider this to be premature optimization.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I put the wrong link, this one was intended.

passing fixed-size vectorizable Eigen objects by value is not only inefficient, it can be illegal or make your program crash

Yes, usage is more cumbersome, but I would not neglect the possibility of producing a program that may crash ;)

Copy link
Contributor Author

@v4hn v4hn Apr 13, 2015 via email

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

AFAIK compilers may or may not respect the inline keyword, it is only a hint to the compiler.

I didn't look at how the interface is defined in other registration classes. Since there is such a big body of code that is implemented this way, and since there are no problems reported so far, I'd say let's keep this way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On Mon, Apr 13, 2015 at 02:34:00PM -0700, Sergey Alexandrov wrote:

I'd say let's keep this way.

Ok, that should be it then. Thanks again for your feedback.

I'll go to bed then and hope to see this merged soon as @JochenSp
already gave his +1.

Michael Görner added 2 commits April 13, 2015 22:58
I'm pretty sure many people implemented that over and over again up to now...
This simplifies the code and gives a good example for using the class
@v4hn v4hn force-pushed the incremental_icp branch from 9da16cd to a0d306d Compare April 13, 2015 20:58
@taketwo
Copy link
Member

taketwo commented Apr 13, 2015

@jspricke No more comments from my side, please merge if you think it's ready.

jspricke added a commit that referenced this pull request Apr 14, 2015
@jspricke jspricke merged commit 061f793 into PointCloudLibrary:master Apr 14, 2015
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

Successfully merging this pull request may close these issues.

3 participants