Skip to content

Commit

Permalink
don't take a timestamp too early
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasw committed May 7, 2022
1 parent bf6787d commit d114516
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion depth_image_proc/test/test_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit d114516

Please sign in to comment.