neka-nat/cupoch

Is it possible to use Open3D and Cupoch together?

Closed this issue · 3 comments

Hello,

I tried to use Open3d and Cupoch together side-by-side for comparison. But got something redefined error. Here is my code

auto pcd_gpu = cupoch::io::CreatePointCloudFromFile("pcd1.pcd"); auto pcd = open3d::io::CreatePointCloudFromFile("pcd1.pcd");

Here is the error messages

image

Anyway to solve this issue?

Thank you!

Hi @1939938853 ,

Thank you for the reporting.
It sounds like a problem with fmt and tinyobjloader libraries.
I think the following issues are related to the tinyobjeloader one.
tinyobjloader/tinyobjloader#171
I didn't find any related issues with fmt.

It looks that we need to manually modify the header files of both fmt and tinyobjloader.

By the way, what is the suggestion for best covert Open3D 3D data to Cupoch and vice versa. static_cast or via the eigenvector?

Thank you!

The open3d point cloud is a std::vector.
By contrast, cupoch is a thrust::device_vector.
It can be copied by the assignment operator.
https://stackoverflow.com/questions/43982841/how-to-copy-host-vector-to-device-vector-by-thrust

open3d::geometry::PointCloud pcd_cpu;
// Initialize pcd_cpu...
cupoch::geometry::PointCloud pcd_gpu;
pcd_gpu.points_ = pcd_cpu.points_;