From 96e7a9a89048a13b9e97b72494e4733dc09b615b Mon Sep 17 00:00:00 2001 From: Weilong Ye Date: Thu, 15 Apr 2021 09:55:26 -0400 Subject: [PATCH 1/2] Replaced bag.isOpen() by checking bag filename --- rosbag_snapshot/src/snapshotter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rosbag_snapshot/src/snapshotter.cpp b/rosbag_snapshot/src/snapshotter.cpp index 407e074..863bebd 100644 --- a/rosbag_snapshot/src/snapshotter.cpp +++ b/rosbag_snapshot/src/snapshotter.cpp @@ -311,7 +311,7 @@ bool Snapshotter::writeTopic(rosbag::Bag& bag, MessageQueue& message_queue, stri MessageQueue::range_t range = message_queue.rangeFromTimes(req.start_time, req.stop_time); // open bag if this the first valid topic and there is data - if (!bag.isOpen() && range.second > range.first) + if (bag.getFileName().empty() && range.second > range.first) { try { @@ -425,7 +425,7 @@ bool Snapshotter::triggerSnapshotCb(rosbag_snapshot_msgs::TriggerSnapshot::Reque } // If no topics were subscribed/valid/contained data, this is considered a non-success - if (!bag.isOpen()) + if (bag.getFileName().empty()) { res.success = false; res.message = res.NO_DATA_MESSAGE; From 8d5c01b06b1a12d4c828b08c1d04984e013cd7e8 Mon Sep 17 00:00:00 2001 From: Weilong Ye Date: Thu, 15 Apr 2021 10:22:31 -0400 Subject: [PATCH 2/2] bump version to 1.1.0 --- rosbag_snapshot/package.xml | 2 +- rosbag_snapshot_msgs/package.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rosbag_snapshot/package.xml b/rosbag_snapshot/package.xml index 1779d14..81cb850 100644 --- a/rosbag_snapshot/package.xml +++ b/rosbag_snapshot/package.xml @@ -1,7 +1,7 @@ rosbag_snapshot - 1.0.3 + 1.1.0 The rosbag_snapshot package Kevin Allen David V. Lu!! diff --git a/rosbag_snapshot_msgs/package.xml b/rosbag_snapshot_msgs/package.xml index 509078f..c398b04 100644 --- a/rosbag_snapshot_msgs/package.xml +++ b/rosbag_snapshot_msgs/package.xml @@ -1,7 +1,7 @@ rosbag_snapshot_msgs - 1.0.3 + 1.1.0 Service and message definitions for rosbag_snapshot Kevin Allen