From 693a0f991a385e4b334e498f092bab929062edbb Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Fri, 12 Apr 2013 13:05:52 +0000 Subject: [PATCH] Added the Filter<->Smoother synchronization back into the example --- .../ConcurrentFilteringAndSmoothingExample.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gtsam_unstable/examples/ConcurrentFilteringAndSmoothingExample.cpp b/gtsam_unstable/examples/ConcurrentFilteringAndSmoothingExample.cpp index 6b0482c8f..a1151235f 100644 --- a/gtsam_unstable/examples/ConcurrentFilteringAndSmoothingExample.cpp +++ b/gtsam_unstable/examples/ConcurrentFilteringAndSmoothingExample.cpp @@ -130,10 +130,13 @@ int main(int argc, char** argv) { fixedlagSmoother.update(newFactors, newValues, newTimestamps); batchSmoother.update(newFactors, newValues, newTimestamps); -// // Manually synchronize the Concurrent Filter and Smoother every 1.0 s -// if(fmod(time, 1.0) < 0.01) { -// synchronize(concurrentFilter, concurrentSmoother); -// } + // Manually synchronize the Concurrent Filter and Smoother every 1.0 s + if(fmod(time, 1.0) < 0.01) { + // Synchronize the Filter and Smoother + synchronize(concurrentFilter, concurrentSmoother); +// // Update the smoother +// concurrentSmoother.update(); + } // Print the optimized current pose cout << setprecision(5) << "Timestamp = " << time << endl;