fix(pcl_ros): preserve all fields in combined_pointcloud_to_pcd#528
Open
kubojion wants to merge 1 commit into
Open
fix(pcl_ros): preserve all fields in combined_pointcloud_to_pcd#528kubojion wants to merge 1 commit into
kubojion wants to merge 1 commit into
Conversation
Replace pcl::PointCloud<pcl::PointXYZ>/pcl::PointXYZRGB accumulators with pcl::PCLPointCloud2 so all fields (intensity, ring, timestamps, etc.) are preserved, consistent with the approach in pointcloud_to_pcd (ros-perception#491). - Use pcl::PCLPointCloud2::concatenate for safe accumulation with schema validation; skip clouds with mismatched fields/endianness - Skip clouds when fixed_frame TF fails to avoid silently mixing frames - Mark rgb parameter as deprecated no-op (all fields preserved automatically) - Propagate is_dense as logical AND across accumulated clouds - Add pcl_ros_tf linkage; use pcl_ros::transformPointCloud, removing the inline typed transform helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
combined_pointcloud_to_pcdwas accumulating clouds into typedpcl::PointCloud<pcl::PointXYZ>/pcl::PointCloud<pcl::PointXYZRGB>containers, silently dropping all extra fields (intensity, ring,
timestamps, custom fields, etc.) on every incoming message.
This applies the same approach used in
pointcloud_to_pcdsince #491:replace the typed accumulators with a single
pcl::PCLPointCloud2soall fields are preserved as-is.
The TF transform path also needed to change: typed
clouds allowed manual Eigen loops over
.points, which is not possiblewith
PCLPointCloud2. The fix usespcl_ros::transformPointCloud(sameas
pointcloud_to_pcd). With per-cloud TF, failing silently and fallingback to the original frame would mix coordinate frames in the output, so
the node now skips the cloud and logs a warning instead.
Other changes:
pcl::PCLPointCloud2::concatenatereplaces manual buffer append,adding schema validation (skips cloudds with mismatched fields or endianness)
rgbparameter is kept but marked deprecatedis_densepropagated as logical AND across accumulated cloudspcl_ros_tfadded to link dependencies;tf2_eigenand directtf2_rosremoved (transitively provided bypcl_ros_tf)"combined_"was producingcombined_combined_*.pcdrclcpp::shutdown()no longer called from destructor (passed viado_shutdownflag to avoid UB)