From d51f54aea936630c3d605d4624957db98c199eb3 Mon Sep 17 00:00:00 2001 From: Lucas Walter Date: Tue, 27 Aug 2024 10:22:38 -0700 Subject: [PATCH] supply rate to mcap player and fix field name of clock msg --- one2z/scripts/ros1_play_mcap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/one2z/scripts/ros1_play_mcap.py b/one2z/scripts/ros1_play_mcap.py index 24fd08f..edd21b1 100755 --- a/one2z/scripts/ros1_play_mcap.py +++ b/one2z/scripts/ros1_play_mcap.py @@ -27,7 +27,7 @@ def main(): count = 0 while not rospy.is_shutdown(): rate = rospy.get_param("~rate", 1.0) - play_mcap(sys.argv[1], msg_classes) + play_mcap(sys.argv[1], msg_classes, rate) rospy.loginfo(f"looping {count}") count += 1 time.sleep(1.0) @@ -186,7 +186,7 @@ def __init__(self): # TODO(lucasw) keep advancing /clock for a few seconds before looping for i in range(100): - last_clock_msg.time += rospy.Duration(0.05) + last_clock_msg.clock += rospy.Duration(0.05) clock_pub.publish(last_clock_msg) time.sleep(0.01)