From dc67332cb3703a1a4c049d48cfd189db65fbbcd8 Mon Sep 17 00:00:00 2001 From: Okan Barut <26722429+YumaTheCompanion@users.noreply.github.com> Date: Fri, 9 Aug 2019 10:42:10 +0300 Subject: [PATCH 1/3] Updated README.md I had difficulty the first time I tried to use the KITTIx executables. Better to mark them inside a `codeblock` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index acf42ee7e0..3d026ff4bf 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ This will create **libORB_SLAM2.so** at *lib* folder and the executables **mono 1. Download the dataset (grayscale images) from http://www.cvlibs.net/datasets/kitti/eval_odometry.php -2. Execute the following command. Change `KITTIX.yaml`by KITTI00-02.yaml, KITTI03.yaml or KITTI04-12.yaml for sequence 0 to 2, 3, and 4 to 12 respectively. Change `PATH_TO_DATASET_FOLDER` to the uncompressed dataset folder. Change `SEQUENCE_NUMBER` to 00, 01, 02,.., 11. +2. Execute the following command. Change `KITTIX.yaml`by `KITTI00-02.yaml`, `KITTI03.yaml` or `KITTI04-12.yaml` for sequence 0 to 2, 3, and 4 to 12 respectively. Change `PATH_TO_DATASET_FOLDER` to the uncompressed dataset folder. Change `SEQUENCE_NUMBER` to 00, 01, 02,.., 11. ``` ./Examples/Monocular/mono_kitti Vocabulary/ORBvoc.txt Examples/Monocular/KITTIX.yaml PATH_TO_DATASET_FOLDER/dataset/sequences/SEQUENCE_NUMBER ``` From 64767ecd4590f771a4a3c739b7a504819f75247c Mon Sep 17 00:00:00 2001 From: Okan Barut <26722429+YumaTheCompanion@users.noreply.github.com> Date: Tue, 3 Sep 2019 15:44:24 +0300 Subject: [PATCH 2/3] Added image check for right camera stereo images The image load sequence was not being checked for the right camera. Added a check accordingly. --- Examples/Stereo/stereo_kitti.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Examples/Stereo/stereo_kitti.cc b/Examples/Stereo/stereo_kitti.cc index cb8bc4096e..07dc53eac7 100644 --- a/Examples/Stereo/stereo_kitti.cc +++ b/Examples/Stereo/stereo_kitti.cc @@ -75,6 +75,12 @@ int main(int argc, char **argv) cerr << endl << "Failed to load image at: " << string(vstrImageLeft[ni]) << endl; return 1; + } + else if(imRight.empty()) + { + cerr << endl << "Failed to load image at: " + << string(vstrImageRight[ni]) << endl; + return 1; } #ifdef COMPILEDWITHC11 From c176780226d600c8649ed0ff5e229c750a221c61 Mon Sep 17 00:00:00 2001 From: Okan Barut <26722429+YumaTheCompanion@users.noreply.github.com> Date: Mon, 16 Sep 2019 15:28:52 +0300 Subject: [PATCH 3/3] Fixed a segmentation fault --- src/Tracking.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Tracking.cc b/src/Tracking.cc index 2273b2ce48..6505540d0d 100644 --- a/src/Tracking.cc +++ b/src/Tracking.cc @@ -539,11 +539,7 @@ void Tracking::StereoInitialization() cout << "New map created with " << mpMap->MapPointsInMap() << " points" << endl; - mpLocalMapper->InsertKeyFrame(pKFini); - - mLastFrame = Frame(mCurrentFrame); - mnLastKeyFrameId=mCurrentFrame.mnId; - mpLastKeyFrame = pKFini; + mpLocalMapper->InsertKeyFrame(pKFini); mvpLocalKeyFrames.push_back(pKFini); mvpLocalMapPoints=mpMap->GetAllMapPoints(); @@ -555,6 +551,10 @@ void Tracking::StereoInitialization() mpMap->mvpKeyFrameOrigins.push_back(pKFini); mpMapDrawer->SetCurrentCameraPose(mCurrentFrame.mTcw); + + mLastFrame = Frame(mCurrentFrame); + mnLastKeyFrameId=mCurrentFrame.mnId; + mpLastKeyFrame = pKFini; mState=OK; }