mainwindow.cpp
Go to the documentation of this file.
2 
3 MainWindow::MainWindow(QWidget *parent) :
4  QMainWindow(parent)
5 {
6  qRegisterMetaType<QMessageBox::Icon>();
7  parent = new QWidget;
8  setCentralWidget(parent);
9  QHBoxLayout *layout(new QHBoxLayout);
10  parent->setLayout(layout);
11 
12  setWindowTitle("ROS bag exporter");
13 
14  QMenu *menu(new QMenu("File"));
15  menuBar()->addMenu(menu);
16 
17  QAction *open_bag(new QAction("Open", menu));
18  open_bag->setToolTip("Open a bag file");
19  connect(open_bag, &QAction::triggered, this, &MainWindow::openBagFile);
20  menu->addAction(open_bag);
21  QAction *export_topics(new QAction("Export", menu));
22  export_topics->setToolTip("Export topics to files");
23  connect(export_topics, &QAction::triggered, this, &MainWindow::exportToDirectory);
24  menu->addAction(export_topics);
25 
26  QVBoxLayout *left = new QVBoxLayout;
27  left->addWidget(new QLabel("Topics to be exported"));
28  topics_container_ = new QWidget;
29  left->addWidget(topics_container_);
30  left->addStretch(1);
31 
32  QVBoxLayout *right(new QVBoxLayout);
33  right->addWidget(new QLabel("Start / end time"));
34  start_end_time_ = new QWidget;
35  time_begin_ = new QDoubleSpinBox;
36  time_begin_->setEnabled(false);
37  time_end_ = new QDoubleSpinBox;
38  time_end_->setEnabled(false);
39  QHBoxLayout *start_end_time(new QHBoxLayout);
40  start_end_time->addWidget(time_begin_);
41  start_end_time->addWidget(new QLabel(" sec"));
42  start_end_time->addWidget(time_end_);
43  start_end_time->addWidget(new QLabel(" sec"));
44  start_end_time_->setLayout(start_end_time);
45  right->addWidget(start_end_time_);
46  right->addStretch(1);
47 
48  video_tab_ = new QTabWidget;
49  QWidget* first_tab(new QWidget);
50  QVBoxLayout *tab_information(new QVBoxLayout);
51  QSpinBox* observed_fps(new QSpinBox);
52  observed_fps->setEnabled(false);
53  QHBoxLayout *video_fps(new QHBoxLayout);
54  QSpinBox* fps(new QSpinBox);
55  fps->setEnabled(false);
56  video_fps->addWidget(new QLabel("Video FPS"));
57  video_fps->addWidget(fps);
58  tab_information->addWidget(new QLabel("Observed FPS"));
59  tab_information->addWidget(observed_fps);
60  tab_information->addLayout(video_fps);
61  first_tab->setLayout(tab_information);
62  video_tab_->addTab(first_tab, "Topic");
63  right->addWidget(video_tab_);
64 
65  layout->addLayout(left);
66  layout->addLayout(right);
67 
68  connect(time_begin_, SIGNAL(valueChanged(double)), this, SLOT(updateTimeEnd(double)));
69  connect(time_end_, SIGNAL(valueChanged(double)), this, SLOT(updateTimeBegin(double)));
70  connect(this, SIGNAL(displayMessageBox(const QString, const QString, const QString, const QMessageBox::Icon)), this,
71  SLOT(displayMessageBoxHandler(const QString, const QString, const QString, const QMessageBox::Icon)));
72 
73  load();
74  csv_ac_.reset(new ExportToCSVActionClient("export_csv", true));
75  video_ac_.reset(new ExportToVideoActionClient("export_video", true));
76 }
77 
79 {
80 }
81 
83 {
84  ros::ServiceClient client = nh_.serviceClient<rqt_bag_exporter::CloseBag>("close_bag");
85  rqt_bag_exporter::CloseBag srv;
86  if (!client.waitForExistence(ros::Duration(1)))
87  {
88  Q_EMIT displayMessageBox("Service error",
89  QString::fromStdString("Service server " + client.getService() + " does not exist."),
90  "",
91  QMessageBox::Icon::Critical);
92  return;
93  }
94 
95  if (!client.call(srv))
96  {
97  Q_EMIT displayMessageBox("Error calling service",
98  QString::fromStdString("Failed to call service " + client.getService()),
99  "",
100  QMessageBox::Icon::Critical);
101  return;
102  }
103 
104  if (!srv.response.error.empty())
105  {
106  Q_EMIT displayMessageBox(QString::fromStdString(client.getService() + " failed"),
107  QString::fromStdString(srv.response.error),
108  "",
109  QMessageBox::Icon::Critical);
110  return;
111  }
112 }
113 
115 {
116  const std::string file_name(QFileDialog::getOpenFileName(this, "Open bag file",
117  settings_->value("open_path").toString(),
118  "Bag files (*.bag)", Q_NULLPTR).toStdString());
119  if (file_name.empty())
120  return;
121 
122  std::string path_file(file_name);
123  const int pos(path_file.find_last_of("/"));
124  path_file.erase(pos, std::string::npos);
125  settings_->setValue("open_path", QString::fromStdString(path_file));
126  directory_ = path_file;
127  ros::ServiceClient client = nh_.serviceClient<rqt_bag_exporter::OpenBag>("open_bag");
128  if (!client.waitForExistence(ros::Duration(1)))
129  {
130  Q_EMIT displayMessageBox("Service error",
131  QString::fromStdString("Service server " + client.getService() + " does not exist."),
132  "",
133  QMessageBox::Icon::Critical);
134  return;
135  }
136 
137  rqt_bag_exporter::OpenBag srv;
138  srv.request.bag_file = file_name;
139  if (!client.call(srv))
140  {
141  Q_EMIT displayMessageBox("Error calling service",
142  QString::fromStdString("Failed to call service " + client.getService()),
143  "",
144  QMessageBox::Icon::Critical);
145  return;
146  }
147  if (!srv.response.error.empty())
148  {
149  Q_EMIT displayMessageBox(QString::fromStdString(client.getService() + " failed"),
150  QString::fromStdString(srv.response.error),
151  "",
152  QMessageBox::Icon::Critical);
153  return;
154  }
155 
157  displayTopics();
159  video_tab_->clear();
160  for (std::size_t i(0); i < topics_list_.topics_type.size(); ++i)
161  {
162  if (topics_list_.topics_type[i].find("sensor_msgs/CompressedImage") != std::string::npos)
163  fillVideoTab(topics_list_.topics_name[i]);
164  }
165 }
166 
168 {
169  ros::ServiceClient client = nh_.serviceClient<rqt_bag_exporter::ListTopics>("list_topics");
170  rqt_bag_exporter::ListTopics srv;
171  if (!client.waitForExistence(ros::Duration(1)))
172  {
173  Q_EMIT displayMessageBox("Service error",
174  QString::fromStdString("Service server " + client.getService() + " does not exist."),
175  "",
176  QMessageBox::Icon::Critical);
177  return;
178  }
179 
180  if (!client.call(srv))
181  {
182  Q_EMIT displayMessageBox("Error calling service",
183  QString::fromStdString("Failed to call service " + client.getService()),
184  "",
185  QMessageBox::Icon::Critical);
186  return;
187  }
188 
189  if (!srv.response.error.empty())
190  {
191  Q_EMIT displayMessageBox(QString::fromStdString(client.getService() + " failed"),
192  QString::fromStdString(srv.response.error),
193  "",
194  QMessageBox::Icon::Critical);
195  return;
196  }
197 
198  if (srv.response.topics_name.size() != srv.response.topics_type.size())
199  {
200  Q_EMIT displayMessageBox(QString::fromStdString(client.getService() + " failed"),
201  "Topics names and topics type are of different sizes",
202  "",
203  QMessageBox::Icon::Critical);
204  return;
205  }
206 
207  topics_list_.topics_name.clear();
208  topics_list_.topics_type.clear();
209  for (std::size_t i(0); i < srv.response.topics_name.size(); ++i)
210  {
211  topics_list_.topics_name.push_back(srv.response.topics_name[i]);
212  topics_list_.topics_type.push_back(srv.response.topics_type[i]);
213  }
214 }
215 
217 {
218  QVBoxLayout* checkbox_layout(new QVBoxLayout);
219  qDeleteAll(topics_container_->children());
220  topics_container_->setLayout(checkbox_layout);
221  for (std::size_t i(0); i < topics_list_.topics_name.size(); ++i)
222  {
223  const bool check_csv_type = isCsvWritableTopic(topics_list_.topics_type[i]);
224  const bool check_video_type = isCompressedImageTopic(topics_list_.topics_type[i]);
225  QHBoxLayout *sub_checkbox_layout(new QHBoxLayout);
226  QCheckBox *checkbox = new QCheckBox(QString::fromStdString(topics_list_.topics_name[i]));
227 
228  if (!check_csv_type && !check_video_type)
229  checkbox->setEnabled(false);
230 
231  checkbox->setObjectName(QString::fromStdString(topics_list_.topics_type[i]));
232  sub_checkbox_layout->addWidget(checkbox);
233  std::string topic_type("(" + topics_list_.topics_type[i] + ")");
234  sub_checkbox_layout->addWidget(new QLabel(QString::fromStdString(topic_type)));
235  checkbox_layout->addLayout(sub_checkbox_layout);
236  }
237 }
238 
239 bool MainWindow::isCompressedImageTopic(const std::string topic_type)
240 {
241  if (topic_type.find("sensor_msgs/CompressedImage") != std::string::npos)
242  return true;
243  return false;
244 }
245 
246 bool MainWindow::isCsvWritableTopic(const std::string topic_type)
247 {
248  if (topic_type.find("std_msgs/Bool") != std::string::npos)
249  return true;
250 
251  if (topic_type.find("std_msgs/Duration") != std::string::npos)
252  return true;
253 
254  if (topic_type.find("std_msgs/Float32") != std::string::npos)
255  return true;
256 
257  if (topic_type.find("std_msgs/Float64") != std::string::npos)
258  return true;
259 
260  if (topic_type.find("std_msgs/Int16") != std::string::npos)
261  return true;
262 
263  if (topic_type.find("std_msgs/Int32") != std::string::npos)
264  return true;
265 
266  if (topic_type.find("std_msgs/Int64") != std::string::npos)
267  return true;
268 
269  if (topic_type.find("std_msgs/Int8") != std::string::npos)
270  return true;
271 
272  if (topic_type.find("std_msgs/String") != std::string::npos)
273  return true;
274 
275  if (topic_type.find("std_msgs/Time") != std::string::npos)
276  return true;
277 
278  if (topic_type.find("std_msgs/UInt16") != std::string::npos)
279  return true;
280 
281  if (topic_type.find("std_msgs/UInt32") != std::string::npos)
282  return true;
283 
284  if (topic_type.find("std_msgs/UInt64") != std::string::npos)
285  return true;
286 
287  if (topic_type.find("std_msgs/UInt8") != std::string::npos)
288  return true;
289 
290  return false;
291 }
292 
294 {
295  ros::ServiceClient client = nh_.serviceClient<rqt_bag_exporter::GetDuration>("get_duration");
296  rqt_bag_exporter::GetDuration srv;
297  if (!client.waitForExistence(ros::Duration(1)))
298  {
299  Q_EMIT displayMessageBox("Service error",
300  QString::fromStdString("Service server " + client.getService() + " does not exist."),
301  "",
302  QMessageBox::Icon::Critical);
303  return;
304  }
305  if (!client.call(srv))
306  {
307  Q_EMIT displayMessageBox("Error calling service",
308  QString::fromStdString("Failed to call service " + client.getService()),
309  "",
310  QMessageBox::Icon::Critical);
311  return;
312  }
313 
314  if (!srv.response.error.empty())
315  {
316  Q_EMIT displayMessageBox(QString::fromStdString(client.getService() + " failed"),
317  QString::fromStdString(srv.response.error),
318  "",
319  QMessageBox::Icon::Critical);
320  return;
321  }
322 
323  if (srv.response.duration == 0)
324  {
325  Q_EMIT displayMessageBox(QString::fromStdString(client.getService()),
326  "Video duration is zero",
327  "",
328  QMessageBox::Icon::Critical);
329  return;
330  }
331 
332  time_begin_->setEnabled(true);
333  time_end_->setEnabled(true);
334  time_begin_->setRange(0, srv.response.duration);
335  time_end_->setRange(0, srv.response.duration);
336  time_end_->setValue(srv.response.duration);
337 }
338 
339 void MainWindow::fillVideoTab(const std::string topic_name)
340 {
341  ros::ServiceClient client = nh_.serviceClient<rqt_bag_exporter::EstimateVideoFps>(
342  "estimate_video_fps");
343  rqt_bag_exporter::EstimateVideoFps srv;
344  srv.request.topic_name = topic_name;
345  if (!client.waitForExistence(ros::Duration(1)))
346  {
347  Q_EMIT displayMessageBox("Service error",
348  QString::fromStdString("Service server " + client.getService() + " does not exist."),
349  "",
350  QMessageBox::Icon::Critical);
351  return;
352  }
353 
354  if (!client.call(srv))
355  {
356  Q_EMIT displayMessageBox("Error calling service",
357  QString::fromStdString("Failed to call service " + client.getService()),
358  "",
359  QMessageBox::Icon::Critical);
360  return;
361  }
362 
363  if (srv.response.fps == 0)
364  {
365  Q_EMIT displayMessageBox("Error getting topics", "Fail to get back video fps of rosbag", "",
366  QMessageBox::Icon::Critical);
367  return;
368  }
369 
370  fps_ = srv.response.fps;
371  QWidget* tab(new QWidget);
372  QVBoxLayout *tab_information(new QVBoxLayout);
373  QSpinBox* observed_fps(new QSpinBox);
374  observed_fps->setEnabled(false);
375  observed_fps->setValue(srv.response.fps);
376  QHBoxLayout *video_fps(new QHBoxLayout);
377  QSpinBox* fps(new QSpinBox);
378  fps->setMaximum(999);
379  fps->setValue(srv.response.fps);
380  video_fps->addWidget(new QLabel("Video FPS"));
381  video_fps->addWidget(fps);
382  tab_information->addWidget(new QLabel("Observed FPS"));
383  tab_information->addWidget(observed_fps);
384  tab_information->addLayout(video_fps);
385  tab->setLayout(tab_information);
386  video_tab_->addTab(tab, QString::fromStdString(srv.request.topic_name));
387 
388  connect(fps, SIGNAL(valueChanged(int)), this, SLOT(updateFps(int)));
389 }
390 
391 void MainWindow::updateFps(const int fps)
392 {
393  fps_ = fps;
394 }
395 
396 void MainWindow::updateTimeEnd(const double time_begin)
397 {
398  if (time_begin >= time_end_->value())
399  time_end_->setValue(time_begin + 0.01);
400 }
401 
402 void MainWindow::updateTimeBegin(const double time_end)
403 {
404  if (time_end <= time_begin_->value())
405  time_begin_->setValue(time_end - 0.01);
406 }
407 
409 {
411  if (topics_to_export_.topics_name.empty())
412  {
413  Q_EMIT displayMessageBox("Zero topic to export", "Choose at least one topic to be exported", "",
414  QMessageBox::Icon::Warning);
415  return;
416  }
417 
418  directory_ =
419  QFileDialog::getExistingDirectory(
420  this,
421  "Export directory",
422  settings_->value("path_directory").toString(),
423  QFileDialog::ShowDirsOnly).toStdString();
424  if (directory_.empty())
425  return;
426 
427  settings_->setValue("path_directory", QString::fromStdString(directory_));
428  exportTopic();
429 }
430 
432 {
434  for (std::size_t i(0); i < topics_to_export_.topics_name.size(); ++i)
435  {
436  progress_dialog_ = std::make_shared<ProgressDialog>();
437  bool check_csv_type = isCsvWritableTopic(topics_to_export_.topics_type[i]);
438  bool check_video_type = isCompressedImageTopic(topics_to_export_.topics_type[i]);
439  if (check_csv_type)
440  {
441  if (!csv_ac_->waitForServer(ros::Duration(1)))
442  {
443  Q_EMIT displayMessageBox("Error getting topics", "Action server does not exist.", "",
444  QMessageBox::Icon::Critical);
445  return;
446  }
447  rqt_bag_exporter::ExportToCSVGoal goal;
448  rqt_bag_exporter::ExportToCSVResult result;
449  goal.directory = directory_;
450  goal.topic_name = topics_to_export_.topics_name[i];
451  goal.start_time = time_begin_->value();
452  goal.end_time = time_end_->value();
453  csv_ac_->sendGoal(goal, boost::bind(&MainWindow::csvDoneCb, this, _1, _2), NULL,
454  boost::bind(&MainWindow::csvFeedbackCb, this, _1));
455  if (!progress_dialog_->exec())
456  {
457  if (csv_ac_->getState().state_ == actionlib::SimpleClientGoalState::ACTIVE)
458  csv_ac_->cancelAllGoals();
459  }
460 
461  bool finished_before_timeout = csv_ac_->waitForResult();
462  if (finished_before_timeout)
463  {
464  if (!result.error.empty())
465  {
466  Q_EMIT displayMessageBox("Error from action", QString::fromStdString(result.error), "",
467  QMessageBox::Icon::Critical);
468  return;
469  }
470  actionlib::SimpleClientGoalState state = csv_ac_->getState();
471  }
472  else
473  Q_EMIT displayMessageBox("Error getting topics", "Action did not finish before the time out.", "",
474  QMessageBox::Icon::Critical);
475  }
476  if (check_video_type)
477  {
478  if (!video_ac_->waitForServer(ros::Duration(1)))
479  {
480  Q_EMIT displayMessageBox("Error getting topics", "Action server does not exist.", "",
481  QMessageBox::Icon::Critical);
482  return;
483  }
484  rqt_bag_exporter::ExportToVideoGoal goal;
485  rqt_bag_exporter::ExportToVideoResult result;
486  goal.directory = directory_;
487  goal.topic_name = topics_to_export_.topics_name[i];
488  goal.start_time = time_begin_->value();
489  goal.end_time = time_end_->value();
490  goal.fps = fps_;
491  video_ac_->sendGoal(goal, boost::bind(&MainWindow::videoDoneCb, this, _1, _2), NULL,
492  boost::bind(&MainWindow::videoFeedbackCb, this, _1));
493  if (!progress_dialog_->exec())
494  {
495  if (video_ac_->getState().state_ == actionlib::SimpleClientGoalState::ACTIVE)
496  video_ac_->cancelAllGoals();
497  }
498  bool finished_before_timeout = video_ac_->waitForResult();
499 
500  if (finished_before_timeout)
501  {
502  if (!result.error.empty())
503  {
504  Q_EMIT displayMessageBox("Error from action", QString::fromStdString(result.error), "",
505  QMessageBox::Icon::Critical);
506  return;
507  }
508  actionlib::SimpleClientGoalState state = video_ac_->getState();
509  }
510  else
511  Q_EMIT displayMessageBox("Error getting topics", "Action did not finish before the time out.", "",
512  QMessageBox::Icon::Critical);
513 
514  }
515  }
516 }
517 
519 {
520  topics_to_export_.topics_name.clear();
521  topics_to_export_.topics_type.clear();
522  QList<QCheckBox *> all_check_box = topics_container_->findChildren<QCheckBox *>();
523  for (int i(0); i < all_check_box.size(); ++i)
524  {
525  if (all_check_box[i]->isChecked())
526  {
527  topics_to_export_.topics_name.push_back(all_check_box[i]->text().toStdString());
528  topics_to_export_.topics_type.push_back(all_check_box[i]->objectName().toStdString());
529  }
530  }
531 }
532 
534  const rqt_bag_exporter::ExportToCSVResultConstPtr &result)
535 {
536  ros::Duration(0.1).sleep(); // Otherwise progress window bugs
537 
539  {
540  if (result->error.empty())
541  {
542  if (progress_dialog_)
543  Q_EMIT progress_dialog_->accept();
544  }
545  }
546 
548  {
549  if (progress_dialog_)
550  Q_EMIT progress_dialog_->reject();
551 
552  std::string error_msg("Action exportToCSV Aborted with error :" + result->error);
553  Q_EMIT displayMessageBox("Error from action", QString::fromStdString(error_msg), "",
554  QMessageBox::Icon::Critical);
555  }
556 
558  {
559  if (progress_dialog_)
560  Q_EMIT progress_dialog_->reject();
561  }
562 }
563 
564 void MainWindow::csvFeedbackCb(const rqt_bag_exporter::ExportToCSVFeedbackConstPtr &feedback)
565 {
566  if (progress_dialog_ && progress_dialog_->isVisible())
567  Q_EMIT progress_dialog_->drawProgress(feedback->progress_value, QString::fromStdString(feedback->progress_msg));
568 }
569 
571  const rqt_bag_exporter::ExportToVideoResultConstPtr &result)
572 {
573  ros::Duration(0.1).sleep(); // Otherwise progress window bugs
574 
576  {
577  if (result->error.empty())
578  {
579  if (progress_dialog_)
580  Q_EMIT progress_dialog_->accept();
581  }
582  }
583 
585  {
586  if (progress_dialog_)
587  Q_EMIT progress_dialog_->reject();
588 
589  std::string error_msg("Action exportToVideo Aborted with error :" + result->error);
590  Q_EMIT displayMessageBox("Error from action", QString::fromStdString(error_msg), "",
591  QMessageBox::Icon::Critical);
592 
593  }
594 
596  {
597  if (progress_dialog_)
598  Q_EMIT progress_dialog_->reject();
599  }
600 }
601 
602 void MainWindow::videoFeedbackCb(const rqt_bag_exporter::ExportToVideoFeedbackConstPtr &feedback)
603 {
604  if (progress_dialog_ && progress_dialog_->isVisible())
605  Q_EMIT progress_dialog_->drawProgress(feedback->progress_value, QString::fromStdString(feedback->progress_msg));
606 }
607 
608 void MainWindow::closeEvent(QCloseEvent *event)
609 {
610  closeBag();
611  settings_ = new QSettings("Institut Maupertuis", "rqt_bag_exporter");
612  settings_->setValue("geometry", saveGeometry());
613  settings_->setValue("window_state", saveState());
614  QMainWindow::closeEvent(event);
615 }
616 
618 {
619  settings_ = new QSettings("Institut Maupertuis", "rqt_bag_exporter");
620  restoreGeometry(settings_->value("geometry").toByteArray());
621  restoreState(settings_->value("window_state").toByteArray());
622 }
623 
624 void MainWindow::displayMessageBoxHandler(const QString title,
625  const QString message,
626  const QString info_msg,
627  const QMessageBox::Icon icon)
628 {
629  const bool old(isEnabled());
630  Q_EMIT setEnabled(false);
631  QMessageBox msg_box;
632  msg_box.setWindowTitle(title);
633  msg_box.setText(message);
634  msg_box.setInformativeText(info_msg);
635  msg_box.setIcon(icon);
636  msg_box.setStandardButtons(QMessageBox::Ok);
637  msg_box.exec();
638  Q_EMIT setEnabled(old);
639 }
actionlib::SimpleActionClient< rqt_bag_exporter::ExportToVideoAction > ExportToVideoActionClient
Definition: mainwindow.hpp:79
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
void exportToDirectory()
Definition: mainwindow.cpp:408
QSettings * settings_
Definition: mainwindow.hpp:84
void fillTopicsToExport()
Definition: mainwindow.cpp:518
void csvDoneCb(const actionlib::SimpleClientGoalState &state, const rqt_bag_exporter::ExportToCSVResultConstPtr &result)
Definition: mainwindow.cpp:533
void closeEvent(QCloseEvent *event)
Definition: mainwindow.cpp:608
bool sleep() const
void updateTimeBegin(const double time_end)
Definition: mainwindow.cpp:402
bool call(MReq &req, MRes &res)
void closeBag()
Definition: mainwindow.cpp:82
bool isCompressedImageTopic(const std::string topic_type)
Definition: mainwindow.cpp:239
void displayMessageBoxHandler(const QString title, const QString message, const QString info_msg="", const QMessageBox::Icon icon=QMessageBox::Icon::Information)
Definition: mainwindow.cpp:624
void videoDoneCb(const actionlib::SimpleClientGoalState &state, const rqt_bag_exporter::ExportToVideoResultConstPtr &result)
Definition: mainwindow.cpp:570
QDoubleSpinBox * time_begin_
Definition: mainwindow.hpp:86
void fillVideoTab(const std::string topic_name)
Definition: mainwindow.cpp:339
void fillStartEndTime()
Definition: mainwindow.cpp:293
rqt_bag_exporter::ListTopicsResponse topics_to_export_
Definition: mainwindow.hpp:92
std::string directory_
Definition: mainwindow.hpp:93
QDoubleSpinBox * time_end_
Definition: mainwindow.hpp:87
rqt_bag_exporter::ListTopicsResponse topics_list_
Definition: mainwindow.hpp:91
std::shared_ptr< ProgressDialog > progress_dialog_
Definition: mainwindow.hpp:76
bool waitForExistence(ros::Duration timeout=ros::Duration(-1))
QWidget * topics_container_
Definition: mainwindow.hpp:90
MainWindow(QWidget *parent=0)
Definition: mainwindow.cpp:3
unsigned fps_
Definition: mainwindow.hpp:94
void csvFeedbackCb(const rqt_bag_exporter::ExportToCSVFeedbackConstPtr &feedback)
Definition: mainwindow.cpp:564
actionlib::SimpleActionClient< rqt_bag_exporter::ExportToCSVAction > ExportToCSVActionClient
Definition: mainwindow.hpp:78
void displayTopics()
Definition: mainwindow.cpp:216
QTabWidget * video_tab_
Definition: mainwindow.hpp:88
QWidget * start_end_time_
Definition: mainwindow.hpp:89
bool isCsvWritableTopic(const std::string topic_type)
Definition: mainwindow.cpp:246
ros::NodeHandle nh_
Definition: mainwindow.hpp:74
void updateTimeEnd(const double time_begin)
Definition: mainwindow.cpp:396
std::string getService()
std::unique_ptr< ExportToCSVActionClient > csv_ac_
Definition: mainwindow.hpp:81
void displayMessageBox(const QString, const QString, const QString, const QMessageBox::Icon)
void updateFps(const int fps)
Definition: mainwindow.cpp:391
void exportTopic()
Definition: mainwindow.cpp:431
void load()
Definition: mainwindow.cpp:617
void openBagFile()
Definition: mainwindow.cpp:114
void videoFeedbackCb(const rqt_bag_exporter::ExportToVideoFeedbackConstPtr &feedback)
Definition: mainwindow.cpp:602
void listTopicsInBagFile()
Definition: mainwindow.cpp:167
std::unique_ptr< ExportToVideoActionClient > video_ac_
Definition: mainwindow.hpp:82


rqt_bag_exporter
Author(s): Romain Hernandez, Victor Lamoine - Institut Maupertuis
autogenerated on Mon Jun 10 2019 14:57:01