5 from std_srvs.srv
import Empty
7 if __name__ ==
'__main__':
8 rospy.init_node(
'stitch_loop')
9 rospy.wait_for_service(
'/hugin_panorama/image_saver1/save')
10 rospy.wait_for_service(
'/hugin_panorama/image_saver2/save')
11 rospy.wait_for_service(
'/hugin_panorama/stitch')
12 rospy.wait_for_service(
'/hugin_panorama/reset')
13 save_image1 = rospy.ServiceProxy(
'/hugin_panorama/image_saver1/save', Empty)
14 save_image2 = rospy.ServiceProxy(
'/hugin_panorama/image_saver2/save', Empty)
15 stitch = rospy.ServiceProxy(
'/hugin_panorama/stitch', Empty)
16 reset = rospy.ServiceProxy(
'/hugin_panorama/reset', Empty)
18 while not rospy.is_shutdown():
19 rospy.loginfo(
"Clearing previous panorama files")
21 rospy.loginfo(
"Saving image from camera #1")
23 rospy.loginfo(
"Saving image from camera #2")
26 rospy.loginfo(
"Stitching panorama...")
28 rospy.loginfo(
"Done. Looping...")