sound_play not working with robot_upstart
I have been using soundplay happily for some time now and it has been working wonderfully. But recently I just switched to using robotupstart to launch my code. I had to add udev rules for various hardware in order to make it work. However my speaker is the only thing still giving me trouble. I get the following error:
No handlers could be found for logger "roslaunch"FATAL: cannot locate cpu MHz in /proc/cpuinfo
No handlers could be found for logger "roslaunch" [soundplaynode-3] process has died [pid 1300, exit code 1, cmd /opt/ros/indigo/lib/soundplay/soundplaynode.py _name:=soundplaynode _log:=/tmp/6713e882-b0ea-11e6-af2b-1711043209a9/soundplaynode-3.log]. log file: /tmp/6713e882-b0ea-11e6-af2b-1711043209a9/soundplaynode-3*.log
[WARN] [WallTime: 1479843193.510036] Sound command issued, but no node is subscribed to the topic. Perhaps you forgot to run soundplay_node.py?
I found the hardware associated with my speaker by running this bash script:
#!/bin/bash
for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do
(
syspath="${sysdevpath%/dev}"
devname="$(udevadm info -q name -p $syspath)"
[[ "$devname" == "bus/"* ]] && continue
eval "$(udevadm info -q property --export -p $syspath)"
[[ -z "$ID_SERIAL" ]] && continue
echo "/dev/$devname - $ID_SERIAL"
)
done
Which told me the following files were associated with my speaker:
/dev/sda - JIELICD002-1CD002-0:0
/dev/snd/controlC1 - CD002CD002CD002
/dev/snd/pcmC1D0p - CD002CD002CD002
/dev/input/event9 - CD002CD002CD002
/dev/hidraw5 - CD002CD002_CD002
I added the to a udev/rules.d file like so:
KERNEL=="sda", MODE="0666"
KERNEL=="snd/controlC1", MODE="0666"
KERNEL=="snd/pcmC1D0p", MODE="0666"
KERNEL=="hidraw5", MODE="0666"
So that they would have access to the speaker, but I still am getting the same error.
Asked by shoemakerlevy9 on 2016-11-22 14:46:00 UTC
Comments