Created
April 30, 2018 11:34
-
-
Save Kyungpyo-Kim/8e2b3b34334fa956c5bac26fc60bdb7c to your computer and use it in GitHub Desktop.
PCL, ROS, pcl to ros msg
This file contains 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
void loam_wrapper::publishInput(pcl::PointCloud<pcl::PointXYZHSV>::Ptr pc) | |
{ | |
sensor_msgs::PointCloud2 pc2; | |
pcl::toROSMsg(*pc, pc2); | |
pc2.header.stamp = ros::Time().now(); | |
pc2.header.frame_id = "/world"; | |
publishInput(pc2); | |
} | |
/* Reference | |
/* https://github.com/adrelino/loam_velodyne-1/blob/master/src/loam/loam_wrapper.cpp | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pcl::toROSMsg(*pc, pc2); 를 하면 header 값이 초기화 된다.
The header is initialized after the transform pcl::toROSMsg().