Some time ago I wrote about my first computer-radio-controlled car, which I constructed in 1984 around my Commodore 64 and a 4-way relay controller. At that time I had to design everything myself, ranging from radio delays to wheel sensor clap adjustments. I still vividly remember the feeling when the car was able to navigate through a room with random obstacles like chairs and shoes. I wish I had printed the code at that time, as it is now forever lost; it was saved on a low-quality cassette tape which slowly evaporated.
Fast forward to 2019. To get myself more in tune with our nDrone SpimeCopter project now taking shape in Zürich, I bought a midrange hobby drone with GPS and barometric flight aids. The drone had its dedicated dual-joystick controller, but it also supports controls over 2.4GHz WiFi, with the drone acting as an access point. One just downloads the control software, connects to the drone and the display shows a virtual cockpit, even with camera feed. Nice.
The WiFi control system seemed to work flawlessly, so I got curious on how it was implemented. The built-in drone access point has no encryption, so it was easy to capture the traffic for further analysis.
So far so good. The drone AP creates a private IP network into which the phone (or laptop) is a client to. The video feed is established with almost standard TCP RTSP request, after which the drone blindly sends the RTSP camera feed back to the client to be displayed. Feels quite modern, right?
Then comes the controls part. As soon as the client software is running, it starts sending UDP packets to the drone address with 8-byte payload every 50 milliseconds. These 8 bytes simply encode the analog position of two joysticks and additional buttons controlling ascend/descend, camera and emergency stop. It took me about 30 minutes to start sending my own control commands with a small Python program. Man, what a dejavu! (And yes, I could easily hijack any similar drone with a laptop or Raspberry Pi.)
What I find amazing is that the control/telemetry system is well comparable to my 1984 creation, with no error correction, authentication, encryption or any other modern flavors. Although there are frameworks such as Mavlink especially for remote-controlled planes and drones, it seems that not much has changed what comes to entry level products.
Now during one summer weekend, let’s see if I can make the drone navigate by itself in our forest, using remote object detection based on machine learning within BaseN backend infrastructure. That’d be a 3D upgrade to my 1984.