Closed AlexandreLaborde closed 2 months ago
Hey @AlexandreLaborde , I've tried it and was not able to reproduce this issue, albeit on ARM MacOS. The following minimal example runs without any issues for me:
#include <string>
#include <iostream>
#include "open3d/io/PointCloudIO.h"
int main(int argc, char *argv[]) {
const std::string path = "../test.pcd";
const std::string format = "pcd";
std::cout << path << std::endl;
std::shared_ptr<open3d::geometry::PointCloud> pcl = open3d::io::CreatePointCloudFromFile(path, format);
return 0;
}
Since the warning indicates empty strings have been passed as filepath and format, are you sure that both contain the correct data the moment you call CreatePointCloudFromFile(..)
?
Thanks for helping me sort this out. Everything is okay with the file since I can open it in other programs. In fact if I add a new method the open3d library that loads the same file it works without any issues. But If pass the path as a parameter it does not work.
I am very confident that is a windows only issue as it appears a bit left behind compared to the linux version. At the moment its not even possible to build the library without modifying several files.
I ran your code to illustrate what happens.
The interesting part is that depending on how the path is described I seem to get different errors.
Finally found out the solution! Visual Studio does not like when the DLL you are importing is built for Release and you are consuming it in a application in Debug mode. I built open3d in Debug and it works now.
Checklist
main
branch).Describe the issue
I built the C++ version of the library for windows and appears to working well, except I cannot pass strings to methods. This can be seen for instance when loading a point cloud from a file. The call occurs fine but the strings with filename and format are broken so it fails to load the files.
I modified the open3d code and hardcode the path it loads the data without issues so the issue is related to passing the string to function 🤷
This issue even prevents the logger from printing data.
Can anyone please shine some ideas on this weird issue ?
Steps to reproduce the bug
Error message
[Open3D DEBUG] Format File [Open3D WARNING] Read geometry::PointCloud failed: unknown file extension for (format: ).
Expected behavior
No response
Open3D, Python and System information
Additional information
No response