Skip to content

Commit 0b14afe

Browse files
committed
don't take a timestamp too early
1 parent 28c6ac4 commit 0b14afe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

depth_image_proc/test/test_register.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def test_register(self):
6565
rospy.loginfo(depth)
6666

6767
depth_msg = self.cv_bridge.cv2_to_imgmsg(depth, "32FC1")
68-
ci_msg.header.stamp = rospy.Time.now()
6968
rgb_ci_msg = copy.deepcopy(ci_msg)
7069
rgb_ci_msg.header.frame_id = "station2"
7170
depth_msg.header = ci_msg.header
@@ -87,6 +86,10 @@ def test_register(self):
8786
self.count = 0
8887
rospy.loginfo("publishing depth and ci, wait for callbacks")
8988
for i in range(4):
89+
stamp = rospy.Time.now()
90+
ci_msg.header.stamp = stamp
91+
rgb_ci_msg.header.stamp = stamp
92+
depth_msg.header.stamp = stamp
9093
self.depth_image_pub.publish(depth_msg)
9194
self.depth_ci_pub.publish(ci_msg)
9295
self.rgb_ci_pub.publish(rgb_ci_msg)

0 commit comments

Comments
 (0)