View Full Version : [Question(s)] Controlling hexapod in real-time

04-08-2013, 08:53 AM
Hi guys,

I've got a phantomX hexapod bot and want to control it in real-time via a fit-PC.

The bot is plugged to the PC via a FTDI (USB) break out bord.

I'm quiet new in this field, and don't know how (for example with wich node, arbotix_python ? ) it is possible to send some basic commands to control the hexapod in real-time.

Something I want to have later on is, to send a basic command, like :
Xspeed = "velocity",
and that the bot then goes forward with the specified velocity.
(So actually a bit the same as with the Robocontroller.)

I'm sorry for my lack of knowledge in programmation, but I really don't how to start.


04-08-2013, 05:51 PM
There are ones up here that are much better at this then I am, but will try to give you a few ideas.

First the simplist way (Assuming you have an Arbotix controller): Assuming you use either the PhantomX code from the website or the Phantom Phoenix code which you can get from my github account (https://github.com/KurtE/Arduino_Phoenix_Parts) The standard code assumes you are using a Commander to control the board. But instead you have USB FTDI connector hooked up to your pc. Now all you need to do is to have a program on your PC output data over the comm port that uses the same data format. If I remember correctly the Arbotix people have one written in Python that would work, but you could do this using any language you would like. I think I have a simple VB test app that did this. The format of the data that you send out is real simple: It is easiest to look at the code for the exact format, but it is some simple handshake data, plus X and Y values for both joysticks and a byte of data giving the on/off state of each of the buttons. They just keep sending this data out so many times per second. Note this is real simple stuff, it is not sending out any local thing like, go at speed Y. The code on the robot side takes the User Inputs and figure out what to do with it.

Next Option up from this: Could change the interface to have some higher level commands like: Move in direction X at speed Y. Make the robot height be Y...

Could move even more of it up into the PC and the commands are simply telling the Arbotix the new servo information...

Or you could remove the arbotix altogether and use something like the USB2AX adapter. Thread talking about this: http://forums.trossenrobotics.com/showthread.php?5675-USB2AX-v3.1

As for Real Time, that often means different things to different people. For some that simply means that each task is accomplished in a prescribed amount of time (I want the robot to update its gait information N times per seconds, plus I want to use video camera and process M frames of data...) Others probably have different definitions for it, so I am not sure here what it is you wish to do.

I hope that helps.