mv-lm-icp icon indicating copy to clipboard operation
mv-lm-icp copied to clipboard

Compile on Windows

Open Andyjk1406 opened this issue 6 years ago • 5 comments

I saw you have recently updated this, but I still have an issue in cmake with the gflw external:

---------------GLFW------------------- Looking for pthread.h Looking for pthread.h - not found Found Threads: TRUE
Could NOT find Vulkan (missing: VULKAN_LIBRARY VULKAN_INCLUDE_DIR) Using Win32 for window creation CMake Error at ext/glfw/CMakeLists.txt:403 (install): install INSTALL(EXPORT) given keyword "EXPORT_LINK_INTERFACE_LIBRARIES", but target "glfw" does not have policy CMP0022 set to NEW.

This may be an issue with which version gets downloaded into the /ext folder ?

Can you help ?

BTW - I used vcpkg to build ceres (very easy), and then just make sure you have the -DTOOLCHAIN flag set in cmake to point to vcpk when building the solution. This makes the Ceres issue on Windows a pice of cake!

Andyjk1406 avatar Mar 30 '18 10:03 Andyjk1406

Compiling always is in trouble! i can't help u ,sorry, Trying to again !

jingxa avatar Apr 03 '18 09:04 jingxa

Well since I am using submodules, the version in ext/glfw should be exactly the same that I have.

The only thing I can think of is an incompatibility with that (old) glfw version with a newer cmake version, hence the warning with setting a new policy because some variable was deprecated.

What cmake version are you using?

adrelino avatar Apr 13 '18 14:04 adrelino

Does this help:

http://www.glfw.org/docs/latest/compile_guide.html

Otherwise, instead of compiling glfw on windows using cmake, you could try to just use their precompiled .dlls downloadable here: http://www.glfw.org/download.html. They have dlls for multiple versions of the MSVC as well as the MinGW compiler, which one are you using?

adrelino avatar Apr 13 '18 15:04 adrelino

Hi everybody, I've just compiled this project on Windows 10 (Visual Studio 2017). I've encountered several problems, mainly with external libraries compatibility:

  1. newest release of G2O didn't work - finally used this one: https://github.com/RainerKuemmerle/g2o/releases/tag/20170730_git
  2. new Sophus has slightly different syntax: Sophus::SE3Group has been renamed to Sophus::SE3,
  3. it seems that Sophus doesn't provide internalJacobian method in Eigen::Map<const Sophus::SE3d> class, I've tried to replace this with Dx_this_mul_exp_x_at_0, but I have no idea if this is correct [file sophus_se3.h, function ComputeJacobian],
  4. in file sophus_se3.h there was a problem with function getParametrization with this expression: return new ceres::AutoDiffLocalParameterization<SophusSE3Plus,Sophus::SE3::num_parameters, Sophus::SE3::DoF>; changed it to: return new ceres::AutoDiffLocalParameterization<SophusSE3Plus,Sophus::SE3d::num_parameters, Sophus::SE3d::DoF>; since num_parameters and DoF are hardcoded static constexpr, there should be no execution difference at all,
  5. in file icp_ceres.cpp function Sophus::SE3d isoToSophus(const Isometry3d& pose) was erroneous. Changed this line: return Sophus::SE3d(pose); to return Sophus::SE3d(pose.rotation(), pose.translation()); since Sophus::SE3d has no constructor that accepts Isometry3d object reference as input. No idea if this is correct semantically.

PiotrGizaB3D avatar Sep 22 '20 10:09 PiotrGizaB3D

Hello, I don't quite understand how you solved the third question, I am very difficult to deal with this problem now

georgezzj avatar Dec 13 '23 03:12 georgezzj