Welcome

This blog details my finding in building and setting up a small web connected humanoid robot.
The first objective of this project is to fully control and monitor the robot from internet.
This will be done by adding a single board computer running a full Linux system connected to the Robovie Nano robot by the serial port and connected to the web by wifi.
Beside web remote control, I will take advantage of the complete Linux system to add some higher functions to this robot (environment analysis, navigation, speech & video recognition,...).

There are several constraints in this project.

At first a limited weight and space . The Nano is a very small robot and the available space is quite narrow (6 x 3 x 2 cm in the back) .
The added weight load must be under 100 gms (Linux board + battery + wlan+ audio + webcam + sensors ) if we want to keep fluid motions and good autonomy.
Due to theses constraints I have to work with a minimal processing power. I am using a Bifferboard from Bifferos running a full Debian Distro at 150Mhz.

The tasks and progress are:

Build Debian kernel & rootf : (done) Debian Squeeze with headers. Linux 2.6.32.2
Wlan (done)
Remote motions control (done)
Remote master slave control : (done)
Video streaming - 2 ways : (done)
Vision/Blob recognitions (not started)
Sound streaming - 2 ways (wip) - can play stream, can record sound
Speech Synthesis (done) - flite working well, espeak is choppy but still usable
Speech Recognition (wip)
Remote Sensors monitoring (done) Battery level, accelerometer, distance, temperature
Lcd usb display (done) - hacked 1.5" key chain
Oled i2c display (wip)
Auto charging (not started)

Friday, March 18, 2011

USB LCD & BIFFERBOARD

I hacked a  cheap 1.5” color USB LCD (Copy DP-152, you can find some as low at 5 usd on Ebay)  following http://picframe.spritesserver.nl/wiki/index.php/Main_Page
Without the body and Lipo, the screen is less than 10 g, and very compact. I could save 1-2 g and 2 mm in thickness by removing the mini  usb.









I also removed the screen buttons, they are not necessary as it start automatically in USB update mode.
The driver is  easy to compile, as long as you have installed the libgd2 library.

I can display any picture with the command. /septic /dev/sdb /pic.png.
The little script provided by Spritesmods to display a webcam stream allow me to either to display the stream from the onboard camera or from any ip camera (mjpeg stream) .

The frame rate is slow, ~1f/s, as the script is basically graping a jpeg and converting to a .png (with Imagemagik) , which is quite heavy work for the Biff..

It took me more time to compile lcd4linux (ton of dependency pbs), but it is a neat application thanks to I can display the processor speed, ram left, wifi traffic, system message, batteries status…

http://lcd4linux.bulix.org/
I can simultaneously run lcd4linux and the webcam script but I will have to fine tune the font color,& size to make everything more readable with a changing background.




Here is my lcd4linux.conf file:



variables {
wifi 'wlan0'
dysk '/tmp'
transparent
minuta 6000
0 'ffffff00' }
{ Driver
Display st2205u
'st2205'
'/dev/sdb' Font
Port
'6x8'
d 'ffffff' Backgrou
Foregrou
nnd '000000' Basecolor '000000'
t
} Plugin FIFO { FifoPath '
/mp/lcd4linux.fifo' FifoBufSize 80
} Widget CPU_Busy { class 'Text
' expression proc_stat::cpu('busy', 500)
prefix 'CPU ' postfix '% '
ign 'L'
width 10 precision 1 a
lupdate minuta } Widget RAM {
meminfo('MemFree
class 'Text' expressio
n') prefix 'RAM ' postfix 'Kb'
'R' upd
width 11 precision 0 alig
nate minuta } Widget IPaddress {
info::ipaddr(wifi
class 'Text' expression ne
t) prefix 'IP' width 20 align 'C'
reground '00ff
style bold Background transparent F
o00' } Widget wlan_qual { class 'Text'
) prefix 'WLAN QUALITY: ' width 20 al
expression exec('cat /tmp/wlanvar.tmp', 300
0ign 'C' update 3000 } Widget down_icon { class 'Icon' speed 500 Bitmap {
.|*****|.***.|.***.' Row3 '.***.|.....|.....|..*
Row1 '.....|..*..|.***.|*****|.***.|.***.|.***.' Row2 '.....|.....|..*..|.**
*..|.***.|*****|.***.' Row4 '.***.|.***.|.....|.....|..*..|.***.|*****' Row5 '.***.|.***.|.***.|.....|.....|..*..|.***.'
*.|*****|.***.|.***.|.***.|.....' } Background t
Row6 '*****|.***.|.***.|.***.|.....|.....|..*..' Row7 '.***.|*****|.***.|.***.|.***.|.....|.....' Row8 '..*..|.*
*ransparent Foreground '00ff00' } Widget up_icon { class 'Icon' speed 500 Bitmap { Row8 '.....|..*..|.***.|*****|.***.|.***.|.***.'
.***.|*****' Row4 '.***.|.***.|.***.|.....|.....
Row7 '.....|.....|..*..|.***.|*****|.***.|.***.' Row6 '.***.|.....|.....|..*..|.***.|*****|.***.' Row5 '.***.|.***.|.....|.....|..*..
||..*..|.***.' Row3 '*****|.***.|.***.|.***.|.....|.....|..*..' Row2 '.***.|*****|.***.|.***.|.***.|.....|.....' Row1 '..*..|.***.|*****|.***.|.***.|.***.|.....' }
ign 'R' Foreground 'ff
Background transparent Foreground 'ff0000' } Widget wan_dl { class 'Text' expression (netdev(wifi, 'Rx_bytes', 500))/1024 postfix 'kB/s' width 8 precision 0 a
lffff' Background transparent } Widget wan_up { class 'Text' expression (netdev(wifi, 'Tx_bytes', 500))/1024 postfix 'kB/s' width 8 precision 0 align 'R' Foreground 'ffffff'
ff' Background '000000
Background transparent } Widget wan_bar { class 'Bar' expression netdev(wifi, 'Rx_bytes', 500) expression2 netdev(wifi, 'Tx_bytes', 500) length 21 direction 'E' Foreground 'fff
f80' BarColor0 '008000' BarColor1 '800000' } Widget tail_log2 { class 'Text' expression exec('tail -c -35 /var/log/messages', 1000) width 20 align 'M' update 500 } Widget fifo {
03.Col01 'IPaddr
class 'Text' expression fifo::read() width 20 align 'M' update 400 Background 'FFD700' Foreground '0000FF' } Layout mylayout { Row01.Col01 'CPU_Busy' Row01.Col11 'RAM' Ro
wess' Row04.Col01 'wlan_qual' Row07.Col01 'down_icon' Row07.Col02 'wan_dl' Row07.Col11 'up_icon' Row07.Col12 'wan_up' Row08.Col01 'wan_bar' Row14.Col01 'tail_log2' Row15.Col01 'fifo' }
Display 'st2205u'
Layout 'mylayout'



USB HUB & BIFFERBOARD

It seems that only the USB Hub pictured below contain a special chinese chip (some fe1.1 type ) that allow webcam streaming in full resolution with Linux.



With this hub , Mjpgstreamer and uvcstreamer work well in MJPEG (10 fps at 640x480 with my cheap and extra small webcam).
With other hubs, I have lower performances and can only stream in YUV.
For space reason I am going to replace this hub with  a common USB 2.0 hub, with a smaller pcb size 3 x 2 cm. I will still be able to stream in YUV at 5 fps which is enough for me now.