UZ-SLAMLab / ORB_SLAM3

ORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial and Multi-Map SLAM
GNU General Public License v3.0
6.67k stars 2.57k forks source link

localization mode accuracy with TUM dataset #600

Open macTracyHuang opened 2 years ago

macTracyHuang commented 2 years ago

hello, I'm trying the localization only mode with the TUM dataset(rgbd_dataset_freiburg2_large_with_loop) and found the predicted pose is far from the trajectory that was saved by SLAM mode with exactly same dataset. I also find out that only bOKMM is true when runing this, which means Relocalization() always return false.

1.I first generated keyframetrajectory.txt and save map with the dataset in SLAM mode in .bin extension. 2.Load the map , turn on localization mode and predict pose information with the same dataset.

I was expecting exatly the same trajectory but found the pose is far from the save maps. According to my knowledge, the computation cost of localizaion mode is lower than slam mode, so the computation power of my pc should not be the reason. I am thinking if there is a bug in saving map ( ex: information that was loaded is not as completed as the one in SLAM mode), however, I use the original save map and load map in Atlas, it should be bug-free since I believe that was submited by experts.

Could any one give me a hint what would possibily cause this problem?

Thx a lot

Vslamer commented 2 years ago

I also encountered this problem ( ex: information that was loaded is not as completed as the one in SLAM mode), the loaded map points are few, did you solve this problem?

macTracyHuang commented 2 years ago

I also encountered this problem ( ex: information that was loaded is not as completed as the one in SLAM mode), the loaded map points are few, did you solve this problem?

I found out when localization mode is on, it will create new map everytime, somehow the active map will not be the one I loaded. I currently save the map with the biggest number of keyframes as my map. after that, instead of creating a new map, I set the map I loaded as the active map. This solution is ok for my current purpose but I believe it's not the best way to correct it. The modifed code is in my github fork repository, you can have look of it and welcome to discuss with me.