Go to the documentation of this file.00001
00002 import roslib
00003 roslib.load_manifest('hrl_camera')
00004 import ros_camera as rc
00005 import sys
00006 import cv
00007 import rospy
00008
00009 if __name__ == '__main__':
00010 if len(sys.argv) < 2:
00011 print 'Views images published through ROS.'
00012 print 'Usage: ./image_listener.py ROS_TOPIC_NAME'
00013 else:
00014 ros_topic_name = sys.argv[1]
00015 camera = rc.ROSImageClient(ros_topic_name)
00016 cv.NamedWindow(ros_topic_name, cv.CV_WINDOW_AUTOSIZE)
00017
00018 while not rospy.is_shutdown():
00019 f = camera.get_frame()
00020 cv.ShowImage(ros_topic_name, f)
00021 cv.WaitKey(10)
00022