ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

sound_play playWave() is not playing sound

asked 2012-09-07 12:29:56 -0500

DocSmiley gravatar image

updated 2014-01-28 17:13:36 -0500

ngrennan gravatar image

I followed the directions I received in:

I had the sound_play's soundClient functionality working for some time.

However it has inexplicably stopped working and I'm unsure as to why.

I'm starting the and running the following in another node.

The relevant lines from my node (and launch file) are:

<param name = "my_file" value = "file://$(find my_audio)/a_sound.wav" />

from sound_play.libsoundplay import SoundClient

soundhandle = SoundClient()
my_sound = rospy.get_param('my_file')

With numerous print statements I can tell that the soundhandle.playWave(my_sound) is being called and does not appear to generate an error, but no sound is played. I have tried the second method as well, but with the same results.

I can run

$rosrun sound_play "/absolute/path/to/my_file.wav"

and get the sound to play every time.

Any help would be appreciated. Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-09-07 12:34:22 -0500

kszonek gravatar image

What about calling soundhandle.playWave('/absolute/path/to/my_file.wav'), does it work?

edit flag offensive delete link more

Question Tools


Asked: 2012-09-07 12:29:56 -0500

Seen: 742 times

Last updated: Sep 07 '12