Trying to control an anafi

Well, first I’m french so sorry for those words I won’t googletraduct and you’ll read bad globish.

I first tried to pilot my drone with a Lenovo PB1-770M Android 5.1.1, for christmas, but my videofeedback used to freeze. Tried all wifi frequency, freeze, freeze, freeze.Changing from photo to video in order to set a frame (“cadrer”) without moving my drone. Read that my android firmware could be the issue.
I decided to buy one of those cheap chinise tablet with Android 8.1 (for another reason) and tried with the new parrot firmwares. No more freeze but bad bad bad image with “big blocks”, impossible to pilot, even set correctly a frame for aerial photography. On both Lenovo A5.1 and Chinise A8.1.
I discovered that mplayer (and vlc) were able to get the drone’s video stream, I tried on different OS, same “raining blocks” in my video feedback unreadable, uncontrolable.

I can only pilot in eyes-sight.

I tried with a friend’s Iphone 7, everything’s perfect of course.
And when Freeflight on Android is in map mode, with a tiny video feedback, the mini video is perfect, small but fluid, no freeze, no blocks.

So I decided to make my own custom controller when the SDK went out, discovering Olympe, I thought it would be possible to control my drone with a Raspberry Pi Zero W. But that board uses an ARM6 microcontroler and the ulog library needs some thumb instructions “not implemented”. And the Olympe build crashes… :frowning: Is there another way than using ulog?

:confused:

I managed to get it running on a Raspberry Pi3.
To get rid of the thumb issue then follow instructions in following topic:

https://forum.developer.parrot.com/t/sorry-unimplemented-thumb-1-hard-float-vfp-abi-when-building-sdk-on-rpi-3/6977

Here is a compiled instruction for what I had to do to get it working:
1:
I used Raspian Wheels and had to install Python 3.5 since OpenCV was not yet supported for Python 3.7 (which was standrd in that release)

Wheels provided support all Raspberry Pi models (Pi 3, Pi 2, Pi 1 and Pi Zero). Wheels are provided for Raspbian Jessie (Python 3.4) and Raspbian Stretch (Python 3.5). We plan to add support for Raspbian Buster (Python 3.7) in due course.

2:
Search for cpu.mk and add following text (from post above):

ifeq ("$(TARGET_CPU)",“pi3”)
TARGET_GLOBAL_CFLAGS += -march=armv7-a
TARGET_FLOAT_ABI ?= hard
endif

3: Add following lines to ./products/olympe/linux/config/product.mk (item 1 and 3 from post above. Item 2 was added by me since I could not build the Python bindings without it)
TARGET_DEFAULT_ARM_MODE := arm
TARGET_GLOBAL_CFLAGS_arm := -mfloat-abi=hard
TARGET_CPU = pi3

Hope it helps…
/ Mats

2 Likes

Hi eubmabe,

Thank you for sharing your findings!
I think that you’re the first person trying the SDK on a RPi.

Have you been able to connect to a drone with Olympe running on your RPi ?

Please keep us informed!

Thanks

Nicolas

Yes it works fine with the updates above. I have been able to start and land and can take photos. I have connected both directly to the drone via WiFi and through the Skycontroler3 using a USB cable.
I have not been able to control the Gimbal (see my new post) but I do not think that is related to RPi.
Please let me know if there is something special you would like me to test.

Thank you so much eubmabe/Mats !

I finally printed my “Installation Ok”, on a Pizero running Raspbian Stretch.

Even if I had to check a numpy installation issue, the build was perfect, and that’s only thanks to you.

And now, thanks to you again, I 've just installed olympe on a PI 3 A+ .
Wouldn’t you mind if i create a new topic to synthetize this raspberry pi installation process?

3 Likes

Hello, please share your experience of setup for us. Thank you!:blush::blush:

… done :wink:

Please go ahead. Great that someone else could benefit from this.