Help with Crazyradio in python

Post here to get support
Post Reply
jchiches
Beginner
Posts: 2
Joined: Sun Jan 18, 2015 12:17 pm

Help with Crazyradio in python

Post 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"
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Help with Crazyradio in python

Post 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.
jchiches
Beginner
Posts: 2
Joined: Sun Jan 18, 2015 12:17 pm

Re: Help with Crazyradio in python

Post 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.
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Help with Crazyradio in python

Post by chad »

Moved to the more appropriate sub-forum (Crazyradio->Support).
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
Slaxx
Member
Posts: 86
Joined: Tue Mar 03, 2015 11:19 am
Location: Switzerland

Re: Help with Crazyradio in python

Post by Slaxx »

I appear to have to same problem. Is there any solution yet?

It works on the Virtual Machine but not on windows
Post Reply