class mola::SharedKeyframeMap

Overview

Mixin interface for a central-map backend (e.g. mola_mapper_3d) that accepts keyframe-insertion requests from front ends (LIO/VIO), decoupled from the front end’s own internal local map / odometry frame.

A front end detects this sink the same way it detects a NavStateFilter (ExecutableBase::findService<SharedKeyframeMap>()) and, when present, pushes keyframes using its own existing keyframing/sparsity criteria, in addition to (or instead of) writing its own .simplemap.

Implementations are required to be thread-safe.

#include <SharedKeyframeMap.h>

class SharedKeyframeMap
{
public:
    // typedefs

    typedef uint64_t KeyFrameID;

    // structs

    struct KeyframeInsertRequest;

    // construction

    SharedKeyframeMap();
    SharedKeyframeMap(const SharedKeyframeMap&);
    SharedKeyframeMap(SharedKeyframeMap&&);

    // methods

    SharedKeyframeMap& operator = (const SharedKeyframeMap&);
    SharedKeyframeMap& operator = (SharedKeyframeMap&&);
    virtual std::optional<KeyFrameID> requestInsertKeyframe(const KeyframeInsertRequest& req) = 0;
};

Methods

virtual std::optional<KeyFrameID> requestInsertKeyframe(const KeyframeInsertRequest& req) = 0

Requests inserting one keyframe into the central map.

Returns:

The central-map keyframe id, or std::nullopt if the request was rejected.