- Learn Linux
- Learn Electronics
- Raspberry Pi
- LPI certification
- News & Reviews
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.
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.
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).
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.
First pyusb needs to be installed to allow communication with the usb device. Download and install in a terminal using the following steps:
wget https://github.com/walac/pyusb/tarball/master -O walac-pyusb.tar.gz
tar -xvzf walac-pyusb.tar.gz
sudo python3 setup.py install
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.
wget https://github.com/penguintutor/robot-arm/archive/master.zip -O robotarm.zip
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
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 setupmenu-old.sh instead).
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 README.md 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
sudo python setup.py install
Now follow the robotarm software installation instructions.
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
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.
Only major updates are listed, minor updates are tracked through github.
Initial version with the realtime control of the robot arm.
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).