dataload_ros.h
Go to the documentation of this file.
1 #ifndef DATALOAD_ROS_H
2 #define DATALOAD_ROS_H
3 
4 #include <QObject>
5 #include <QtPlugin>
6 
7 #include <ros/ros.h>
8 #include <rosbag/bag.h>
9 
13 #include "parser_configuration.h"
14 
16 {
17  Q_OBJECT
18  Q_PLUGIN_METADATA(IID "facontidavide.PlotJuggler3.ROSDataLoader")
19  Q_INTERFACES(PJ::DataLoader)
20 
21 public:
22  DataLoadROS();
23 
24  virtual ~DataLoadROS() override;
25 
26  virtual const std::vector<const char*>& compatibleFileExtensions() const override;
27 
28  virtual bool readDataFromFile(PJ::FileLoadInfo* fileload_info,
29  PJ::PlotDataMapRef& destination) override;
30 
31  virtual const char* name() const override
32  {
33  return "DataLoad ROS bags";
34  }
35 
36  virtual bool xmlSaveState(QDomDocument& doc, QDomElement& parent_element) const override;
37 
38  virtual bool xmlLoadState(const QDomElement& parent_element) override;
39 
40 protected:
41 
42  std::shared_ptr<rosbag::Bag> _bag;
43 
44 private:
45  std::vector<const char*> _extensions;
46 
48 
49  std::vector<std::pair<QString, QString>> getAllTopics(const rosbag::Bag* bag, PJ::CompositeParser &parser);
50 
52 };
53 
54 #endif // DATALOAD_CSV_H
rosbag::Bag
dataloader_base.h
DataLoadROS::xmlLoadState
virtual bool xmlLoadState(const QDomElement &parent_element) override
Definition: dataload_ros.cpp:247
DataLoadROS::_plot_map
PJ::PlotDataMapRef * _plot_map
Definition: dataload_ros.h:51
PJ::FileLoadInfo
DataLoadROS::_extensions
std::vector< const char * > _extensions
Definition: dataload_ros.h:45
ros.h
DataLoadROS::xmlSaveState
virtual bool xmlSaveState(QDomDocument &doc, QDomElement &parent_element) const override
Definition: dataload_ros.cpp:241
PJ::RosParserConfig
Definition: parser_configuration.h:14
dialog_select_ros_topics.h
DataLoadROS::getAllTopics
std::vector< std::pair< QString, QString > > getAllTopics(const rosbag::Bag *bag, PJ::CompositeParser &parser)
Definition: dataload_ros.cpp:47
DataLoadROS::_config
PJ::RosParserConfig _config
Definition: dataload_ros.h:47
bag.h
parser_configuration.h
ros1_parser.h
PJ::CompositeParser
Definition: parser_configuration.h:32
DataLoadROS::compatibleFileExtensions
virtual const std::vector< const char * > & compatibleFileExtensions() const override
Definition: dataload_ros.cpp:41
DataLoadROS
Definition: dataload_ros.h:15
PJ::DataLoader
DataLoadROS::readDataFromFile
virtual bool readDataFromFile(PJ::FileLoadInfo *fileload_info, PJ::PlotDataMapRef &destination) override
Definition: dataload_ros.cpp:107
DataLoadROS::~DataLoadROS
virtual ~DataLoadROS() override
Definition: dataload_ros.cpp:29
DataLoadROS::name
virtual const char * name() const override
Definition: dataload_ros.h:31
PJ::PlotDataMapRef
DataLoadROS::_bag
std::shared_ptr< rosbag::Bag > _bag
Definition: dataload_ros.h:42
DataLoadROS::DataLoadROS
DataLoadROS()
Definition: dataload_ros.cpp:22


plotjuggler_ros
Author(s): Davide Faconti
autogenerated on Wed Feb 21 2024 03:22:55