Normal Estimation using PCL--Error
Ubuntu12.04 fuerte
When I just add this one line in the code, I am getting the errors given below.
pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> ne;
Full code
void cloud_cb (const sensor_msgs::PointCloud2ConstPtr& cloud) {
sensor_msgs::PointCloud2 cloud_filtered;
// estimate normals
pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal>);
pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> ne;
// Publish the data pub.publish (cloud_filtered);
}
Error:
CMakeFiles/temp3.dir/src/temp3.cpp.o: In function pcl::search::OrganizedNeighbor<pcl::PointXYZ>::setInputCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> const> const&)':
temp3.cpp:(.text._ZN3pcl6search17OrganizedNeighborINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS2_EEEE[pcl::search::OrganizedNeighbor<pcl::PointXYZ>::setInputCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> const> const&)]+0x88): undefined reference to
pcl::search::OrganizedNeighbor<pcl::pointxyz>::estimateFocalLengthFromInputCloud(pcl::PointCloud<pcl::pointxyz> const&)'
temp3.cpp:(.text._ZN3pcl6search17OrganizedNeighborINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS2_EEEE[pcl::search::OrganizedNeighbor<pcl::pointxyz>::setInputCloud(boost::shared_ptr<pcl::pointcloud<pcl::pointxyz> const> const&)]+0xa2): undefined reference to pcl::search::OrganizedNeighbor<pcl::PointXYZ>::generateRadiusLookupTable(unsigned int, unsigned int)'
CMakeFiles/temp3.dir/src/temp3.cpp.o: In function
pcl::search::OrganizedNeighbor<pcl::pointxyz>::setInputCloud(boost::shared_ptr<pcl::pointcloud<pcl::pointxyz> const> const&, boost::shared_ptr<std::vector<int, std::allocator<int=""> > const> const&)':
temp3.cpp:(.text._ZN3pcl6search17OrganizedNeighborINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS2_EEEERKNS5_IKSt6vectorIiSaIiEEEE[pcl::search::OrganizedNeighbor<pcl::pointxyz>::setInputCloud(boost::shared_ptr<pcl::pointcloud<pcl::pointxyz> const> const&, boost::shared_ptr<std::vector<int, std::allocator<int=""> > const> const&)]+0xd8): undefined reference to pcl::search::OrganizedNeighbor<pcl::PointXYZ>::estimateFocalLengthFromInputCloud(pcl::PointCloud<pcl::PointXYZ> const&)'
temp3.cpp:(.text._ZN3pcl6search17OrganizedNeighborINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS2_EEEERKNS5_IKSt6vectorIiSaIiEEEE[pcl::search::OrganizedNeighbor<pcl::PointXYZ>::setInputCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> const> const&, boost::shared_ptr<std::vector<int, std::allocator<int> > const> const&)]+0xf2): undefined reference to
pcl::search::OrganizedNeighbor<pcl::pointxyz>::generateRadiusLookupTable(unsigned int, unsigned int)'
CMakeFiles/temp3.dir/src/temp3.cpp.o:(.rodata._ZTVN3pcl6search17OrganizedNeighborINS_8PointXYZEEE[vtable for pcl::search::OrganizedNeighbor<pcl::pointxyz>]+0x24): undefined reference to pcl::search::OrganizedNeighbor<pcl::PointXYZ>::nearestKSearch(pcl::PointCloud<pcl::PointXYZ> const&, int, int, std::vector<int, std::allocator<int> >&, std::vector<float, std::allocator<float> >&)'
CMakeFiles/temp3.dir/src/temp3.cpp.o:(.rodata._ZTVN3pcl6search17OrganizedNeighborINS_8PointXYZEEE[vtable for pcl::search::OrganizedNeighbor<pcl::PointXYZ>]+0x28): undefined reference to
pcl::search::OrganizedNeighbor<pcl::pointxyz>::nearestKSearch(int, int, std::vector<int, std::allocator<int=""> >&, std::vector<float, std::allocator<float=""> >&)'
CMakeFiles/temp3.dir/src/temp3.cpp.o:(.rodata._ZTVN3pcl6search17OrganizedNeighborINS_8PointXYZEEE[vtable for pcl::search::OrganizedNeighbor<pcl::pointxyz>]+0x30): undefined reference to pcl::search::OrganizedNeighbor<pcl::PointXYZ>::radiusSearch(pcl::PointXYZ const&, double, std::vector<int, std::allocator<int> >&, std::vector<float, std::allocator<float> >&, int) const'
CMakeFiles/temp3.dir/src/temp3.cpp.o:(.rodata._ZTVN3pcl6search17OrganizedNeighborINS_8PointXYZEEE[vtable for pcl::search::OrganizedNeighbor<pcl::PointXYZ>]+0x38): undefined reference to
pcl::search::OrganizedNeighbor<pcl::pointxyz>::radiusSearch(int, double, std::vector<int, std::allocator<int=""> >&, std::vector<float, std::allocator<float=""> >&, int) const'
collect2: ld returned 1 exit status
make[3]: * [../bin/temp3] Error 1