cylon-crazyflie
cylon-crazyflie copied to clipboard
error running demo code
I tried running the demo code against crazyflie 2.0. I'm getting following error.
$ node test.js I, [2015-07-04T20:32:28.351Z] INFO -- : [Robot 1] - Starting connections. STATE: setup --> connected /opt/node-v0.12.6-linux-x64/lib/node_modules/cylon-crazyflie/node_modules/aerogel/lib/usbstreams.js:30 this.endpoint.startStream(3, 64); ^ TypeError: undefined is not a function at ReadableUSBStream._read (/opt/node-v0.12.6-linux-x64/lib/node_modules/cylon-crazyflie/node_modules/aerogel/lib/usbstreams.js:30:17) at ReadableUSBStream.Readable.read (_stream_readable.js:341:10) at _stream_readable.js:689:16 at process._tickDomainCallback (node.js:381:11) at Function.Module.runMain (module.js:503:11) at startup (node.js:129:16) at node.js:814:3
My npm module versions are ┬ [email protected] ├─┬ [email protected] │ ├─┬ [email protected] │ │ ├── [email protected] │ │ ├── [email protected] │ │ └─┬ [email protected] │ │ ├── [email protected] │ │ ├── [email protected] │ │ └── [email protected] │ ├── [email protected] │ ├─┬ [email protected] │ │ ├── [email protected] │ │ └── [email protected] │ ├── [email protected] │ ├── [email protected] │ └─┬ [email protected]
Any idea?
We do not have one yet, so not much help. However, it appears that the protocol is mostly the same, so?
Hello, I have the same error with a crazyflie v1.
I, [2015-08-12T19:44:47.977Z] INFO -- : [Robot 1] - Starting connections.
STATE: setup --> connected
/home/sam/Development/Javascript/node_modules/cylon-crazyflie/node_modules/aerogel/lib/usbstreams.js:30
this.endpoint.startStream(3, 64);
^
TypeError: undefined is not a function
at ReadableUSBStream._read (/home/sam/Development/Javascript/node_modules/cylon-crazyflie/node_modules/aerogel/lib/usbstreams.js:30:17)
at ReadableUSBStream.Readable.read (_stream_readable.js:341:10)
at _stream_readable.js:689:16
at process._tickDomainCallback (node.js:381:11)
at Function.Module.runMain (module.js:503:11)
at startup (node.js:129:16)
at node.js:814:3
I had this error too. Aerogels package.json doesn't specify dependency versions, which means it will always try and get the latest version. The problem appears to be that the "usb" library has changed at some point, breaking aerogel. I haven't experimented to find the most recent version of "usb" that works, but setting the version to 0.3.11 has worked for me.
Looks like it has been a long while since @ceejbot worked on aerogel actively, so @amfio perhaps you could submit a PR to Aerogel to lock the usb
module to a specific version that you know works? Or if you have a fork, you could publish the fork and we could switch cylon-crazyflie
to use it. Whatever is easiest for everyone.