sound_play "say.py" can read the same text only once
I am trying to run the test.cpp in sound_play but the code to repeat a string does not seem to work. The sentence is read once, and that's it. I was expecting to hear "I am annoying." multiple times until sc.stopSaying is issued.
So I tried to do it manually with a simple:
while(nh.ok())
{
sc.say("Hello world!");
sleepok(2, nh);
sc.say("Hello world!");
sleepok(2, nh);
sc.say("Hello world!");
sleepok(2, nh);
}
Only the first "Hello world!" in the first iteration is read out, and silence after that.
Even in command line, I tried entering rosrun sound_play say.py 'Hello world'
multiple times (entering the line again after the sentence is read), and only the first time works.
I know from rostopic echo /robotsound
that the message is being published, so what is going wrong here?
EDIT 20/12/12
changing the sleep time to 30 seconds works for sc.say(...) Minimum sleep time seems to be 11. sc.repeat(...) does not work for any of the sleep time that works with sc.say(...)
I've noticed this too (I think it also happens when playing sound files). This is almost definitely a bug in sound_play.
Which version of sound_play are you using? Does it work if you increase the sleep time to 30 seconds?
Hi Austin, I'm using the electric version 0.1.5.