Class KeyframeMapCapable
Defined in File KeyframeMapCapable.h
Class Documentation
-
class KeyframeMapCapable
Mixin interface for keyframe-based metric maps that need to expose per-KF pose plumbing to higher layers (e.g. LiDAR odometry online gravity tilt correction).
A “keyframe map” is a metric map whose internal representation is a finite, dynamic set of SE(3)-posed sub-clouds (keyframes), each identified by a stable monotonic
KeyFrameID.All methods are required to be thread-safe with respect to the implementing class’ own internal state.
Public Types
-
using KeyFrameID = uint64_t
Public Functions
-
KeyframeMapCapable() = default
-
KeyframeMapCapable(const KeyframeMapCapable&) = default
-
KeyframeMapCapable &operator=(const KeyframeMapCapable&) = default
-
KeyframeMapCapable(KeyframeMapCapable&&) = default
-
KeyframeMapCapable &operator=(KeyframeMapCapable&&) = default
-
virtual ~KeyframeMapCapable()
-
virtual std::map<KeyFrameID, mrpt::poses::CPose3D> keyframePoses() const = 0
Returns a snapshot of all currently-active keyframe poses, keyed by KF id. The returned map is a deep copy and is safe to hold across subsequent map mutations.
-
virtual std::optional<KeyFrameID> oldestActiveKeyframeID() const = 0
Returns the smallest currently-active KF id, or nullopt if the map is empty. Used as the natural pivot for online tilt correction (oldest active KF stays put).
-
virtual void setKeyframePose(KeyFrameID id, const mrpt::poses::CPose3D &new_pose) = 0
Overwrites the pose of one keyframe. No-op if
idis not present. Any internal caches dependent on KF poses must be invalidated by the implementation.
-
virtual void applyPivotTransform(KeyFrameID pivot_id, const mrpt::poses::CPose3D &delta_at_pivot) = 0
Applies a pivot-based rigid SE(3) transform to all currently-active KFs.
Implementations are encouraged to delegate to their existing
transform_map_left_multiply()after computing: T_correct = T_pivot + delta_at_pivot + (-T_pivot) No-op ifpivot_idis not present in the active set.
-
using KeyFrameID = uint64_t