Skip to content

Commit

Permalink
Merge pull request #1280 from garaemon/speak-text-param
Browse files Browse the repository at this point in the history
[jsk_topic_tools/rosping_existence] Add ~speak_text parameter to cust…
  • Loading branch information
garaemon committed Dec 9, 2015
2 parents 9cdf50d + ed1d59c commit e56127c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jsk_topic_tools/scripts/rosping_existence.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ def checkNodeExistence(stat):
sound = SoundRequest()
sound.sound = SoundRequest.SAY
sound.command = SoundRequest.PLAY_ONCE
sound.arg = " ".join(nodes).replace("/", "").replace("_", " ") + " are dead"
if speak_text:
sound.arg = speak_text
else:
sound.arg = " ".join(nodes).replace("/", "").replace("_", " ") + " is dead"
g_robotsound_pub.publish(sound)
else:
stat.summary(diagnostic_msgs.msg.DiagnosticStatus.OK,
Expand All @@ -143,9 +146,10 @@ def checkNodeExistence(stat):
# nodes = [n.namespace + n.name for n in config.nodes]
nodes = argv[1:]
speak = rospy.get_param("~speak", False)
speak_text = rospy.get_param("~speak_test", "")
if speak:
g_robotsound_pub = rospy.Publisher("/robotsound", SoundRequest)
r = rospy.Rate(0.1)
r = rospy.Rate(0.01)
while not rospy.is_shutdown():
updater.update()
r.sleep()
Expand Down

0 comments on commit e56127c

Please sign in to comment.