![]() |
Fixposition SDK 0.0.0-heads/main-0-g97f6014
Collection of c++ libraries and apps for use with Fixposition products on Linux
|
ROS2 bag writer helper. More...
#include <bagwriter.hpp>
Public Member Functions | |
| bool | Open (const std::string &path, const int compress=0) |
| Open bag for writing. | |
| void | Close () |
| Close bag. | |
| template<typename T> | |
| bool | WriteMessage (const T &msg, const std::string &topic, const rclcpp::Time &time) |
| Write a message to the bag. | |
| template<typename T> | |
| bool | WriteMessage (const T &msg, const std::string &topic, const common::time::RosTime &time) |
| Write a message to the bag. | |
| void | AddMsgDef (const common::fpl::RosMsgDef &rosmsgdef) |
| Add ROS message definition from .fpl. | |
| bool | WriteMessage (const common::fpl::RosMsgBin &rosmsgbin) |
| Write message from .fpl. | |
ROS2 bag writer helper.
Definition at line 43 of file bagwriter.hpp.
| bool fpsdk::ros2::bagwriter::BagWriter::Open | ( | const std::string & | path, |
| const int | compress = 0 ) |
Open bag for writing.
| [in] | path | Path of the bag directory |
| [in] | compress | Compress bag, 0 = no compression, 1 = ... Note: not fully implemented |
|
inline |
Write a message to the bag.
| T | ROS message type |
| [in] | msg | The message |
| [in] | topic | Topic name |
| [in] | time | Bag record time |
Definition at line 76 of file bagwriter.hpp.
References WARNING.
Referenced by WriteMessage().
|
inline |
Write a message to the bag.
| T | ROS message type |
| [in] | msg | The message |
| [in] | topic | Topic name |
| [in] | time | Bag record time |
Definition at line 99 of file bagwriter.hpp.
References fpsdk::common::time::RosTime::nsec_, fpsdk::common::time::RosTime::sec_, and WriteMessage().
| void fpsdk::ros2::bagwriter::BagWriter::AddMsgDef | ( | const common::fpl::RosMsgDef & | rosmsgdef | ) |
Add ROS message definition from .fpl.
| [in] | rosmsgdef | The message definition |
| bool fpsdk::ros2::bagwriter::BagWriter::WriteMessage | ( | const common::fpl::RosMsgBin & | rosmsgbin | ) |
Write message from .fpl.
| [in] | rosmsgbin | The recorded message |