27 #include <ISM/tools/DataMerger.hpp> 34 if (!nh.
getParam(
"target", target_file) || target_file.empty())
36 ROS_INFO(
"Missing parameter: \"target\"");
44 if (!nh.
getParam(
"sources", source_files) || source_files.empty())
46 ROS_INFO(
"Missing parameter: \"sources\"");
51 std::stringstream info;
53 for (
const std::string& file : source_files)
55 info << std::endl <<
"\t" << file;
60 if (!nh.
getParam(
"merge_records", merge_records))
62 ROS_INFO(
"Missing parameter: \"merge_records\"");
70 if (!nh.
getParam(
"merge_models", merge_models))
72 ROS_INFO(
"Missing parameter: \"merge_models\"");
84 int main (
int argc,
char **argv)
89 ISM::DataMerger data_merger;
91 std::string target_file;
92 std::vector<std::string> source_files;
98 data_merger.merge(target_file, source_files, merge_records, merge_models);
103 ROS_INFO(
"MERGE ABORTED! Check launch-file for missing parameter.");
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
int main(int argc, char **argv)
#define ROS_INFO_STREAM(args)
bool getParam(const std::string &key, std::string &s) const
bool getNodeParameters(ros::NodeHandle nh, std::string &target_file, std::vector< std::string > &source_files, bool &merge_records, bool &merge_models)