Fixed synchronization code in ConcurrentBatchFilter such that an empty graph does not trigger a segfault
parent
444ab957c4
commit
36e66b2f0b
|
@ -124,6 +124,7 @@ void ConcurrentBatchFilter::synchronize(const NonlinearFactorGraph& summarizedFa
|
||||||
values.insert(smootherValues_);
|
values.insert(smootherValues_);
|
||||||
values.update(separatorValues); // ensure the smoother summarized factors are linearized around the values in the smoother
|
values.update(separatorValues); // ensure the smoother summarized factors are linearized around the values in the smoother
|
||||||
|
|
||||||
|
if(factors_.size() > 0) {
|
||||||
// Perform an optional optimization on the to-be-sent-to-the-smoother factors
|
// Perform an optional optimization on the to-be-sent-to-the-smoother factors
|
||||||
if(true) {
|
if(true) {
|
||||||
// Create ordering and delta
|
// Create ordering and delta
|
||||||
|
@ -201,7 +202,7 @@ void ConcurrentBatchFilter::synchronize(const NonlinearFactorGraph& summarizedFa
|
||||||
// all of the smoother variables that are not part of the new separator. This smoother summarization will be
|
// all of the smoother variables that are not part of the new separator. This smoother summarization will be
|
||||||
// stored locally for use in the filter
|
// stored locally for use in the filter
|
||||||
smootherSummarizationSlots_ = insertFactors( marginalize(graph, values, smootherOrdering, smootherKeys, parameters_.getEliminationFunction()) );
|
smootherSummarizationSlots_ = insertFactors( marginalize(graph, values, smootherOrdering, smootherKeys, parameters_.getEliminationFunction()) );
|
||||||
|
}
|
||||||
gttoc(synchronize);
|
gttoc(synchronize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue