openvslam icon indicating copy to clipboard operation
openvslam copied to clipboard

Current camera pose going backward

Open gizmosir opened this issue 4 years ago • 4 comments

Follow the installation step by step and finally run the example successfully. But the current camera pose are going backard instead. And the tracking will lose as soon as it detect a looping. Do you have any idea?

backward_1 current_cam_pose are going backward

backward_2 current_cam_pose look like at the symmetry place of where it should be

backward_3 before looping is detected, everything seems fine except the current_cam_pose

backward_4 as the looping is detected, map change dramatically and tracking no more

gizmosir avatar Aug 27 '20 08:08 gizmosir

I think you have the wrong config or input image. I think it would be a good idea to go to https://spectrum.chat/openvslam and write the information about the camera and the current config.yaml and ask how you should create the config.

ymd-stella avatar Aug 28 '20 21:08 ymd-stella

@ymd-stella Thank for you advice. I will definitly get it a try.

Actually I am running the command bellow which pretty much the same as tutorial. And I also tried the KITTI sequence_00 with the config.yaml in example/kitti folder. It has the same problem.

./build/run_video_slam -v orb_vocab/orb_vocab.dbow2 -c ~/Dataset/equirectangular/aist_living_lab_1/config.yaml -m ~/Dataset/equirectangular/aist_living_lab_1/video.mp4 --frame-skip 3 --map-db aist_living_lab_1_map.msg

From my point of view, it looks like a hidden bug instead of missing around with dataset and config. I am tracking down this bug and it seems like cam_pose_cw.inverse() bellow do not get the right result.

/src/pangolin_viewer/viewer.cc @@185~189

pangolin::OpenGlMatrix viewer::get_current_cam_pose() { 
    const auto cam_pose_cw = map_publisher_->get_current_cam_pose();
    const pangolin::OpenGlMatrix gl_cam_pose_wc(cam_pose_cw.inverse().eval());
    return gl_cam_pose_wc;
}

I am using eigen 3.3.5 and this lib performs correctly at another computer.

gizmosir avatar Aug 29 '20 07:08 gizmosir

If it's an installation issue, there's little I can advise you on. All you can do for this issue is to adapt your environment to the one we tested or figure out how to get the library to work in your environment as well. I'm looking forward to a follow-up report.

ymd-stella avatar Aug 29 '20 19:08 ymd-stella

Hi @gizmosir

IDK if it's related or not but when I built g2o and openVSLAM with -DBUILD_WITH_MARCH_NATIVE=OFF it seems to have the same problem.

When I change it to -DBUILD_WITH_MARCH_NATIVE=ON , then it works fine.

surfii3z avatar Sep 03 '20 14:09 surfii3z