data_tamer
data_tamer copied to clipboard
MCAP logging error: Message: invalid magic bytes in Footer: 0xD0FF0B0000000000
Hi @facontidavide!
I've been trying to get started with this tool and I'm probably doing something wrong with the MCAPSink.
So first of all, I was running into the chunking issue explained in https://github.com/PickNikRobotics/data_tamer/issues/20 -- since I was only trying to log a single scalar double value over time, I wasn't seeing anything coming up on file until I logged a ton of data.
Next up, when I finally get a file that's partially full, I try to load it into PlotJuggler and get this error:
Message: invalid magic bytes in Footer: 0xD0FF0B0000000000
Is there some special way to make sure the file/buffer are closed properly? Or something missing? Here is my code:
(in the constructor)
mcap_sink_ = std::make_shared<DataTamer::MCAPSink>("ruckig_traj_executor_log.mcap");
log_channel_ = DataTamer::LogChannel::create("trajectory");
log_channel_->addDataSink(mcap_sink_);
log_channel_->registerValue("joint_1", &joint_value_);
in some subscriber callback
joint_value_ += 1.0;
if (!log_channel_->takeSnapshot()) {
RCLCPP_INFO_STREAM(get_node()->get_logger(), "LOGGING FAILED!");
} else {
RCLCPP_INFO_STREAM(get_node()->get_logger(), "LOGGING SUCCEEDED!");
}
Confirming the "LOGGING SUCCEEDED" printout is happening.
Any ideas? Thanks!