mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
example.cpp File Reference

Example file for the LKF implementation. More...

#include <mrs_lib/lkf.h>
#include <random>
#include <ros/ros.h>
+ Include dependency graph for example.cpp:

Namespaces

 mrs_lib
 All mrs_lib functions, classes, variables and definitions are contained in this namespace.
 

Typedefs

using mrs_lib::lkf_t = LKF< n_states, n_inputs, n_measurements >
 
using A_t = lkf_t::A_t
 
using B_t = lkf_t::B_t
 
using H_t = lkf_t::H_t
 
using Q_t = lkf_t::Q_t
 
using x_t = lkf_t::x_t
 
using P_t = lkf_t::P_t
 
using u_t = lkf_t::u_t
 
using z_t = lkf_t::z_t
 
using R_t = lkf_t::R_t
 
using statecov_t = lkf_t::statecov_t
 

Enumerations

enum  x_pos {
  x_x = 0, x_y = 1, x_z = 2, x_dx = 3,
  x_dy = 4, x_dz = 5, x_x = 0, x_y = 1,
  x_dx = 2, x_dy = 3, x_x = 0, x_y = 1,
  x_alpha = 2, x_x = 0, x_y, x_alpha,
  x_speed
}
 
enum  u_pos { u_dx = 0, u_dy = 0, u_alpha = 0, u_alpha = 0 }
 
enum  z_pos {
  z_x = 0, z_y = 1, z_x = 0, z_y = 1,
  z_x = 0, z_y
}
 

Functions

x_t tra_model_f (const x_t &x, const u_t &u, [[maybe_unused]] const double dt)
 
z_t obs_model_f (const x_t &x)
 
template<int rows>
Eigen::Matrix< double, rows, 1 > normal_randmat (const Eigen::Matrix< double, rows, rows > &cov)
 
int main ()
 

Variables

const int mrs_lib::n_measurements = 2
 
A_t A
 
B_t B
 
H_t H
 
const double speed = 0.3
 

Detailed Description

Example file for the LKF implementation.

Author
Matouš Vrba - vrbam.nosp@m.ato@.nosp@m.fel.c.nosp@m.vut..nosp@m.cz

This example may be run after building mrs_lib by executing rosrun mrs_lib lkf_example.

See lkf/example.cpp.