grab_cam_info.py
Go to the documentation of this file.
00001 import roslib; roslib.load_manifest('hai_sandbox')
00002 import rospy
00003 import hrl_lib.util as ut
00004 import sensor_msgs.msg as sm
00005 import sys
00006 
00007 class CamInfoCB:
00008     def __init__(self, topic):
00009         rospy.init_node('grab_cam_info')
00010         rospy.Subscriber(topic, sm.CameraInfo, self.cb)
00011         self.msg = None
00012 
00013     def cb(self, msg):
00014         self.msg = msg
00015 
00016 topic = sys.argv[1]
00017 save_name = sys.argv[2]
00018 c = CamInfoCB(topic)
00019 r = rospy.Rate(10)
00020 while not rospy.is_shutdown() and c.msg == None:
00021     r.sleep()
00022 ut.save_pickle(c.msg, save_name)
00023 
00024 


hai_sandbox
Author(s): Hai Nguyen
autogenerated on Wed Nov 27 2013 11:46:56