Thermal Camera Detection and LED Light Flash for AVR Drone

Our team just finished programming the thermal camera and LED lights to work in GUI. I was under the impression that once we were finished with that, we would have to do additional programming so that when the thermal camera detects heat, the LED light automatically flashes. However, when looking in the AVR build guide and game manual for this season I can’t find any instructions on how to do that- are we just supposed to have someone running the GUI from a computer and manually flashing the LED light during competition?

1 Like

I think it is allowed to press it manually during competition, but I saw in the pypi bell-avr-libraries that there is a way to grab the thermal camera data and turn it into an 8x8 grid of integer values representing temperature.

@Fiona_McDonald a couple of thoughts I’d like to share. First off, this is the verbiage from the game manual:

For Mission 3, the AVR Drone must add a downward facing mount for the thermal
camera (camera included in the AVR kit) which will be used to identify Hot Spots on the
Transformers. In addition the AVR Drone requires a mounted LED strip on the upper
area of the Drone which displays a white LED when a Hot Spot is identified.

There is no indication that this has to be done programmatically so it’s absolutely fine if your ground station operator is looking at the thermal view in the GUI and then presses the button in the GUI to turn the AVR LED to white.

If your team wants to do this autonomously (I don’t think there are any additional points for this) then it’s significantly more involved. As @GioOC8 states there is documentation about the pixel array that is used to display the thermal view in the GUI on this page:

The specific MQTT topic is:

avr/thermal/reading

and sample code to decode this message is on that page too:

import base64
import json

data = json.loads(payload)["data"]
base64_decoded = data.encode("utf-8")
as_bytes = base64.b64decode(base64_decoded)
pixel_ints = list(bytearray(as_bytes))

The challenge becomes writing the code to determine the proper intensity of the pixels to detect a heat signature. It’s definitely doable, but we will leave that to your team to decide if it’s worth the challenge/effort. I hope this helps and please reach out with any further questions.

Yeah- I think we’ll be doing it manually! I think our issue now is that we can’t figure out how to turn the LEDs to white- the only options in the AVR GUI are red, green, blue, and off.

Did you figure out how to do this? We are wondering the same thing. Thank you!

I don’t think it’s possible with the pre-built GUI that Bell provides. You’d have to clone the AVR-2022 repository and make the changes yourself.

@Jurassic_001 Has your team done this?

No, not yet but I’m hoping to get a solution from @droneblocks this week. I’ll tag you again when we find a solution!

1 Like

No, we’re using a different method to detect thermal hotspots and flash the LEDs. However, I know for certain that it can be done.