-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[jsk_tools] Add audible warnings node #1607
base: master
Are you sure you want to change the base?
Conversation
please add more description, who is using this. how can we integrate with existing warning codes? https://github.com/jsk-ros-pkg/jsk_robot/blob/master/jsk_fetch_robot/jsk_fetch_startup/scripts/warning.py ? https://github.com/jsk-ros-pkg/jsk_robot/tree/master/jsk_pr2_robot/jsk_pr2_startup/jsk_pr2_warning |
waiting for @iory 's feedback |
I think robots using
Most of the existing code is robot-specific. The only code whose function overlaps with the function of this node is I think the following function is in
In addition, It would be nice to have the function to stop the speak function only immediately after program startup. For example
|
I created PR for fetch to use |
@708yamaguchi |
@k-okada
|
…on server result.
What is this?
This is a general node that subscribes to
/diagnostics_agg
to speak the error content.Robots using diagnostics can use this node.
Target Action
/robotsound
(sound_play/SoundRequestAction
)Target action name.
If it is a different server name, please remap it like
<remap from="/robotsound" to="/sound_play" />
.Subscribing Topics
/diagnostics_agg
(diagnostic_msgs/DiagnosticArray
)Aggregated diagnostics.
Parameter
~speak_rate
(Float
, default:1.0
)Rate of speak loop.
~speak_interval
(Float
, default:120.0
)The same error will not be spoken until this number of seconds has passed.
~volume
(Float
, default:1.0
)Volume of speaking.
~language
(String
, default:""
)Language parameters for
arg2
insound_play/SoundRequestAction
.~wait_speak
(Bool
, default:True
)If
True
, wait until finish saying one error.~seconds_to_start_speaking
(Float
, default:0.0
)It is the time to wait for the node to speak after it has started.
This is useful for ignoring errors that occur when the robot starts.
~speak_warn
(Bool
, default:True
)If
True
, speak warning level diagnostics.~speak_error
(Bool
, default:True
)If
True
, speak error level diagnostics.~speak_stale
(Bool
, default:True
)If
True
, speak stale level diagnostics.~speak_when_runstopped
(Bool
, default:True
)If
True
, speak an error even if runstop isTrue
.~run_stop_topic
(String
, default:None
)Subscribe this topic if this value is specified.
~run_stop_condition
(String
, default:m.data == True
)Returning bool value condition using the given Python expression.
The Python expression can access any of the Python builtins plus:
topic
(the topic of the message),m
(the message) andt
(time of message).For example,
~run_stop_topic
isrobot_state (fetch_driver_msgs/RobotState)
and if you want to check whether a runstop is a pressed, you can do the following.run_stop_condition: "m.runstopped is True"
~blacklist
(Yaml
, required)User must always specify
name
. You can specifymessage
as an option.These values are matched using python regular expressions.
It is something like below:
~run_stop_blacklist
(Yaml
, optional)This is valid when run_stop is
True
. Blacklist at run_stop.Usage
Listen warnings from diagnostics.