Skip to content

Commit d114516

Browse files
committed
don't take a timestamp too early
1 parent bf6787d commit d114516

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
@@ -68,7 +68,6 @@ def test_register(self):
6868
rospy.loginfo(depth)
6969

7070
depth_msg = self.cv_bridge.cv2_to_imgmsg(depth, "32FC1")
71-
ci_msg.header.stamp = rospy.Time.now()
7271
rgb_ci_msg = copy.deepcopy(ci_msg)
7372
rgb_ci_msg.header.frame_id = "station2"
7473
depth_msg.header = ci_msg.header
@@ -90,6 +89,10 @@ def test_register(self):
9089
self.count = 0
9190
rospy.loginfo("publishing depth and ci, wait for callbacks")
9291
for i in range(4):
92+
stamp = rospy.Time.now()
93+
ci_msg.header.stamp = stamp
94+
rgb_ci_msg.header.stamp = stamp
95+
depth_msg.header.stamp = stamp
9396
self.depth_image_pub.publish(depth_msg)
9497
self.depth_ci_pub.publish(ci_msg)
9598
self.rgb_ci_pub.publish(rgb_ci_msg)

0 commit comments

Comments
 (0)