ihashacks

i dunno

Tuxdroid Lives

Me and tux

There is not a whole lot of updated tuxdroid documentation on the net these days. I dusted my Tux off the other day and tried to get him working in Ubuntu. I had no luck in 12.04 but was able to get him up and running on 11.10.

1
2
3
wget http://ftp.tuxdroid-community.net/setup/linux/generic/tuxbox-USEnglish-TTS-3.1.4-amd64.tar.gz
tar zxvf tuxbox-USEnglish-TTS-3.1.4-amd64.tar.gz
cd tuxbox-USEnglish

The install.sh script needs to be patched.

1
2
3
4
wget https://raw.github.com/gist/2795759/b2711d8339ea434ab14247ebfbb702c97197b038/install.sh.patch
patch -p0 < install.sh.patch
sudo ./install.sh
echo $?

As long as $? == 0 you should be good to move forward.

1
2
tuxhttpserver --start
netstat -lan --inet | grep :54321 | grep LISTEN

As long as port 54321 is LISTENing you should be able to connect to your Tux via a web browser:

tuxdroid_web

Bonus points for working in /devels/

tuxdroid_web_devels

or Python console…

1
tuxsh

That should put you at a Python shell that loads up the Tux api automatically.

test him out
1
2
tux.mouth.open()
tux.mouth.close()

I like to tinker in Python but the documentation is less than obvious. I did end up finding a list of objects and methods with some one-liners.

1
2
3
4
5
6
7
8
9
10
cd /usr/local/lib/python2.7/dist-packages/tuxisalive/api/tuxdroid
# list of objects
grep "def\ " *.py | \
> grep -v init | \
> awk -F\. ' { print $1 } ' | \
> sort | \
> uniq | \
> tr A-Z a-z
# list of methods
grep "def\ " *.py | grep -v init

That helps you figure out things like…

1
2
3
4
5
6
# spin in circles
tux.spinning.leftOnAsync(5.0)
# flap wings
tux.flippers.onAsync(10)
# and say poooop while you're doing it
tux.tts.speak("poooop")

Comments