-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pcl::PCDReader::read] Could not find file . #6132
Comments
My best guess would be that you mix debug and release libraries. How do you build your code? Do you use CMake? Also, please post the output and error message as text, not as a screenshot. At least then I can put it into a translator, to get the message in English. |
Thank you for your reply. I didn't use CMake, I just wrote the code and compiled it directly through Visual Studio 2022. [pcl::PCDReader::read] Could not find file '`笓'. C:\Users\WANGBO\Desktop\point_cloud_registration\x64\Debug\point_cloud_registration.exe (进程 35420)已退出,代码为 -1 (0xffffffff)。 |
So it seems like you are building your code in debug configuration. Did you check whether the libraries you link (especially the PCL libraries) are the debug version, not the release version? I would strongly recommend to use CMake because it takes care of these things. |
Sorry, I'm not familiar with VS yet, can you tell me how to set it to debug or realease version? |
https://learn.microsoft.com/en-us/visualstudio/debugger/how-to-set-debug-and-release-configurations?view=vs-2022 |
@BoBoINVICTUS Did that help? Can this issue be closed? |
Closing due to no response. I am going to assume then that switching the build configuration solved the problem. |
My code is as follows:
typedef pcl::PointCloudpcl::PointXYZ pointcloud;
pointcloud::Ptr source(new pointcloud);
pointcloud::Ptr target(new pointcloud);
if (pcl::io::loadPCDFilepcl::PointXYZ("1.pcd", *source) == -1) {
PCL_ERROR("Couldn't read file 1.pcd \n");
return -1;
}
pcl::io::loadPCDFilepcl::PointXYZ("1.pcd", *source);
pcl::io::loadPCDFilepcl::PointXYZ("2.pcd", *target);
It compiles, but the following error occurs when reading the PCD file:
I tried to change to an absolute path, but I still couldn't read the PCD file. Can you tell me why?
The text was updated successfully, but these errors were encountered: