ZJU-Robotics-Lab / GEM

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

the question in the elevationmapping.cpp file about Local mapping? #13

Closed roslidog closed 2 years ago

roslidog commented 2 years ago

1.how can we set the newKeyframeSignal ? the topic of new_keyframe do not publish in the test.bag. do you have any idea about set the topic about it or any tips ? 2.in the function ElevationMapping::updateLocalMap(), the phase of // Local mapping//,it get the values of "elevation " and "traver",the it make judge so long in the following and i do not understand it.can you help me?why make this if condition ? if(((position.x() < (currentx - length resolution_ / 2) || position.y() < (currenty - length resolution_ / 2 )) && (delta_x > 0 && delta_y > 0)) || ((position.x() > (currentx + length resolution_ / 2 ) || position.y() > (currenty + length resolution_ / 2 )) && (delta_x < 0 && delta_y < 0)) || ((position.x() < (currentx - length resolution_ / 2 ) || position.y() > (currenty + length resolution_ / 2 )) && (delta_x > 0 && delta_y < 0)) || ((position.x() > (currentx + length resolution_ / 2 ) || position.y() < (currenty - length resolution_ / 2 )) && (delta_x < 0 && delta_y > 0)) || ((position.x() < (currentx - length resolution_ / 2 )) && (delta_x > 0 && delta_y == 0)) || ((position.x() > (currentx + length resolution_ / 2 )) && (delta_x < 0 && delta_y == 0)) || ((position.y() < (currenty - length resolution_ / 2 )) && (delta_y > 0 && delta_x == 0)) || ((position.y() > (currenty + length resolution_ / 2 )) && (delta_y < 0 && delta_x == 0)))

MaverickPeter commented 2 years ago

@xiaowei520-lwl The newKeyframeSignal is set by the SLAM system to generate submaps for further map optimization. You can advertise a newKeyframeSignal when the SLAM system generates a submap and optKeyframes when the SLAM system finish optimization If there is no need for map optimization, you can just ignore it. As for updateLocalMap, the judgment is to ensure the elevation is valid since -10 is an initial value. The condition "traver" is not necessary, we test it to filter out some obstacle points to make the map light, you can just delete it. The included if condition is about adding a "L" shape point to the submap for real time performance.

roslidog commented 2 years ago

thank you for your reply。do you have any referral SLAM system ? and what does the "L" shape means ? i donot have a clear understanding ,can you give me some advise ? Thank you very much ! because i am a green hand about the mapping system.

MaverickPeter commented 2 years ago

@xiaowei520-lwl You can try to implement these to the Opensourced SLAM system (SC-LeGO-LOAM, SC-LIO-SAM) by publishing a newKeyframeSignal and optKeyframes using our slam_msg package. About the "L" shape you can refer to our papers mentioned in README.

roslidog commented 2 years ago

ok, i got it. thank you very much!