Filter PCL2 Data [closed]
Hey,
I know that this is probably one of the most easiest question ever asked.
How do I get the Type of the points published in sensor_msgs::pointcloud2?
The idea is to write my own filter and I suppose the code will look like that:
/* Code Skeleton for Ros-Node, with input as PCL::Pointcloud<T> */
for(point<T> point in input::Points)
{
if(!(point::_z<2))
{ point::_z=0;
point::_x=0;
point::_y=0;
}
}
/* Publish processed data */
I know, that it is not the best idea to simply put the coordinates of the points to 0,0,0 :-)
edit:
According to the wiki it is velodyne_pointcloud::PointXYZIR which means I have to change
for(point<T> point in input::Points)
to
for(velodyne_pointcloud::PointXYZIR point in input::Points)
right?