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

errors on launch soundplay_node [closed]

asked 2011-09-05 22:34:11 -0600

jan gravatar image

updated 2011-09-07 00:26:47 -0600

I got some problems using the soundplay_node of the sound_drivers stack.

First of all: My speakers are Logitech USB speakers and are connected, activated, not muted, volume is adjusted, no red LED and THEY ARE WORKING. I used aplay to play some .wav files and I also successfully used the mpg123-player to listen to .mp3 tracks.

When I startup with

roslaunch sound_play soundplay_node.launch

I always get this error message:

[ERROR] [WallTime: 1315304498.071437] Exception in sound startup, will retry once per second. Is the speaker connected? Have you configured ALSA? Can aplay play sound? See the wiki if there is a red light on the Logitech speaker. Have a look at http://pr.willowgarage.com/wiki/sound_play/Troubleshooting Error message: No available audio device

If I start in an extra terminal

rosrun sound_play say.py "hello world"

no errors occur but you can't hear anything.

The message is

Saying: hello world

and it is exiting normally.

I tried a lot of things I found in the world wide web but nothing helped. I did the troubleshoot more than 10 times but nothing helped. I read everything about alsa and how to configure. I configured alsa that it uses the correct device (device 1). Here you can see my /etc/asound.conf (I tried a lot with these parameters perhaps I made some mistakes...):

defaults.pcm.card 1
defaults.ctl.card 0
defaults.pcm.device 0
defaults.pcm.subdevice 0
defaults.pcm.nonblock 1
defaults.pcm.ipc_key 5678293
defaults.pcm.ipc_gid audio
defaults.pcm.ipc_perm 0660
defaults.pcm.dmix.max_periods 0
defaults.pcm.dmix.rate 48000
defaults.pcm.dmix.format "unchanged"
defaults.pcm.dmix.card defaults.pcm.card
defaults.pcm.dmix.device defaults.pcm.device
defaults.pcm.dsnoop.card defaults.pcm.card
defaults.pcm.dsnoop.device defaults.pcm.device
defaults.pcm.front.card defaults.pcm.card
defaults.pcm.front.device defaults.pcm.device
defaults.pcm.rear.card defaults.pcm.card
defaults.pcm.rear.device defaults.pcm.device
defaults.pcm.center_lfe.card defaults.pcm.card
defaults.pcm.center_lfe.device defaults.pcm.device
defaults.pcm.side.card defaults.pcm.card
defaults.pcm.side.device defaults.pcm.device
defaults.pcm.surround40.card defaults.pcm.card
defaults.pcm.surround40.device defaults.pcm.device
defaults.pcm.surround41.card defaults.pcm.card
defaults.pcm.surround41.device defaults.pcm.device
defaults.pcm.surround50.card defaults.pcm.card
defaults.pcm.surround50.device defaults.pcm.device
defaults.pcm.surround51.card defaults.pcm.card
defaults.pcm.surround51.device defaults.pcm.device
defaults.pcm.surround71.card defaults.pcm.card
defaults.pcm.surround71.device defaults.pcm.device
defaults.pcm.iec958.card defaults.pcm.card
defaults.pcm.iec958.device defaults.pcm.device
defaults.pcm.modem.card defaults.pcm.card
defaults.pcm.modem.device defaults.pcm.device

I configured the asound.conf file directly. Before this I edited the ~/.asoundrc-file but without success.

Can you help me get the sound output work?

EDIT: Here the group-rights of my pioneer bot. Is this ok?

uid=1000(pioneer) gid=1000(pioneer) Gruppen=4(adm),20(dialout),24(cdrom),29(audio),46(plugdev),105(lpadmin),112(netdev),116(pulse-access),119(admin),122(sambashare),1000(pioneer)

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2012-02-24 19:20:17

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-09-06 01:21:18 -0600

Eric Perko gravatar image

I believe this can happen if you do not have full permissions on the audio device. Make sure the user you are running this as is in the audio group (and/or any other groups that look related to audio, depending on OS).

edit flag offensive delete link more

Comments

Hi Eric, I checked that already and it looks like I am in the audio group. You can have a look at the group rights. I edited my post. It is just the sound_play node which doesnt want to work. The normal soundoutput works fine.
jan gravatar image jan  ( 2011-09-07 00:02:39 -0600 )edit
Hmm... I think the only time I've ever seen this was when the permissions were screwed up, but it's entirely possible you have a different problem. Are the USB speakers the only sound output device (check the Sound preferences pane)? If not, maybe sound_play is picking the wrong output?
Eric Perko gravatar image Eric Perko  ( 2011-09-07 11:29:00 -0600 )edit
I tried this already. The problem is, that the other sound device (NVidia) doesnt work. Not even with normal output. (aplay or mpg123)
jan gravatar image jan  ( 2011-09-08 03:32:23 -0600 )edit

Question Tools

Stats

Asked: 2011-09-05 22:34:11 -0600

Seen: 294 times

Last updated: Sep 07 '11