EdwardLiuyc / StaticMapping

Use LiDAR to map the static world
MIT License
340 stars 69 forks source link

Get stuck in finding icp init guess for loop closure #46

Closed ahandsomeperson closed 3 years ago

ahandsomeperson commented 3 years ago

Hi Liu! Thanks for your great job! I am trying to find an icp init guess in loop closure based on lego loam. However i get stuck and it performs bad. After I read your bool LoopDetector::CloseLoop function in loop_detector.cc, I find we are in a same way to add init guess for icp. As you comment in your code, it is a bug and it is quite wrong to simply calculating like this. Have you fixed this bug? Do you have any advice on this problem?

EdwardLiuyc commented 3 years ago

Hi handsome! The commented code is for gps and the calculation is wrong indeed, which simply uses the delta translation in gps but ignores the influence from rotation. so, my advice:

  1. Use a gps device which provides you with 6DOF global pose. That makes more sense for add init guess for icp.
  2. The backend in this project will do the graph optimization using gps as a factor(only translation part) all the time, if so, the global pose you got will be rather accurate and you do not need any modification on the init guess. This is what I did in this project, otherwise, a better global match algorithm may be needed.
ahandsomeperson commented 3 years ago

Thank you very much!