Main Page
Namespaces
Classes
Files
File List
src
hugin_panorama
src/hugin_panorama/stitch_loop.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
import
time
3
import
rospy
4
5
from
std_srvs.srv
import
Empty
6
7
# if __name__ == '__main__':
8
time.sleep(5)
9
rospy.init_node(
'stitch_loop'
)
10
11
rospy.wait_for_service(
'/image_saver1/save'
)
12
rospy.wait_for_service(
'/image_saver2/save'
)
13
rospy.wait_for_service(
'/stitch'
)
14
rospy.wait_for_service(
'/reset'
)
15
time.sleep(5)
16
save_image1 = rospy.ServiceProxy(
'/image_saver1/save'
, Empty)
17
save_image2 = rospy.ServiceProxy(
'/image_saver2/save'
, Empty)
18
stitch = rospy.ServiceProxy(
'/stitch'
, Empty)
19
reset = rospy.ServiceProxy(
'/reset'
, Empty)
20
time.sleep(5)
21
22
23
while
True
:
24
time.sleep(5)
25
reset
()
26
rospy.loginfo(
"Saving image from camera #1"
)
27
save_image1
()
28
rospy.loginfo(
"Saving image from camera #2"
)
29
save_image2
()
30
rospy.loginfo(
"Stitching panorama..."
)
31
time.sleep(1)
# wait for image files to be written
32
stitch
()
33
rospy.loginfo(
"Done. Looping..."
)
hugin_panorama.stitch_loop.save_image2
save_image2
Definition:
src/hugin_panorama/stitch_loop.py:17
hugin_panorama.stitch_loop.reset
reset
Definition:
src/hugin_panorama/stitch_loop.py:19
hugin_panorama.stitch_loop.save_image1
save_image1
Definition:
src/hugin_panorama/stitch_loop.py:16
hugin_panorama.stitch_loop.stitch
stitch
Definition:
src/hugin_panorama/stitch_loop.py:18
hugin_panorama
Author(s): Daniel Snider
autogenerated on Mon Jun 10 2019 13:37:30