From cc79d3d5243fe57b3c830d1292b3483db17a914b Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Tue, 5 Jun 2012 17:20:18 +0000 Subject: [PATCH] Updated documentation for PartialPriorFactor - needs to have implementation switched to only requiring manifold/group operations, rather than Lie --- gtsam/slam/PartialPriorFactor.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gtsam/slam/PartialPriorFactor.h b/gtsam/slam/PartialPriorFactor.h index 479fd3fa6..fb8e673cb 100644 --- a/gtsam/slam/PartialPriorFactor.h +++ b/gtsam/slam/PartialPriorFactor.h @@ -28,15 +28,12 @@ namespace gtsam { * * The prior vector used in this factor is stored in compressed form, such that * it only contains values for measurements that are to be compared, and they are in - * the same order as T::Logmap(). The mask will determine which components to extract + * the same order as VALUE::Logmap(). The mask will determine which components to extract * in the error function. * - * It takes two template parameters: - * Key (typically TypedSymbol) is used to look up T's in a Values - * Values where the T's are stored, typically Values or a TupleValues<...> - * * For practical use, it would be good to subclass this factor and have the class type * construct the mask. + * @tparam VALUE is the type of variable the prior effects */ template class PartialPriorFactor: public NoiseModelFactor1 { @@ -46,12 +43,15 @@ namespace gtsam { protected: + // Concept checks on the variable type - currently requires Lie + GTSAM_CONCEPT_LIE_TYPE(VALUE) + typedef NoiseModelFactor1 Base; typedef PartialPriorFactor This; - Vector prior_; ///< measurement on logmap parameters, in compressed form + Vector prior_; ///< measurement on tangent space parameters, in compressed form std::vector mask_; ///< indices of values to constrain in compressed prior vector - Matrix H_; ///< Constant jacobian - computed at creation + Matrix H_; ///< Constant Jacobian - computed at creation /** default constructor - only use for serialization */ PartialPriorFactor() {} @@ -111,6 +111,7 @@ namespace gtsam { if (H) (*H) = H_; // FIXME: this was originally the generic retraction - may not produce same results Vector full_logmap = T::Logmap(p); +// Vector full_logmap = T::identity().localCoordinates(p); // Alternate implementation Vector masked_logmap = zero(this->dim()); for (size_t i=0; i