Vector reads a children's book

preview_player
Показать описание
This video demonstrates (and for the first time in history also tries to give some quick insight, pardon my poor quality as one-man mobile phone videomaker) how to have Vector read a few lines from a children's book. For this experiment I used Julia Donaldson & Axel Scheffler's "Room on the broom", a fantastic book in rhyme. Hey BBC did also a CGI cartoon adaptation, check it out! :)

My robot is a normal production Vector 1.0 running the wirepod OTA image. Sometimes you need to authenticate the SDK with the robot before putting him on wirepod.

#!/usr/bin/env python3

import shlex
import subprocess
import json
import threading
import time
import re

import anki_vector
from anki_vector import events

def doOCR():
process = subprocess.Popen(args, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print(response)
return response

with anki_vector.Robot(cache_animation_lists=False) as robot:
txt = doOCR()
if len(txt) == 0:
txt = "I don't see anything"


#!/bin/bash
echo $cmd
runuser -l pi -c "$cmd"

It just runs the script passed as a first parameter as system user "pi" and passes to the script the remaining command line parameters.

Happy coding!
Рекомендации по теме
Комментарии
Автор

Thank you for the code ! It was an incredible demo ! 😍

didiervandendaele