Typedefs | Functions

example/TestParticleFilter.cpp File Reference

Executable demonstrating ParticleFilter1D. More...

#include "example/ParticleFilter1D.hpp"
#include <vector>
#include <ctime>
#include <cstdlib>
#include <iostream>
Include dependency graph for TestParticleFilter.cpp:

Go to the source code of this file.

Typedefs

typedef Particle< double,
double, double > 
Particle1Dd
 Tempalte instantiation of a 1D particle.

Functions

double rand_d ()
 Generates a random double in the range [0, 1].
double randomParticleGenerator (void *v)
 Generates a random particle.
int main (int argc, char *argv[])
 Main function.

Detailed Description

Executable demonstrating ParticleFilter1D.

Simulates a robot moving randomly in a 1D environment and receiving noisy measurements of its position at each time step. A particle filter is used to estimate the position of the robot under this uncertainty, and three methods of computing the estimated position at each time step are output. The robot is periodically "kidnapped" and moved to a random new position, so the particle filter uses dynamic random injection of particles to attempt to deal with such disruptions.

The application should be run from the console to observe its output. It does not require any arguments.

Author:
Zach Pezzementi

Definition in file TestParticleFilter.cpp.


Typedef Documentation

typedef Particle<double,double,double> Particle1Dd

Tempalte instantiation of a 1D particle.

Definition at line 55 of file TestParticleFilter.cpp.


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Main function.

Definition at line 69 of file TestParticleFilter.cpp.

double rand_d (  ) 

Generates a random double in the range [0, 1].

Definition at line 46 of file TestParticleFilter.cpp.

double randomParticleGenerator ( void *  v  ) 

Generates a random particle.

Creates a particle drawn uniformly at random from the range [0, 10]. Ignores the input v.

Definition at line 63 of file TestParticleFilter.cpp.