Page 1 of 1

Help with Crazyradio in python

Posted: Sat Feb 14, 2015 5:43 am
by jchiches
I recently obtained a Crazyflie 2.0 for the explicit purpose of doing some simple developmental work as a side hobby. As background I know a bit of python but have spent the last few days trying to set up the dev environment on my PC.

After installing all the required drivers and python requirements, I am having an odd problem where the crazyradio scan function won't pick up my crazyflie. This is odd because when I open the cfclient and scan I find the crazyflie easily.

My code is below, I don't think that it is a specific coding issue as this is from the ramp.py example folder. Any thoughts or ways I can better figure out what might be going on?

Code: Select all

import sys
sys.path.append("../lib")
import cflib.crtp
cflib.crtp.init_drivers(enable_debug_driver=False)

print "Scanning interfaces for Crazyflies..."
available = cflib.crtp.scan_interfaces()
print "Crazyflies found:"
for i in available:
    print i[0]
if len(available) > 0:
    print "Crazyflies located - have fun!"
else:
    print "No Crazyflies found, cannot run example"

Re: Help with Crazyradio in python

Posted: Mon Feb 16, 2015 10:23 am
by arnaud
Hi,

I just tested your code from both my PC and the virtual machine and it works as expected. If you can run the virtual machine it will work.

Are you running on Windows? If so try to install the libusbk driver for the Crazyradio (it is in the list of drivers in zadig), this has already solved some problems for me.

Re: Help with Crazyradio in python

Posted: Fri Feb 20, 2015 10:59 am
by jchiches
Thanks Arnaud

I'll keep tinkering, I am on windows and am very puzzled why the code works on the cfclient (which connects no problem) but not through the python instructions. If you can think of anything let me know.

Re: Help with Crazyradio in python

Posted: Fri Feb 20, 2015 2:47 pm
by chad
Moved to the more appropriate sub-forum (Crazyradio->Support).

Re: Help with Crazyradio in python

Posted: Thu Mar 05, 2015 7:46 am
by Slaxx
I appear to have to same problem. Is there any solution yet?

It works on the Virtual Machine but not on windows