From 29e4395a5aa415e81a77807cdcac8b8da4be2a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Or=C5=A1uli=C4=87?= Date: Thu, 14 Dec 2017 10:02:54 +0100 Subject: [PATCH] Make WaitForAllComputation wait for work queue in 3D as well (#758) Repeat the change in #754 by @gaschler for 3D as well. --- cartographer/mapping_3d/pose_graph.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cartographer/mapping_3d/pose_graph.cc b/cartographer/mapping_3d/pose_graph.cc index fdee1bf..5fff41e 100644 --- a/cartographer/mapping_3d/pose_graph.cc +++ b/cartographer/mapping_3d/pose_graph.cc @@ -368,8 +368,9 @@ void PoseGraph::WaitForAllComputations() { constraint_builder_.GetNumFinishedNodes(); while (!locker.AwaitWithTimeout( [this]() REQUIRES(mutex_) { - return constraint_builder_.GetNumFinishedNodes() == - num_trajectory_nodes_; + return ((constraint_builder_.GetNumFinishedNodes() == + num_trajectory_nodes_) && + !work_queue_); }, common::FromSeconds(1.))) { std::ostringstream progress_info;