Olympe 1.7.0 Battery module is completely vanished!

Regardless of what I do or how I do it, the command: from olympe.messages import battery might load correctly but the battery object is completely blank!
No get_state() is working and I always get:

return drone.get_state(battery.health)[“state_of_health”]
AttributeError: ‘function’ object has no attribute ‘health’

Please fix!

Best,
George D.

This seems to be a general issue… Hmmm

gimbal.reset_orientation is also missing!

Can you please update the SDK to 1.7.1 and see for other missing libraries?

It literally broke all my builds…

Thanks!

Dear @ndessart can you help?

Best,
George.

This is really URGENT

I bought ANAFI USA (a very expensive product) but I can’t use it with my platform as the final Olympe build is obviously broken!

Please update me soon…

Best,
George.

@ndessart could you update us on this ?
Thanks

1 Like

Hi

1/ battery.health issue
It seems that the “battery” message identifier is masked by a function with the same name in your code. (Do you have a “def battery():” somewhere ?)

2/ reset_orientation issue
reset_orientation is a command and there is no sate associated with command messages (only the event messages have an associated state). So if you get a RuntimeError: gimbal.reset_orientation state is uninitialized it’s completely normal. You may be looking for the gimbal.attitude event message instead.

The following code works fine:

import olympe
from olympe.messages import battery
from olympe.messages import gimbal

# def battery():
#     pass

drone = olympe.Drone("192.168.43.1")
drone.connect()
print(drone.get_state(battery.health)["state_of_health"])
print(drone.get_state(gimbal.attitude))

Regards
Nicolas

1 Like