Open zhangletian2 opened 2 years ago
I'm experiencing the same problem. Does anyone know when the last time was when DSO compiled successfully or what may have changed?
For me the problem first appears in dso/src/FullSystem/FullSystem.cpp
dso/src/FullSystem/FullSystem.cpp:646:109: error: ‘_2’ was not declared in this scope 646 | treadReduce.reduce(boost::bind(&FullSystem::activatePointsMT_Reductor, this, &optimized, &toOptimize, _1, _2, _3, _4), 0, toOptimize.size(), 50); |
---|
Though strangely it's immediately followed by suggestions of alternative definitions from various places.
I have no idea if this is correct at all, but I got around that error by adding std::placeholders:: in front of every _1 _2 _3 and _4 in dso/src/util/IndexThreadReduce.h and dso/src/FullSystem.cpp
Now there are new errors though, so something is still not right.
EDIT: 7.6MB of new errors, so I think this is clearly not the right path forward.
I think the reason is the newer Boost version.
You could try adding using namespace boost::placeholders;
to line 36 of dso/src/util/IndexThreadReduce.h
That's what I did to make DM-VIO work with new Boost versions.
That did the trick. I also had to swap:
CV_LOAD_IMAGE_GRAYSCALE with cv::IMREAD_GRAYSCALE CV_LOAD_IMAGE_COLOR with cv::IMREAD_COLOR0 CV_LOAD_IMAGE_UNCHANGED cv::IMREAD_UNCHANGED
in dso/src/IOWrapper/OpenCV/ImageRW_OpenCV.cpp:
Just pointing out a small typo, it's cv::IMREAD_COLOR not cv::IMREAD_COLOR0. Thanks for posting the solution though, it works for me now
the errors are as follows: make[2]: [CMakeFiles/dso.dir/build.make:63: CMakeFiles/dso.dir/src/FullSystem/FullSystem.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:105: CMakeFiles/dso.dir/all] Error 2 make: *** [Makefile:84: all] Error 2