1 #include "pcl/pcl_base.h" 3 #include "jsk_pcl_ros/color_converter.h" 6 #include <sensor_msgs/PointCloud2.h> 8 void callback(
const sensor_msgs::PointCloud2::ConstPtr&
msg)
10 pcl::PointCloud<pcl::PointHSV>
cloud;
12 for (
size_t i = 0; i < cloud.points.size(); i++)
15 std::cout <<
"h: " << point.hue <<
"s: " << point.saturation
16 <<
"v: " << point.value << std::endl;
20 int main(
int argc,
char** argv)
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void fromROSMsg(const sensor_msgs::PointCloud2 &cloud, pcl::PointCloud< T > &pcl_cloud)
ROSCPP_DECL void spin(Spinner &spinner)
void callback(const sensor_msgs::PointCloud2::ConstPtr &msg)
int main(int argc, char **argv)