24 #ifndef HUMANOID_LOCALIZATION_OBSERVATIONMODEL_H_ 25 #define HUMANOID_LOCALIZATION_OBSERVATIONMODEL_H_ 40 #include <sensor_msgs/PointCloud2.h> 59 return -1.0*(
LOG_SQRT_2_PI) - log(sigma) - ((x * x) / (2* sigma * sigma));
65 return -1.0*(
LOG_SQRT_2_PI) - log(sigma) - ((x_sq) / (2* sigma * sigma));
static double logLikelihoodSq(double x_sq, double sigma)
Helper function to compute the log likelihood based on sqared distances.
ObservationModel(ros::NodeHandle *nh, boost::shared_ptr< MapModel > mapModel, EngineT *rngEngine)
virtual void setMap(boost::shared_ptr< octomap::OcTree > map)
boost::shared_ptr< octomap::OcTree > m_map
boost::variate_generator< EngineT &, NormalDistributionT > NormalGeneratorT
standard normal-distributed noise
boost::mt19937 EngineT
Boost RNG engine:
Particle consists of a pose and a weight.
virtual ~ObservationModel()
static double logLikelihood(double x, double sigma)
Helper function to compute the log likelihood.
boost::shared_ptr< MapModel > m_mapModel
virtual void integrateMeasurement(Particles &particles, const PointCloud &pc, const std::vector< float > &ranges, float max_range, const tf::Transform &baseToSensor)=0
NormalGeneratorT m_rngNormal
static const double SQRT_2_PI
sqrt(2*pi)
static const double LOG_SQRT_2_PI
log(sqrt(2*pi))
UniformGeneratorT m_rngUniform
boost::variate_generator< EngineT &, UniformDistributionT > UniformGeneratorT
uniform noise in range [0,1)
virtual void integratePoseMeasurement(Particles &particles, double roll, double pitch, const tf::StampedTransform &footprintToTorso)
virtual bool getHeightError(const Particle &p, const tf::StampedTransform &footprintToBase, double &heightError) const =0
std::vector< Particle > Particles
pcl::PointCloud< pcl::PointXYZ > PointCloud