44 using MatrixWrapper::Matrix;
49 prior_(num_particles),
53 tracker_initialized_(false),
54 num_particles_(num_particles)
66 std::cout <<
"Initializing tracker with " <<
num_particles_ <<
" particles, with covariance " 67 << sigma <<
" around " << mu << std::endl;
70 std::vector<BFL::Sample<BFL::StatePosVel> > prior_samples(
num_particles_);
102 assert(cov.columns() == 3);
130 est.pos.x = tmp.
pos_[0];
131 est.pos.
y = tmp.
pos_[1];
132 est.pos.
z = tmp.
pos_[2];
const std::string & getName() const
return the name of the tracker
virtual MCPdf< StateVar > * PostGet()
virtual double getLifetime() const
return the lifetime of the tracker
bool ListOfSamplesSet(const vector< WeightedSample< T > > &list_of_samples)
virtual void getEstimate(BFL::StatePosVel &est) const
get filter posterior
Class representing state with pos and vel.
virtual ~TrackerParticle()
destructor
virtual void initialize(const BFL::StatePosVel &mu, const BFL::StatePosVel &sigma, const double time)
initialize tracker
BFL::BootstrapFilter< BFL::StatePosVel, tf::Vector3 > * filter_
TrackerParticle(const std::string &name, unsigned int num_particles, const BFL::StatePosVel &sysnoise)
constructor
virtual bool updatePrediction(const double time)
update tracker
virtual bool updateCorrection(const tf::Vector3 &meas, const MatrixWrapper::SymmetricMatrix &cov)
Class representing gaussian pos_vel.
TFSIMD_FORCE_INLINE const tfScalar & z() const
bool tracker_initialized_
TFSIMD_FORCE_INLINE Vector3()
TFSIMD_FORCE_INLINE const tfScalar & y() const
unsigned int num_particles_
MatrixWrapper::Matrix getHistogramVel(const tf::Vector3 &min, const tf::Vector3 &max, const tf::Vector3 &step) const
void getParticleCloud(const tf::Vector3 &step, double threshold, sensor_msgs::PointCloud &cloud) const
MatrixWrapper::Matrix getHistogramPos(const tf::Vector3 &min, const tf::Vector3 &max, const tf::Vector3 &step) const
Get histogram from certain area.
ConditionalPdf< MeasVar, StateVar > * MeasurementPdfGet()
BFL::MeasModelPos meas_model_
BFL::SysModelPosVel sys_model_
virtual double getTime() const
return the time of the tracker
virtual bool Update(SystemModel< StateVar > *const sysmodel, const StateVar &u, MeasurementModel< MeasVar, StateVar > *const measmodel, const MeasVar &z, const StateVar &s)
bool SampleFrom(vector< Sample< StatePosVel > > &list_samples, const int num_samples, int method=DEFAULT, void *args=NULL) const
Class representing a posvel mcpdf.