Skip to content

Commit

Permalink
topic_tools/transfom: create publisher before subscriber, because cal…
Browse files Browse the repository at this point in the history
…lback may use the publisher (#1669)
  • Loading branch information
cwecht authored and dirk-thomas committed Aug 3, 2020
1 parent 60af411 commit 1bd134f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/topic_tools/scripts/transform
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ class TopicOp:

self.output_class = roslib.message.get_message_class(args.output_type)

self.sub = rospy.Subscriber(input_topic, input_class, self.callback)
self.pub = rospy.Publisher(args.output_topic, self.output_class, queue_size=1)
self.sub = rospy.Subscriber(input_topic, input_class, self.callback)

def callback(self, m):
if self.input_fn is not None:
Expand Down

0 comments on commit 1bd134f

Please sign in to comment.