class mola::SmartFactorIMU

Overview

Smart factor for a set of IMU measurements (acceleration & gyroscope).

#include <SmartFactorIMU.h>

class SmartFactorIMU: public mola::FactorBase
{
public:
    // enums

    enum NewState;

    // fields

    NewState new_state_ {NewState::NONE};
    double ax_;
    double ay_;
    double az_;
    double wx_;
    double wy_;
    double wz_;
    double dt_;
    mola::id_t prev_pose_kf_;
    mola::id_t new_pose_kf_;

    // construction

    SmartFactorIMU();
    SmartFactorIMU(BackEndBase* slam_backend);

    // methods

    virtual std::size_t edge_count() const;
    virtual mola::id_t edge_indices(const std::size_t i) const;

    void integrateMeasurement(
        double accx,
        double accy,
        double accz,
        double wx,
        double wy,
        double wz,
        double dt
        );

    void createIMUFactor(
        mola::id_t prev_pose_kf,
        mola::id_t new_pose_kf
        );
};

Inherited Members

public:
    // fields

    mola::fid_t my_id_ {mola::INVALID_FID};
    mola::Robust robust_type_ {mola::Robust::REGULAR_L2};
    double robust_param_ {1.0};

    // methods

    virtual std::size_t edge_count() const = 0;
    virtual mola::id_t edge_indices(const std::size_t i) const = 0;

Methods

virtual std::size_t edge_count() const

Number of entities involved in this factor: 1 for unary factors, 2 for binary, etc.

virtual mola::id_t edge_indices(const std::size_t i) const

Access entity indices involved in this factor