Skip to content

Commit

Permalink
save bags
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-Regal committed May 8, 2024
1 parent d51e334 commit cffc022
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/save_bags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ class SaveBags {
const std::string& TopicName)
{
try {
bag_.write(TopicName, Msg->header.stamp, *Msg);
bag_.write(TopicName, ros::Time::now(), *Msg);
}
catch (const std::exception& e) {
ROS_WARN_STREAM("Error in writing [" << TopicName << "] msg to bag: " << e.what());
ROS_WARN_STREAM("Error in writing [" << TopicName << "] stamped msg to bag: " << e.what());
}
}

Expand Down Expand Up @@ -159,7 +159,7 @@ class SaveBags {
bag_name_ = filename_ + ".bag";
}

std::string out_path = output_directory_ + "/" + bag_name_;
std::string out_path = output_directory_ + bag_name_;
bag_.open(out_path, rosbag::bagmode::Write);
is_recording_ = true;

Expand Down

0 comments on commit cffc022

Please sign in to comment.