New basic python programs to control and log the crazyflie

Firmware/software/electronics/mechanics
Post Reply
eldraco
Beginner
Posts: 5
Joined: Thu Jan 02, 2014 7:56 pm

New basic python programs to control and log the crazyflie

Post by eldraco »

Hi list.

I was trying to start developing in python to control the crazyflie, but unfortunately the current examples, including the wiki (http://wiki.bitcraze.se/projects:crazyf ... tils:pylib), are outdated because they use the old API.

So I create/modify (taking parts of others) two simple example python programs. The fist logs the accelerometer, barometer and stabilizer. The second tests the motors. Both use the new API (up to commit 5bffd5d8f311).

https://bitbucket.org/eldraco2000/crazyflie-programs

Hope they help to start developing!
sebas
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: New basic python programs to control and log the crazyfl

Post by tobias »

Great and thanks for the contribution! We will update the examples as soon as we can.
aholler
Beginner
Posts: 4
Joined: Thu Jan 02, 2014 10:55 pm

Re: New basic python programs to control and log the crazyfl

Post by aholler »

It would be great if someone would make the existing python scripts python 3.x aware. Should be easy using 2to3.
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: New basic python programs to control and log the crazyfl

Post by marcus »

aholler wrote:It would be great if someone would make the existing python scripts python 3.x aware. Should be easy using 2to3.
Good idea. I've created an issue for this so we don't forget about it.
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: New basic python programs to control and log the crazyfl

Post by marcus »

eldraco wrote:Hi list.

I was trying to start developing in python to control the crazyflie, but unfortunately the current examples, including the wiki (http://wiki.bitcraze.se/projects:crazyf ... tils:pylib), are outdated because they use the old API.

So I create/modify (taking parts of others) two simple example python programs. The fist logs the accelerometer, barometer and stabilizer. The second tests the motors. Both use the new API (up to commit 5bffd5d8f311).

https://bitbucket.org/eldraco2000/crazyflie-programs

Hope they help to start developing!
sebas
Great! We have had problems with the API/example getting out of sync before as well. I've created an issue for placing them in the crazyflie-pc-client repo instead. If you would like you can create a pull-request for placing the examples in an example dir in the root. Not sure how to keep you as the author otherwise.
eldraco
Beginner
Posts: 5
Joined: Thu Jan 02, 2014 7:56 pm

Re: New basic python programs to control and log the crazyfl

Post by eldraco »

Ok, I will do a pull-request and put the code there.

I will also make them python3 compatible and maybe simplify them.

It is good idea to have people collaborate with more example code.

cheers
sebas
Post Reply