Remote Control of a Robot
This project allowed a user to remotely control a robot. This is accomplished by creating a webserver on a computer near the robot. They are connected together by USB cables. The remote user then connects to the server using any webbrowser. This presents a simple robot control interface to the user - typically button based. The commands are relayed from the remote user to the local webserver via websockets. These commands are then processed and relayed to the robot via backend Python scripts. A virtual robot may also receive the same commands to verify they are being received and transmitted correctly. This virtual robot can be seen in the remote user's webbrowser.
For those interested, this began as a one person project. The concept, design, and development were all my ideas and work. I wrote all the initial code and performed all the initial testing. Eventually I managed to get a second person assigned to help me. I needed him to to build the physical robot. He also assisted in working the interface code between the computer's Python backend and the robot's code - Which was also initially written by me and was running on a Raspberry Pi. In sum, what I needed was someone more skilled in Mechanical/Electrical Engineering to attach things in a functional and working manner to the Pi. Much thanks Jon! =) |
|
The code was later adapted to allow Xbox controllers to interface with the web browser. Through that connection the user could use the Xbox controller to remotely manipulate the robot. Another addition placed a camera to view the physical robot. The video from this camera was then transmitted back to the remote user. Thus, using the same websockets based connection, and the same webpage control page, the remote user could watch the robot respond to his or her commands. |
|
It was also possible to send a copy of the digital twin / virtual model to the remote operator. Using either, or both, of these as visual feedback, the user could easily understand how the robot was responding to the issued commands. Support for multiple cameras was also in place, but never required. |
Shown here is an early prototype of the project. The user is connected to the virtual robot, and controlling its movements via a web browser on his phone. The virtual robot is a separate pseudo-application being fed commands from the backend Python scripts of the webserver.
This virtual robot was useful for visualization and testing. This allowed testing the backend Python scripts without risking damage to the physical robot. Shortly after the test shown here, the actual robot was connected and controlled.
There were some small latency issues encountered. But under typical internet speeds the user was able to easily control the robot. It should also be noted the intended use case was not for any time critical, or life critical purposes. If that were to be the use case, more testing, and safety redundancy would have needed to be implemented.
This video may offer a slightly better view over the gif: mp4 video 640x360