Thermal vue Anafi USA

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 :

set_mode_expectation = drone(set_mode(mode=2)).wait()
                 print(f"thermal.switch_lens set_mode explain {set_mode_expectation.explain()} ")
                 set_rendering_expectation = drone(set_rendering(mode=1)).wait()

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 :confused:
I use pdraw from ground sdk tools to stream.
This is the command from the ground sdk tools folder :

./out/groundsdk-linux/staging/native-wrapper.sh pdraw -u rtsp://192.168.42.1/live

Note that I can see the thermal stream from there.
Any help would be awesome ! Thanks !

Hello Jatou,

Could you please precise which firmware version you’re using

Hello,
I am using olympe 7.7 and my drone firmware version : 1.10.7 (the latest according to freeflight6USA)

Hello,

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.

Hello,
No olympe is connected to the drone through wifi with the usual ip address :
192.168.42.1
And PDraw as well.

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.



Thanks in advance !

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.

Hi!

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()

You should now see the change in Pdraw.

Let me know if that works!
Best regards,
Hugo

It works so great, awesome thank you !

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.