Hello there,
I am struggling with the rendering of the thermal camera of our anafi USA.
In fact, when switching from visible to thermal vue with olympe, the rendering is all black and white and I can’t seem to find out how to make it colorful (as available with freeflight).
Here is how I switch to thermal mode :
I assumed I would have to use “set_palette_settings” from the thermal fetaures from olympe but the stream goes black when using it with whatever parameter i put in
I use pdraw from ground sdk tools to stream.
This is the command from the ground sdk tools folder :
Are you connecting your PC to the drone through USB?
In that case the drone’s USB switches to device mode and the thermal camera which is on the same bus is disconnected resulting in a black and white image with only the visible image and no thermal image.
From your code you seem to be using rendering mode 1 which is thermal image only. For blended video you should use mode 2. See here: Thermal feature - 7.7
I managed to get what was expected now i am looking into how to change from black hot, to white hot or yellow hot etc … I am able to do it with freeflightUSA but can’t seem to make it work with Olympe.
I tried to do :
set_mode(mode=2)
set_rendering_mode(mode=2)
And
set_palette_part(red = 1.0, green = 0.0, blue = 0.0, index=1.0, list_flags=0)
Or
set_palette_part(red = 1.0, green = 0.0, blue = 0.0, index=1.0, list_flags=1)
set_palette_part(red = 1.0, green = 0.0, blue = 0.0, index=0.0, list_flags=0)
…
But still white hot, black cold in Pdraw.
The issue is most likely with the list_flags you’re passing to set_palette_part.
In your examples, you’re using list_flags=0 or list_flags=1, assuming it’s a basic integer flag — but list_flags is actually a bitfield enum, and it needs to be used accordingly for the palette to be recognized.
Specifically:
list_flags.First = 1 (bit 0) → marks the start of the palette
list_flags.Last = 2 (bit 1) → marks the end of the palette
If you don’t set at least First and Last, the palette won’t be correctly initialized and won’t be applied, which is why you still see the default white-hot/black-cold palette in Pdraw.
Here’s a minimal working example that sets a red-hot palette:
from olympe.messages.thermal import set_palette_part
from olympe.enums.thermal import list_flags
# Set palette mode first
drone(set_mode(mode=2)).wait().success()
drone(set_rendering_mode(mode=2)).wait().success()
# Define a red-only palette (index from 0.0 to 1.0)
drone(set_palette_part(
red=0.0, green=0.0, blue=0.0,
index=0.0,
list_flags=list_flags.First # 1: marks the beginning of the palette
)).wait().success()
drone(set_palette_part(
red=1.0, green=0.0, blue=0.0,
index=1.0,
list_flags=list_flags.Last # 2: marks the end of the palette
)).wait().success()