23 : mDimension(pDimension)
34 BOOST_FOREACH(boost::property_tree::ptree::value_type &v, pPt.get_child(pNode))
37 if(!std::strcmp(v.first.c_str(),
"kernel"))
47 if(sum < 0.999 || sum > 1.001)
48 throw std::invalid_argument(
"Unable to procees loading. The weights of the mixture of gaussian do not sum up to one (" + boost::lexical_cast<std::string>(sum) +
").");
55 kernel.initializeVisualizer(pVisualizer);
78 mVisualizer->resetCertainty();
91 Eigen::Vector3d position = pPose->point->getEigen();
92 evidence[0] = position[0];
93 evidence[1] = position[1];
94 evidence[2] = position[2];
96 Eigen::Quaternion<double> orientation = pPose->quat->getEigen();
97 evidence[0] = orientation.w();
98 evidence[1] = orientation.x();
99 evidence[2] = orientation.y();
100 evidence[3] = orientation.z();
102 throw std::invalid_argument(
"Unable to evaluate gaussian mixture distribution. It has an invalid number of dimensions (" + boost::lexical_cast<std::string>(
mDimension) +
").");
void visualize(boost::shared_ptr< Visualization::ProbabilisticSecondarySceneObjectVisualization > pVisualizer, boost::shared_ptr< ISM::Pose > pPose)
std::vector< PSMInference::GaussianKernel > mKernels
~GaussianMixtureDistribution()
GaussianMixtureDistribution(unsigned int pDimension)
void initializeVisualizer(boost::shared_ptr< Visualization::ProbabilisticSecondarySceneObjectVisualization > pVisualizer)
void load(boost::property_tree::ptree &pPt, std::string pNode)
double evaluate(boost::shared_ptr< ISM::Pose > pPose)
Eigen::VectorXd getVectorFromObject(boost::shared_ptr< ISM::Pose > pPose)
double evaluate(Eigen::VectorXd pEvidence)