Bayes++ Library入门学习之熟悉UKF相关类
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相关类的更多相关文章
- Bayes++ Library入门学习之熟悉namespace
Bayes++是一个开源的C++类库.这些类表示并实现了用于离散系统的贝叶斯滤波的各种数值算法.该库中的类提供测试和一致的数值方法,并且用层次明确的结构表明了各种滤波算法和系统模型类型. 接下来,我们 ...
- Bayes++ Library入门学习之熟悉class-Bayesian_filter_base(2)
前面我们已经熟悉了Bayesian_filter::Bayes_filter_base和其子类的击继承关系,接下来我们开始学习该类的实现. bayesFlt.hpp文件为其实现主体,首先是两个常规的头 ...
- Bayes++ Library入门学习之熟悉class-Bayesian_filter_base(1)
在对Bayes++库的名称空间有了一个大概的了解之后,我们开始学习该名称空间下的第一个子类Bayesian_filter::Bayes_filter_base. 该类与其子类的继承关系图如下图所示. ...
- Bayes++ Library入门学习之熟悉class-Importance_resampler
接下来,需要介绍的是重要性重采样类Bayesian_filter::Improtance_resampler.该类实现了两种重采样方法[1][2],和其子类的继承关系图如下: 其中Standard_r ...
- 零基础入门学习Python(36)--类和对象:给大家介绍对象
知识点 Python3 面向对象 Python从设计之初就已经是一门面向对象的语言,正因为如此,在Python中创建一个类和对象是很容易的.本章节我们将详细介绍Python的面向对象编程. 如果你以前 ...
- 第15.10节 PyQt(Python+Qt)入门学习:Qt Designer可视化设计界面组件与QWidget类相关的组件属性详解
PyQt学习有阵子了,对章节的骨架基本考虑好了,准备本节就写组件的属性的,结果一是日常工作繁忙,经常晚上还要加班,二是Qt的组件属性很多,只能逐一学习.研究和整理,花的时间有点长,不过终于将可视化设计 ...
- OpenCV入门学习笔记
OpenCV入门学习笔记 参照OpenCV中文论坛相关文档(http://www.opencv.org.cn/) 一.简介 OpenCV(Open Source Computer Vision),开源 ...
- SCARA——OpenGL入门学习一、二
参考博客:http://www.cppblog.com/doing5552/archive/2009/01/08/71532.html 简介 最近开始一个机械手臂的安装调试,平面关节型机器人又称SCA ...
- opengl入门学习
OpenGL入门学习 说起编程作图,大概还有很多人想起TC的#include <graphics.h>吧? 但是各位是否想过,那些画面绚丽的PC游戏是如何编写出来的?就靠TC那可怜的640 ...
随机推荐
- SVG 贝塞尔曲线控制【方便设置】:贝塞尔曲线
http://dayu.pw/svgcontrol/
- nyoj--214--单调递增子序列(二)(二分查找+LIS)
单调递增子序列(二) 时间限制:1000 ms | 内存限制:65535 KB 难度:4 描述 给定一整型数列{a1,a2...,an}(0<n<=100000),找出单调递增最长子序 ...
- xBIM 基础07 创建WebBIM文件
系列目录 [已更新最新开发文章,点击查看详细] xBIM项目提供了一个IFC文件的Web查看器.当你想把IFC转换成紧凑的WexBIM时,需要 xBIM Essentials 和 xBIM G ...
- Windows 10 Mobile 演示:插入耳机自动执行 APP
Windows Mobile 10 新特性:插入外部设备自动动作(如插入耳机执行 APP.打开小工具):另外可以找到最后一次使用设备地点和时间: http://www.tudou.com/progra ...
- 如何去掉边框及input的兼容问题?
右偷个懒,发现别人写的也不错,我就做个小搬运工 如何去掉边框及input的兼容问题? 说到input,又不得不说它的兼容问题.input如何兼容各个浏览器呢? 第一步:清除input的border的默 ...
- Java文件(io)编程——文件字节流的使用
案例1: 演示FileInputStream类的使用(用FileInputStream的对象把文件读入到内存) 首先要在E盘新建一个文本文件,命名为test.txt,输入若干字符 public cla ...
- 配置 centos apache 的日志文件为每天保存,在home分区
/usr/local/apache/bin/rotatelogs 这个执行程序会根据安装方式不同的位置也不同,yum安装的话,路径为:/usr/sbin/rotatelogs 改为: ErrorLog ...
- django 分组统计遇见的问题
在使用 django 的时候发现了一个坑 例如: In [54]: print(F.objects.all().values("age").annotate(fff=Count(& ...
- 浅谈 MySQL的外键的作用
MySQL中外键的介绍: MySQL外键必须使用存储引擎为 innDB 其中MySAM 和MEMORYH这两种引擎不支持 由数据库自身保证数据一致性,完整性,更可靠,因为程序很难100%保证数据的 ...
- win10 64位下VirtualBox安装CentOS6.9
第一步:安装VritualBox 百度“VritualBox”下载安装即可: 第二步:下载Linux镜像系统并安装 这里写出我参照的博客,很详细,我就不累赘了! 原文地址:http://blog.cs ...