Robotics

Sunday, April 30, 2006

Programming the VEX

I cracked open the VEX EasyC programming kit today that I got at the local Radio Shack, and read the manual. Super short and simple. It left me feeling that likely I will need to find some other way (beyond the drag and drop interface) to program the controller, given the complexity of what I want to do. I'm not 100% sure of this, but unless I can inline my own C code within the drag and drop code, it probably is not going to be a powerful-enough toolchain. It sure looks well-designed, regardless.

I did see some mention on the vexlabs site that there is an alternate controller module that may be more conducive to being programmed in the clear. I'll need to look into this further, all they offered was a "call us at xxx-xxx-xxxx for more information". Would have been nice to find the nitty-gritty details online.

I posted the following to the vexlabs online forum moments ago:

What I would like to do is interface VEX with a Linux-based SBC that hosts an AI
engine (I've purchased 2 starter kits with the idea of using VEX as a basis for
doing swarm robotics experiments, and I plan on having the bots talk to each other
over 802.11, and host video cameras, which is another reason I feel the need to
offload to a more general purpose environment). I'd simply like the VEX controller
to send to the SBC any sensor inputs it gathers, and I would like the SBC, in turn,
to be able to send commands to the VEX controller to drive motors.

As a C programmer with a MS degree in Computer Science and 20 years of experience,
I don't have any problems with the programming of the AI engine, or design of a
command language that would be used to perform the communication. What I am wondering
is over what interface the communication will occur. Can code hosted on the VEX read
the serial port that is used to download programs from the EasyC software? Or is
there some other recommendation for interfacing to a secondary controller?

Any API details or sample code for dealing with the serial port would be appreciated;
I saw nothing in the programming kit to help me with this question. I'm guessing that
the USB to serial cable to "whatever that black box is" to the RJ connector interface
could be driven easily from the SBC side (I plan to experiment with that soon); it's
the other end of the pipe (the VEX end) that I really am lacking information about.

Anyone who is not aware of swarm intelligence can look up the term on wikipedia.org,
or go to swarm.org. Also check out my blog at http://vexrobot.blogspot.com.

syd

We'll see what kind of responses I get. I'm hopeful there is a good solution (but not overly so :-)

Oh, and it looks like the vexlabs people got back control of VEX from Radio Shack. Probably best for VEX, long-term. Though losing such a big distribution channel had to be a disappointment (both to Tandy and vexlabs).

Sunday, April 23, 2006

Robostix vs Technologics ARM SBC

An interesting comparison of Robostix/gumstix and the technologics ARM-based SBC is here.

I don't think I would need the robostix component, just a connex (Intel XScaleĀ® PXA255 400MHz). The Vex is going to be doing the sensing, after all.

To interface to the VEX (I think) I need RS-232 (with a RS-232/TTL cable http://www.acroname.com/robotics/parts/R115-INT-BRD-KIT.html) or a TTL-based COM port (which I know I can get from technologics). For gumstix, I would need expansion cards (less than $30) for this. These expansion cards also have USB (mini-B or A connectors). Probably the thumbstix-gs (type-A male USB, 4 TTL serial ports) at $27 is what I would want.

In terms of networking, there is an expansion card for gumstix that allows CF cards. The CF wifi card that I use with Zaurus (a Linksys model) is not listed as supported (according to the article), but I know it has drivers for Linux, since it does work with the Zaurus.

The issue I have is can I stack these expansion cards, allowing me to have two CF slots (one for storage, one for the wifi card)? And also stack these cards with the serial ports and USB? All of a sudden, what was a smallish setup may be much larger, both in terms of size and cost ($120 for the basic board, plus another $120 for the expansion boards, assuming a cost of about $30 each). In the case of the technologics offerings, boards are $179, plus I need to buy a development kit which runs from $150 to $180, depending on the board. This cost would be amortized over the number of robots, however. E.g., if I just buy one board, the robot would be $120 more than a gumstix solution, $60 more if I implement 2 bots, and so on.

I have an e-mail out to the technolgics folks, and I'll probably make some posts at gumstix.org to get answers regarding the stacking of expansion slots. But so far, it's looking like it is down to these two vendors, and the article that I linked at the start of this post helped to confirm that I was on the right track.

Saturday, April 22, 2006

Gumstix and robostix


Both gumstix and robostix look like promising Linux SBCs. However, they only support wired ethernet or bluetooth, not 802.11.

Stock picture of the VEX starter kit

The plan...



Sometime in the future (Q1 2007), after my next book is published, I plan on taking my background in C/C++ programming, Linux embedded software development, AI/Neural networks, and TCP/IP networking and combine it all as I explore the world of robotics.

To date, I have purchased two VEX robotics kits (they are half price at radio shack, and I am interested in swarming -- so I'll eventually want at least two bots), a development kit, and assorted accessories. I also have enquiries out to a vendor of ARM-based single board computers (one that supports Linux).

Generally speaking, my plan is to mate a VEX system with a Linux-based SBC (somehow). I understand that people have been able to interface a Palm-based PDA with their VEX, so it must be possible for me to do the same with a more capable Linux system. I want the bots (and perhaps a desktop controller) to communicate over 802.11, I want the host to support a LAMP stack (particularly apache/PHP so I can log on to the thing over the net, control it, and check on its status). I also have a huge interest in machine vision, so I'll want to mount a couple of cameras and work on software such that most of the decisions made by the bots are based on visual cues.

The VEX has a microcontroller that looks to be plenty powerful to support reading sensors and controlling actuators. But not nearly enough to do what I described in the paragraph above. I'm thinking the best thing to do is devise some interface (serial??) between the VEX and the SBC, and come up with some language that can be used by the VEX to send the SBC status, and the SBC to send commands to the VEX. If I do it right, the whole thing should be portable to other robotic platforms (e.g., Lego mindstorms).