struct mola::SharedKeyframeMap::KeyframeMapSnapshot

Overview

The keyframes of the central map with their current pose estimates.

#include <SharedKeyframeMap.h>

struct KeyframeMapSnapshot
{
    // fields

    std::uint64_t poses_revision = 0;
    std::vector<mrpt::poses::CPose3D> poses;
    std::vector<mrpt::Clock::time_point> timestamps;
    KeyFrameID first_id = 0;
    std::vector<mrpt::obs::CSensoryFrame> observations;
    bool is_final = false;
    std::string map_file;
};

Fields

std::uint64_t poses_revision = 0

Changes whenever the pose estimates of keyframes already in the map change (e.g. after each solve of a global pose graph).

std::vector<mrpt::poses::CPose3D> poses

Current pose estimate (vehicle frame) in the map frame of every keyframe, by id (0, 1, …).

std::vector<mrpt::Clock::time_point> timestamps

Time of every keyframe, by id.

KeyFrameID first_id = 0

Id of the first keyframe in observations.

std::vector<mrpt::obs::CSensoryFrame> observations

Observations of the keyframes first_id, first_id + 1, …, as inserted (KeyframeInsertRequest::observations). Shallow copies: the observation objects are shared with the map and other modules and are read-only for everyone. To load, unload or modify one, work on a deep copy (e.g. a CObservationImage copy shares its pixels: copy the image too).

bool is_final = false

True once the map will not change any more (e.g. after the end-of-run passes of a mapper): no new keyframes and no new pose estimates. The map saves its keyframes after this, once the writers of keyframe metadata have sent their last values (see set_keyframe_metadata()).

std::string map_file

File the map is (or will be) saved to, if any, so annotations can be saved next to it. Empty: none.