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

Cache whether an update performs a shift, and expose a method to determi... #944

Merged
merged 1 commit into from
Oct 8, 2014

Conversation

mbarriault
Copy link
Contributor

Cache whether an update performs a shift, and expose a method to determine after an update if a shift occurred.

We needed a method to reliably determine if a cube shift occurred, and while there is a checkForShift method in CyclicalBuffer, the call in KinfuTracker::operator() depends on arguments constructed in the method immediately before. To get around this, we can simply cache the result of CyclicalBuffer::checkForShift in operator(), and expose a method to return it.

@@ -235,6 +235,13 @@ namespace pcl
PCL_WARN("ICP is %s\n", !disable_icp_?"ENABLED":"DISABLED");
}

/** \brief Return whether the last update resulted in a shift */
bool
hasShifted ()
Copy link
Member

Choose a reason for hiding this comment

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

Typically we inline and const-qualify getter functions.

@mbarriault
Copy link
Contributor Author

Updated based on these notes.

@taketwo
Copy link
Member

taketwo commented Oct 8, 2014

Thanks. Could you please squash? Then I'll merge.

@mbarriault
Copy link
Contributor Author

Done.

taketwo added a commit that referenced this pull request Oct 8, 2014
Cache whether an update performs a shift, and expose a method to determi...
@taketwo taketwo merged commit 9e98d4f into PointCloudLibrary:master Oct 8, 2014
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.

2 participants