Wednesday, August 24, 2016

[ROS Issues] Problems during installing sound_play package on an Odroid XU4

I am going to add some sound play and recognition function on my mobile robot. All good (Ok currently only sound synthesis) on my SONY VAIO laptop, Ubuntu 14.04 with Indigo. Alsamixer shows it is a HDA Intel PCH card...
Though I need to run 

rosdep install --from-paths /path/to/my/sound_play --ignore-src
to install some missing dependent libs to make the package compiled successfully.

However, on the Odroid XU4, ubuntu 14.04 with indigo, I connect a Logitech Z205 usb speaker, there is no compilation problems on my system, but cannot be executed, it says festival is not installed so I try rosdep again.

rosdep install --from-paths /path/to/my/sound_play --ignore-src -r
After that festival will be installed but still some dep errors.

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
sound_play: Cannot locate rosdep definition for [gir1.2-gst-plugins-base-1.0]

Never mind, try

roslaunch sound_play test.launch 
will see some warning

[WARN] [WallTime: 1472029411.178135] Inbound TCP/IP connection failed: connection from sender terminated before handshake header received. 0 bytes were received. Please check sender for additional details.

However this should not be the problem why it is silent. Check 
alsamixer, my device is odroid-audio, try to change it to logitech. 

On the sound_play wiki trouble shooting page or configuring page

asoundconf set-default-card [device #]
but asoundconf not found ... Ok, try to install this cmd.. until I found this 


One guy is trying to add sound_play to his robot using ros... Wonderful, 
I did not try to understand the command line by line, but the most important part for me (changed from the original post according to my own conf)

$ pacmd list-sources | grep -e device.string -e 'name:'
name: <alsa_output.platform-sound.12.analog-stereo.monitor>
device.string = "0"
name: <alsa_output.usb-Logitech_Logitech_Z205-00-Z205.analog-stereo.monitor>
device.string = "1"

$ pacmd set-default-source alsa_output.usb-Logitech_Logitech_Z205-00-Z205.analog-stereo.monitor 
Welcome to PulseAudio! Use "help" for usage information.

$ pacmd list-sink | grep -e 'name:' -e 'index'
odroid@odroid:/etc$ pacmd set-default-sink alsa_output.
alsa_output.platform-sound.12.analog-stereo
alsa_output.usb-Logitech_Logitech_Z205-00-Z205.analog-stereo

$ pacmd set-default-sink alsa_output.usb-Logitech_Logitech_Z205-00-Z205.analog-stereo 
Welcome to PulseAudio! Use "help" for usage information.

Try again !

roslaunch sound_play test.launch 
"Beep, Beep!" Very loud. 

If we try 

roslaunch sound_play soundplay_node.launch
rosrun sound_play test
Then we can hear "Hello world"!

-----

when there is a sound file (.wav) cannot be completed?

To be resolved..

No comments:

Post a Comment