Open3DGen icon indicating copy to clipboard operation
Open3DGen copied to clipboard

compilation error

Open Rothschild-hhu opened this issue 2 years ago • 0 comments

Hello, when I run build.sh on ubuntu18.04, I am getting the following error:

In file included from /home/luosq/Projects/Open3DGen/main.cpp:13:0: /home/luosq/Projects/Open3DGen/src/surface_mesh.h: In member function ‘void stitcher3d::surface::SurfaceMesh::scale(double)’: /home/luosq/Projects/Open3DGen/src/surface_mesh.h:80:47: error: no matching function for call to ‘open3d::geometry::PointCloud::Scale(const double&)’ m_pointcloud->Scale(scaling_factor); ^ In file included from /usr/local/include/Open3D/Open3D.h:60:0, from /home/luosq/Projects/Open3DGen/main.cpp:7: /usr/local/include/Open3D/Geometry/PointCloud.h:76:17: note: candidate: virtual open3d::geometry::PointCloud& open3d::geometry::PointCloud::Scale(double, const Vector3d&) PointCloud &Scale(const double scale, ^~~~~ /usr/local/include/Open3D/Geometry/PointCloud.h:76:17: note: candidate expects 2 arguments, 1 provided In file included from /home/luosq/Projects/Open3DGen/main.cpp:13:0: /home/luosq/Projects/Open3DGen/src/surface_mesh.h:83:41: error: no matching function for call to ‘open3d::geometry::TriangleMesh::Scale(const double&)’ m_mesh->Scale(scaling_factor); ^ In file included from /usr/local/include/Open3D/Geometry/TriangleMesh.h:38:0, from /usr/local/include/Open3D/Visualization/Rendering/Renderer.h:29, from /usr/local/include/Open3D/GUI/Window.h:37, from /usr/local/include/Open3D/Open3D.h:52, from /home/luosq/Projects/Open3DGen/main.cpp:7: /usr/local/include/Open3D/Geometry/MeshBase.h:93:23: note: candidate: virtual open3d::geometry::MeshBase& open3d::geometry::MeshBase::Scale(double, const Vector3d&) virtual MeshBase &Scale(const double scale, ^~~~~ /usr/local/include/Open3D/Geometry/MeshBase.h:93:23: note: candidate expects 2 arguments, 1 provided In file included from /home/luosq/Projects/Open3DGen/main.cpp:13:0: /home/luosq/Projects/Open3DGen/src/surface_mesh.h: In static member function ‘static std::shared_ptrstitcher3d::surface::SurfaceMesh stitcher3d::surface::SurfaceMesh::mesh_from_cameras_and_obj(const std::vector<std::shared_ptrstitcher3d::Camera >&, double, const string&)’: /home/luosq/Projects/Open3DGen/src/surface_mesh.h:96:49: error: no matching function for call to ‘open3d::geometry::PointCloud::Scale(const double&, bool)’ cloud->Scale(pointcloud_scale, false); ^ In file included from /usr/local/include/Open3D/Open3D.h:60:0, from /home/luosq/Projects/Open3DGen/main.cpp:7: /usr/local/include/Open3D/Geometry/PointCloud.h:76:17: note: candidate: virtual open3d::geometry::PointCloud& open3d::geometry::PointCloud::Scale(double, const Vector3d&) PointCloud &Scale(const double scale, ^~~~~ /usr/local/include/Open3D/Geometry/PointCloud.h:76:17: note: no known conversion for argument 2 from ‘bool’ to ‘const Vector3d& {aka const Eigen::Matrix<double, 3, 1>&}’ /home/luosq/Projects/Open3DGen/main.cpp: In function ‘int main(int, char**)’: /home/luosq/Projects/Open3DGen/main.cpp:66:9: error: reference to ‘o3d’ is ambiguous o3d::io::WritePointCloudToPLY(output_path + "/reconstructed_point_cloud.ply", *mesh->get_pointcloud()); ^~~ In file included from /home/luosq/Projects/Open3DGen/src/constants.h:6:0, from /home/luosq/Projects/Open3DGen/src/visualizer.h:6, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/s3d_camera.h:15:23: note: candidates are: namespace o3d = open3d; namespace o3d = open3d; ^ In file included from /home/luosq/Projects/Open3DGen/src/visualizer.h:6:0, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/constants.h:125:27: note: namespace stitcher3d::o3d = open3d; namespace o3d = open3d; ^ /home/luosq/Projects/Open3DGen/main.cpp:75:36: error: parse error in template argument list const auto bbox = std::make_sharedo3d::geometry::OrientedBoundingBox(mesh->get_pointcloud()->GetOrientedBoundingBox().Scale(BOUNDING_BOX_SCALE_FACTOR, true)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/luosq/Projects/Open3DGen/main.cpp:75:170: error: no matching function for call to ‘open3d::geometry::OrientedBoundingBox::Scale(const float&, bool)’ haredo3d::geometry::OrientedBoundingBox(mesh->get_pointcloud()->GetOrientedBoundingBox().Scale(BOUNDING_BOX_SCALE_FACTOR, true)); ^ In file included from /home/luosq/Projects/Open3DGen/main.cpp:1:0: /usr/local/include/Open3D/Geometry/BoundingVolume.h:90:34: note: candidate: virtual open3d::geometry::OrientedBoundingBox& open3d::geometry::OrientedBoundingBox::Scale(double, const Vector3d&) virtual OrientedBoundingBox& Scale(const double scale, ^~~~~ /usr/local/include/Open3D/Geometry/BoundingVolume.h:90:34: note: no known conversion for argument 2 from ‘bool’ to ‘const Vector3d& {aka const Eigen::Matrix<double, 3, 1>&}’ /home/luosq/Projects/Open3DGen/main.cpp:79:13: error: reference to ‘o3d’ is ambiguous o3d::visualization::DrawGeometries({ mesh->get_mesh(), bbox }); ^~~ In file included from /home/luosq/Projects/Open3DGen/src/constants.h:6:0, from /home/luosq/Projects/Open3DGen/src/visualizer.h:6, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/s3d_camera.h:15:23: note: candidates are: namespace o3d = open3d; namespace o3d = open3d; ^ In file included from /home/luosq/Projects/Open3DGen/src/visualizer.h:6:0, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/constants.h:125:27: note: namespace stitcher3d::o3d = open3d; namespace o3d = open3d; ^ /home/luosq/Projects/Open3DGen/main.cpp:88:13: error: reference to ‘o3d’ is ambiguous o3d::visualization::DrawGeometries({ mesh->get_mesh()}); ^~~ In file included from /home/luosq/Projects/Open3DGen/src/constants.h:6:0, from /home/luosq/Projects/Open3DGen/src/visualizer.h:6, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/s3d_camera.h:15:23: note: candidates are: namespace o3d = open3d; namespace o3d = open3d; ^ In file included from /home/luosq/Projects/Open3DGen/src/visualizer.h:6:0, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/constants.h:125:27: note: namespace stitcher3d::o3d = open3d; namespace o3d = open3d; ^ /home/luosq/Projects/Open3DGen/main.cpp:155:17: error: reference to ‘o3d’ is ambiguous o3d::visualization::DrawGeometries({ mesh->get_mesh()}); ^~~ In file included from /home/luosq/Projects/Open3DGen/src/constants.h:6:0, from /home/luosq/Projects/Open3DGen/src/visualizer.h:6, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/s3d_camera.h:15:23: note: candidates are: namespace o3d = open3d; namespace o3d = open3d; ^ In file included from /home/luosq/Projects/Open3DGen/src/visualizer.h:6:0, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/constants.h:125:27: note: namespace stitcher3d::o3d = open3d; namespace o3d = open3d; ^ /home/luosq/Projects/Open3DGen/main.cpp:179:41: error: template argument 1 is invalid std::vectoro3d::geometry::Image textures; ^ /home/luosq/Projects/Open3DGen/main.cpp:179:41: error: template argument 2 is invalid /home/luosq/Projects/Open3DGen/main.cpp:182:22: error: request for member ‘emplace_back’ in ‘textures’, which is of non-class type ‘int’ textures.emplace_back(o3d::geometry::Image()); ^~~~~~~~~~~~ /home/luosq/Projects/Open3DGen/main.cpp:182:35: error: reference to ‘o3d’ is ambiguous textures.emplace_back(o3d::geometry::Image()); ^~~ In file included from /home/luosq/Projects/Open3DGen/src/constants.h:6:0, from /home/luosq/Projects/Open3DGen/src/visualizer.h:6, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/s3d_camera.h:15:23: note: candidates are: namespace o3d = open3d; namespace o3d = open3d; ^ In file included from /home/luosq/Projects/Open3DGen/src/visualizer.h:6:0, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/constants.h:125:27: note: namespace stitcher3d::o3d = open3d; namespace o3d = open3d; ^ /home/luosq/Projects/Open3DGen/main.cpp:184:17: error: reference to ‘o3d’ is ambiguous o3d::io::ReadImage(assets_path + RAY_BLANK_IMG_8K, textures.back()); ^~~ In file included from /home/luosq/Projects/Open3DGen/src/constants.h:6:0, from /home/luosq/Projects/Open3DGen/src/visualizer.h:6, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/s3d_camera.h:15:23: note: candidates are: namespace o3d = open3d; namespace o3d = open3d; ^ In file included from /home/luosq/Projects/Open3DGen/src/visualizer.h:6:0, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/constants.h:125:27: note: namespace stitcher3d::o3d = open3d; namespace o3d = open3d; ^ /home/luosq/Projects/Open3DGen/main.cpp:184:77: error: request for member ‘back’ in ‘textures’, which is of non-class type ‘int’ o3d::io::ReadImage(assets_path + RAY_BLANK_IMG_8K, textures.back()); ^~~~ /home/luosq/Projects/Open3DGen/main.cpp:186:17: error: reference to ‘o3d’ is ambiguous o3d::io::ReadImage(assets_path + RAY_BLANK_IMG_4K, textures.back()); ^~~ In file included from /home/luosq/Projects/Open3DGen/src/constants.h:6:0, from /home/luosq/Projects/Open3DGen/src/visualizer.h:6, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/s3d_camera.h:15:23: note: candidates are: namespace o3d = open3d; namespace o3d = open3d; ^ In file included from /home/luosq/Projects/Open3DGen/src/visualizer.h:6:0, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/constants.h:125:27: note: namespace stitcher3d::o3d = open3d; namespace o3d = open3d; ^ /home/luosq/Projects/Open3DGen/main.cpp:186:77: error: request for member ‘back’ in ‘textures’, which is of non-class type ‘int’ o3d::io::ReadImage(assets_path + RAY_BLANK_IMG_4K, textures.back()); ^~~~ /home/luosq/Projects/Open3DGen/main.cpp:188:17: error: reference to ‘o3d’ is ambiguous o3d::io::ReadImage(assets_path + RAY_BLANK_IMG_2K, textures.back()); ^~~ In file included from /home/luosq/Projects/Open3DGen/src/constants.h:6:0, from /home/luosq/Projects/Open3DGen/src/visualizer.h:6, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/s3d_camera.h:15:23: note: candidates are: namespace o3d = open3d; namespace o3d = open3d; ^ In file included from /home/luosq/Projects/Open3DGen/src/visualizer.h:6:0, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/constants.h:125:27: note: namespace stitcher3d::o3d = open3d; namespace o3d = open3d; ^ /home/luosq/Projects/Open3DGen/main.cpp:188:77: error: request for member ‘back’ in ‘textures’, which is of non-class type ‘int’ o3d::io::ReadImage(assets_path + RAY_BLANK_IMG_2K, textures.back()); ^~~~ /home/luosq/Projects/Open3DGen/main.cpp:192:181: error: invalid initialization of reference of type ‘std::vectoropen3d::geometry::Image&’ from expression of type ‘int’ gpu(DEFAULT_DEPTH_SCALE, pointcloud_world_scale, *mesh, textures, cameras, output_nth, workgroup_size, ray_threshold, reject_blur); ^ In file included from /home/luosq/Projects/Open3DGen/main.cpp:19:0: /home/luosq/Projects/Open3DGen/src/texture_projector.h:40:6: note: in passing argument 4 of ‘void stitcher3d::textures::project_texture_sequence_on_mesh_gpu(float, float, stitcher3d::surface::SurfaceMesh&, std::vectoropen3d::geometry::Image&, std::vector<std::shared_ptrstitcher3d::Camera >, uint32_t, uint32_t, float, float)’ void project_texture_sequence_on_mesh_gpu(const float depth_scale, const float depth_cloud_world_scale, surface::SurfaceMesh& mesh, std::vectoro3d::geometry::Image& textures, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/luosq/Projects/Open3DGen/main.cpp:199:42: error: request for member ‘size’ in ‘textures’, which is of non-class type ‘int’ for (int i = 0; i < textures.size(); i++) ^~~~ /home/luosq/Projects/Open3DGen/main.cpp:200:17: error: reference to ‘o3d’ is ambiguous o3d::io::WriteImage(output_path + "/texture_out_gpu_" + std::to_string(i) + ".png", textures[i]); ^~~ In file included from /home/luosq/Projects/Open3DGen/src/constants.h:6:0, from /home/luosq/Projects/Open3DGen/src/visualizer.h:6, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/s3d_camera.h:15:23: note: candidates are: namespace o3d = open3d; namespace o3d = open3d; ^ In file included from /home/luosq/Projects/Open3DGen/src/visualizer.h:6:0, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/constants.h:125:27: note: namespace stitcher3d::o3d = open3d; namespace o3d = open3d; ^ /home/luosq/Projects/Open3DGen/main.cpp:200:111: error: invalid types ‘int[int]’ for array subscript o3d::io::WriteImage(output_path + "/texture_out_gpu_" + std::to_string(i) + ".png", textures[i]); ^ /home/luosq/Projects/Open3DGen/main.cpp:205:9: error: reference to ‘o3d’ is ambiguous o3d::geometry::Image avg_texture = textures::average_blend_images(textures); ^~~ In file included from /home/luosq/Projects/Open3DGen/src/constants.h:6:0, from /home/luosq/Projects/Open3DGen/src/visualizer.h:6, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/s3d_camera.h:15:23: note: candidates are: namespace o3d = open3d; namespace o3d = open3d; ^ In file included from /home/luosq/Projects/Open3DGen/src/visualizer.h:6:0, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/constants.h:125:27: note: namespace stitcher3d::o3d = open3d; namespace o3d = open3d; ^ /home/luosq/Projects/Open3DGen/main.cpp:214:9: error: reference to ‘o3d’ is ambiguous o3d::io::WriteImage(output_path + "/texture_out_gpu_average.png", avg_texture); ^~~ In file included from /home/luosq/Projects/Open3DGen/src/constants.h:6:0, from /home/luosq/Projects/Open3DGen/src/visualizer.h:6, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/s3d_camera.h:15:23: note: candidates are: namespace o3d = open3d; namespace o3d = open3d; ^ In file included from /home/luosq/Projects/Open3DGen/src/visualizer.h:6:0, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/constants.h:125:27: note: namespace stitcher3d::o3d = open3d; namespace o3d = open3d; ^ /home/luosq/Projects/Open3DGen/main.cpp:214:75: error: ‘avg_texture’ was not declared in this scope o3d::io::WriteImage(output_path + "/texture_out_gpu_average.png", avg_texture); ^~~~~~~~~~~ /home/luosq/Projects/Open3DGen/main.cpp:214:75: note: suggested alternative: ‘textures’ o3d::io::WriteImage(output_path + "/texture_out_gpu_average.png", avg_texture); ^~~~~~~~~~~ textures /home/luosq/Projects/Open3DGen/main.cpp:220:9: error: reference to ‘o3d’ is ambiguous o3d::io::WriteImage(output_path + "/texture_out_gpu_average_dilated.png", avg_texture); ^~~ In file included from /home/luosq/Projects/Open3DGen/src/constants.h:6:0, from /home/luosq/Projects/Open3DGen/src/visualizer.h:6, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/s3d_camera.h:15:23: note: candidates are: namespace o3d = open3d; namespace o3d = open3d; ^ In file included from /home/luosq/Projects/Open3DGen/src/visualizer.h:6:0, from /home/luosq/Projects/Open3DGen/src/surface_mesh.h:12, from /home/luosq/Projects/Open3DGen/main.cpp:13: /home/luosq/Projects/Open3DGen/src/constants.h:125:27: note: namespace stitcher3d::o3d = open3d; namespace o3d = open3d; ^ CMakeFiles/Open3DGen.dir/build.make:81: recipe for target 'CMakeFiles/Open3DGen.dir/main.cpp.o' failed make[2]: *** [CMakeFiles/Open3DGen.dir/main.cpp.o] Error 1 CMakeFiles/Makefile2:94: recipe for target 'CMakeFiles/Open3DGen.dir/all' failed make[1]: *** [CMakeFiles/Open3DGen.dir/all] Error 2 Makefile:102: recipe for target 'all' failed make: *** [all] Error 2

The versions of some dependencies I use are as follows:

Open3D  = 0.10.1
OpenCV & OpenCV_Contrib = 3.4.5
GTSAM = 4.1.1
clang = 12.0.1

Is it caused by the incompatibility of different Open3D versions? Can you give me some advice? or which version are you using?Best regards.

Rothschild-hhu avatar Mar 26 '22 05:03 Rothschild-hhu