Inspiration

Rolls Roys Power Systems AG inspired this challenge at the START Hack 2018 hackathon. The challenge was based on a fictional nuclear disaster scenario, in which a defective generator needed to be identified by an autonomous drone.

What it does

Fenix is control software for the Raspberry Pi 3 and interfaces with a CC3D flight controller running LibrePilot through PWM signals in order to control a drone autonomously. For navigation, the system utilises 5 ultrasonic sensors (HC-SR04). One facing in each horizontal direction and one facing toward the ground. Additionally, a Raspberry Pi camera is used to identify red and green lights indicating the go signal and the defective generator.

How we built it

We decided to use node.js to write the control system. Although, from a real-time programming point of view this choice might seem questionable, we actually found it made scheduling periodic tasks quite easy and sufficiently reliable. The software communicated with the external devices through the Raspberry Pi's GPIO interface. We found a node.js library, which utilised a C backend, allowing for higher performance and accuracy than Python counterparts.

We used PID controller algorithms to control the altitude of the drone, as well as its lateral position. We used simulations to estimate the coefficients for the controllers and further testing to attempt to fine-tune the drones behaviour.

To achieve the necessary image recognition functionality we evaluated many different approaches, including simple averaging, thresholding, color-space and vibrancy analysis. We benchmarked the different approaches using sample images we captured with different lighting. Finally, we decided to use color vibrancy analysis.

Challenges we ran into

Being a custom modified drone, it was somewhat delicate and not always operational. As such we had to tape together the parts to build a second drone for some of the tests.

Given the limited resources and time for testing, fine-tuning our controllers was tricky, since in the end there is always some trial and error involved. Luckily we could offset this difficulty somewhat using simulations.

Developing for an embedded device, we saw the need to optimise our workflow by using a combination of rsync and ssh to implement immediate deployment and execution of new code over the network.

Accomplishments that we're proud of

Destroying three sets of rotors...

What we learned

For most of us this was a first in the area of embedded programming and real-world software interaction, so naturally we learned a lot. In particular, we discovered a lot about Control Theory.

Built With

Share this project:

Updates