21 #define MeasModel MeasurementModel 22 #define CV ColumnVector 28 double resamplethreshold,
34 , _dimension(prior->DimensionGet())
35 , _num_samples(prior->NumSamplesGet())
59 MeasModel<CV,CV>*
const measmodel,
85 for (
int i = numsamples-2; i >= 0 ; i--){
88 unsigned int index = 0;
95 for (
int i = 0; i < numsamples ; i++)
99 assert(index <= (
unsigned int)numsamples);
119 MeasModel<CV,CV>*
const measmodel,
143 if (!measmodel->SystemWithoutSensorParams())
152 if (!measmodel->SystemWithoutSensorParams())
std::vector< WeightedSample< ColumnVector > > _old_samples
Proposal Density for non-linear systems with additive Gaussian Noise (using a EKF Filter) ...
virtual bool UpdateInternal(SystemModel< ColumnVector > *const sysmodel, const ColumnVector &u, MeasurementModel< ColumnVector, ColumnVector > *const measmodel, const ColumnVector &z, const ColumnVector &s)
Actual implementation of Update, varies along filters.
std::vector< WeightedSample< ColumnVector > >::iterator _oit
std::vector< double > _unif_samples
EKParticleFilter(MCPdf< ColumnVector > *prior, int resampleperiod=0, double resamplethreshold=0, int resamplescheme=DEFAULT_RS)
Constructor.
std::vector< SymmetricMatrix > _tmpCov
void DimensionSet(unsigned int dim)
Pdf< ColumnVector > * _post
Pointer to the Posterior Pdf.
Virtual Class representing all particle filters.
virtual ~EKParticleFilter()
Destructor.
bool SystemWithoutInputs() const
Has the system inputs or not.
virtual bool DynamicResampleStep()
Resample if necessary.
virtual bool Resample()
Resample also redefined for the same reasons...
virtual void ConditionalArgumentSet(unsigned int n_argument, const CondArg &argument)
Set the n-th argument of the list.
bool _proposal_depends_on_meas
Proposal depends on last measurement?
vector< WeightedSample< ColumnVector > >::iterator _os_it
Iterator for old list of samples.
std::vector< SymmetricMatrix >::iterator _cov_it
int _timestep
Represents the current timestep of the filter.
vector< WeightedSample< ColumnVector > > _new_samples
While updating store list of new samples.
std::vector< double > _CumPDF
Monte Carlo Pdf: Sample based implementation of Pdf.
std::vector< double >::const_iterator _CumPDFit
Proposal Density for non-linear systems with additive Gaussian Noise (using a (analytic) Filter) ...
T & ValueGet()
Get the value of the Sample.
virtual bool StaticResampleStep()
Resample if wanted.
virtual bool SampleFrom(vector< Sample< T > > &list_samples, const unsigned int num_samples, int method=DEFAULT, void *args=NULL) const
Draw multiple samples from the Pdf (overloaded)
Sample< ColumnVector > _sample
vector< WeightedSample< ColumnVector > >::iterator _ns_it
Iterator for new list of samples.
virtual bool UpdateWeightsInternal(SystemModel< ColumnVector > *const sysmodel, const ColumnVector &u, MeasurementModel< ColumnVector, ColumnVector > *const measmodel, const ColumnVector &z, const ColumnVector &s)
Update Weights.
MatrixWrapper::SymmetricMatrix CovarianceGet() const
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf.
ConditionalPdf< ColumnVector, ColumnVector > * _proposal
Pointer to the Proposal Density.
std::vector< WeightedSample< ColumnVector > > _result_samples
virtual MatrixWrapper::SymmetricMatrix CovarianceGet() const
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf.
virtual bool ProposalStepInternal(SystemModel< ColumnVector > *const sysmodel, const ColumnVector &u, MeasurementModel< ColumnVector, ColumnVector > *const measmodel, const ColumnVector &z, const ColumnVector &s)
std::vector< WeightedSample< ColumnVector > >::iterator _rit
std::vector< SymmetricMatrix > _sampleCov
Sample Covariances for use with EKF Proposal density.
std::vector< SymmetricMatrix >::iterator _tmpCovit