33 if(!boost::filesystem::exists(pPathToFile))
34 throw std::invalid_argument(
"Unable to procees loading. The model file doesn't exist!");
37 ROS_INFO_STREAM(
"Loading scene model from this location: " << pPathToFile);
40 boost::property_tree::ptree pt;
41 read_xml(pPathToFile, pt);
44 BOOST_FOREACH(boost::property_tree::ptree::value_type &v, pt.get_child(
"psm.scenes"))
50 scene->load(v.second, pAlgorithm);
61 scene->initializeVisualizer(mSuperior);
98 scene->calculateSceneProbaility();
105 pSceneList.push_back(i);
110 for(
unsigned int i = 0; i < pSceneList.size(); i++)
111 pSceneList[i].mLikelihood /= sum;
void initializeVisualizer(boost::shared_ptr< Visualization::ProbabilisticSceneModelVisualization > mSuperior)
std::vector< boost::shared_ptr< SceneDescription > > mScenes
void integrateEvidence(const boost::shared_ptr< const ISM::Object > &pObject)
ObjectEvidence mObjectEvidence
void push(const boost::shared_ptr< const ISM::Object > &pObject)
std::vector< ISM::Object > mEvidenceList
void getSceneListWithProbabilities(std::vector< SceneIdentifier > &pSceneList)
bool hasWaitingEvidences()
#define ROS_INFO_STREAM(args)
void loadModelFromFile(std::string pPathToFile, std::string pAlgorithm)
void getEvidences(std::vector< ISM::Object > &pEvidences)