| 193 | } |
| 194 | |
| 195 | map<string, shared_ptr<std::ofstream>> openFileStreams(const string folder_path, |
| 196 | map<string, map<string, string>>& sensor_info) { // NOLINT |
| 197 | map<string, shared_ptr<std::ofstream>> topic2file_map; |
| 198 | for (auto& iterator : sensor_info) { |
| 199 | string topic = iterator.first; |
| 200 | string csv_file_path = folder_path + string("/") + iterator.second[CSVFILE]; |
| 201 | std::ofstream* file = new std::ofstream(csv_file_path.c_str()); |
| 202 | shared_ptr<std::ofstream> file_ptr(file); |
| 203 | topic2file_map.insert(std::pair<string, shared_ptr<std::ofstream>>(topic, file_ptr)); |
| 204 | } |
| 205 | writeCSVHeaders(topic2file_map, sensor_info); |
| 206 | return topic2file_map; |
| 207 | } |
| 208 | |
| 209 | map<string, map<string, string>> sensorInfo(const ros::NodeHandle& nh) { |
| 210 | cout << colouredString("\tRetrieving sensor list...", RED, REGULAR); |
no test coverage detected