about
Boston Enigneering has released its
FlexStack modular rapid prototyping system and I whipped up this demo to show it off. The system models a long distance, low bandwidth, wireless link between the
FlexStack and base station. This is the type of camera you'd use with a remote telepresence robot like the mars rovers. Through a serial connection the operator controls the camera (serial connections are easy to set up with radios like bluetooth RFCOMM, zigbee, pretty much any other...).

- Note that the
SRV-1 is a good choice for a high speed wireless linux camera (and robotic controller)
Operation
The operator requests that the camera snaps a picture. The camera takes a picture and saves it to the onboard SD card. It then generates a thumbnail and uploads the thumbnail to the base station via the wireless link. By only sending thumbnails bandwidth is conserved and the operator can decide which images are worth downloading the high resolution version of and which aren't worth bothering with.
2k thumbnail
|
37k original (that's a keeper!)
|
Embedded
The emedded software uses python 2.4.3 and jpgtn (JPG Thumbnail) running on uClinux. The network camera runs a webserver with a constantly updated jpg. In order to get an image off of it the
FlexStack just needs to use
wget to grab an image. Again due to time constraints I used Python to execute system commands rather than using python libraries to do it all natively. Still the power of python is evident in the array slicing and exception handling. The python scripts creates a shell to control the camera and provides a simple interface for the host controller to use.
Here's the Help screen from the embedded system
FlexStack Remote Camera Demo
HELP - Print this menu
DEBUG - Toggle debugging output
TN - Capture image, generate thumbnail,
and transmit thumbnail via XMODEM
LG - Request full resolution image where
is the name of the thumbnail
Python on the Blackfin
The blackfin source tree only comes with Python 2.0.0 but I was able to get Python 2.4.3 running
with a little help. This is the power of the OSS community - another dev did the work and was willing to share it with me.
I manually installed the following modules to get the functionality I needed. Mainly the embedded software uses systems calls and standard linux programs to do the heavy lifting. Ideally this would have all been done natively but time did not permit that.
copy_reg.py install.sh posixpath.py site.py stat.py UserDict.py
getopt.py os.py setupenv socket.py types.py
jpgtn
JPG Thumbnail is a program I found on sourceforge that uses libjpeg to resize jpg images. It was written a while ago but works well. It is intended for x86 machines but since its a standard linux program its possible to compile it for linux on the blackfin. I was pleased to find it compiled fine and ran well on the blackfin. I didn't setup a proper makefile since its only a few source files but you can see the process
here
Host
For debugging I wrote a simple host side interface to control the embedded camera and then tied that into a python cgi script using FastCGI. Clicking the
Snapshot link takes a picture and uploads the image. Clicking on the image displays it if the file has already been downloaded or downloads the high resolution image from the
FlexStack. Since it was a test jig there are some issues and the page needs to be refreshed to get images to be displayed sometimes.
In addition another engineer at work wrote a LabView frontend that connected up to the
FlexStack. It performed the same function by interfacing to the
FlexStack camera but allowed us to show-off LabView as well. Boston Engineering does a lot of work with LabView and LabView Embedded. I have been a bit critical of it becuase of the
huge binaries it produces but it is amazingly easy to code complex applications and has good drivers and building blocks so you don't need to reinvent wheels. Its not my bag but do believe its a strong tool.
--
ChristopherPepe - 02 Jun 2007