Page 1 of 2

Did anyone get the Cylon Crazyflie adapter to work?

Posted: Sun Jan 26, 2014 2:47 am
by orcinus
Not sure if this is the right place, but...
Has anyone managed to get Cylon.JS (http://cylonjs.com/) to work with Crazyflie?

I've successfully installed the Crazyflie adapter/driver.
Test code connects to the drone just fine, and there seems to be telemetry streaming in after initiating a takeoff sequence (as per http://cylonjs.com/documentation/drivers/crazyflie/). However, there's no thrust at all. The motors never spin up.

Invoking the setThrust method doesn't seem to do anything either.
Not sure if it's just me or if it truly doesn't work.

PS: i'm on Mac OS, crazyflie works fine via cfclient and i've got 2013.11-beta1 fw running on it.

Re: Did anyone get the Cylon Crazyflie adapter to work?

Posted: Mon Jan 27, 2014 1:34 pm
by kikill
yes i could make it work (in archlinux in VM and also in a raspberry).
but i had to turn off/on the crazyflie and execute several times the script.
that made me switch to python

Re: Did anyone get the Cylon Crazyflie adapter to work?

Posted: Mon Jan 27, 2014 5:21 pm
by orcinus
Hm, yeah, tried restarting multiple times - no go.
Absolutely no control at all, even though the link gets established just fine and telemetry seems to be streaming in.

Re: Did anyone get the Cylon Crazyflie adapter to work?

Posted: Wed Jan 29, 2014 8:46 am
by tobias
I didn't know this existed, cool! I have not tried it but will as soon as I have some spare time.

Re: Did anyone get the Cylon Crazyflie adapter to work?

Posted: Sun Feb 02, 2014 12:14 pm
by kikill
maybe you could try aerogel https://github.com/ceejbot/aerogel instead of cylon

Re: Did anyone get the Cylon Crazyflie adapter to work?

Posted: Sun Feb 02, 2014 8:39 pm
by orcinus
Cylon uses aerogel.

Anyways, no luck there either, it's aerogel that actually hangs waiting for (something).
Didn't have much time to debug, unfortunately.

It finds the cf, gets the URI, then something in the connect method hangs.
The weird part is, the output/behaviour are not always the same.

Sometimes i just get:

Code: Select all

STATE: setup --> connected
Sometimes i get:

Code: Select all

STATE: setup --> connected
starting telemetry
telemetry ready; elapsed= 439
{ 'pm.state': 
   { id: 1,
     type: 4,
     group: 'pm',
     name: 'state',
     fullname: 'pm.state' },
  'sys.canfly': 
   { id: 2,
     type: 4,
     group: 'sys',
     name: 'canfly',
     fullname: 'sys.canfly' },
  'acc.x': { id: 3, type: 7, group: 'acc', name: 'x', fullname: 'acc.x' },
  'acc.y': { id: 4, type: 7, group: 'acc', name: 'y', fullname: 'acc.y' },
  'acc.z': { id: 5, type: 7, group: 'acc', name: 'z', fullname: 'acc.z' },
  'acc.zw': { id: 6, type: 7, group: 'acc', name: 'zw', fullname: 'acc.zw' },
  'acc.mag2': 
   { id: 7,
     type: 7,
     group: 'acc',
     name: 'mag2',
     fullname: 'acc.mag2' },
  'baro.asl': 
   { id: 8,
     type: 7,
     group: 'baro',
     name: 'asl',
     fullname: 'baro.asl' },
  'baro.aslRaw': 
   { id: 9,
     type: 7,
     group: 'baro',
     name: 'aslRaw',
     fullname: 'baro.aslRaw' },
  'baro.aslLong': 
   { id: 10,
     type: 7,
     group: 'baro',
     name: 'aslLong',
     fullname: 'baro.aslLong' },
  'baro.temp': 
   { id: 11,
     type: 7,
     group: 'baro',
     name: 'temp',
     fullname: 'baro.temp' },
  'baro.pressure': 
   { id: 12,
     type: 7,
     group: 'baro',
     name: 'pressure',
     fullname: 'baro.pressure' },
  'motor.m4': 
   { id: 13,
     type: 6,
     group: 'motor',
     name: 'm4',
     fullname: 'motor.m4' },
  'motor.m1': 
   { id: 14,
     type: 6,
     group: 'motor',
     name: 'm1',
     fullname: 'motor.m1' },
  'motor.m2': 
   { id: 15,
     type: 6,
     group: 'motor',
     name: 'm2',
     fullname: 'motor.m2' },
  'motor.m3': 
   { id: 16,
     type: 6,
     group: 'motor',
     name: 'm3',
     fullname: 'motor.m3' },
  'stabilizer.roll': 
   { id: 17,
     type: 7,
     group: 'stabilizer',
     name: 'roll',
     fullname: 'stabilizer.roll' },
  'stabilizer.pitch': 
   { id: 18,
     type: 7,
     group: 'stabilizer',
     name: 'pitch',
     fullname: 'stabilizer.pitch' },
  'stabilizer.yaw': 
   { id: 19,
     type: 7,
     group: 'stabilizer',
     name: 'yaw',
     fullname: 'stabilizer.yaw' },
  'stabilizer.thrust': 
   { id: 20,
     type: 2,
     group: 'stabilizer',
     name: 'thrust',
     fullname: 'stabilizer.thrust' },
  'altHold.err': 
   { id: 21,
     type: 7,
     group: 'altHold',
     name: 'err',
     fullname: 'altHold.err' },
  'altHold.target': 
   { id: 22,
     type: 7,
     group: 'altHold',
     name: 'target',
     fullname: 'altHold.target' },
  'altHold.zSpeed': 
   { id: 23,
     type: 7,
     group: 'altHold',
     name: 'zSpeed',
     fullname: 'altHold.zSpeed' },
  'altHold.vSpeed': 
   { id: 24,
     type: 7,
     group: 'altHold',
     name: 'vSpeed',
     fullname: 'altHold.vSpeed' },
  'altHold.vSpeedASL': 
   { id: 25,
     type: 7,
     group: 'altHold',
     name: 'vSpeedASL',
     fullname: 'altHold.vSpeedASL' },
  'altHold.vSpeedAcc': 
   { id: 26,
     type: 7,
     group: 'altHold',
     name: 'vSpeedAcc',
     fullname: 'altHold.vSpeedAcc' },
  'gyro.x': { id: 27, type: 7, group: 'gyro', name: 'x', fullname: 'gyro.x' },
  'gyro.y': { id: 28, type: 7, group: 'gyro', name: 'y', fullname: 'gyro.y' },
  'gyro.z': { id: 29, type: 7, group: 'gyro', name: 'z', fullname: 'gyro.z' },
  'vpid.pid': 
   { id: 30,
     type: 7,
     group: 'vpid',
     name: 'pid',
     fullname: 'vpid.pid' },
  'vpid.p': { id: 31, type: 7, group: 'vpid', name: 'p', fullname: 'vpid.p' },
  'vpid.i': { id: 32, type: 7, group: 'vpid', name: 'i', fullname: 'vpid.i' },
  'vpid.d': { id: 33, type: 7, group: 'vpid', name: 'd', fullname: 'vpid.d' },
  'mag.x': { id: 34, type: 7, group: 'mag', name: 'x', fullname: 'mag.x' },
  'mag.y': { id: 35, type: 7, group: 'mag', name: 'y', fullname: 'mag.y' },
  'mag.z': { id: 36, type: 7, group: 'mag', name: 'z', fullname: 'mag.z' } }
STATE: connected --> waiting
I'll play a bit more with it the next weekend (hopefully that one will be free unlike the past few :( ).

Re: Did anyone get the Cylon Crazyflie adapter to work?

Posted: Sun Feb 02, 2014 9:20 pm
by kikill
indeed, cylon uses aerogel, that's why i tried it directly
here is a git depot i'm was working on https://bitbucket.org/kikill/aerocrazy

Re: Did anyone get the Cylon Crazyflie adapter to work?

Posted: Tue Feb 04, 2014 4:14 am
by orcinus
Thanks. I'll give it a try as soon as i catch some free time.
I'm having a nagging feling it might be some kind of an issue with libusb nodejs bindings on Mac OS.

Re: Did anyone get the Cylon Crazyflie adapter to work?

Posted: Fri Feb 07, 2014 5:05 am
by mharkus
I played around with Aerogel a few months back and built a visualization using node.js, d3.js and a bit of three.js. You can find more info in my blog post here:

http://marctan.com/blog/2013/10/19/visu ... ta-part-1/

or you can watch the early version of the UI here:

http://www.youtube.com/watch?v=LqBmeLJJ ... 4-overview

There are lots of cases where the link gets connected but I cannot control the quadcopter at all. I just usually disconnect and reconnect the dongle again. I'm also running it on Mac.

Re: Did anyone get the Cylon Crazyflie adapter to work?

Posted: Fri Feb 07, 2014 8:54 am
by kikill
very interesting project :)
looking forward for the part 2