Using savePCDFileASCII, PCD file isn't created (no errors though)
Hey guys,
I'm using an XV-11 and IMU to create a 3D sensor_msgs::PointCloud which is successfully advertised on a topic. I want to convert that cloud into a sensor_msgs::PointCloud2 and then pcl::PointCloud. I would also like to convert the intensities into RGB values, but I was having too many problems accessing/editing the rgb values for pcl::PointCloud<pcl::pointxyzrgb>. So, I ended up with this code for just the XYZ values...
sensor_msgs::PointCloud cloud_out;
sensor_msgs::PointCloud2 cloud2_out;
... calculations and unnecessary code omitted
sensor_msgs::convertPointCloudToPointCloud2 (cloud_out, cloud2_out);
pcl::PointCloud<pcl::PointXYZ> pcl_cloud;
pcl::fromROSMsg(cloud2_out, pcl_cloud);
pcl::io::savePCDFileASCII ("test_pcd123.pcd", pcl_cloud);
which compiles and runs without any errors, except that test_pcd123.pcd cannot be found anywhere on my computer. Any ideas on what's going wrong?
When I use std::cerr << "Saved " << pcl_cloud.points.size () << " data points to test_pcd.pcd." << std::endl;
, a correct message of Saved 360 data points to test_pcd.pcd.
is shown