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 native sensor_msgs::PointCloud2 support without conversion #9

Open
wants to merge 2 commits into
base: hydro-devel
Choose a base branch
from

Conversation

spuetz
Copy link

@spuetz spuetz commented Jul 19, 2015

Since the conversion from PointCloud2 to PointCloud and back for assembling the clouds is bad, I added a native sensor_msgs::PointCloud2 support without conversion. I also added an organized mode, to assemble PointClouds2 to an organized PointCloud2.

sensor_msgs::convertPointCloud2ToPointCloud(scan_in, cloud_in);
tf_->transformPointCloud(fixed_frame_id, cloud_in, cloud_out) ;
return ;
pcl_ros::transformPointCloud(fixed_frame_id, cloud_in, cloud_out, *tf_);
Copy link
Contributor

Choose a reason for hiding this comment

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

@vrabaud
Copy link
Contributor

vrabaud commented Jul 19, 2015

overall very useful, thank you. It will probably take use a few days to get through the code. I believe some code should be part of the base class (as private lightweight functions). E.g., all that code is duplicated for PointCloud and PointCloud2:

if (field->offset != this->scan_hist_[start_index].fields[chan_ind].offset){

Please have only one function for those (like a function that return analyses two different PointFields)

@vrabaud
Copy link
Contributor

vrabaud commented Aug 2, 2015

@spuetz , any comments on that ?

@spuetz
Copy link
Author

spuetz commented Aug 24, 2015

@vrabaud, I added the method hasEqualScanHeader to check the headers. as recommended by you. Additionally, I fixed the down-sampling for the organized mode.

@spuetz
Copy link
Author

spuetz commented Sep 24, 2015

@vrabaud, would be nice, if we can complete this pull request and merge it. thx

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