Executable demonstrating ParticleFilter1D. More...
#include "example/ParticleFilter1D.hpp"#include <vector>#include <ctime>#include <cstdlib>#include <iostream>
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. | |
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.
Definition in file TestParticleFilter.cpp.
| typedef Particle<double,double,double> Particle1Dd |
Tempalte instantiation of a 1D particle.
Definition at line 55 of file TestParticleFilter.cpp.
| 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.
1.7.1