30 #include "../nonlinearanalyticconditionalgaussianmobile.h" 32 #include "../mobile_robot.h" 38 #include "../mobile_robot_wall_cts.h" 73 int main(
int argc,
char** argv)
75 cerr <<
"==================================================" << endl
76 <<
"Test of kalman filter" << endl
77 <<
"Mobile robot localisation example" << endl
78 <<
"==================================================" << endl;
94 sys_noise_Cov(1,2) = 0.0;
95 sys_noise_Cov(1,3) = 0.0;
96 sys_noise_Cov(2,1) = 0.0;
98 sys_noise_Cov(2,3) = 0.0;
99 sys_noise_Cov(3,1) = 0.0;
100 sys_noise_Cov(3,2) = 0.0;
103 Gaussian system_Uncertainty(sys_noise_Mu, sys_noise_Cov);
114 double wall_ct = 2/(sqrt(pow(
RICO_WALL,2.0) + 1));
118 H(1,2) = 0 - wall_ct;
124 SymmetricMatrix meas_noise_Cov(
MEAS_SIZE);
126 Gaussian measurement_Uncertainty(meas_noise_Mu, meas_noise_Cov);
142 prior_Cov(1,2) = 0.0;
143 prior_Cov(1,3) = 0.0;
144 prior_Cov(2,1) = 0.0;
146 prior_Cov(2,3) = 0.0;
147 prior_Cov(3,1) = 0.0;
148 prior_Cov(3,2) = 0.0;
150 Gaussian prior_cont(prior_Mu,prior_Cov);
163 ColumnVector input(2);
173 cout <<
"MAIN: Starting estimation" << endl;
174 unsigned int time_step;
178 mobile_robot.
Move(input);
181 ColumnVector measurement = mobile_robot.
Measure();
184 filter.
Update(&sys_model,input,&meas_model,measurement);
192 cout <<
"After " << time_step+1 <<
" timesteps " << endl;
193 cout <<
" Posterior Mean = " << endl << posterior->
ExpectedValueGet() << endl
194 <<
" Covariance = " << endl << posterior->
CovarianceGet() <<
"" << endl;
197 cout <<
"======================================================" << endl
198 <<
"End of the Kalman filter for mobile robot localisation" << endl
199 <<
"======================================================"
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
#define MU_SYSTEM_NOISE_THETA
#define SIGMA_SYSTEM_NOISE_THETA
Non Linear Conditional Gaussian.
void Move(MatrixWrapper::ColumnVector inputs)
Class for analytic system models with additive Gauss. uncertainty.
virtual Gaussian * PostGet()
Get Posterior density.
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
int main(int argc, char **argv)