00001 #!/usr/bin/env python 00002 # coding=utf-8 00003 00004 __author__ = "Minglong Li" 00005 00006 import rospy 00007 00008 class Send(object): 00009 def __init__(self, topic, msg_type): 00010 self._topic = topic 00011 self._msg_type = msg_type 00012 self.pub = rospy.Publisher(self._topic, self._msg_type, queue_size = 1) 00013 00014 def send(self, msg): 00015 self.pub.publish(msg)