Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

We should check if keyfrm is NULL in one of the loop in global optimize? #499

Open
Dung-ND opened this issue Dec 9, 2020 · 0 comments
Open

Comments

@Dung-ND
Copy link

Dung-ND commented Dec 9, 2020

Hi
In this loop:

for (auto keyfrm : keyfrms) {
if (keyfrm->will_be_erased()) {
continue;
}
auto keyfrm_vtx = keyfrm_vtx_container.get_vertex(keyfrm);
const auto cam_pose_cw = util::converter::to_eigen_mat(keyfrm_vtx->estimate());
if (lead_keyfrm_id_in_global_BA == 0) {
keyfrm->set_cam_pose(cam_pose_cw);
}
else {
keyfrm->cam_pose_cw_after_loop_BA_ = cam_pose_cw;
keyfrm->loop_BA_identifier_ = lead_keyfrm_id_in_global_BA;
}
}

should we have if (!keyfrm) condition?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant