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

Added callback signal for filename of grabbed pcd file. #1354

Merged
merged 1 commit into from
Oct 7, 2015
Merged

Conversation

hdino
Copy link
Contributor

@hdino hdino commented Oct 2, 2015

While grabbing pcd files it might be helpful to know which file is passed to the callback function. Use cases are (for example):

  1. A device which provides point clouds in lower resolution than 2D images. Currently these 2D images have to be downsampled and stored within the point cloud. If you know which .pcd file is grabbed, one can store the 2D images next to the pcd data, e.g. in png files, and load them accordingly.
  2. Sometimes it is necessary to store additional data, e.g. the exposure time, in addition to the point cloud itself. For that purpose one can create a csv file that corresponds the additional data to the filename of the point cloud.

@taketwo
Copy link
Member

taketwo commented Oct 2, 2015

In my opinion, for the use-cases you listed it may make sense to implement a custom grabber. Of course, it would derive from the PCDGrabber and reuse most of the code. On top of that, it can deal with loading additional PNG, CVS, or whatever.

@hdino
Copy link
Contributor Author

hdino commented Oct 3, 2015

Yes, you're right, for the listed extraordinary use-cases it makes sense to implement a custom grabber. However, since the grabber's implementation is hidden in pcd_grabber.cpp, a custom grabber not compiled at the same time as the PCL wouldn't be able to access its internal parameters (like the currently grabbed file name). Thus, I think it would make sense to add a file-name-getter-method to the PCDGrabberBase's interface in order to avoid duplicated code or the necessity to build the PCL from source. Do you think this could be a practicable way?

@taketwo
Copy link
Member

taketwo commented Oct 5, 2015

Makes sense. And since your changes do not break public API and do not introduce any noticeable overhead for those who are not interested in filenames, I'm in favor of merging this.

@jspricke what's your opinion?

@taketwo
Copy link
Member

taketwo commented Oct 7, 2015

@jspricke I assume you just missed the notification. Can we get your opinion here?

jspricke added a commit that referenced this pull request Oct 7, 2015
Added callback signal for filename of grabbed pcd file.
@jspricke jspricke merged commit fd0546d into PointCloudLibrary:master Oct 7, 2015
@jspricke
Copy link
Member

jspricke commented Oct 7, 2015

sorry, was just too far up in my list ;).

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