Class FactorBase

Inheritance Relationships

Base Type

  • public mrpt::serialization::CSerializable

Derived Types

Class Documentation

class FactorBase : public mrpt::serialization::CSerializable

Base class for all “factors” in the world model

Subclassed by mola::FactorDynamicsConstVel, mola::FactorRelativePose3, mola::FactorStereoProjectionPose, mola::SmartFactorIMU, mola::SmartFactorStereoProjectionPose

Public Functions

FactorBase() = default
virtual ~FactorBase()
virtual std::size_t edge_count() const = 0

Number of entities involved in this factor: 1 for unary factors, 2 for binary, etc.

virtual mola::id_t edge_indices(const std::size_t i) const = 0

Access entity indices involved in this factor

Public Members

mola::fid_t my_id_ = {mola::INVALID_FID}

The unique ID of this factor in the world model. Stored here for convenience, notice that it is redundant since entities are already stored in the WorldModel indexed by ID.

mola::Robust robust_type_ = {mola::Robust::REGULAR_L2}

Type of robust error function to use

double robust_param_ = {1.0}

Parameter for the robust error function, if so defined in robust_type_

Protected Functions

void baseSerializeTo(mrpt::serialization::CArchive &out) const
void baseSerializeFrom(mrpt::serialization::CArchive &in)