18#ifndef __FPSDK_ROS1_BAGWRITER_HPP__
19#define __FPSDK_ROS1_BAGWRITER_HPP__
28#include "fpsdk_ros1/ext/ros_time.hpp"
29#include "fpsdk_ros1/ext/rosbag_bag.hpp"
61 bool Open(
const std::string& path,
const int compress);
77 void WriteMessage(
const rosbag::MessageInstance& msg,
const std::string& topic =
"");
89 void WriteMessage(
const T& msg,
const std::string& topic,
const ros::Time& time = {})
95 bag_->write(topic, time_, msg);
110 template <
typename T>
127 const std::string& topic,
const std::string& msg_name,
const std::string& msg_md5,
const std::string& msg_def);
140 bool WriteMessage(
const std::vector<uint8_t>& data,
const std::string& topic,
const ros::Time& time = {});
156 std::unique_ptr<rosbag::Bag> bag_;
158 std::map<std::string, boost::shared_ptr<ros::M_string>> msg_defs_;
bool WriteMessage(const std::vector< uint8_t > &data, const std::string &topic, const ros::Time &time={})
Write raw binary (serialised) message.
void WriteMessage(const T &msg, const std::string &topic, const RosTime &time={})
Write a message to the bag, do nothing if no bag is open.
bool Open(const std::string &path, const int compress)
Open bag for writing.
void WriteMessage(const rosbag::MessageInstance &msg, const std::string &topic="")
Write a message to the bag, do nothing if no bag is open.
bool WriteMessage(const std::vector< uint8_t > &data, const std::string &topic, const RosTime &time={})
Write raw binary (serialised) message.
void WriteMessage(const T &msg, const std::string &topic, const ros::Time &time={})
Write a message to the bag, do nothing if no bag is open.
void AddMsgDef(const std::string &topic, const std::string &msg_name, const std::string &msg_md5, const std::string &msg_def)
Add ROS message definition.
Minimal ros::Time() / rplcpp::Time implementation (that doesn't throw)
Fixposition SDK: Time utilities.