From 0a459549f8fee9ddbf6604686a350a6b9a1804a8 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Thu, 11 Apr 2013 12:42:09 +0000 Subject: [PATCH] Updated synchronization interface to require the smoother and filter to track their own separator keys and values --- .../nonlinear/ConcurrentFilteringAndSmoothing.cpp | 10 +++++----- .../nonlinear/ConcurrentFilteringAndSmoothing.h | 10 ++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.cpp b/gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.cpp index 52ce1cd9b..40a1de802 100644 --- a/gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.cpp +++ b/gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.cpp @@ -26,20 +26,20 @@ namespace gtsam { void synchronize(ConcurrentFilter& filter, ConcurrentSmoother& smoother) { NonlinearFactorGraph smootherFactors, filterSumarization, smootherSummarization; - Values smootherValues, rootValues; + Values smootherValues, filterSeparatorValues, smootherSeparatorValues; // Call the pre-sync functions of the filter and smoother filter.presync(); smoother.presync(); // Get the updates from the smoother and apply them to the filter - smoother.getSummarizedFactors(smootherSummarization); - filter.synchronize(smootherSummarization); + smoother.getSummarizedFactors(smootherSummarization, smootherSeparatorValues); + filter.synchronize(smootherSummarization, smootherSeparatorValues); // Get the updates from the filter and apply them to the smoother filter.getSmootherFactors(smootherFactors, smootherValues); - filter.getSummarizedFactors(filterSumarization, rootValues); - smoother.synchronize(smootherFactors, smootherValues, filterSumarization, rootValues); + filter.getSummarizedFactors(filterSumarization, filterSeparatorValues); + smoother.synchronize(smootherFactors, smootherValues, filterSumarization, filterSeparatorValues); // Call the post-sync functions of the filter and smoother filter.postsync(); diff --git a/gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.h b/gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.h index 93f8b06be..feb6a3f1a 100644 --- a/gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.h +++ b/gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.h @@ -66,9 +66,9 @@ protected: * needed by the smoother. Also, linearization points for the new root clique must be provided. * * @param summarizedFactors The summarized factors for the filter branch - * @param rootValues The linearization points of the root clique variables + * @param separatorValues The linearization points of the separator variables */ - virtual void getSummarizedFactors(NonlinearFactorGraph& summarizedFactors, Values& rootValues) = 0; + virtual void getSummarizedFactors(NonlinearFactorGraph& summarizedFactors, Values& separatorValues) = 0; /** * Populate the provided containers with factors being sent to the smoother from the filter. These @@ -84,8 +84,9 @@ protected: * Apply the updated version of the smoother branch summarized factors. * * @param summarizedFactors An updated version of the smoother branch summarized factors + * @param separatorValues The linearization points of the separator variables */ - virtual void synchronize(const NonlinearFactorGraph& summarizedFactors) = 0; + virtual void synchronize(const NonlinearFactorGraph& summarizedFactors, const Values& separatorValues) = 0; /** * Perform any required operations after the synchronization process finishes. @@ -129,8 +130,9 @@ protected: * needed by the filter. * * @param summarizedFactors The summarized factors for the filter branch + * @param separatorValues The linearization points of the separator variables */ - virtual void getSummarizedFactors(NonlinearFactorGraph& summarizedFactors) = 0; + virtual void getSummarizedFactors(NonlinearFactorGraph& summarizedFactors, Values& separatorValues) = 0; /** * Apply the new smoother factors sent by the filter, and the updated version of the filter