libcflie

Firmware/software/electronics/mechanics
fairlight1337
Beginner
Posts: 6
Joined: Tue Jun 04, 2013 5:41 am
Location: Bremen / Hamburg, Germany
Contact:

libcflie

Post 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
Last edited by fairlight1337 on Fri Jun 07, 2013 8:44 am, edited 1 time in total.
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: libcflie

Post by marcus »

Great work!! I'll give it a try :)
TheFrog4u
Expert
Posts: 113
Joined: Fri Feb 08, 2013 6:59 pm
Location: Bremen, Germany

Re: libcflie

Post 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 :)
n0n4m3
Beginner
Posts: 10
Joined: Fri Jun 14, 2013 3:25 pm
Contact:

Re: libcflie

Post 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! :)
amir64
Beginner
Posts: 16
Joined: Tue Jun 11, 2013 8:15 pm
Location: Pullman, USA

Re: libcflie

Post 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?
n0n4m3
Beginner
Posts: 10
Joined: Fri Jun 14, 2013 3:25 pm
Contact:

Re: libcflie

Post by n0n4m3 »

You need to install libusb 1.0. The following line should do it:
sudo apt-get install libusb-1.0-0-dev
amir64
Beginner
Posts: 16
Joined: Tue Jun 11, 2013 8:15 pm
Location: Pullman, USA

Re: libcflie

Post by amir64 »

Great, Thank you so much
n0n4m3
Beginner
Posts: 10
Joined: Fri Jun 14, 2013 3:25 pm
Contact:

Re: libcflie

Post 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!
fairlight1337
Beginner
Posts: 6
Joined: Tue Jun 04, 2013 5:41 am
Location: Bremen / Hamburg, Germany
Contact:

Re: libcflie

Post 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
n0n4m3
Beginner
Posts: 10
Joined: Fri Jun 14, 2013 3:25 pm
Contact:

Re: libcflie

Post 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!
Post Reply