cylon-crazyflie icon indicating copy to clipboard operation
cylon-crazyflie copied to clipboard

error running demo code

Open tsureshkumar opened this issue 9 years ago • 4 comments

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?

tsureshkumar avatar Jul 04 '15 20:07 tsureshkumar

We do not have one yet, so not much help. However, it appears that the protocol is mostly the same, so?

deadprogram avatar Jul 04 '15 21:07 deadprogram

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

dgellow avatar Aug 12 '15 19:08 dgellow

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.

amfio avatar Oct 25 '15 11:10 amfio

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.

deadprogram avatar Oct 25 '15 15:10 deadprogram