Skip to content

Commit

Permalink
[jsk_topic_tools] Remove init_node in ConnectionBasedTransport
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Oct 12, 2015
1 parent 55ee6fa commit 783fd2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion jsk_topic_tools/sample/simple_image_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class SimpleImageTransport(ConnectionBasedTransport):
def __init__(self):
super(SimpleImageTransport, self).__init__('simple_image_transport')
super(SimpleImageTransport, self).__init__()
self._pub = self.advertise('~output', Image, queue_size=1)

def subscribe(self):
Expand All @@ -24,5 +24,6 @@ def _process(self, img_msg):


if __name__ == '__main__':
rospy.init_node('sample_image_transport')
img_trans = SimpleImageTransport()
rospy.spin()
3 changes: 1 addition & 2 deletions jsk_topic_tools/src/jsk_topic_tools/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@


class ConnectionBasedTransport(rospy.SubscribeListener):
def __init__(self, node_name):
def __init__(self):
super(ConnectionBasedTransport, self).__init__()
rospy.init_node(node_name)
self._publishers = []
self._ever_subscribed = False
self._connection_status = ConnectionStatus.NOT_SUBSCRIBED
Expand Down

0 comments on commit 783fd2b

Please sign in to comment.