Page 1 of 3

libcflie

Posted: Tue Jun 04, 2013 11:11 am
by fairlight1337
Hey folks,

libcflie guy here. Just in case some of you are actually using the lib - I would love some feedback on what you are missing, what you are experiencing and especially when something goes wrong when using it. I'd really appreciate it :).

In case you missed it: You can get the C++ Client Library here (plus the Doxygen documentation).

It pretty much covers sensor readings (for whatever numerical value you are planning to log) and sending R/P/Y/thrust back to the copter.
See the (short) sample video here on Youtube.

Hope you find it as much fun to use as I had to write it :).

EDIT (2013/06/07): Apparently, a header include was missing from one of the files which made it un-compilable (at least under Ubuntu 12.10). Fixed that and made sure it now works under 11.10 and 12.10 (haven't tried the other ones).
Instructions on how to set your udev permissions and what to install to get it up and running (including running the example programs) can now be found on the GitHub page, all the way down, in the README.md section.

Cheers,
Jan

Re: libcflie

Posted: Wed Jun 05, 2013 12:58 pm
by marcus
Great work!! I'll give it a try :)

Re: libcflie

Posted: Fri Jun 07, 2013 9:42 pm
by TheFrog4u
Had a quick look into your code and since I am more familiar with c/c++ than python I a appriate your work very much! Well written and clean. Good job! BTW: We live in the same city :)

Re: libcflie

Posted: Fri Jun 14, 2013 4:46 pm
by n0n4m3
Thanks for writing this lib.
I was going to build it myself if there wasn't one but since you already did the work I really appreciate it! :)

Re: libcflie

Posted: Sun Jun 16, 2013 2:04 am
by amir64
Hey I tried to install your library but when I use the command cmake .. I get an error saying:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
USB_LIB
linked by target "cflie" in directory /home/amir/libcflie
-- Configuring incomplete, errors occurred!

Any suggestions how I can fix it?

Re: libcflie

Posted: Sun Jun 16, 2013 2:59 am
by n0n4m3
You need to install libusb 1.0. The following line should do it:
sudo apt-get install libusb-1.0-0-dev

Re: libcflie

Posted: Sun Jun 16, 2013 3:35 am
by amir64
Great, Thank you so much

Re: libcflie

Posted: Thu Jun 20, 2013 1:23 am
by n0n4m3
Just wanted to drop in my feedback on the lib so far.
I've been testing it and the values seem fine although I'm using it on Windows but everything seems to be matching.

The only thing that would be most useful to me was to have access to the altitude value but since you said that there's a problem with pressure value so I guess we don't have access to altitude right now.
Other than that everything looks good and easy to use :)
Great work!

Re: libcflie

Posted: Thu Jun 20, 2013 9:26 am
by fairlight1337
Thanks guys, makes me happy that someone is actually using it (besides me) :).

n0n4m3, you're right. The altitude information is missing from the firmware. Once it is advertised by the firmware, it can be registered for reading and then be read using the sensorDoubleValue() function in the CCrazyflie class.

A custom firmware that outputs Acc and Gyro (and Magnitometer, through not normalized) values is present here. It doesn't include the latest changes, but is fine for testing purposes I guess.

Cheers guys,
Jan

Re: libcflie

Posted: Fri Jun 21, 2013 3:02 am
by n0n4m3
Jan,
About the altitude information missing from the firmware, the sensor's documentation mentions that it only provides the pressure and temperature values (reference: http://www.meas-spec.com/downloads/MS5611-01BA03.pdf) . From these we can calculate the altitude with a 10cm precision. It would be great to have the pressure values coming in so that we could try out and calculate the altitude.

I didn't have a chance to look/debug the code to see why the pressure is always 0 but I may have some time free over the weekend so if you can point me out where to look in the firmware it would be even more helpful!

Btw, I'm using your custom firmware and could verify the acc and gyro values appeared consistent.

Thanks!