How to use SoundRequestFeedback to tell if a sound is being played or not?
I am trying to reference the .playing
function in SoundRequestFeedback.h
(link to file) to allow my system to finish speaking before executing the rest of the code but I can't seem to figure out how to properly do that.
In my header file I declared sound_play::SoundRequestFeedback_<ContainerAllocator> v
and proceeded to try and do
ROS_INFO("%d", v.playing); // prints False<->0
sound_play::SoundClient.say("This is a test message"); //Says "This is a test message"
while(v.playing){}
//stays in a loop while the system is saying the message
ROS_INFO("%d", v.playing); // also prints False, but does so while the system is still saying the message.
so v.playing
always returns 0 and I don't know why. Does anyone know why ?
Could you link to the files that you are referring to?
Yes, I edited the question.