Template Class EKFSensorFusion

Class Documentation

template<typename MotionModelType, typename ObservationModelType>
class EKFSensorFusion

Public Types

typedef MotionModelType motion_model_type
typedef ObservationModelType observation_model_type
typedef DynMat<real_t> matrix_type
typedef std::string topic_type

Public Functions

EKFSensorFusion(motion_model_type &motion_model, observation_model_type &observation_model)
~EKFSensorFusion()
void step(real_t dt)
EKFSensorFusion &with_matrix(const std::string &name, const matrix_type &mat)
std::optional<std::string> read_from_topic(const topic_type &topic, std::chrono::milliseconds timeout = std::chrono::milliseconds(1000))
void add_input_topic(const std::string &mqtt_url, const topic_type &topic)
void add_sensor_topic(const std::string &mqtt_url, const topic_type &topic, SensorTypeEnum sensor_type)
void add_sensor_noise(const topic_type &topic, const DynMat<real_t> &noise)

Add the modelled sensor noise

Parameters:
  • topic

  • noise

void predict(real_t dt, const std::string &input_message, const std::string &sensor_message, const topic_type &topic)

Predict the next state

Parameters:

dt

void update(real_t dr, const std::string &sensor_message, const topic_type &topic)
const matrix_type &operator[](const std::string &name) const

Returns the name-th matrix.

matrix_type &operator[](const std::string &name)

Returns the name-th matrix.

bool has_matrix(const std::string &name) const

Returns true if the matrix with the given name exists.