How to develop code with Olympe inside an IDE

Hey there,

I’d like to be able to control a Bebop2 to perform an autonomous flight using the Olympe tools. I have it set up on my Linux machine and have been able to run a sample “takeoff.py”. However, I’m wondering if there is any way i could write code for my Bebop2 inside the PyCharm IDE with the olympe package? I’m missing those simple things like autocomplete and method documentation.

If anyone has any hints it would be appreciated!

Thanks!

Well, technically you can write it. As of method documentation, every function seems to be documented (just run help(olympe.Drone.get_last_event)).

One “IDE” that for sure works and already has those features is Jupyter. Try running jupyter-lab.

1 Like

Fair enough ya. But for example when I run the help(olympe.Drone.get_last_event)) command from a python console I see this (The python i am using is the one found under parrot-groundsdk/.python/py3/bin/python3.6 )

import olympe
Traceback (most recent call last):
File “/home/chef/Documents/Sources/parrot-groundsdk/.python/py3/lib/python3.6/site-packages/IPython/core/interactiveshell.py”, line 3296, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File “”, line 1, in
import olympe
File “/snap/pycharm-professional/132/helpers/pydev/_pydev_bundle/pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “/home/chef/Documents/Sources/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/init.py”, line 6, in
import olympe.arsdkng.module_loader
File “/snap/pycharm-professional/132/helpers/pydev/_pydev_bundle/pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “/home/chef/Documents/Sources/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/arsdkng/module_loader.py”, line 60, in
from olympe.arsdkng.messages import ArsdkMessages, ArsdkMessage
File “/snap/pycharm-professional/132/helpers/pydev/_pydev_bundle/pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “/home/chef/Documents/Sources/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/arsdkng/messages.py”, line 57, in
import olympe_deps as od
File “/snap/pycharm-professional/132/helpers/pydev/_pydev_bundle/pydev_import_hook.py”, line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File “/home/chef/Documents/Sources/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe_deps.py”, line 134, in
_libraries[‘libarsdk.so’] = ctypes.CDLL(‘libarsdk.so’)
File “/usr/lib/python3.6/ctypes/init.py”, line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: libarsdk.so: cannot open shared object file: No such file or directory

My PyCharm IDE doesnt complain when i write import Olympe. I am just wondering if there is a command as simple as pip install for this package (or something similar)?

Did you sourced the lib files as told in the tutorial? It returns an OSError about a file not found. Try:

ls -lR ~/{path to your olympe-groundsdk}/ | grep libarsdk.so

It should return you at least one libarsdk.so file. Anyway, I think the important part is to source the libs; this way you’re adding the libs to the OS path environment. Then run PyCharm from there.

1 Like

Ahh aight. Ya I didn’t source the files in that example i sent.
But either way, I found PyParrot which seems to be perfect for what im looking for :smiley:

Thanks for your time!

1 Like