pcl_visualization cannot detect .h file
hello all,
I am trying to visualize point cloud information, using the pcl_visualization package from perception_pcl_addons. following is ithe relevant part of the code i am using:
#include <pcl_visualization slash cloud_viewer.h>
void depth_cb(const sensor_msgs::PointCloud2 &cloud2_msg)
{
std::string filename="test_pcd.pcd";
pcl::PointCloud<pcl::PointXYZ> cloud_t_msg;
pcl::fromROSMsg(cloud2_msg,cloud_t_msg);
pcl::io::savePCDFileASCII(filename,cloud_t_msg);
pcl_visualization::CloudViewer viewer("Simple Cloud Viewer");
viewer.showCloud(cloud);
while (!viewer.wasStopped())
{
}
}
(there's a long list of attached files that i'm not mentioning)
here's the error i get - it cannot find cloud_viewer.h eventhough i have confirmed it exists at the proper location in my filesystem.
/home/samarth/kinect_listener/src/listener.cpp:20:44: error: pcl_visualization/cloud_viewer.h: No such file or directory /home/samarth/kinect_listener/src/listener.cpp: In function ‘void depth_cb(const sensor_msgs::PointCloud2&)’: /home/samarth/kinect_listener/src/listener.cpp:69: error: ‘pcl_visualization’ has not been declared /home/samarth/kinect_listener/src/listener.cpp:69: error: expected ‘;’ before ‘viewer’ /home/samarth/kinect_listener/src/listener.cpp:70: error: ‘viewer’ was not declared in this scope make[3]: *** [CMakeFiles/listener.dir/src/listener.o] Error 1 make[3]: Leaving directory `/home/samarth/kinect_listener/build' make[2]: *** [CMakeFiles/listener.dir/all] Error 2 make[2]: Leaving directory `/home/samarth/kinect_listener/build' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/samarth/kinect_listener/build' make: *** [all] Error 2
PS - my ROS_PACKAGE_PATH variable is suitably set. so no problem there.