粒子滤波(Particle Filter)及其在机器人定位中的应用

本文介绍了粒子滤波的基本思想,即使用随机样本来近似概率分布,通过调节粒子权值和位置,实现状态估计。重点讨论了粒子滤波在机器人定位中的应用,概述了算法步骤,展示了其在最优贝叶斯估计中的效果。
摘要由CSDN通过智能技术生成

一、粒子滤波简介

粒子滤波的基本思想是用随机样本来描述概率分布,然后在测量的基础上,通过调节各粒子权值的大小和样本的位置,来近似实际概率分布,并以样本的均值作为系统的估计值。  

粒子滤波是指:通过寻找一组在状态空间中传播的随机样本对概率密度函数P(Xk|Zk)进行近似,以样本均值代替积分运算,从而获得状态最小方差估计的过程,这些样本即称为“粒子。采用数学语言描述如下:对于平稳的随机过程,假定k-1时刻系统的后验概率密度为P(Xk-1|Zk-1),依据一定原则选取n个随机样本点,k时刻获得测量信息后,经过状态和时间更新过程,n个粒子的后验概率密度可近似为P(Xk|Zk) 。随着粒子数目的增加,粒子的概率密度函数逐渐逼近状态的概率密度数,粒子滤波估计即达到了最优贝叶斯估计的效果。

粒子滤波的算法步骤如下:


粒子滤波的推导过程详见http://blog.csdn.net/heyijia0327/article/category/3245449


二、粒子滤波在机器人定位中的应用


from math import *
import random

# --------
# 
# some top level parameters
#

max_steering_angle = pi / 4.0 # You do not need to use this value, but keep in mind the limitations of a real car.
bearing_noise = 0.1 # Noise parameter: should be included in sense function.
steering_noise = 0.1 # Noise parameter: should be included in move function.
distance_noise = 5.0 # Noise parameter: should be included in move function.

tolerance_xy = 15.0 # Tolerance for localization in the x and y directions.
tolerance_orientation = 0.25 # Tolerance for orientation.


# --------
# 
# the "world" has 4 landmarks.
# the robot's initial coordinates are somewhere in the square
# represented by the landmarks.
#
# NOTE: Landmark coordinates are given in (y, x) form and NOT
# in the traditional (x, y) format!

landmarks  = [[0.0, 100.0], [0.0, 0.0], [100.0, 0.0], [100.0, 100.0]] # position of 4 landmarks in (y, x) format.
world_size = 100.0 # world is NOT cyclic. Robot is allowed to travel "out of bounds"

# ------------------------------------------------
# 
# this is the robot class
#

class robot:

    # --------
    # i
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值