Sorry for necroposting; this thread seemed to be the most relevant.
I'm trying to figure out how to test dev-leapmotion with my crazyflie. Having had no luck with my main Mac laptop, I switched to an old windows one I had lying about.
Since I don't have an environment to compile binary distribution set up, I just installed python 2.7.8, all the necessary libs (including libusb/pyusb), and then cloned the pc-client repo and switched to the dev-leapmotion branch. After patching the empty/is_empty issue as mentioned elsewhere on the forum, I got leapmotion input working in the cliengt! However, it is not useful, as the client can't connect to crazyradio
here's what happens:
Code: Select all
INFO:cfclient.utils.logconfigreader:Parsing [stabilizer.json]
INFO:cfclient.ui.tabs.FlightTab:Changed flightmode to Normal
INFO:cfclient.utils.leapreader:Connected
INFO:cflib.crtp.radiodriver:v0.5 dongle with serial N/A found
Traceback (most recent call last):
File "C:\Users\mbravo\Dropbox\crazyflie-pc-client\lib\cfclient\ui\dialogs\conn
ectiondialogue.py", line 120, in scan
self.interfaceFoundSignal.emit(cflib.crtp.scan_interfaces())
File "C:\Users\mbravo\Dropbox\crazyflie-pc-client\lib\cflib\crtp\__init__.py",
line 64, in scan_interfaces
found = instance.scan_interface()
File "C:\Users\mbravo\Dropbox\crazyflie-pc-client\lib\cflib\crtp\radiodriver.p
y", line 222, in scan_interface
self._scan_radio_channels())
File "C:\Users\mbravo\Dropbox\crazyflie-pc-client\lib\cflib\crtp\radiodriver.p
y", line 199, in _scan_radio_channels
return list(self.cradio.scan_channels(start, stop, (0xff,)))
File "C:\Users\mbravo\Dropbox\crazyflie-pc-client\lib\cflib\drivers\crazyradio
.py", line 225, in scan_channels
status = self.send_packet(packet)
File "C:\Users\mbravo\Dropbox\crazyflie-pc-client\lib\cflib\drivers\crazyradio
.py", line 242, in send_packet
self.handle.write(1, dataOut, 0, 1000)
TypeError: write() takes at most 4 arguments (5 given)
at this point, the Connect dialog window just sits there, saying Scanning and all buttons grayed out. If I close the window and exit the client, that is what I get:
Code: Select all
INFO:cflib.crazyflie:Closing link
INFO:cflib.crazyflie:Callback->Disconnected from []
INFO:cfclient.utils.config:Config file saved to [C:\Users\mbravo\Dropbox\crazyfl
ie-pc-client\lib\..\conf/config.json]
Traceback (most recent call last):
File "C:\Users\mbravo\Dropbox\crazyflie-pc-client\lib\cfclient\ui\main.py", li
ne 494, in closeAppRequest
app.exit(0)
NameError: global name 'app' is not defined
Exception AttributeError: "'NoneType' object has no attribute 'usb_close'" in <bound method Device.__del__ of <DEVICE ID 1915:7777 on Bus 000 Address 001>> ignored
at the same time, cfclient from the 2014.01 binary distribution works just fine on the same laptop.
I suspect it is related somehow to pyusb/libusb, but I'm not sure and don't have deep enough knowledge to troubleshoot effectively.
Any pointers would be much appreciated!