31 #include "../mobile_robot.h" 37 #include "../mobile_robot_wall_cts.h" 72 int main(
int argc,
char** argv)
74 cerr <<
"==================================================" << endl
75 <<
"Test of kalman filter" << endl
76 <<
"Mobile robot localisation example" << endl
77 <<
"==================================================" << endl;
101 ColumnVector sysNoise_Mu(2);
105 SymmetricMatrix sysNoise_Cov(2);
108 sysNoise_Cov(1,2) = 0.0;
109 sysNoise_Cov(2,1) = 0.0;
112 Gaussian system_Uncertainty(sysNoise_Mu, sysNoise_Cov);
125 double wall_ct = 2/(sqrt(pow(
RICO_WALL,2.0) + 1));
128 H(1,2) = 0 - wall_ct;
131 ColumnVector measNoise_Mu(1);
134 SymmetricMatrix measNoise_Cov(1);
136 Gaussian measurement_Uncertainty(measNoise_Mu, measNoise_Cov);
147 ColumnVector prior_Mu(2);
150 SymmetricMatrix prior_Cov(2);
152 prior_Cov(1,2) = 0.0;
153 prior_Cov(2,1) = 0.0;
174 ColumnVector input(2);
181 cout <<
"MAIN: Starting estimation" << endl;
182 unsigned int time_step;
186 mobile_robot.
Move(input);
189 ColumnVector measurement = mobile_robot.
Measure();
192 filter.
Update(&sys_model,input,&meas_model,measurement);
198 cout <<
"After " << time_step+1 <<
" timesteps " << endl;
199 cout <<
" Posterior Mean = " << endl << posterior->
ExpectedValueGet() << endl
200 <<
" Covariance = " << endl << posterior->
CovarianceGet() <<
"" << endl;
203 cout <<
"======================================================" << endl
204 <<
"End of the Kalman filter for mobile robot localisation" << endl
205 <<
"======================================================"
int main(int argc, char **argv)
Class PDF: Virtual Base class representing Probability Density Functions.
This is a class simulating a mobile robot.
MatrixWrapper::ColumnVector Measure()
virtual T ExpectedValueGet() const
Get the expected value E[x] of the pdf.
Class representing Gaussian (or normal density)
#define MU_SYSTEM_NOISE_X
void Move(MatrixWrapper::ColumnVector inputs)
virtual Gaussian * PostGet()
Get Posterior density.
Class for linear analytic systemmodels with additive gaussian noise.
Class for linear analytic measurementmodels with additive gaussian noise.
Linear Conditional Gaussian.
#define SIGMA_SYSTEM_NOISE_X
virtual MatrixWrapper::SymmetricMatrix CovarianceGet() const
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf.
virtual bool Update(SystemModel< StateVar > *const sysmodel, const StateVar &u, MeasurementModel< MeasVar, StateVar > *const measmodel, const MeasVar &z, const StateVar &s)
Full Update (system with inputs/sensing params)
#define MU_SYSTEM_NOISE_Y
#define SIGMA_SYSTEM_NOISE_Y