cylon-crazyflie
cylon-crazyflie copied to clipboard
Can't implement the example code
Hi, Sorry I am a total beginner using nodejs but I kept getting: I, [2014-02-23T01:26:07.416Z] INFO -- : Initializing connections... I, [2014-02-23T01:26:07.418Z] INFO -- : Initializing connection 'crazyflie'... D, [2014-02-23T01:26:07.418Z] DEBUG -- : Loading adaptor 'crazyflie' Illegal instruction: 4 when I tried to implement the crazyflie.js. And tried to go back to aerogel but I still get "Illegal instruction: 4" and couldn't find way to solve it... THX:)
Hi, @chinweiliao sounds to me like you need to install libusb. I've just updated the instructions here https://github.com/hybridgroup/cylon-crazyflie#getting-started it might help.
@deadprogram Thanks a lot for replying:) I actually installed libusb and tried the way said on getting started, but get stuck while I tried to "node crazyflies.js" in examples folder. I googled the "Illegal instruction: 4" as well but seem like a tricky problem to solve so I posted here.
@deadprogram would you be able to give us a hand with this? I do not have the hardware to test this.
@solojavier has one.
@chinweiliao Are you still having this issue? I'll got trough the setup process and let you know what I found...
Sry still can't use it... But not in a hurry to solve, thanks for replying:)- Chin-Wei Liao Founder/ Designer @chinweiLiao
www.fotowith.com
On Mon, Aug 11, 2014 at 10:24 PM, Javier Cervantes [email protected] wrote:
@chinweiliao Are you still having this issue? I'll got trough the setup process and let you know what I found...
Reply to this email directly or view it on GitHub: https://github.com/hybridgroup/cylon-crazyflie/issues/4#issuecomment-51843017
@chinweiliao, it seems the documentation on the Cylon.js driver page for the Crazyflie may be a bit outdated. Replace the example code you're using with the following:
var Cylon = require('cylon');
Cylon.robot({
connection: { name: 'crazyflie', adaptor: 'crazyflie', port: 'radio://1/10/250KPS' },
device: {name: 'drone', driver: 'crazyflie'},
work: function(my) {
my.drone.takeoff();
after((10).seconds(), function() {
my.drone.land();
});
after((15).seconds(), function() {
my.drone.stop();
});
}
}).start();
Let us know if this helps solve your issue.
@chinweiliao anyone knows the status on this one?
Hi there!
I'm trying to test the installation of cylon-crazyflie, and I cannot run the example code.. I get the following:
$ node robot.js I, [2015-02-14T17:33:27.265Z] INFO -- : Initializing connections. I, [2015-02-14T17:33:27.337Z] INFO -- : Initializing devices. I, [2015-02-14T17:33:27.339Z] INFO -- : Starting connections. STATE: setup --> connected
TypeError: Object #<InEndpoint> has no method 'startStream' ....
I have no idea whats going on.
The crazyflie firmware, is the last one at the moment: https://github.com/bitcraze/crazyflie-firmware/releases/tag/2015.1
Hope you can help.
Thanks in advance.
@adiego73, I had got the same problem. Maybe, this problem was occurred by version unmatch of "node-usb" module. The "startStream" method was replaced by the "startPoll" method after v1.0.0.
I attempted to rewrite the "startStream" by the "startPoll" on usbstream.js which is under "cylon-crazyflie/node_modules/aerogel/lib/", and I have been able to run it.
I'm sorry for my poor English. Thanks.
@sobeit Thank you very much! That works like a charm! :)
Now, I have another issue.. $ node robot.js I, [2015-02-16T18:29:08.187Z] INFO -- : Initializing connections. I, [2015-02-16T18:29:08.259Z] INFO -- : Initializing devices. I, [2015-02-16T18:29:08.261Z] INFO -- : Starting connections. STATE: setup --> connected starting telemetry
It freezes there. I can run the copter using the client, and with a c++ program I've made, so I think that there is no problem with the radio neither with the udev rules..
Any idea what's going on?
Thanks!
@adiego73 I think we must rewrite totally aerogel module adopting new implementation of node-usb, if we use current version of node-usb.
Not only startStream method, but other methods were replaced. For example outendpoint.write method which is used in telemetry flow and in other.
@sobeit is exactly correct, IMO.
Any upadtes on this one? do we need to do something else? can we close it yet?
Without any extra coding, manually downgrading the usb library aerogel use solved the problem.
According to the release date, I tried using [email protected], and it works on Ubuntu 14.04 with node 0.12.0. But I have trouble using it on Windows 8.1. I failed to build [email protected] with [email protected], because it required an older version of v8.h, and building is good with [email protected], but failed to get the whole thing working.