baidu / ICE-BA

Apache License 2.0
706 stars 233 forks source link

about local BA and global BA #10

Open ghost opened 6 years ago

ghost commented 6 years ago

hi, haomin I'm very happy to read your papers. In RKD-SLAM, u report Efficient Incremental BA, which do local BA and global BA seamlessly without switch。 but In ICE-BA, u split local BA and global BA in two thread. why?

liuhaomin commented 6 years ago

RKD-SLAM does not do local BA actually. The global BA only changes the local map in most cases and it is fast enough so we don't need an explict local BA. However for visual-inertial SLAM, local BA is necessary because velocity must be recovered for each frame rather than just keyframes, and the accumulating error must be reduced as soon as possible.

ghost commented 6 years ago

To my knowledge,visual-inertial SLAM also could realize Efficient Incremental BA as RKD-SLAM do. but u discard the method because of time-costing. in ICE-BA , imu's pre-integration make optimizer add velocity, accel zero-bias, gyro zero-bias which increase burden,so do local BA to recover velocity and do global BA to remove accumulating error when loop closed. it's right?

liuhaomin commented 6 years ago

Not exactly. I don't discard the method as RKD-SLAM do. Global BA performs in a very similar way as RKD-SLAM, and the additional velocity and bias do not increase much time. The problem is, 1) global BA only optimizes keyframes, 2) the optimization time increases with the number of keyframes. Visual-inertial SLAM need pose and velocity to be recovered for each current frame in realtime. Only the constant time local BA can meet this requirement.

ghost commented 6 years ago

I got it. for realtime, need to choose local BA. but when keyframe's pose optimized is enough accuracy, whether it's ok to use imu's measurement to predict the current frame's pose and velocity(also inertial navigation system). After all INS's motion model is highly accurate within a short time if the initial state(pose,velocity) is ok.

liuhaomin commented 6 years ago

Yes. But still the runtime of global keeps increasing. Also if keyframe is chosen based on covisibility, the latest keyframe may be temporally far away from current frame.

niannianmeng commented 6 years ago

"The problem is, 1) global BA only optimizes keyframes, 2) the optimization time increases with the number of keyframes. Visual-inertial SLAM need pose and velocity to be recovered for each current frame in realtime. Only the constant time local BA can meet this requirement."

@liuhaomin you means if we want to test visual-inertial SLAM, global BA should be discarded because of it's increasing time with keyframes number increasing? or whether we can keep the keyframes number constant like local frame?

liuhaomin commented 6 years ago

No need to discard it. It is running in background thread so would not affect the realtime performance.