Xbee RC Control Protocol

I know that a lot of people have made projects with Arduino and Xbee’s to control their robots, cars, planes etc. I have been searching for a good example or answer to my question for many days, but I haven’t found yet. I successfully configured 2 Xbee’s Series 1 so I have 2 Arduino Duemilanove talking to each other, or I can send messages from terminal programs using self-made adapter (max3232 chip) and Xbee.

The question is: Which is the best way of controlling motors/servos via serial interface? I worry a bit about loss of a control data when the object (mobile robot) is moving. I’m thinking about continuous stream of data that force robot to move and when the stream is interrupted robot must stop. Or something like handshaking with a special symbol or value( although I don’t understand how exactly it could help). Or some other ideas?

Any links, ideas, sample codes will be much appreciated.
Thanks in advance.

I worry a bit about loss of a control data when the object (mobile robot) is moving.

The stream of data need not be continuous. Simply record when there was serial input, and stop if the time since the last serial input exceeds your comfort margin.

Most RC receivers have what is called a 'Failsafe' feature. What they do is when packets are not received, certain servo channels are moved to a 'safe' position. Often the failsafe on an airplane just cuts the throttle to keep it from flying off into oblivion.

I think anything else may just be more effort than it's worth.

I've been doing a very similar thing with my QuadCopter project. Basically, a pair of XBees talking to each other and a Joystick on my PC sending serial control commands. I'm using the arduino messaging library to receive the simple control commands on the arduino. Occasionally commands get missed - but these tend to be one-shot commands. The joystick sends continous data when it is moved, so the odd missed message doesn't matter too much.

AntR:
I've been doing a very similar thing with my QuadCopter project. Basically, a pair of XBees talking to each other and a Joystick on my PC sending serial control commands. I'm using the arduino messaging library to receive the simple control commands on the arduino. Occasionally commands get missed - but these tend to be one-shot commands. The joystick sends continous data when it is moved, so the odd missed message doesn't matter too much.

That's exactly what I have been looking for! Could you, please, share with me a part of the project related to RC control?
Which one messaging library have you used? Arduino Playground - Messenger That one or some other? Thank you for pointing me at messenger library it's seems that it is a good way to the solution.

Yes, that's the library I've been using.

I just use simple one character commands eg: sending "m 1 1300\n" sets a PWM pulse of 1300 on motor 1 (speed controller 1).

I've written the client app in .NET and I'm using a DirectX .Net wrapper library (SlimDX http://slimdx.org/) to read the Joystick.

How about cutting out the PC?

If you have an old joystick laying around, or want to pick one up at a thrift store, you can use an xbee to interpret the joystick positions.