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. HDFS HA架构以及源代码引导

    HA体系架构 相关知识介绍 HDFS master/slave架构,HDFS节点分为NameNode节点和DataNode节点. NameNode存有HDFS的元数据:主要由FSImage和EditL ...

  2. keras安装及使用

    安装全称参考https://keras-cn.readthedocs.io/en/latest/for_beginners/keras_linux/ 环境中已配置cuda8.0.cudnn5.0,ub ...

  3. BZOJ 2127 二元关系

    题意: 思路: 先把所有的值加起来 最小割割哪儿 就代表那个地方不选 一减 剩下的就是 最大值了 //By SiriusRen #include <cstdio> #include < ...

  4. Eclipse安装Web插件

    方法/步骤     本次安装教程,我把所有的步骤都写在了图片中,大家仔细查看图片即可,希望能帮到大家   1.选择菜单栏上的“Help”   选择Install New Software   在弹出的 ...

  5. c#0218-命名空间

    1 namespace 命名空间 可以解决类的重命名问题 可以看做是类的文件夹: 2 跨项目使用类 一个解决方案下有不同的项目,如果想在一个项目中引用另一个项目的类,解决方法是 1 添加引用 2 引用 ...

  6. 1028C:Rectangles

    You are given n rectangles on a plane with coordinates of their bottom left and upper right points. ...

  7. Docker学习笔记(1)----认识Docker

    1. 什么Docker? Docker是一个能把开发的应用程序自动部署到容器的引擎,它使用go语言编写的开源引擎,它在github上面个的地址为:https://github.com/docker/d ...

  8. 优动漫PAINT个人版绘制树叶教程

    超详细树叶绘制法,更有配套绘树小TIPE!让你画树So Easy~一秒变身,画树达人! 优动漫PAINT个人版软件下载:http://www.dongmansoft.com/chanpin.html ...

  9. c/s结构的自动化——pyautogui

    环境:Python 3.5.3 pip install pyautogui -i http://pypi.douban.com/simple --trusted-host pypi.douban.co ...

  10. ztree连接数据库,实现下拉菜单

    $(document).ready(function(){ var treeObj = $("#treeDemo"); $.fn.zTree.init(treeObj, setti ...