watson-intu / self

Intu is a Cognitive Embodiment Middleware for AI on the edge.
Other
29 stars 27 forks source link

JavaScript SDK & Python SDK Unable to Work Simultaneously #16

Open MaryHewittWork opened 7 years ago

MaryHewittWork commented 7 years ago

Currently trying to use the JavaScript SDK to type NLP commands that would be picked up by the Python SDK to kick off other Python processes. Unfortunately, it does not seem possible to run the two SDKs simultaneously. I am running on Ubuntu 14.04.5 in a VirtualBox system.

To recreate my situation:

Map.js:55 Uncaught TypeError: Cannot read property 'toString' of undefined
    at Map.hash (Map.js:55)
    at Map.get (Map.js:63)
    at BlackboardInstance.unsubscribeToType (Blackboard.js:114)
    at ExampleClassifier.onStop (ExampleClassifier.js:52)
    at onEvent (ClassifierManager.js:82)
    at WebSocket.TopicClientInstance.socket.onmessage (TopicClient.js:57)
TopicClient Instantiated!
Topic Client is instantiated!
Connected!
On Connected function!
Sensor Manager has been instantiated!
adding sensor id: fbdedfd5-0848-4f8a-9327-635ac718a231
adding sensor id: e90156ce-412b-434c-b624-25c9eab4ed95
SpeechGesture has started!
adding gesture id: tts
WinstonHomeGesture has started!
adding gesture id: winston_home
Camera Sensor has started!
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
ExampleAgent has started!
ExampleAgent has stopped! # This line is added when JavaScript SDK Page is Refreshed.

I have tested my Python SDK, and it works fine to kick off my "winston_home" gesture when running on its own (i.e. without the JavaScript SDK running). However after the index.html page is refreshed, it appears that text is no longer transmitted to the Python SDK terminal window.

Your help is appreciated, as if this was solved we would be able to do some pretty amazing things with Intu!

rlyle commented 7 years ago

Each client needs to have a unique self ID when they connect, otherwise the system will disconnect the other connection if the ID is the same.. this might be your issue.

takaomoriyama commented 7 years ago

@mhew49680, do you still have the issue ? I tested in my environment, and test_topic_client.py worked if I changed selfId to non-empty string. Also your write_test_to_blackboard.py worked fine! Input text was shown on the Web screen shown by Javascript SDK.