Close

Development of the Dextra control GUI

A project log for Dextra

Open-source myoelectric hand prosthesis

alvaro-villosladaAlvaro Villoslada 09/14/2016 at 17:020 Comments

Although this project focuses on its application as a prosthetic hand, Dextra is, after all, a robotic hand. By this I mean that it has no elements that make it specifically a prosthesis, so it can be used for other purposes. Especially, due to its open-source nature and the possibility of replicating it with a 3D printer, I think it has a great potential to be used in education and research.

When I studied my master in robotics, we had a Shadow robotic hand in our lab, but I could never get to use it, because it was too expensive to risk a student breaking it. Although I understand this fear, for me it was something really frustrating. So, why not use robotic hands that are low-cost and easy to repair to let frustrated students, researchers and makers get their hands on a real device to do real experiments rather than perform boring and unrealistic simulations? With all this in mind, I thought it would be interesting to provide other means of controlling Dextra besides the EMG interface that controls the hand when it is used as a prosthesis. So one of the things I've been working on lately is a simple and intuitive graphical interface to control Dextra from a computer.

It started as a simple Python script with which the desired positions could be sent to the hand microcontroller through the serial port one by one. This script was very useful for the first control tests and to check that the mechanics of the hand worked properly. It worked for me, but for a hypothetical future user it was too basic. Besides, the serial communication part could also be greatly improved, since each position was sent separately instead of sending all the positions at once in some kind of packaged format.

Building on that basic interface, I developed a serial communication protocol called Synapse (which in turn is based on a serial communication protocol called seCo, which I'm developing to send arrays of floating point numbers in an efficient way). The protocol sends the position of each finger and of the abductor in a floating point format converted to binary format, each value with an identifier (something like a hex address). All these values are packed in a message delimited by a header and a footer and with a checksum to check the integrity of the transmitted message. Furthermore, it is possible to send values from the microcontroller to the computer following the same message format, to allow retrieving information from the hand sensors. I've also developed a Python module to be able to use this protocol on the PC side.

But I still needed some kind of interface better than the original text interface. With no experience in designing GUIs, I needed something that was easy to learn and use, so I researched what are the options to design GUIs with Python (which is a great language to get things done quickly and easily, and with which I could integrate the communication protocol). I ended up using Kivy, which I found very appealing for being open-source and cross platform (it even runs on Android and iOS!). After a few days of learning and tinkering, I had a first version of the GUI finished.

The first tab manages the connection with the serial device running the Dextra firmware. The second tab is the one that allows controlling the fingers. This can be done either by entering the desired value directly into a text box, moving a slider, or through small increments with the buttons next to the text boxes to adjust the position accurately.

For the next version of the GUI, I'm planning to include a way of storing and reproducing different hand positions. In this way, it would be really easy to program the hand behaviour, and use these programmed gestures in different applications.

Discussions