mola-kernel: MOLA data types and interfaces

Overview

// typedefs

typedef std::map<std::string, LazyLoadResource> mola::annotations_data_t;
typedef std::variant<std::monostate, RefPose3, RelPose3, RelPose3KF, RelDynPose3KF, LandmarkPoint3, EntityOther> mola::Entity;
typedef std::variant<std::monostate, FactorRelativePose3, FactorConstVelKinematics, FactorStereoProjectionPose, SmartFactorStereoProjectionPose, SmartFactorIMU, FactorOther> mola::Factor;
typedef std::uint64_t mola::id_t;
typedef std::uint64_t mola::fid_t;
typedef mola::fast_map<id_t, mola::fast_set<fid_t>> mola::entity_connected_factors_t;
typedef ContainerDeque<Entity, WorldModelData::EntitiesContainer, EntityBase, EntityOther, id_t> mola::EntitiesContainerDeque;
typedef ContainerFastMap<Entity, WorldModelData::EntitiesContainer, EntityBase, EntityOther, id_t, e_str> mola::EntitiesContainerFastMap;

// enums

enum mola::Robust;

// structs

struct mola::NavState;

// classes

class mola::BackEndBase;
class mola::Dataset_UI;
class mola::EntityBase;
class mola::EntityRelativeBase;
class mola::ExecutableBase;
class mola::FactorBase;
class mola::FactorConstVelKinematics;
class mola::FactorRelativePose3;
class mola::FactorStereoProjectionPose;
class mola::FilterBase;
class mola::FrontEndBase;
class mola::KeyFrameBase;
class mola::LandmarkPoint3;
class mola::LocalizationSourceBase;
class mola::MapServer;
class mola::MapSourceBase;
class mola::NavStateFilter;
class mola::OfflineDatasetSource;
class mola::RawDataConsumer;
class mola::RawDataSourceBase;
class mola::RefPose3;
class mola::RelDynPose3KF;
class mola::RelPose3;
class mola::RelPose3KF;
class mola::Relocalization;
class mola::SmartFactorIMU;
class mola::SmartFactorStereoProjectionPose;
class mola::VizInterface;
class mola::WorldModel;
class mola::WorldModelData;

// global variables

constexpr id_t mola::INVALID_ID = std::numeric_limits<id_t>::max();
constexpr fid_t mola::INVALID_FID = std::numeric_limits<fid_t>::max();

Typedefs

typedef std::map<std::string, LazyLoadResource> mola::annotations_data_t

Arbitrary annotated data, indexed by “label” or “variable name” and capable of offline storage on disk when not used.

typedef std::variant<std::monostate, RefPose3, RelPose3, RelPose3KF, RelDynPose3KF, LandmarkPoint3, EntityOther> mola::Entity

Variant type for “entities” in the world model. It’s guaranteed that the type is either:

  • std::monostate : Not initialized, or

  • A class derived from EntityBase (stored by value), or

  • EntityOther, which is a wrapper around EntityBase::Ptr (an object allocated in the heap).

In this way, Entity can be handled as a polymorphic class, without the cost of dynamic memory allocation for the most-common classes, while still allowing using any user-derived class via dynamic memory.

typedef std::variant<std::monostate, FactorRelativePose3, FactorConstVelKinematics, FactorStereoProjectionPose, SmartFactorStereoProjectionPose, SmartFactorIMU, FactorOther> mola::Factor

Variant type for “factors” in the world model. It’s guaranteed that the type is either:

  • std::monostate : Not initialized, or

  • A class derived from FactorBase (stored by value), or

  • FactorOther, which is a wrapper around FactorBase::Ptr (an object allocated in the heap).

In this way, Factor can be handled as a polymorphic class, without the cost of dynamic memory allocation for the most-common classes, while still allowing using any user-derived class via dynamic memory.

typedef std::uint64_t mola::id_t

Unique ID for each Entity in a WorldModel.

typedef std::uint64_t mola::fid_t

Unique ID for each Factor in a WorldModel.

typedef ContainerDeque<Entity, WorldModelData::EntitiesContainer, EntityBase, EntityOther, id_t> mola::EntitiesContainerDeque

Implementation of EntitiesContainer using a std::deque. Avoids pool allocation for each entry, but poorly supports discontinuous ID numbers.

typedef ContainerFastMap<Entity, WorldModelData::EntitiesContainer, EntityBase, EntityOther, id_t, e_str> mola::EntitiesContainerFastMap

Implementation of EntitiesContainer using a std::map<> with mola::FastAllocator.

Global Variables

constexpr id_t mola::INVALID_ID = std::numeric_limits<id_t>::max()

A numeric value for invalid IDs.

constexpr fid_t mola::INVALID_FID = std::numeric_limits<fid_t>::max()

A numeric value for invalid IDs.