Added optional flag to ConcurrentBatchFilter to control relinearization
during syncs.release/4.3a0
parent
d83b5b20cd
commit
1c5061cf3c
|
|
@ -126,7 +126,7 @@ void ConcurrentBatchFilter::synchronize(const NonlinearFactorGraph& summarizedFa
|
||||||
|
|
||||||
if(factors_.size() > 0) {
|
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(relin_) {
|
||||||
// Create ordering and delta
|
// Create ordering and delta
|
||||||
Ordering ordering = *graph.orderingCOLAMD(values);
|
Ordering ordering = *graph.orderingCOLAMD(values);
|
||||||
VectorValues delta = values.zeroVectors(ordering);
|
VectorValues delta = values.zeroVectors(ordering);
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Default constructor */
|
/** Default constructor */
|
||||||
ConcurrentBatchFilter(const LevenbergMarquardtParams& parameters = LevenbergMarquardtParams()) : parameters_(parameters) {};
|
ConcurrentBatchFilter(const LevenbergMarquardtParams& parameters = LevenbergMarquardtParams(), bool relin = true) : parameters_(parameters), relin_(relin) {};
|
||||||
|
|
||||||
/** Default destructor */
|
/** Default destructor */
|
||||||
virtual ~ConcurrentBatchFilter() {};
|
virtual ~ConcurrentBatchFilter() {};
|
||||||
|
|
@ -122,6 +122,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
LevenbergMarquardtParams parameters_; ///< LM parameters
|
LevenbergMarquardtParams parameters_; ///< LM parameters
|
||||||
|
bool relin_;
|
||||||
NonlinearFactorGraph factors_; ///< The set of all factors currently in the filter
|
NonlinearFactorGraph factors_; ///< The set of all factors currently in the filter
|
||||||
Values theta_; ///< Current linearization point of all variables in the filter
|
Values theta_; ///< Current linearization point of all variables in the filter
|
||||||
Ordering ordering_; ///< The current ordering used to calculate the linear deltas
|
Ordering ordering_; ///< The current ordering used to calculate the linear deltas
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue