ros-drivers / audio_common

Common code for working with audio in ROS
BSD 3-Clause "New" or "Revised" License
86 stars 152 forks source link

dont wait when rospy.Duration(0) is set for timeout #231

Closed knorth55 closed 1 year ago

knorth55 commented 1 year ago

this PR add no wait mode when timout=rospy.Duration(0).

actionlib default behavior is that when we set rospy.Duration(0) for timeout, the client wait until result comes back. this is a bit unnatural behavior, so I will change the behavior.

$ python say.py hello
[INFO] [1682567497.053644] [/say_387012_1682567495934:rosout]: Saying: hello
[INFO] [1682567497.056795] [/say_387012_1682567495934:rosout]: Voice: voice_kal_diphone
[INFO] [1682567497.059283] [/say_387012_1682567495934:rosout]: Volume: 1.0
[ERROR] [1682567498.205018] [/say_387012_1682567495934:rosout]: default elapsed_time: 1.1435973644256592
[ERROR] [1682567498.206991] [/say_387012_1682567495934:rosout]: no wait elapsed_time: 0.00020051002502441406