pcl::PassThrough<sensor_msgs::PointCloud2> generates error
Hi,
when I create a PCL Passtrough Filter object (pcl::PassThrough) in a simple code fragment
#include "ros/ros.h"
#include <sensor_msgs/PointCloud2.h>
#include <pcl/filters/passthrough.h>
int main(int argc, char **argv)
{
ros::init(argc, argv, "PointCloud2Filter");
ros::NodeHandle n;
pcl::PassThrough<sensor_msgs::PointCloud2> pass;
return 0;
}
I get the following error message while compilation on my system (Kubuntu 12.10, ROS Hydro, PCL 1.7)
In file included from /usr/include/pcl-1.7/pcl/point_cloud.h:50:0,
from /usr/include/pcl-1.7/pcl/pcl_base.h:53,
from /usr/include/pcl-1.7/pcl/filters/filter.h:43,
from /usr/include/pcl-1.7/pcl/filters/filter_indices.h:43,
from /usr/include/pcl-1.7/pcl/filters/passthrough.h:43,
from /home/zug/Workspace/ROS-Projects/RoboMix/src/PointCloudToImage.cpp:4:
/usr/include/pcl-1.7/pcl/point_traits.h: In instantiation of ‘struct pcl::traits::fieldList<sensor_msgs::PointCloud2_<std::allocator<void> > >’:
/usr/include/pcl-1.7/pcl/filters/passthrough.h:86:61: required from ‘class pcl::PassThrough<sensor_msgs::PointCloud2_<std::allocator<void> > >’
/home/zug/Workspace/ROS-Projects/RoboMix/src/PointCloudToImage.cpp:11:46: required from here
/usr/include/pcl-1.7/pcl/point_traits.h:152:12: error: invalid use of incomplete type ‘struct pcl::traits::fieldList<sensor_msgs::PointCloud2_<std::allocator<void> > >’
/usr/include/pcl-1.7/pcl/point_traits.h:152:12: error: declaration of ‘struct pcl::traits::fieldList<sensor_msgs::PointCloud2_<std::allocator<void> > >’
/usr/include/pcl-1.7/pcl/point_traits.h:158:7: error: no matching function for call to ‘assertion_failed(mpl_::failed************ (pcl::traits::fieldList<sensor_msgs::PointCloud2_<std::allocator<void> > >::POINT_TYPE_NOT_PROPERLY_REGISTERED::************)(sensor_msgs::PointCloud2_<std::allocator<void> >&))’
What's wrong? Thanks for your help!
Sebastian