yuhaozhang7 / NGD-SLAM

NGD-SLAM: Towards Real-Time Dynamic SLAM without GPU.
GNU General Public License v3.0
85 stars 12 forks source link

Issues with g2o #2

Closed cmakelabs closed 3 months ago

cmakelabs commented 3 months ago

While trying to build using build.sh, I encountered the following issue:

CMake Error at Thirdparty/g2o/CMakeLists.txt:91 (ADD_LIBRARY):
  Cannot find source file:

    g2o/stuff/timeutil.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx

CMake Error at Thirdparty/g2o/CMakeLists.txt:91 (ADD_LIBRARY):
  No SOURCES given to target: g2o

It is true that this file does not exist in the repo, but since I noticed that in the code, timueutil is being imported several times, which makes it not possible to build, so I have just copied them from the repo of g2o, which seems to solve the issue, however I still could not build due to the following error:

ngd_slam_ws/src/NGD-SLAM/Thirdparty/g2o/g2o/core/../stuff/g2o_stuff_api.h:39:10: fatal error: g2o/config.h: No such file or directory
   39 | #include "g2o/config.h"

I note that the file config.h is being generated and it exists in the directory as specified, however I am still not able to build, I would be grateful for your help.

yuhaozhang7 commented 3 months ago

Thanks for pointing that out! I have added the missing files and tested them on a clean machine. Could you please recompile with a clean repository? Let me know if it works or if you encounter any other problems. I would greatly appreciate it.

cmakelabs commented 3 months ago

Thanks it works!