Skip to content

PointCloud interface consolidation and various optimizations #1361

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

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

fran6co
Copy link
Contributor

@fran6co fran6co commented Oct 7, 2015

This is a big change and I'm still working on it, but I wanted to get it out there as some other people are working on similar things.
This should supersede #1343 and #1340 and eventually fix #1306.

The end goal of this PR is to replace the std::vector structure of PointCloud to something else that doesn't have the same shortcomings. But there are other issues that this PR will fix:

  • Most of the time width and height are updated manually, by using PointCloud interface the internal state is going to be always valid (Found several places where the PointClouds have invalid width and height)
  • push_back is misused, most of the time the code knows the size of the PointCloud beforehand. push_back should be used only when the size of the PointCloud is not known before processing it
  • PointCloud iteration use cases should be standardized, of course std::vector iterators should be removed and be replaced by PointCloud iterators that are compatible with stl. I have seen direct pointer access (&cloud->points[0]) that should be contemplated by the interface like OpenCV does (a ptr() method should be enough).

Take in account this is work in progress PR, I'm still splitting bigger commits in smaller ones so it can easily reviewed. I'm creating two types of commits: the big ones, that are just search & replace changes, and the rest that fix code or standardize it.

With all these changes points can be made protected (already tried and it compiles just fine).

@taketwo taketwo mentioned this pull request Oct 7, 2015
@fran6co fran6co force-pushed the pointcloud-vector branch 2 times, most recently from 8a4f3f1 to 4e78bf2 Compare October 8, 2015 14:34
@fran6co
Copy link
Contributor Author

fran6co commented Oct 8, 2015

Things to do:

  • There are still some places that use points directly but they need a custom patch
  • The commit "Use PointCloud::operator [] instead of PointCloud::points::operator []" contains some other changes that should be split in additional commits
  • Introduce ptr member to PointCloud and make the code that access the points by pointer use it
  • Make the code that use begin and end from the PointCloud use CloudIterator

@fran6co fran6co force-pushed the pointcloud-vector branch 2 times, most recently from 086701c to 5e8a6a5 Compare October 8, 2015 18:05
@taketwo taketwo mentioned this pull request Oct 11, 2015
7 tasks
@fran6co fran6co force-pushed the pointcloud-vector branch 2 times, most recently from e61dff4 to 25177e4 Compare October 14, 2015 15:35
@fran6co fran6co force-pushed the pointcloud-vector branch 11 times, most recently from 6fa4a2b to bfa6dc6 Compare October 23, 2015 17:41
@fran6co fran6co force-pushed the pointcloud-vector branch 6 times, most recently from 057537d to 0e4a924 Compare November 3, 2015 18:25
@fran6co fran6co force-pushed the pointcloud-vector branch 2 times, most recently from a8b8501 to 6bf3677 Compare November 22, 2015 16:03
@fran6co fran6co force-pushed the pointcloud-vector branch from cae3324 to aafb387 Compare March 9, 2016 22:25
@fran6co fran6co changed the title [WIP] PointCloud interface consolidation and various optimizations PointCloud interface consolidation and various optimizations Mar 9, 2016
@fran6co
Copy link
Contributor Author

fran6co commented Mar 9, 2016

@taketwo I think this can be merged and continue in a different PR the extra interface consolidation task. It's a pain to rebase it everytime something changes.

@SergioRAgostinho SergioRAgostinho added this to the pcl-1.9.0 milestone Aug 22, 2016
@SergioRAgostinho SergioRAgostinho added the needs: more work Specify why not closed/merged yet label Aug 22, 2016
@SergioRAgostinho SergioRAgostinho added status: needs decision and removed needs: more work Specify why not closed/merged yet labels Nov 22, 2017
@SergioRAgostinho SergioRAgostinho removed this from the pcl-1.9.0 milestone Jan 25, 2018
@stale
Copy link

stale bot commented Feb 22, 2020

This pull request has been automatically marked as stale because it hasn't had
any activity in the past 60 days. Commenting or adding a new commit to the
pull request will revert this.

Come back whenever you have time. We look forward to your contribution.

@stale stale bot added the status: stale label Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upstream #1361 commit by commit after discussions
3 participants