From 10281aa52e3267f2b70594335021435ce2a73f98 Mon Sep 17 00:00:00 2001 From: SchwarzerYV <103877999+SchwarzerYV@users.noreply.github.com> Date: Wed, 15 May 2024 15:32:30 +0800 Subject: [PATCH 1/2] Adapted for Ubuntu 22.04 --- Examples/Monocular/mono_euroc.cc | 2 ++ Examples/Monocular/mono_kitti.cc | 2 ++ Examples/Monocular/mono_tum.cc | 2 ++ Examples/RGB-D/rgbd_tum.cc | 2 ++ Examples/Stereo/stereo_euroc.cc | 2 ++ Examples/Stereo/stereo_kitti.cc | 2 ++ include/System.h | 2 ++ src/LocalMapping.cc | 2 ++ src/LoopClosing.cc | 2 ++ src/System.cc | 2 ++ src/Tracking.cc | 2 ++ src/Viewer.cc | 2 ++ 12 files changed, 24 insertions(+) diff --git a/Examples/Monocular/mono_euroc.cc b/Examples/Monocular/mono_euroc.cc index 4bcb90f170..f75ac189f7 100644 --- a/Examples/Monocular/mono_euroc.cc +++ b/Examples/Monocular/mono_euroc.cc @@ -28,6 +28,8 @@ #include +#include + using namespace std; void LoadImages(const string &strImagePath, const string &strPathTimes, diff --git a/Examples/Monocular/mono_kitti.cc b/Examples/Monocular/mono_kitti.cc index f2f7b3ebfd..b7d9f93756 100644 --- a/Examples/Monocular/mono_kitti.cc +++ b/Examples/Monocular/mono_kitti.cc @@ -29,6 +29,8 @@ #include"System.h" +#include + using namespace std; void LoadImages(const string &strSequence, vector &vstrImageFilenames, diff --git a/Examples/Monocular/mono_tum.cc b/Examples/Monocular/mono_tum.cc index 09a2afc4b7..e41322adeb 100644 --- a/Examples/Monocular/mono_tum.cc +++ b/Examples/Monocular/mono_tum.cc @@ -28,6 +28,8 @@ #include +#include + using namespace std; void LoadImages(const string &strFile, vector &vstrImageFilenames, diff --git a/Examples/RGB-D/rgbd_tum.cc b/Examples/RGB-D/rgbd_tum.cc index 001199d1aa..45ffa96122 100644 --- a/Examples/RGB-D/rgbd_tum.cc +++ b/Examples/RGB-D/rgbd_tum.cc @@ -28,6 +28,8 @@ #include +#include + using namespace std; void LoadImages(const string &strAssociationFilename, vector &vstrImageFilenamesRGB, diff --git a/Examples/Stereo/stereo_euroc.cc b/Examples/Stereo/stereo_euroc.cc index 6bc09c50be..cf43b712fa 100644 --- a/Examples/Stereo/stereo_euroc.cc +++ b/Examples/Stereo/stereo_euroc.cc @@ -29,6 +29,8 @@ #include +#include + using namespace std; void LoadImages(const string &strPathLeft, const string &strPathRight, const string &strPathTimes, diff --git a/Examples/Stereo/stereo_kitti.cc b/Examples/Stereo/stereo_kitti.cc index cb8bc4096e..57e0df9e2f 100644 --- a/Examples/Stereo/stereo_kitti.cc +++ b/Examples/Stereo/stereo_kitti.cc @@ -29,6 +29,8 @@ #include +#include + using namespace std; void LoadImages(const string &strPathToSequence, vector &vstrImageLeft, diff --git a/include/System.h b/include/System.h index b377b453d1..ef33bac949 100644 --- a/include/System.h +++ b/include/System.h @@ -36,6 +36,8 @@ #include "ORBVocabulary.h" #include "Viewer.h" +#include + namespace ORB_SLAM2 { diff --git a/src/LocalMapping.cc b/src/LocalMapping.cc index 6c87a6e55a..28838aad73 100644 --- a/src/LocalMapping.cc +++ b/src/LocalMapping.cc @@ -25,6 +25,8 @@ #include +#include + namespace ORB_SLAM2 { diff --git a/src/LoopClosing.cc b/src/LoopClosing.cc index 5e317dd420..d5a076d54c 100644 --- a/src/LoopClosing.cc +++ b/src/LoopClosing.cc @@ -31,6 +31,8 @@ #include #include +#include + namespace ORB_SLAM2 { diff --git a/src/System.cc b/src/System.cc index 8df4157095..0439db1d6d 100644 --- a/src/System.cc +++ b/src/System.cc @@ -26,6 +26,8 @@ #include #include +#include + namespace ORB_SLAM2 { diff --git a/src/Tracking.cc b/src/Tracking.cc index 2273b2ce48..0059669594 100644 --- a/src/Tracking.cc +++ b/src/Tracking.cc @@ -37,6 +37,8 @@ #include +#include + using namespace std; diff --git a/src/Viewer.cc b/src/Viewer.cc index dec3204f53..d666c0a2f8 100644 --- a/src/Viewer.cc +++ b/src/Viewer.cc @@ -23,6 +23,8 @@ #include +#include + namespace ORB_SLAM2 { From 86190bb16a4b06b039dadffe535bbda188e6b597 Mon Sep 17 00:00:00 2001 From: SchwarzerYV <103877999+SchwarzerYV@users.noreply.github.com> Date: Wed, 15 May 2024 15:42:36 +0800 Subject: [PATCH 2/2] Solve issue that Pangolin interface stuck, can't generate trajectory --- src/System.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/System.cc b/src/System.cc index 0439db1d6d..363c776fa5 100644 --- a/src/System.cc +++ b/src/System.cc @@ -317,8 +317,8 @@ void System::Shutdown() usleep(5000); } - if(mpViewer) - pangolin::BindToContext("ORB-SLAM2: Map Viewer"); + // if(mpViewer) + // pangolin::BindToContext("ORB-SLAM2: Map Viewer"); } void System::SaveTrajectoryTUM(const string &filename)