Public Member Functions | Public Attributes
ownRandom Class Reference

#include <CParticleFilter.h>

List of all members.

Public Member Functions

void allocate (int m_size)
 Allocate the memory for cache.
void allocate (int m_size)
 Allocate the memory for cache.
void covRandom (float &xRand, float &yRand, float cov[3])
void covRandom (float &xRand, float &yRand, float cov[3])
void fillCache ()
void fillCache ()
float getCachedUniformRandom ()
float getCachedUniformRandom ()
float normalRandom ()
float normalRandom ()
 ownRandom ()
 ownRandom ()
float uniformRandom (void)
float uniformRandom (void)
 ~ownRandom ()
 ~ownRandom ()

Public Attributes

bool isOk
float * normalRandomCache
int size

Detailed Description

This is an implementation of a particle filter Short howto: Create -> CParticleFilter filt; Init -> filt.initializeNormalRandom(init_pose, variance,size_of_filter); ///also uniform init Predict -> filt.predict(delta_movement, std_of_noise)

Next Calculate the likehood using some likelihood function, which updates LikelihoodFunction(&filt) where you update the particle likelihood manually (filt.Particles[i].lik) or then you calculate the likelihood vector and use updateLikelihood(float *lik) - function

Next make the normalization -> filt.normalize();

Now you can go back to predict or then you can resample the distribution by calling filt.SIRupdate();

Author:
Jari Saarinen (jari.p.saarinen@gmail.com) Class for random number generation

A helper class for calculating random numbers

Author:
Jari Saarinen (jari.p.saarinen@gmail.com) Class for random number generation

Definition at line 35 of file CParticleFilter.h.


Constructor & Destructor Documentation

ownRandom::ownRandom ( ) [inline]

< set new seed

Definition at line 41 of file CParticleFilter.h.

ownRandom::~ownRandom ( ) [inline]

Definition at line 47 of file CParticleFilter.h.

ownRandom::ownRandom ( ) [inline]

< set new seed

Definition at line 27 of file ownRandom.h.

ownRandom::~ownRandom ( ) [inline]

Definition at line 33 of file ownRandom.h.


Member Function Documentation

void ownRandom::allocate ( int  m_size) [inline]

Allocate the memory for cache.

Definition at line 37 of file ownRandom.h.

void ownRandom::allocate ( int  m_size) [inline]

Allocate the memory for cache.

Definition at line 51 of file CParticleFilter.h.

void ownRandom::covRandom ( float &  xRand,
float &  yRand,
float  cov[3] 
) [inline]

Returns a sample from given covariance "ellipse" cov[0] = X - variance cov[1] = XY -covariance cov[2] = Y - variance

Returns:
xRand and yRand the random value

Definition at line 118 of file ownRandom.h.

void ownRandom::covRandom ( float &  xRand,
float &  yRand,
float  cov[3] 
) [inline]

Returns a sample from given covariance "ellipse" cov[0] = X - variance cov[1] = XY -covariance cov[2] = Y - variance

Returns:
xRand and yRand the random value

Definition at line 132 of file CParticleFilter.h.

void ownRandom::fillCache ( ) [inline]

Definition at line 47 of file ownRandom.h.

void ownRandom::fillCache ( ) [inline]

Definition at line 61 of file CParticleFilter.h.

Gets the uniform random number from cache

< Just for precaution

Definition at line 62 of file ownRandom.h.

Gets the uniform random number from cache

< Just for precaution

Definition at line 76 of file CParticleFilter.h.

float ownRandom::normalRandom ( ) [inline]

Returns normally distributed random number Zero mean and unit variance.

Definition at line 89 of file ownRandom.h.

float ownRandom::normalRandom ( ) [inline]

Returns normally distributed random number Zero mean and unit variance.

Definition at line 103 of file CParticleFilter.h.

float ownRandom::uniformRandom ( void  ) [inline]

Returns a (pseudo) random number between 0 and 1.

Definition at line 81 of file ownRandom.h.

float ownRandom::uniformRandom ( void  ) [inline]

Returns a (pseudo) random number between 0 and 1.

Definition at line 95 of file CParticleFilter.h.


Member Data Documentation

Definition at line 38 of file CParticleFilter.h.

Definition at line 37 of file CParticleFilter.h.

Definition at line 39 of file CParticleFilter.h.


The documentation for this class was generated from the following files:


ndt_mcl
Author(s): Jari Saarinen
autogenerated on Mon Oct 6 2014 03:20:03