UKF-SLAM是一种比较流行SLAM方案。相比EKF-SLAM,UKF利用unscented transform代替了EKF的线性化趋近,因而具有更高的精度。Bayes++库中的unsFlt.hpp中给出了UKF实现的相关类。

namespace Bayesian_filter
{ class Unscented_predict_model : public Predict_model_base
/* Specific Unscented prediction model for Additive noise
43 * x(k|k-1) = f(x(k-1|k-1)) + w(x(k))
44 *
45 * Unscented filter requires
46 * f the function part of the non-linear model
47 * Q the covariance of the additive w(x(k)), w is specifically allow to be a function of state
48 */
{
public:
Unscented_predict_model (std::size_t q_size)
{
q_unscented = q_size;
} virtual const FM::Vec& f(const FM::Vec& x) const = ;
// Functional part of additive model
// Note: Reference return value as a speed optimisation, MUST be copied by caller. virtual const FM::SymMatrix& Q(const FM::Vec& x) const = ;
// Covariance of additive noise
// Note: Reference return value as a speed optimisation, MUST be copied by caller.
private:
friend class Unscented_filter; // Filter implementation need to know noise size
std::size_t q_unscented;
}; class Unscented_scheme : public Linrz_kalman_filter, public Functional_filter
{
private:
std::size_t q_max; // Maximum size allocated for noise model, constructed before XX
public:
FM::ColMatrix XX; // Unscented form of state, with associated Kappa
Float kappa; Unscented_scheme (std::size_t x_size, std::size_t z_initialsize = );
Unscented_scheme& operator= (const Unscented_scheme&);
// Optimise copy assignment to only copy filter state void init ();
void init_XX ();
void update ();
void update_XX (Float kappa); void predict (Unscented_predict_model& f);
// Efficient Unscented prediction
void predict (Functional_predict_model& f);
void predict (Additive_predict_model& f);
Float predict (Linrz_predict_model& f)
{ // Adapt to use the more general additive model
predict(static_cast<Additive_predict_model&>(f));
return .; // Always well condition for additive predict
} Float observe (Uncorrelated_additive_observe_model& h, const FM::Vec& z);
Float observe (Correlated_additive_observe_model& h, const FM::Vec& z);
// Unscented filter implements general additive observe models Float observe (Linrz_uncorrelated_observe_model& h, const FM::Vec& z)
{ // Adapt to use the more general additive model
return observe (static_cast<Uncorrelated_additive_observe_model&>(h),z);
}
Float observe (Linrz_correlated_observe_model& h, const FM::Vec& z)
{ // Adapt to use the more general additive model
return observe (static_cast<Correlated_additive_observe_model&>(h),z);
} public: // Exposed Numerical Results
FM::Vec s; // Innovation
FM::SymMatrix S, SI; // Innovation Covariance and Inverse protected:
virtual Float predict_Kappa (std::size_t size) const;
virtual Float observe_Kappa (std::size_t size) const;
/* Unscented Kappa values
117 default uses the rule which minimise mean squared error of 4th order term
118 */ protected: // allow fast operation if z_size remains constant
std::size_t last_z_size;
void observe_size (std::size_t z_size); private:
void unscented (FM::ColMatrix& XX, const FM::Vec& x, const FM::SymMatrix& X, Float scale);
/* Determine Unscented points for a distribution */
std::size_t x_size;
std::size_t XX_size; // 2*x_size+1 protected: // Permanently allocated temps
FM::ColMatrix fXX;
}; }//namespace
#endif

Bayes++ Library入门学习之熟悉UKF相关类的更多相关文章

  1. Bayes++ Library入门学习之熟悉namespace

    Bayes++是一个开源的C++类库.这些类表示并实现了用于离散系统的贝叶斯滤波的各种数值算法.该库中的类提供测试和一致的数值方法,并且用层次明确的结构表明了各种滤波算法和系统模型类型. 接下来,我们 ...

  2. Bayes++ Library入门学习之熟悉class-Bayesian_filter_base(2)

    前面我们已经熟悉了Bayesian_filter::Bayes_filter_base和其子类的击继承关系,接下来我们开始学习该类的实现. bayesFlt.hpp文件为其实现主体,首先是两个常规的头 ...

  3. Bayes++ Library入门学习之熟悉class-Bayesian_filter_base(1)

    在对Bayes++库的名称空间有了一个大概的了解之后,我们开始学习该名称空间下的第一个子类Bayesian_filter::Bayes_filter_base. 该类与其子类的继承关系图如下图所示. ...

  4. Bayes++ Library入门学习之熟悉class-Importance_resampler

    接下来,需要介绍的是重要性重采样类Bayesian_filter::Improtance_resampler.该类实现了两种重采样方法[1][2],和其子类的继承关系图如下: 其中Standard_r ...

  5. 零基础入门学习Python(36)--类和对象:给大家介绍对象

    知识点 Python3 面向对象 Python从设计之初就已经是一门面向对象的语言,正因为如此,在Python中创建一个类和对象是很容易的.本章节我们将详细介绍Python的面向对象编程. 如果你以前 ...

  6. 第15.10节 PyQt(Python+Qt)入门学习:Qt Designer可视化设计界面组件与QWidget类相关的组件属性详解

    PyQt学习有阵子了,对章节的骨架基本考虑好了,准备本节就写组件的属性的,结果一是日常工作繁忙,经常晚上还要加班,二是Qt的组件属性很多,只能逐一学习.研究和整理,花的时间有点长,不过终于将可视化设计 ...

  7. OpenCV入门学习笔记

    OpenCV入门学习笔记 参照OpenCV中文论坛相关文档(http://www.opencv.org.cn/) 一.简介 OpenCV(Open Source Computer Vision),开源 ...

  8. SCARA——OpenGL入门学习一、二

    参考博客:http://www.cppblog.com/doing5552/archive/2009/01/08/71532.html 简介 最近开始一个机械手臂的安装调试,平面关节型机器人又称SCA ...

  9. opengl入门学习

    OpenGL入门学习 说起编程作图,大概还有很多人想起TC的#include <graphics.h>吧? 但是各位是否想过,那些画面绚丽的PC游戏是如何编写出来的?就靠TC那可怜的640 ...

随机推荐

  1. WinForm容器内控件批量效验是否同意为空?设置是否仅仅读?设置是否可用等方法分享

    WinForm容器内控件批量效验是否同意为空?设置是否仅仅读?设置是否可用等方法分享 在WinForm程序中,我们有时须要对某容器内的全部控件做批量操作.如批量推断是否同意为空?批量设置为仅仅读.批量 ...

  2. hdu4390-Number Sequence(容斥计算)

    题意:给定b数列.计算有多少种数列 a1,a2,...,an 满足条件 a1*a2*...*an=b1*b2*-*bn (ai>1). 解法:处理出b数列中出现的全部质因子的数量记录在map中, ...

  3. Java 7之传统I/O - 字符类 StringReader和StringWriter

    转自:https://www.xuebuyuan.com/2015312.html 这两个类将String类适配到了Reader和Writer接口,在StringWriter类实现的过程中,真正使用的 ...

  4. ubuntu12.04下NFS链接开发板并测试交叉编译的第一个应用

    思路:配置网络->安装NFS->配置NFS->挂载NFS服务->Down文件执行.Okay lets go! 配置网络: 在配置网络之前,首先咱得搞定与开发板的交互工作,那么这 ...

  5. Codeforces 667D World Tour 最短路

    链接 Codeforces 667D World Tour 题意 给你一个有向稀疏图,3000个点,5000条边. 问选出4个点A,B,C,D 使得 A-B, B-C, C-D 的最短路之和最大. 思 ...

  6. C# Lambda && Linq

    Lambda表达式在C#3.0加入,它是一个匿名函数,可用于创建委托或者表达式树类型,运算符为=>,读作"goes to",=>左侧是变量,右侧是表达式,变量类型可以自 ...

  7. Python读取Matlab的.mat文件

    参考网站: https://blog.csdn.net/rumswell/article/details/8545087 数据: R 22*22 double 部分截图如下: 使用sicpy.io即可 ...

  8. eclipse的maven工程视图切换

    上面图切换成下面图: 点击eclipse右上角,如下图红圈,然后在选择javaEE这样就切换成javaEE视图了

  9. vue实现tab栏切换

    html <ul class="tab"> <li v-for="(item,index) in tabs" @click="tab ...

  10. layui计算剩余时间

    <div id="test"></div> <script> layui.use('util', function(){ var util = ...