Template Class LocalizationFilter

Class Documentation

template<class T>
class maplab::LocalizationFilter

Public Functions



The RosFilter constructor makes sure that anyone using this template is doing so with the correct object type



Clears out the message filters and topic subscribers.

void reset()

Resets the filter to its initial state.

void initialize(const common::LocalizationResult &T_G_M_init, const aslam::Transformation &T_M_B)
bool localizationCallback(const common::LocalizationResult &localization, const vio::ViNodeState &T_M_B_buffered)

Callback method for receiving all localization messages.

  • localization[in] - The Localization Result from world - base_link

  • T_M_B_buffered[in] - The odometry estimate from mission - base_link

inline int64_t getLastMessageTimeNs()
void getFusedLocalization(common::LocalizationResult *fused_localization_result) const
inline bool isInitialized() const

Protected Functions

void localizationResultToMeasurement(const common::LocalizationResult &msg, LocalizationFilterMeasurement &localization_G_B)

Converts a localization result for integration into the filter.

  • msg[in] - The localization message to prepare

  • localization_G_B[out] - The localization in the desired format (base_link - global)

void aslamTransformationToStateVector(const aslam::Transformation &transformation, Eigen::VectorXd &state_vector) const

Protected Attributes

std::atomic<int64_t> last_message_time_
common::LocalizationMode localization_mode_
T filter_

Our filter (EKF, UKF, etc.)

std::vector<size_t> update_vector_

Which entries of the filter state are being updated by a measurement.

Currently set to true for all of them, but might be useful for extensions of the filter state later on.