Cyclops Control Protocol

Cyclops is a universal robot platform consisting of software and hardware that allows a user to control a robot over the internet and receive feedback from its onboard sensors (primarily a live video feed). In 2011, a friend and I spent the summer working on implementing this idea. My primary contribution to the project was in the form of software. I was involved in designing and implementing the networking protocol used to control the robot over the Internet.


Controlling Cyclops using the Robot Command Center client:

This is Cyclops being controlled over the Internet using the full protocol implementation.


Here is Cyclops moving around:

Here, Cyclops is being controlled directly over WiFi without being connected to the server.



Check out this Cyclops page for more information on the actual robot platform.


Click on an image to enlarge.

The software we wrote consists of three parts: the server, the client, and the robot software. The robot software is responsible for communicating with the robot's hardware (via Arduino interface) and translating received action commands into actual movement. It is also responsible for capturing video from the robot's camera, and sending it to the client over UDP. The client software is what a user can use to control the robot and view video from it over the Internet. The server is the static component that accepts connections from both clients and robots, and establishes and moderates connections between the two.

The Cyclops server and robot software is written in C++. There are two versions of the client: one is in C++ as well, and the other one is a GUI-based cross-platform version written in Java. All of the C++ code was written using Microsoft Visual Studio, using the Windows Socket 2 API for networking. The robot software uses OpenCV to capture video from a video camera. Currently, the robot runs Windows XP as its operating system.


 
These are images of the debug versions of the server and robot programs. The server (left) is shown accepting connections from a robot and a client. The robot (right) is shown connecting to the server.


The protocol (viewable here) was designed to let the server remain in the loop while the client controls a robot. The client must be authenticated by the server (with a username and password), at which point the client can choose from a list of robots on standby that are available to control. The protocol dictates that the client receives a direct video feed from the robot through a UDP stream, but commands are sent through the server. The server can choose to disconnect a client or robot at any time, and also has the power to send a shutdown signal to any robot, effectively discontinuing all of the robot's actions.

While the protocol has proven to be quite robust, newer versions can include several new features. Such features could include encryption, for securely sending sensitive data (such as passwords), or even for sending commands to a robot. More advanced features could include automatic software updates for the robot and client.



In this image, the robot (top left) experienced an error. Although the robot couldn't find a camera, both the server (top right) and the client (bottom) recovered and reset back to a pervious operation phase as dictated by the protocol.


The robot itself was built from scratch using an Asus Mini ITX motherboard with an Arduino controller, DC motors, a battery, power supply, and a motor controller. Servo motors were used to control the camera. All of the components were put together using aluminum sheets and square tubes, and Plexiglas.


Click the image to view the running Java Applet (demo):


Source code for the RCC applet is available here on GitHub!

The Robot Command Center client was written as a friendly GUI-based application with which to control the robot. All of the buttons, text fields, and controls were custom-built using the Java Graphics API and mouse/keyboard listeners. The .jar file can be embedded as a Java Web Applet, or it can be run as a standalone application.



Cyclops is a huge and diverse project. We are currently looking into further improving our code and protocol, as well as adding a variety of new features that will expand the possibilities of the Cyclops project. We aspire to make the most out of this project, and we hope that in the future, Cyclops will be a smarter, more automated, and perhaps even a partially autonomous system.




Back to Top