Skip to content

Commit

Permalink
[jsk_tools/audible_warning] Set wait_speak_duration_time to wait acti…
Browse files Browse the repository at this point in the history
…on server result.
  • Loading branch information
iory committed Jul 6, 2022
1 parent 8ecd6bc commit 4e6e771
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions doc/jsk_tools/scripts/audible_warning.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ Robots using diagnostics can use this node.

This is useful for ignoring errors that occur when the robot starts.

* `~wait_speak_duration_time` (`Float`, default: `30.0`)

Waiting time in `robotsound` action.

* `~enable` (`Bool`, default: `True`)

If `True`, speak diagnositcs. If `False`, this node don't speak.
Expand Down
4 changes: 3 additions & 1 deletion jsk_tools/node_scripts/audible_warning.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ def __init__(self):
language = rospy.get_param('~language', '')
seconds_to_start_speaking = rospy.get_param(
'~seconds_to_start_speaking', 0)
wait_speak_duration_time = rospy.get_param(
'~wait_speak_duration_time', 30.0)

# Wait until seconds_to_start_speaking the time has passed.
self.run_stop_enabled_time = None
Expand Down Expand Up @@ -209,7 +211,7 @@ def __init__(self):
self.speak_thread = SpeakThread(
speak_rate, wait_speak,
language,
wait_speak_duration_time=seconds_to_start_speaking)
wait_speak_duration_time=wait_speak_duration_time)
self.srv = Server(Config, self.config_callback)

# run-stop
Expand Down

0 comments on commit 4e6e771

Please sign in to comment.