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. bzoj1045: [HAOI2008] 糖果传递(数论)

    1045: [HAOI2008] 糖果传递 题目:传送门(双倍经验3293) 题解: 一开始想着DP贪心一顿乱搞,结果就GG了 十分感谢hzwer大佬写的毒瘤数论题解: 首先,最终每个小朋友的糖果数量 ...

  2. CoreData(数据库升级 )版本迁移-iOS App升级安装

    版权声明:本文为博主原创文章,未经博主允许不得转载. 如果IOS App 使用到CoreData,并且在上一个版本上有数据库更新(新增表.字段等操作),那在覆盖安装程序时就要进行CoreData数据库 ...

  3. m_Orchestrate learning system---二十二、html代码如何变的容易

    m_Orchestrate learning system---二十二.html代码如何变的容易 一.总结 一句话总结:(结构清晰之后构建页面就变得超级容易了)(多做多用一下子就熟了) 1.文章显示页 ...

  4. 3.多线程传参,以及tuple数组

    #include <Windows.h> #include <thread> #include <iostream> #include <tuple> ...

  5. BZOJ 2127 二元关系

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

  6. 解决JavaScript浮点数(小数) 运算出现Bug的方法

    解决JS浮点数(小数) 运算出现Bug的方法例如37.2 * 5.5 = 206.08 就直接用JS算了一个结果为: 204.60000000000002 怎么会这样, 两个只有一位小数的数字相乘, ...

  7. Re:从0开始的微服务架构:(一)重识微服务架构--转

    原文地址:http://www.infoq.com/cn/articles/micro-service-architecture-from-zero?utm_source=infoq&utm_ ...

  8. Java 以空格分割字符串

    Java中使用类似于 str.split("/"); 的方法可以很方便的实现将一个字符串分割为数组, 但是如果分隔符是一个(或几个)空格呢?? 我们的本能反应或许应该是 str.s ...

  9. 你不知道的JavaScript(二)数组

    作为一种线性数据结构,几乎每一种编程语言都支持数组类型.和c++.java这些强类型的语言相比,JavaScript数组有些不同,它可以存放任意类型的值.上节中有提到过JS中任意类型的值都可以赋值给任 ...

  10. C# 运算符 ?、??、?: 、?. 、 各种问号的用法和说明

    1. 可空类型修饰符(?):引用类型可以使用空引用表示一个不存在的值,而值类型通常不能表示为空.例如:string str=null; 是正确的,int i=null; 编译器就会报错.为了使值类型也 ...