diff --git a/include/core/factor/factor_base.h b/include/core/factor/factor_base.h index 1894148de2ea576614b14d6de81a4f138c4e037c..0ca91c9c6bb5db6577e268e9f159da0f09a89a4e 100644 --- a/include/core/factor/factor_base.h +++ b/include/core/factor/factor_base.h @@ -123,6 +123,31 @@ class FactorBase : public NodeBase, public std::enable_shared_from_this<FactorBa return topology_; } + std::string getTopologyString() const + { + switch (topology_) + { + case TOP_GEOM: + return "GEOM"; + break; + case TOP_ABS: + return "ABS"; + break; + case TOP_LMK: + return "LMK"; + break; + case TOP_LOOP: + return "LOOP"; + break; + case TOP_OTHER: + return "OTHER"; + break; + default: + return "UNDEFINED"; + } + } + + /** \brief Evaluate the factor given the input parameters and returning the residuals and jacobians **/ virtual bool evaluate(double const* const* _parameters, double* _residuals, double** _jacobians) const = 0;