Rewrite of Qbo code
 
Notifications
Clear all

Rewrite of Qbo code

3 Posts
2 Users
0 Reactions
822 Views
chrisbuy
(@chrisbuy)
Member
Joined: 6 years ago
Posts: 71
Topic starter  

I've started to rewrite Qbo's standard startup code (PiFaceFast.py)  but I'm stuck on Qbo's controller (more specifically the head, cfr. later posting). Face recognition has been improved with tracking, python 3 is partially supported, better logging and I think I have improved the python code's readability. It works (!) but the head movements are not yet what I wanted it to be. I see horizontal movement not vertically. I think I have to research Arduino coding a bit first (totally new for me) because I suspect some code issues there (or I don't understand it yet).

I didn't manage to get snowboy (hotword recognition) already Python 3 compliant so only interactive-gassistant (Google Assistant) mode works fine.

For those interested in trying out...

  1. Connect to Q.bo using VNC
  2. Copy the attached files PiFaceFast_CBv2.py, QboController.py, QboTalk.py, QboWatson.py, QboGAssistant.py, QboDialogFlowV2.py to the /home/pi/ directory
  3. Press Ctrl+Alt+T to open a terminal
  4. Enter
    sudo pkill python
    sudo pkill chromium
  5. To get Qbo's python 3 default installation base compatible, enter
    sudo apt-get install libjasper-dev
    sudo apt-get install libqtgui4
    sudo apt-get install libqt4-test
    sudo pip3 install pyyaml
    sudo pip3 install imutils
    sudo pip3 install opencv-contrib-python
  6. Enter
    sudo cp PiFaceFast_CBv2.py /opt/qbo
    sudo cp QboDialogFlowV2.py /opt/qbo/assistants/
    sudo cp QboGAssistant.py /opt/qbo/assistants/
    sudo cp QboTalk.py /opt/qbo/assistants/
    sudo cp QboWatson.py /opt/qbo/assistants/
    sudo cp QboController.py /opt/qbo/controller/
    python3 -u qbo /opt/qbo/PiFaceFast_CBv2.py

Cheers,
Christian.

This topic was modified 6 years ago by chrisbuy

--
Christian Buysschaert
Leuven - Belgium
Email christian.buysschaert@gmail.com


   
Quote
chrisbuy
(@chrisbuy)
Member
Joined: 6 years ago
Posts: 71
Topic starter  

The only changes I had to make in the standard libraries for Python 3 in QboController.py, QboTalk.py, QboWatson.py, QboGAssistant.py, QboDialogFlowV2.py should be backwards compatible with Python 2... "print(string)" versus "print string".

This post was modified 6 years ago by chrisbuy

--
Christian Buysschaert
Leuven - Belgium
Email christian.buysschaert@gmail.com


   
ReplyQuote
Niko
 Niko
(@niko)
Eminent Member
Joined: 6 years ago
Posts: 39
 

Chris, i will check on weekend and i will revert on you!!!. Good contribution to the community  😀 

Niko


   
ReplyQuote
Share: