ZJU-Robotics-Lab / GEM

GEM: Online Globally consistent dense elevation mapping for unstructured terrain.
219 stars 32 forks source link

the question about the meaning about trigger variates in the code #16

Closed roslidog closed 2 years ago

roslidog commented 2 years ago

i read the code but i confued about the variates in the code bool optFlag; bool JumpFlag;bool insertionFlag;bool JumpOdomFlag; what does the meaning about them ? can you explain them ?Thank you very much !Happy Lantern Festival!

MaverickPeter commented 2 years ago

@xiaowei520-lwl
Hi, the flags are set to control the process status in multi-thread. optFlag is set to true when the global optimization is running. JumpOdomFlag is set to true when the front-end odometry optimizes the current pose, however, in real applications, some front-end odometry sends optKeyframe before the tf change that will cause some defect, so we further add JumpFlag to detect odometry change (that is a trick). InsertionFlag is now deprecated.

roslidog commented 2 years ago

ok.i get it. thank you very much ! i have others questions. why do you make the HASH GRID MAP? i notice that you make a conversion about the point cloud and hash . this step have correction with submap ? or the submap must receive point cloud format data? i run the bag and the process only have one submap? ,if the code receive the keyframe signal , it will make a new submap ? thank you very much!

MaverickPeter commented 2 years ago

@xiaowei520-lwl The hashmap is for local map fusion, as multiple access may happen in a local map causing overlap points. And the submap is designed with pointcloud representation as it can be easily visualized and processed using pcl library. The bag shows a relatively short path. you can modify param "robot_local_map_size: 20" to a smaller scale. In a real application where a front-end is supported, you can use the keyframe signal to create a new submap that is aligned to the pose graph.

roslidog commented 2 years ago

thanks for your reply。 the HASH GRID MAP can redue the process time and increase the process efficiency?the overlap points can convert the same hash grid value ? Is that correct?

MaverickPeter commented 2 years ago

@xiaowei520-lwl The hash map provides O(1) query efficiency, it helps us to quickly remove the overlapped point in a local map. The overlapped points can be queried by the same hash grid. That's correct.