#include <bag_manager.hpp>
Public Member Functions | |
| BagManager (const std::string &path, const std::string &default_topic) | |
| template<class T > | |
| void | write (const T &msg) |
| template<class T > | |
| void | write (const std::string &topic, const T &msg) |
| ~BagManager () | |
Private Member Functions | |
| int | numOfFiles (const std::string &path) const |
Private Attributes | |
| rosbag::Bag | bag_ |
| std::string | default_topic_ |
Produces a rosbag with given message data.
Definition at line 13 of file bag_manager.hpp.
| generic_control_toolbox::BagManager::BagManager | ( | const std::string & | path, |
| const std::string & | default_topic | ||
| ) |
Open a bag on the given path.
| path | The path where to record the bag. |
| default_topic | The default topic name for the bag to record. |
Definition at line 5 of file bag_manager.cpp.
Definition at line 16 of file bag_manager.cpp.
| int generic_control_toolbox::BagManager::numOfFiles | ( | const std::string & | path | ) | const [private] |
Returns the number of bag files in the recording directory.
| path | Path to the recording directory. |
Definition at line 18 of file bag_manager.cpp.
| void generic_control_toolbox::BagManager::write | ( | const T & | msg | ) |
Add a message to the bag file on the default topic.
| msg | The message to be written. |
Definition at line 56 of file bag_manager.hpp.
| void generic_control_toolbox::BagManager::write | ( | const std::string & | topic, |
| const T & | msg | ||
| ) |
Add a message to the bag file on a given topic.
| topic | The topic name. |
| msg | The message to be written. |
Definition at line 62 of file bag_manager.hpp.
Definition at line 43 of file bag_manager.hpp.
std::string generic_control_toolbox::BagManager::default_topic_ [private] |
Definition at line 44 of file bag_manager.hpp.