learner_batch.cpp
Go to the documentation of this file.
1 
18 // Global includes
19 #include <cstdlib>
20 
21 // Package includes
22 #include <ros/ros.h>
23 
25 
26 // Local includes
28 
29 using namespace ProbabilisticSceneRecognition;
30 
31 int main(int argc, char* argv[])
32 {
33  ros::init(argc, argv, "js_probabilistic_scene_learner");
34 
35  // Declaration of the learner for the scene model.
36  SceneLearningEngine* learner;
37 
38  // Check for wrong configurations and similar.
39  try {
40  learner = new SceneLearningEngine();
41 
42  } catch(std::exception& exception){
43  std::cerr << exception.what() << std::endl;
44  std::exit(1);
45  }
46 
47  // Get all ISM::ObjectSets from databasefiles passed as ros parameters.
48  learner->readLearnerInput();
49 
50  // Check for errors with the resulting scene model
51  try {
52  // Calculate parameters of scene model based on scene graphs from rosbag input.
53  learner->generateSceneModel();
54 
55  // Dump model to file and plot its distributions.
56  learner->saveSceneModel();
57  } catch(std::exception& exception) {
58  std::cerr << exception.what() << std::endl;
59  }
60 
61  // Get rid of learner object.
62  delete learner;
63 
64  // Stating that program has run correctly.
65  return EXIT_SUCCESS;
66 }
67 
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
int main(int argc, char *argv[])


asr_psm
Author(s): Braun Kai, Gehrung Joachim, Heizmann Heinrich, Meißner Pascal
autogenerated on Fri Nov 15 2019 03:57:54