26 : mPrivateNamespaceHandle(
"~")
30 double workspaceVolume;
33 double staticBreakRatio, togetherRatio, maxAngleDeviation;
37 throw std::runtime_error(
"Please specify parameter " + std::string(
"scene_model_name") +
" when starting this node.");
41 throw std::runtime_error(
"Please specify parameter " + std::string(
"scene_model_type") +
" when starting this node.");
45 throw std::runtime_error(
"Please specify parameter " + std::string(
"scene_model_directory") +
" when starting this node.");
49 ss.imbue(std::locale(ss.getloc(),
new boost::local_time::local_time_facet(
"%Y-%m-%d %H:%M:%S")));
50 boost::local_time::time_zone_ptr zone_GMT1(
new boost::local_time::posix_time_zone(
"GMT+1"));
51 ss << boost::local_time::local_sec_clock::local_time(zone_GMT1);
58 throw std::runtime_error(
"Please specify parameter " + std::string(
"input_db_file") +
" when starting this node.");
64 throw std::runtime_error(
"Please specify the 'workspace volume' when starting this node.");
68 throw std::runtime_error(
"Please specify the 'static_break_ratio' when starting this node.");
72 throw std::runtime_error(
"Please specify the 'together_ratio' when starting this node.");
76 throw std::runtime_error(
"Please specify the 'max_angle_deviation' when starting this node.");
80 throw std::runtime_error(
"Please specify parameter " + std::string(
"base_frame_id") +
" when starting this node.");
84 throw std::runtime_error(
"Please specify parameter " + std::string(
"scale_factor") +
" when starting this node.");
88 throw std::runtime_error(
"Please specify parameter " + std::string(
"sigma_multiplicator") +
" when starting this node.");
92 throw std::runtime_error(
"Please specify parameter " + std::string(
"intermediate_results") +
" when starting this node.");
96 throw std::runtime_error(
"Please specify parameter " + std::string(
"timestamps") +
" when starting this node.");
123 ROS_INFO_STREAM(
"Pulling Objects from database " << dbFileName.c_str());
124 tableHelper = ISM::TableHelperPtr(
new ISM::TableHelper(dbFileName));
126 for(
auto patternName : tableHelper->getRecordedPatternNames())
128 ISM::RecordedPatternPtr pattern = tableHelper->getRecordedPattern(patternName);
129 for(ISM::ObjectSetPtr objectSet : pattern->objectSets)
131 objectSet->mIdentifier = pattern->name;
144 throw std::logic_error(
"Cannot save a non-existing scene model and plot its distributions.");
157 throw std::logic_error(
"Cannot save a non-existing scene model and plot its distributions.");
193 ROS_INFO(
"Initializing visualization mechanism.");
196 mVisualizer.reset(
new Visualization::ProbabilisticSceneModelVisualization());
std::string mSceneModelType
double mSigmaMultiplicator
boost::shared_ptr< ISM::TableHelper > tableHelper
boost::shared_ptr< Visualization::ProbabilisticSceneModelVisualization > mVisualizer
void extractTracksFromDbFile(const std::string &dbFileName)
std::string mSceneModelName
void visualizeSceneModel()
void initializeVisualizationChain()
std::string mSceneModelDirectory
ros::NodeHandle mPrivateNamespaceHandle
boost::shared_ptr< SceneModelLearner > mSceneModelLearner
bool mAddTimestampsToFilename
bool mIntermediateResults
void initializeSceneModel(double pWorkspaceVolume, double mStaticBreakRatio, double mTogetherRatio, double mMaxAngleDeviation)
std::string mInputDbFilename
void generateSceneModel()
#define ROS_INFO_STREAM(args)
bool getParam(const std::string &key, std::string &s) const