From 4b2460cb5380e6389122044d6e08af0d31613fae Mon Sep 17 00:00:00 2001 From: Paul Tunison Date: Fri, 1 Nov 2024 12:03:38 -0400 Subject: [PATCH] Fix conversion of frames/videos to bag Time position of written message was incorrect. --- ros/angel_utils/scripts/convert_video_to_ros_bag.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ros/angel_utils/scripts/convert_video_to_ros_bag.py b/ros/angel_utils/scripts/convert_video_to_ros_bag.py index 855396e99..f03748f90 100755 --- a/ros/angel_utils/scripts/convert_video_to_ros_bag.py +++ b/ros/angel_utils/scripts/convert_video_to_ros_bag.py @@ -137,7 +137,8 @@ def convert_video_to_bag( bag_writer.write( output_image_topic, serialize_message(image_msg), - image_msg.header.stamp.nanosec, + # Time position of this message in nanoseconds (integer). + int(frame_rel_ts * 1e9), ) except Exception as err: # Truncating the error message because it printed out the whole image_msg input