Third party cookies may be stored when visiting this site. Please see the cookie information.

PenguinTutor YouTube Channel

G-Robot Arm - GUI interface for the Cebek Robot Arm

The cebeekit robot arm is a fun educational toy useful for demonstrating how robots work. The robot arm comes supplied with software, but that software is only available for Windows, whereas I wanted to use it with a Raspberry Pi. Some other people have already written command line software that works with Linux and the Raspberry Pi, but I really wanted a GUI application that made it as easy to use as it is on Windows. I have therefore created the G-Robot arm software which can be used on a Raspberry Pi or other Linux computer.

Robot Arm - with Raspberry Pi

As you can see from the screenshot the application has control buttons that can be used to control the robot arm. These can be pressed using a mouse, a touchscreen (if you have one) or using keyboard shortcuts. The keyboard shortcuts are the same as those used on the Windows version of the software.

Hardware requirements

To get started you need:

# When buying a robot arm you need to ensure that you buy the version that includes the USB computer interface (or buy the usb interface separately). The robot arm from CPC and from Maplin both include the USB interface, but other suppliers may provide a handheld remote control instead.

* The software will also work with other Linux based computers (see later).

G-Robot Arm - Controlling a robot arm on the Raspberry Pi using Pygame

Installing on a Raspberry Pi

These instructions are based on using Python 3 on Raspbian (through NOOBS). This is the preferred version on the Raspberry Pi as all future versions will be tested with Python 3 or newer.

Install pre-requisites

First pyusb needs to be installed to allow communication with the usb device. Download and install in a terminal using the following steps:
wget -O walac-pyusb.tar.gz
tar -xvzf walac-pyusb.tar.gz
cd walac-pyusb-*
sudo python3 install

Download and install robot arm software

The lastest version of the software can be downloaded from the github repository. Note that this uses root permission (through sudo) to install the code into the /opt folder. Once installed it can be run as a regular user.
sudo -s
cd /opt
wget -O
mv robot-arm-master robotarm

The next step is to grant appropriate permissions to the USB device. This is required on the Raspberry Pi running Raspbian, but may or may not be required on other distributions.
cp robotarm/src/10-robotarm.rules /etc/udev/rules.d/

Now exit from root permissions

Add applications to the Raspberry Pi LXDE start menu

If installing on a Raspberry Pi then the following will add the robotarm software to the LXDE start menu. This will only work on a Raspberry Pi using the default pi username.


(or if running an older version of Raspbian prior to September 2015 use instead).

Install instructions for other Linux platforms

Although the preferred platform for future updates is Python 3 it can be quite difficult to install on systems where pygame is not packed up for python 3 yet. I have therefore provided the instructions for Python 2. If you would rather use Python 3 then see the file in the download file for more details of the pre-requisites.

These instructions are for Debian (or Ubuntu) based distributions. Other Linux distrubutions (eg. RPM based distros) may use different commands.

Dependencies are pygame, libusb and pyusb. The first two are installed using:
sudo apt-get install python-pygame libusb-1.0-0

Pyusb needs to be installed manually using
tar -xvzf walac-pyusb.tar.gz
cd walac-pyusb-*
sudo python install

Now follow the robotarm software installation instructions.

Running GRobotArm

If the program is added to the applications menu then it can be launched by clicking on the appropriate icon. Alternatively he program can run from the terminal using /opt/robot-arm/src/grobata (on the Raspberry Pi), or python2 /opt/robotarm/src/grobota.

G-Robot Arm - GUI software for robot arm on the Raspberry Pi

Using it with the Raspberry Pi 7" touch screen display

The current version was written prior to the official Raspberry Pi display screen becoming available. It was designed for higher resolution screens and on the touch screen only part of the screen can be displayed. It is possible to move the screen (using <Alt> Mouse Drag) so that the controls are all on the screen. It is hoped to create a different layout in future that will work on smaller screen sizes.

Latest update

Only major updates are listed, minor updates are tracked through github.

September 2015 version 0.1

Initial version with the realtime control of the robot arm.

Future development

The following are ideas for future development, these may or may not be included in future updates.

At the moment only real-time operation of the robot arm is included. In future I hope to add record and playback functionality. Space has been left at the right hand side of the screen so that this can be included in the one window.

Hover doesn't do anything yet (perhaps add tooltips).

Improve layout for small screens (eg. Raspbery Pi Display).