From 70f72908c235662da9168a6aef7864fd603ec537 Mon Sep 17 00:00:00 2001 From: Lucas Walter Date: Tue, 18 Jan 2022 09:35:37 -0800 Subject: [PATCH] don't take a timestamp too early --- depth_image_proc/test/test_register.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/depth_image_proc/test/test_register.py b/depth_image_proc/test/test_register.py index e934a1042..f8ca07a62 100755 --- a/depth_image_proc/test/test_register.py +++ b/depth_image_proc/test/test_register.py @@ -68,7 +68,6 @@ def test_register(self): rospy.loginfo(depth) depth_msg = self.cv_bridge.cv2_to_imgmsg(depth, "32FC1") - ci_msg.header.stamp = rospy.Time.now() rgb_ci_msg = copy.deepcopy(ci_msg) rgb_ci_msg.header.frame_id = "station2" depth_msg.header = ci_msg.header @@ -90,6 +89,10 @@ def test_register(self): self.count = 0 rospy.loginfo("publishing depth and ci, wait for callbacks") for i in range(4): + stamp = rospy.Time.now() + ci_msg.header.stamp = stamp + rgb_ci_msg.header.stamp = stamp + depth_msg.header.stamp = stamp self.depth_image_pub.publish(depth_msg) self.depth_ci_pub.publish(ci_msg) self.rgb_ci_pub.publish(rgb_ci_msg)