Page 1 of 1

Python script not finding Crazyradio pa - windows 10 - Project deadline approaching, sorry

Posted: Fri Mar 23, 2018 9:17 am
by PO1
Hi New to Crazyflie and python

I have a flow deck fitted and I understand I after loading the latest python (Mar 2018) onto my laptop, I can run an autonomous script ( The one in your stem section) in Idle 3.6.4 just by selecting F5.

The Crazyradio PA is in the USB and exists in device manager USB section but on running script I get

Connecting to radio://0/80/250K
ERROR:cflib.crazyflie:Couldn't load link driver: Cannot find a Crazyradio Dongle

Traceback (most recent call last):
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\drivers\crazyradio.py", line 119, in __init__
device = _find_devices()[devid]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crazyflie\__init__.py", line 218, in open_link
link_uri, self._link_quality_cb, self._link_error_cb)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crtp\__init__.py", line 91, in get_link_driver
instance.connect(uri, link_quality_callback, link_error_callback)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crtp\radiodriver.py", line 190, in connect
address)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crtp\radiodriver.py", line 100, in __init__
_RadioManager._radios[self._devid] = _SharedRadio(self._devid)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crtp\radiodriver.py", line 69, in __init__
self.radio = Crazyradio(devid=devid)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\drivers\crazyradio.py", line 121, in __init__
raise Exception('Cannot find a Crazyradio Dongle')
Exception: Cannot find a Crazyradio Dongle

Connection to radio://0/80/250K failed: Couldn't load link driver: Cannot find a Crazyradio Dongle

Traceback (most recent call last):
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\drivers\crazyradio.py", line 119, in __init__
device = _find_devices()[devid]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crazyflie\__init__.py", line 218, in open_link
link_uri, self._link_quality_cb, self._link_error_cb)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crtp\__init__.py", line 91, in get_link_driver
instance.connect(uri, link_quality_callback, link_error_callback)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crtp\radiodriver.py", line 190, in connect
address)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crtp\radiodriver.py", line 100, in __init__
_RadioManager._radios[self._devid] = _SharedRadio(self._devid)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crtp\radiodriver.py", line 69, in __init__
self.radio = Crazyradio(devid=devid)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\drivers\crazyradio.py", line 121, in __init__
raise Exception('Cannot find a Crazyradio Dongle')
Exception: Cannot find a Crazyradio Dongle

Traceback (most recent call last):
File "C:\PythonPrograms\CrazyFlie\CF_SR1.py", line 29, in <module>
with SyncCrazyflie(URI) as scf:
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crazyflie\syncCrazyflie.py", line 68, in __enter__
self.open_link()
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crazyflie\syncCrazyflie.py", line 65, in open_link
raise Exception(self._error_message)
Exception: Couldn't load link driver: Cannot find a Crazyradio Dongle

Traceback (most recent call last):
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\drivers\crazyradio.py", line 119, in __init__
device = _find_devices()[devid]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crazyflie\__init__.py", line 218, in open_link
link_uri, self._link_quality_cb, self._link_error_cb)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crtp\__init__.py", line 91, in get_link_driver
instance.connect(uri, link_quality_callback, link_error_callback)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crtp\radiodriver.py", line 190, in connect
address)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crtp\radiodriver.py", line 100, in __init__
_RadioManager._radios[self._devid] = _SharedRadio(self._devid)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\crtp\radiodriver.py", line 69, in __init__
self.radio = Crazyradio(devid=devid)
File "C:\Users\Genesys2\AppData\Local\Programs\Python\Python36\lib\site-packages\cflib\drivers\crazyradio.py", line 121, in __init__
raise Exception('Cannot find a Crazyradio Dongle')
Exception: Cannot find a Crazyradio Dongle

I need to solve this quickly, any help would be much appreciated

(The Crazyflie flies in VM OK)

Re: Python script not finding Crazyradio pa - windows 10 - Project deadline approaching, sorry

Posted: Fri Mar 23, 2018 9:23 am
by arnaud
Did you install the libUSB driver for the crazyradio (and not winUSB)?
Does the client work on windows?

Re: Python script not finding Crazyradio pa - windows 10 - Project deadline approaching, sorry

Posted: Fri Mar 23, 2018 10:29 am
by PO1
Just loaded the lib file via zadig and it seems to have solved the issue

can i load an autonomous script onto a micro sd?

Are you intending to release a camera for the Crazyflie?

Thanks

Re: Python script not finding Crazyradio pa - windows 10 - Project deadline approaching, sorry

Posted: Mon Mar 26, 2018 8:06 am
by arnaud
Glad that it worked!

In the current state of the firmware, you cannot run sequences from the SD-card deck on the Crazyflie. Though, the hardware supports it and all the software is open source so it is possible ;-). The Crazyflie already has code to read files on the SD-card fat filesystem, so what is left is to implement a sequencer that reads sequences from the SD-Card and generates setpoints.

There is currently no plan on making a camera deck for Crazyflie 2.0. If you can use an analog camera with transmitter, you can make a deck yourself. For example https://www.hackster.io/fredg/crazyflie ... tup-d2fc25 and viewtopic.php?f=6&t=2789&p=14181&hilit= ... net#p14041.