Skip to content

Commit

Permalink
roslaunch users also need wait-for-start option
Browse files Browse the repository at this point in the history
copied code from ros@32edfbf
  • Loading branch information
k-okada committed Jan 18, 2016
1 parent a174857 commit 9997734
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/topic_tools/scripts/relay_field
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ class RelayField(object):
'expression',
help='Python expression to apply on the input message \'m\'.'
)
parser.add_argument(
'--wait-for-start', action='store_true',
help='Wait for input messages.'
)


# get and strip out ros args first
argv = rospy.myargv()
Expand All @@ -78,7 +83,7 @@ class RelayField(object):
self.expression = args.expression

input_class, input_topic, self.input_fn = rostopic.get_topic_class(
args.input)
args.input, blocking=args.wait_for_start)
if input_topic is None:
print('ERROR: Wrong input topic (or topic field): %s' % args.input,
file=sys.stderr)
Expand Down

0 comments on commit 9997734

Please sign in to comment.