roboticslab-uc3m / teo-configuration-files

TEO configuration files.
http://roboticslab.uc3m.es/roboticslab/robot/teo-humanoid
GNU Lesser General Public License v2.1
0 stars 0 forks source link

[speechRecognition.py] Error in Yarp Module Manager #14

Closed jgvictores closed 6 years ago

jgvictores commented 6 years ago

From @jgvictores on May 17, 2018 8:6

From @rsantos88 on November 4, 2016 10:29

Actualmente, con la nueva versión de speechRecognition.py instalada en teo-head, el Yarp Module Manager no es capaz de realizar el arranque remoto del mismo, mostrando el siguiente error: [ERR]: (teoBase_App) cannot run /sbin/runuser on /head : cannot run /sbin/runuser on /head

Copied from original issue: roboticslab-uc3m/vision#46

Copied from original issue: roboticslab-uc3m/speech#26

jgvictores commented 6 years ago

From @rsantos88 on November 4, 2016 12:14

Pongo esta información por si pudiera ser de utilidad: Al ejecutar en terminal los pasos que realizaría el xml del Yarp Manager:

ssh head
cd /sbin
sudo runuser -l teo -c speechRecognition.py

Nos muestra el siguiente error:

Using pygtkcompat and Gst from gi
gdk_mir_display_open
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
gdk_mir_display_open
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
||| clearing context
||| adding context [speechRecognition]
||| finding file words-20150720.lm
||| checking [/home/teo/words-20150720.lm] (pwd)
||| checking [/home/teo/.config/yarp/robots/default] (robot YARP_CONFIG_HOME)
||| checking [/home/teo/.local/share/yarp/robots/default] (robot YARP_DATA_HOME)
||| checking [/etc/yarp/robots/default] (robot YARP_CONFIG_DIRS)
||| checking [/home/teo/repos/teo-head/build/share/teo-head/robots/default] (robot YARP_DATA_DIRS)
||| checking [/usr/local/share/speech/robots/default] (robot YARP_DATA_DIRS)
||| checking [/home/teo/repos/teo-head/build/share/teo-head/config/path.d] (robot path.d YARP_DATA_DIRS)
||| checking [/usr/local/share/speech/config/path.d] (robot path.d YARP_DATA_DIRS)
||| checking [/home/teo/.config/yarp/contexts/speechRecognition] (context YARP_CONFIG_HOME)
||| checking [/home/teo/.local/share/yarp/contexts/speechRecognition] (context YARP_DATA_HOME)
||| checking [/etc/yarp/contexts/speechRecognition] (context YARP_CONFIG_DIRS)
||| checking [/home/teo/repos/teo-head/build/share/teo-head/contexts/speechRecognition] (context YARP_DATA_DIRS)
||| found /home/teo/repos/teo-head/build/share/teo-head/contexts/speechRecognition
||| checking [/usr/local/share/speech/contexts/speechRecognition] (context YARP_DATA_DIRS)
||| checking [/home/teo/repos/teo-head/build/share/teo-head/contexts/speechRecognition/words-20150720.lm] (context)
||| found /home/teo/repos/teo-head/build/share/teo-head/contexts/speechRecognition/words-20150720.lm
||| finding file words-20150720.dic
||| checking [/home/teo/words-20150720.dic] (pwd)
||| checking [/home/teo/repos/teo-head/build/share/teo-head/contexts/speechRecognition/words-20150720.dic] (context)
||| found /home/teo/repos/teo-head/build/share/teo-head/contexts/speechRecognition/words-20150720.dic
swig/python detected a memory leak of type 'Type *', no destructor found.
yarp: Port /speechRecognition:o active at tcp://2.2.2.53:10009
yarp: Port /speechRecognition/rpc:s active at tcp://2.2.2.53:10010
Traceback (most recent call last):
  File "/usr/local/bin/speechRecognition.py", line 180, in <module>
    app = SpeechRecognition()
  File "/usr/local/bin/speechRecognition.py", line 108, in __init__
    self.init_gst()
  File "/usr/local/bin/speechRecognition.py", line 119, in init_gst
    + '! pocketsphinx name=asr beam=1e-20 ! fakesink')
GLib.Error: gst_parse_error: no element "pocketsphinx" (1)
jgvictores commented 6 years ago

This link looks helpful: http://www.devsplanet.com/question/35931585 In case link ever dies, I'd highlight 'gst-inspect-1.0 pocketsphinx' (through runuser in our case), and the use of the environment variable GST_PLUGIN_PATH.

jgvictores commented 6 years ago

From @rsantos88 on November 7, 2016 10:7

Al ejecutar por terminal la linea sudo runuser -l teo -c "gst-inspect-1.0 pocketsphinx" obtenemos el siguiente resultado:

/sbin$ sudo runuser -l teo -c "gst-inspect-1.0 pocketsphinx"
No such element or plugin 'pocketsphinx'

Este error era consecuencia de que no estaba especificada la ruta de gstreamer en GST_PLUGIN_PATH. Una vez pasada la ruta al script .bashrc, el problema se solucionaba (ver aqui) Es posible que runuser este ignorando este script al ejecutarse...

jgvictores commented 6 years ago

From @rsantos88 on November 7, 2016 11:33

Tema resuelto (ver commit de teo-main) Cierro esta issue :)

jgvictores commented 6 years ago

https://github.com/roboticslab-uc3m/kinematics-dynamics/commit/bab6d27b522a8ecb61f3adc4752e2bae7f65dc4c