I want to post some minor advances I've made on my robot without getting into the seemingly never ending debate about micro-controllers vs PC type systems. So, can we lay off the micro-controller vc PC debate for this post?
Anyway, if you are using Linux on your robot, or may be tempted to try it, here are some quick time-savers and potentially cool things:
First of all, my robot uses 802.11G wireless networking. Radio controlled operation is just an extension of normal wireless networking.
The programs on my website: http://64.46.156.80/robot/ are command line based utilities. Using ssh, a remote console, I can use the command line utilities as if I was sitting using a keyboard and display on the robot while my desktop machine or laptop.
Using the "ffmpeg" package included on most Linux distributions, I can stream my QuickCam over the internet. Using any network aware viewer on almost any machine, I can see the video output of the camera. It is amazingly easy: # This runs the video server ffserver -f /usr/share/doc/ffmpeg-0.4.8/doc/ffserver.conf & # This runs a program to read the quickcam and produce mpeg # The "-an" parameter disables audio ffmpeg -r 8 -an -vd /dev/video0 http://localhost:8090/feed1.ffm &
(Streaming seems unusable for navigation in that it is pretty slow, but I'm looking for a better solution.)
Most Linux distributions, if you are unfamiliar with Linux, have a fairly sophisticated startup which can be a bit daunting, but don't be too freaked, look for the file: "rc.local", typically located in "/etc/rc.d." Just add the commands you want to run at the bottom of this file. (The UNIX purists will choke on this one, but it isn't all that "bad")
Since the robot does not have a keyboard or display, but it does have speakers, I use the librsynth's "say" program, like this: /usr/local/bin/say $(/usr/local/robot/robot diag) The above line will execute "robot diag" and take its output and pass it to "say" as a program command line argument, causing the robot to speak the results.
One problem I ran into is that the synth is usually customized by the user, so Mandrake (the version of Linux I am using) didn't set the output volume at startup and for some reason it couldn't find the presets. (probably because there was no "user."). So I added the program to set the sound up, aumix, in rc.local BEFORE the commands that will be sent to "say." /usr/bin/aumix aumix -v90 -w90 -c80
(You may need to install "aumix" on some distributions as it is not always installed if you have a desktop like GNOME or KDE)
So, right now, I can drive the robot from a remote computer, view the camera images, it reports its status at startup, and works pretty darn well.
One last thing, "nice." Since my motor control system runs as a process under Linux, it sort of has to run at a fairly high priority, so use the program "nice" to start it with a negative "nice" values, making the program "less nice."