Robowflex
v0.1
Making MoveIt Easy
|
rosbag
management class to ease message saving and loading.
More...
#include <bag.h>
Public Types | |
enum | Mode { READ , WRITE } |
File modes. More... | |
Public Member Functions | |
Bag (const std::string &file, Mode mode=WRITE) | |
Constructor. More... | |
~Bag () | |
Destructor. Closes opened bag. More... | |
template<typename T > | |
bool | addMessage (const std::string &topic, const T &msg) |
Adds a message to the bag under topic. More... | |
template<typename T > | |
std::vector< T > | getMessages (const std::vector< std::string > &topics) |
Gets messages from an opened bag. Returns all messages of type T from a list of topics topics. More... | |
Private Attributes | |
const Mode | mode_ |
Mode to open file in. More... | |
const std::string | file_ |
File opened. More... | |
rosbag::Bag | bag_ |
rosbag opened. More... | |
IO::Bag::Bag | ( | const std::string & | file, |
Mode | mode = WRITE |
||
) |
Constructor.
[in] | file | File to open or create. |
[in] | mode | Mode to open file in. |
Definition at line 398 of file robowflex_library/src/io.cpp.
IO::Bag::~Bag | ( | ) |
Destructor. Closes opened bag.
Definition at line 405 of file robowflex_library/src/io.cpp.
|
inline |
Adds a message to the bag under topic.
[in] | topic | Topic to save message under. |
[in] | msg | Message to write. |
T | Type of message. |
|
inline |
|
private |
|
private |