3 #include <pcl/tracking/coherence.h>
4 #include <pcl/tracking/particle_filter.h>
5 #include <pcl/tracking/tracking.h>
17 template <
typename Po
intInT,
typename StateT>
45 using Ptr = shared_ptr<KLDAdaptiveParticleFilterTracker<PointInT, StateT>>;
46 using ConstPtr = shared_ptr<const KLDAdaptiveParticleFilterTracker<PointInT, StateT>>;
141 equalBin(
const std::vector<int>& a,
const std::vector<int>& b)
143 int dimension = StateT::stateDimension();
144 for (
int i = 0; i < dimension; i++)
156 const double a[9] = {1.24818987e-4,
165 const double b[15] = {-4.5255659e-5,
194 for (
int i = 1; i < 9; i++)
201 for (
int i = 1; i < 15; i++)
206 return ((1. - z) / 2.0);
207 return ((1. + z) / 2.0);
217 double chi = 1.0 - 2.0 / (9.0 * (k - 1)) + sqrt(2.0 / (9.0 * (k - 1))) * z;
218 return ((k - 1.0) / (2.0 *
epsilon_) * chi * chi * chi);
227 insertIntoBins(std::vector<int>&& new_bin, std::vector<std::vector<int>>& bins);
257 #ifdef PCL_NO_PRECOMPILE
258 #include <pcl/tracking/impl/kld_adaptive_particle_filter.hpp>
KLDAdaptiveParticleFilterTracker tracks the PointCloud which is given by setReferenceCloud within the...
shared_ptr< KLDAdaptiveParticleFilterTracker< PointInT, StateT > > Ptr
void setDelta(double delta)
set delta to be used in chi-squared distribution.
virtual double calcKLBound(int k)
calculate K-L boundary.
double getDelta() const
get delta to be used in chi-squared distribution.
void setEpsilon(double eps)
set epsilon to be used to calc K-L boundary.
unsigned int getMaximumParticleNum() const
get the maximum number of the particles.
double getEpsilon() const
get epsilon to be used to calc K-L boundary.
void resample() override
resampling phase of particle filter method.
unsigned int maximum_particle_number_
the maximum number of the particles.
shared_ptr< const KLDAdaptiveParticleFilterTracker< PointInT, StateT > > ConstPtr
typename PointCloudState::ConstPtr PointCloudStateConstPtr
typename Tracker< PointInT, StateT >::PointCloudIn PointCloudIn
typename Coherence::Ptr CoherencePtr
virtual bool insertIntoBins(std::vector< int > &&new_bin, std::vector< std::vector< int >> &bins)
insert a bin into the set of the bins.
double normalQuantile(double u)
return upper quantile of standard normal distribution.
double delta_
probability of distance between K-L distance and MLE is less than epsilon_
typename PointCloudIn::ConstPtr PointCloudInConstPtr
KLDAdaptiveParticleFilterTracker()
Empty constructor.
StateT getBinSize() const
get the bin size.
typename PointCloudIn::Ptr PointCloudInPtr
typename CloudCoherence::Ptr CloudCoherencePtr
StateT bin_size_
the size of a bin.
typename PointCloudState::Ptr PointCloudStatePtr
void setMaximumParticleNum(unsigned int nr)
set the maximum number of the particles.
typename CloudCoherence::ConstPtr CloudCoherenceConstPtr
typename Tracker< PointInT, StateT >::PointCloudState PointCloudState
bool initCompute() override
This method should get called before starting the actual computation.
void setBinSize(const StateT &bin_size)
set the bin size.
virtual bool equalBin(const std::vector< int > &a, const std::vector< int > &b)
return true if the two bins are equal.
typename Coherence::ConstPtr CoherenceConstPtr
double epsilon_
error between K-L distance and MLE
ParticleFilterTracker tracks the PointCloud which is given by setReferenceCloud within the measured P...
PointCloudCoherence is a base class to compute coherence between the two PointClouds.
shared_ptr< PointCloudCoherence< PointInT > > Ptr
shared_ptr< const PointCloudCoherence< PointInT > > ConstPtr
PointCoherence is a base class to compute coherence between the two points.
shared_ptr< const PointCoherence< PointInT > > ConstPtr
shared_ptr< PointCoherence< PointInT > > Ptr
Tracker represents the base tracker class.
std::string tracker_name_
The tracker name.