From 23c91d90ad27ef30ef9cad4f1f473fa4012dcfb5 Mon Sep 17 00:00:00 2001 From: JonnyKong Date: Sun, 18 Apr 2021 21:32:29 -0400 Subject: [PATCH 1/2] Correct type to make the program compile --- include/LoopClosing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/LoopClosing.h b/include/LoopClosing.h index 79542f7860..87707fa1ee 100644 --- a/include/LoopClosing.h +++ b/include/LoopClosing.h @@ -47,7 +47,7 @@ class LoopClosing typedef pair,int> ConsistentGroup; typedef map, - Eigen::aligned_allocator > > KeyFrameAndPose; + Eigen::aligned_allocator > > KeyFrameAndPose; public: From 129ea756321752df298612ee77729394e26416e6 Mon Sep 17 00:00:00 2001 From: JonnyKong Date: Sun, 18 Apr 2021 21:35:09 -0400 Subject: [PATCH 2/2] Make client exit gracefully --- src/Tracking.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Tracking.cc b/src/Tracking.cc index 62bbc4b24a..bdde2be29c 100644 --- a/src/Tracking.cc +++ b/src/Tracking.cc @@ -2321,12 +2321,17 @@ void Tracking::tcp_receive(moodycamel::ConcurrentQueue* messageQueu // Edge-SLAM: added destructor to destroy all connections on object termination Tracking::~Tracking(){ - keyframe_socket->~TcpSocket(); - frame_socket->~TcpSocket(); + keyframe_socket->setAlive(false); + frame_socket->setAlive(false); map_socket->~TcpSocket(); + // This is just a dummy enqueue to unblock the wait_dequeue function in tcp_send() keyframe_queue.enqueue("exit"); frame_queue.enqueue("exit"); + + keyframe_thread->join(); + frame_thread->join(); + map_thread->join(); } } //namespace ORB_SLAM