class mola::KeyframePointCloudMap::KeyFrame

Overview

Key-frame data

class KeyFrame
{
public:
    // fields

    mrpt::Clock::time_point timestamp;

    // construction

    KeyFrame(std::size_t k_correspondences_for_cov);
    KeyFrame(const KeyFrame& other);
    KeyFrame(KeyFrame&&);

    // methods

    KeyFrame& operator = (const KeyFrame& other);
    KeyFrame& operator = (KeyFrame&&);
    void pointcloud(const mrpt::maps::CPointsMap::Ptr& pc);
    const mrpt::maps::CPointsMap::Ptr& pointcloud() const;
    const mrpt::maps::CPointsMap::Ptr& pointcloud_global() const;
    void pose(const mrpt::poses::CPose3D& pose);
    const mrpt::poses::CPose3D& pose() const;
    mrpt::math::TBoundingBoxf localBoundingBox() const;
    void buildCache() const;
    void invalidateCache();
    const auto& covariancesGlobal() const;
    std::shared_ptr<mrpt::opengl::CPointCloudColoured> getViz(const TRenderOptions& ro) const;
};

Fields

mrpt::Clock::time_point timestamp

Timestamp of the key-frame (from observation)

Methods

void pointcloud(const mrpt::maps::CPointsMap::Ptr& pc)

Local metric map for this key-frame. Points are already transformed from the sensor frame to the vehicle (“base_link”) frame.

void pose(const mrpt::poses::CPose3D& pose)

Sets the pose of the key-frame in the map reference frame.

const mrpt::poses::CPose3D& pose() const

Gets the pose of the key-frame in the map reference frame.

void buildCache() const

Ensures the bbox, the kd-tree, and the covariances are built.

std::shared_ptr<mrpt::opengl::CPointCloudColoured> getViz(const TRenderOptions& ro) const

Builds (or get cached) visualization of the cloud in this KF, already transformed to its global pose.