Hexapod Control for multiplatforms

Remote control of Hexapod

The purpose of this program is to enable control of a MSR-H01 Hexapod through a Sony Playstation Sixaxis (or compatible) handheld controller. The controller itself is connected to a computer, which then again is connected to the Hexapod. If you have enabled wireless Bluetooth communication between your computer and the Hexapod, the Hexapod can move without wires. Several other excellent implementations does this too, so whether this software suits you is an open question.

Operating System support

It is beyond the scope of this tutorial to describe how to get a Sixaxis controller to work with your preferred operating system. Sixaxis support is built into recent versions of Linux. For Windows, please find instructions elsewhere, search on Google for "sixaxis driver pc" and follow the links. Although the software should run on recent versions of Mac, it has not been verified.

Windows users

This software utilises the analog input of many of the Sixaxis buttons. Unfortunately, these analog values are not reported by the current drivers for the Windows Operating System. Therefore it is not recommended for computers running Windows. Although it will run, it is severely restricted in function.

Please note, that you can run Ubuntu Linux on a standard Windows computer with a technology called Wubi. If you own 64-bit capable hardware, Wubi will automatically install 64-bit Ubuntu.

Operating the Hexapod

When the Hexapod is activated, it can be controlled by your Sixaxis. All stride moves and speeds as well as body rotates and translates implemented by the HexEngine firmware (PIP mode) are supported. All commands can be combined in real time by operating several buttons and stickers simultaneously. Note that button presses are sensitive to pressure, the harder you press, the more movement.

ButtonDirectionMove
Logo Wake controller
Start Wake/sleep
Select Reset
Start+Select Emergency stop
Right stickUp/downHeight
Right stickLeft/rightLean
Left stickUp/downMove
Left stickLeft/rightTurn
Left stick while
right stick pressed
Left/rightSidewards
Up Front up
Down Front down
Right Left side up
Left Right side up
L1 Body backward
L2 Body forward
R1 Body turn right
R2 Body turn left

Only the wave gait is currently supported.

Security and supported architectures

This program is written in the Java programming language. It is capable of running on both 32 and 64 bit x86 architectures and on Windows, Mac, and Linux. The author has verified 32 bit Windows XP SP3 and 64 bit Ubuntu 9.04. Mac users are encouraged to try it out and report back. The verification was done running Sun Java 1.6. Other Java runtimes (specifically OpenJDK) might work.

Note that you have to accept the self-signed security certificate, essentially trusting the author of the program. Access to the serial communication hardware of the computer requires this level of trust.

Running offline

The software as such does not need to be installed, it will just run - even when offline. But the underlying Java Runtime needs to be installed, if not done already.

After initial download, you are able to create a shortcut on your desktop and subsequently run the program even if you are not connected to the internet. To create the shortcut, start the Java Control Panel applet, in the General tab, select the View... button in the section called Temporary Internet Files. Then right-click on the Hexapod Control and select the appropriate action.

User Interface

Aside from the initial specification of serial port and baud rate, there is no user interface in the current release. Through the Java Control Panel, you are able to activate a Java Console for some very basic runtime information. If you know how to do it, put in this line in the Java logging.properties file: dk.brispo.level = FINEST. Also change the line java.util.logging.ConsoleHandler.level = INFO to java.util.logging.ConsoleHandler.level = FINEST. If on Windows, use Wordpad instead of Notepad to get correct line-endings.

Running the software

Before any invocation of the software, users should have verified correct setup of the Hexapod, including name of serial port used and correct baud rate. When using Bluetooth remote control, please also ensure correct setup, including the CBR parameter. Please follow the excellent instructions found in the documentation of the Hexapod.

The correct Java Web Start setup can be verified by invoking the action below:

The result (possible after installation of Java) should be a small dialog in the upper left corner of your screen stating correct installation of Java Web Start.

Then proceed to verify correct detection of your Sony Playstation Sixaxis controller. When you do that, a number of dialogs are shown. Look for a dialog with the word controller as the last word in the title. Operate your controller and notice if the values in the dialog changes.

Press the middle button on the controller (marked with the Sony logo) and then click here to verify a working Sixaxis controller.

Turn on your Hexapod and invoke the software:

Provide the information about serial port name and baud rate, and click the button. Wake up the Hexapod with the Start button on the controller, and get it back to sleep with one more press on the Start button. While awake, use the different buttons and sticks to control the Hexapod.

If it does not work

As mentioned before, this software is brand new and very untested.

A lot of stuff can go wrong, and it is very difficult to guess where the error might be located. If you successfully have verified correct setup, and still have no luck, there is not much to do. If you report your findings with as many details as possible, the error might be found.

There is one known error, where the computer keeps sending M commands to the Hexapod. Only solution is to restart the program.

More about the software

The basic software is a platform and an API, which controls the Hexapod through the PIP-interface. The implementation of Sixaxis control is more of a proof-of-concept than the final goal. The basic platform allows simultaneously access to the HexEngine from several different sources, all without saturation of the HexEngine and serial port. Long term ambition is to combine sensor information (i.e. camera) to let the Hexapod move autonomously in crowded places.

The development platform is Eclipse running on 64 bit Ubuntu.

The software is planned to be released as open source when more mature. It is using the work of several other open source frameworks, Sun Java, RXTX serial port software, and JInput the Java Gaming API.

Acknowledgements and about the author

A lot of talented people have provided me with inspiration for this little piece of software. Of course Matt Denton, who created the MSR-H01 and the basic hardware and software for it, but also the other Hexapod enthusiasts around the world. This includes in particular the norwegian Kåre Halvorson (Zenta), it was his Phoenix and the box video on Youtube, which initially caught my attention. And a lot of other people, none mentioned, none forgotten.

My name is Peder Madsen, located in Copenhagen, Denmark. I'm a software engineer, working for a major danish financial institution. This project is very much a hobby undertaking, and unfortunately I'm only able to donate a small amount of time. Family and friends are very polite, when I show them the Hexapod, but behind my back, I'm sure they are discussing my mental health.

General disclaimer

This software is alpha level and may work only partially or not at all. To the best of my knowledge, it is incapable of harming your computer and your robot in any way, but never the less, the author takes absolutely no responsibility whatsoever.