tum-vision / tandem

[CoRL 21'] TANDEM: Tracking and Dense Mapping in Real-time using Deep Multi-view Stereo
912 stars 146 forks source link

cnpy error when i install #45

Closed GY56723-debug closed 1 year ago

GY56723-debug commented 1 year ago

when i run make -j i got :

what should i do to fix it?


/home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp: In member function 'Vec6 CudaCoarseTracker::calcRes(const Eigen::Matrix<double, 4, 4>&, float, const Vector2d&, float)': /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:218:64: error: no matching function for call to 'npy_save(const char [25], float [6], )' 218 | cnpy::npy_save("cct_data/nfxfyaffLLb.npy", nfxfyaffLLb, {6}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:218:64: note: candidate expects 6 arguments, 3 provided 218 | cnpy::npy_save("cct_data/nfxfyaffLLb.npy", nfxfyaffLLb, {6}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:221:87: error: no matching function for call to 'npy_save(const char [48], float [6], )' 221 | cnpy::npy_save("cct_data/setting_huberTH_maxEnergy_cutoffTH.npy", nfxfyaffLLb, {3}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:221:87: note: candidate expects 6 arguments, 3 provided 221 | cnpy::npy_save("cct_data/setting_huberTH_maxEnergy_cutoffTH.npy", nfxfyaffLLb, {3}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:223:79: error: no matching function for call to 'npy_save(const char [30], float&, )' 223 | cnpy::npy_save("cct_data/refToNew_Ki_host.npy", refToNew_Ki_host, {16 + 9}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:223:79: note: candidate expects 6 arguments, 3 provided 223 | cnpy::npy_save("cct_data/refToNew_Ki_host.npy", refToNew_Ki_host, {16 + 9}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:227:65: error: no matching function for call to 'npy_save(const char [18], float&, )' 227 | cnpy::npy_save("cct_data/pc_u.npy", buf, {(unsigned long) n}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:227:65: note: candidate expects 6 arguments, 3 provided 227 | cnpy::npy_save("cct_data/pc_u.npy", buf, {(unsigned long) n}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:230:65: error: no matching function for call to 'npy_save(const char [18], float&, )' 230 | cnpy::npy_save("cct_data/pc_v.npy", buf, {(unsigned long) n}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:230:65: note: candidate expects 6 arguments, 3 provided 230 | cnpy::npy_save("cct_data/pc_v.npy", buf, {(unsigned long) n}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:233:70: error: no matching function for call to 'npy_save(const char [23], float&, )' 233 | cnpy::npy_save("cct_data/pc_idepth.npy", buf, {(unsigned long) n}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:233:70: note: candidate expects 6 arguments, 3 provided 233 | cnpy::npy_save("cct_data/pc_idepth.npy", buf, {(unsigned long) n}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:236:69: error: no matching function for call to 'npy_save(const char [22], float&, )' 236 | cnpy::npy_save("cct_data/pc_color.npy", buf, {(unsigned long) n}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:236:69: note: candidate expects 6 arguments, 3 provided 236 | cnpy::npy_save("cct_data/pc_color.npy", buf, {(unsigned long) n}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:241:74: error: no matching function for call to 'npy_save(const char [19], float&, )' 241 | cnpy::npy_save("cct_data/dInew.npy", buf, {(unsigned long) 3 w h}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:241:74: note: candidate expects 6 arguments, 3 provided 241 | cnpy::npy_save("cct_data/dInew.npy", buf, {(unsigned long) 3 w h}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp: In member function 'void CudaCoarseTracker::calcG(Eigen::Matrix<double, 8, 8>&, Eigen::Matrix<double, 8, 1>&, float, const Vector2d&)': /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:290:64: error: no matching function for call to 'npy_save(const char [25], float [6], )' 290 | cnpy::npy_save("cct_data/nfxfyaffLLb.npy", nfxfyaffLLb, {6}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:290:64: note: candidate expects 6 arguments, 3 provided 290 | cnpy::npy_save("cct_data/nfxfyaffLLb.npy", nfxfyaffLLb, {6}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:294:69: error: no matching function for call to 'npy_save(const char [22], float&, )' 294 | cnpy::npy_save("cct_data/pc_color.npy", buf, {(unsigned long) n}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:294:69: note: candidate expects 6 arguments, 3 provided 294 | cnpy::npy_save("cct_data/pc_color.npy", buf, {(unsigned long) n}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:297:69: error: no matching function for call to 'npy_save(const char [22], float&, )' 297 | cnpy::npy_save("cct_data/warped_u.npy", buf, {(unsigned long) n}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:297:69: note: candidate expects 6 arguments, 3 provided 297 | cnpy::npy_save("cct_data/warped_u.npy", buf, {(unsigned long) n}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:300:69: error: no matching function for call to 'npy_save(const char [22], float&, )' 300 | cnpy::npy_save("cct_data/warped_v.npy", buf, {(unsigned long) n}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:300:69: note: candidate expects 6 arguments, 3 provided 300 | cnpy::npy_save("cct_data/warped_v.npy", buf, {(unsigned long) n}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:303:70: error: no matching function for call to 'npy_save(const char [23], float&, )' 303 | cnpy::npy_save("cct_data/warped_dx.npy", buf, {(unsigned long) n}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:303:70: note: candidate expects 6 arguments, 3 provided 303 | cnpy::npy_save("cct_data/warped_dx.npy", buf, {(unsigned long) n}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:306:70: error: no matching function for call to 'npy_save(const char [23], float&, )' 306 | cnpy::npy_save("cct_data/warped_dy.npy", buf, {(unsigned long) n}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:306:70: note: candidate expects 6 arguments, 3 provided 306 | cnpy::npy_save("cct_data/warped_dy.npy", buf, {(unsigned long) n}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:309:74: error: no matching function for call to 'npy_save(const char [27], float&, )' 309 | cnpy::npy_save("cct_data/warped_idepth.npy", buf, {(unsigned long) n}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:309:74: note: candidate expects 6 arguments, 3 provided 309 | cnpy::npy_save("cct_data/warped_idepth.npy", buf, {(unsigned long) n}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:312:76: error: no matching function for call to 'npy_save(const char [29], float&, )' 312 | cnpy::npy_save("cct_data/warped_residual.npy", buf, {(unsigned long) n}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:312:76: note: candidate expects 6 arguments, 3 provided 312 | cnpy::npy_save("cct_data/warped_residual.npy", buf, {(unsigned long) n}); | ^ /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:315:74: error: no matching function for call to 'npy_save(const char [27], float&, )' 315 | cnpy::npy_save("cct_data/warped_weight.npy", buf, {(unsigned long) n}); | ^ In file included from /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9: /usr/local/include/cnpy.h:64:31: note: candidate: 'template void cnpy::npy_save(std::string, const T, const unsigned int, unsigned int, std::string, std::string)' 64 | template void npy_save(std::string fname, const T data, const unsigned int shape, const unsigned int ndims, std::string mode = "w", std::string order = "C") { | ^~~~ /usr/local/include/cnpy.h:64:31: note: template argument deduction/substitution failed: /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:315:74: note: candidate expects 6 arguments, 3 provided 315 | cnpy::npy_save("cct_data/warped_weight.npy", buf, {(unsigned long) n}); | ^ make[2]: [libdr/cuda_coarse_tracker/CMakeFiles/cuda_coarse_tracker.dir/build.make:76: libdr/cuda_coarse_tracker/CMakeFiles/cuda_coarse_tracker.dir/src/cuda_coarse_tracker.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/Makefile2:275: libdr/cuda_coarse_tracker/CMakeFiles/cuda_coarse_tracker.dir/all] Error 2 make[1]: Waiting for unfinished jobs....


GY56723-debug commented 1 year ago

exactly, it appeared after i installed cnpy, before i installed cnpy, the error is : /home/tandem/tandem-master/tandem/libdr/cuda_coarse_tracker/src/cuda_coarse_tracker.cpp:9:10: fatal error: cnpy.h: No such file or directory 9 | #include "cnpy.h" | ^~~~ compilation terminated. I don't know if this is related to my direct execution of the following order sudo apt install libsuitesparse-dev libeigen3-dev libboost-all-dev

GY56723-debug commented 1 year ago

Exatly, The save function doesn't work, leave them out is OK ,then errors will disappear. The reason for this error is cnpy:: npy in the cnpy library I installed The save function and the author use cnpy:: npy The parameters of the name function are different, which may be caused by the version

template<typename T> void npz_save(std::string zipname, std::string fname, const T* data, const unsigned int* shape, const unsigned int ndims, std::string mode = "w", std::string order = "C")
 bool save = false;
//  if (save) {
//    float nfxfyaffLLb[6] = {(float) n, fx, fy, affLL.x, affLL.y, (float) ref_aff_g2l.y()};
//    cnpy::npy_save("cct_data/nfxfyaffLLb.npy", nfxfyaffLLb, {6}, 1);
//    float *buf = (float *) malloc(sizeof(float) * n);

//    cudaMemcpy(buf, pc_color, sizeof(float) * n, cudaMemcpyDeviceToHost);
//    cnpy::npy_save("cct_data/pc_color.npy", buf, {(unsigned long) n}, 1);

//    cudaMemcpy(buf, warped_u, sizeof(float) * n, cudaMemcpyDeviceToHost);
//    cnpy::npy_save("cct_data/warped_u.npy", buf, {(unsigned long) n}, 1);

//    cudaMemcpy(buf, warped_v, sizeof(float) * n, cudaMemcpyDeviceToHost);
//    cnpy::npy_save("cct_data/warped_v.npy", buf, {(unsigned long) n}, 1);

//    cudaMemcpy(buf, warped_dx, sizeof(float) * n, cudaMemcpyDeviceToHost);
//    cnpy::npy_save("cct_data/warped_dx.npy", buf, {(unsigned long) n}), 1;

//    cudaMemcpy(buf, warped_dy, sizeof(float) * n, cudaMemcpyDeviceToHost);
//    cnpy::npy_save("cct_data/warped_dy.npy", buf, {(unsigned long) n}, 1);

//    cudaMemcpy(buf, warped_idepth, sizeof(float) * n, cudaMemcpyDeviceToHost);
//    cnpy::npy_save("cct_data/warped_idepth.npy", buf, {(unsigned long) n}, 1);

//    cudaMemcpy(buf, warped_residual, sizeof(float) * n, cudaMemcpyDeviceToHost);
//    cnpy::npy_save("cct_data/warped_residual.npy", buf, {(unsigned long) n}, 1);

//    cudaMemcpy(buf, warped_weight, sizeof(float) * n, cudaMemcpyDeviceToHost);
//    cnpy::npy_save("cct_data/warped_weight.npy", buf, {(unsigned long) n}, 1);

//    if (n > 0.5 * 640 * 480)
//      exit(EXIT_SUCCESS);
//  }