Page 2 of 2
Re: New program to control the crazyflie with your keyboard
Posted: Sun Feb 02, 2014 1:43 pm
by kikill
sorry i didn't reply sooner : here is the code
https://bitbucket.org/kikill/hova
i failed to make it work as i hoped, i guess i miss some flight knowledge, in order to make the CF hovering

Re: New program to control the crazyflie with your keyboard
Posted: Sun Feb 02, 2014 2:01 pm
by kikill
brownyoda wrote:Hey. I just started working with crazyflie.
I wanted to try your program. I'm using the virtual machine and I'm not sure where to put your file to run it. This might sound really easy and I apologize, but I'm new to this. I don't have a game controller and I want to control my crazyflie with a program like you created. Please help.
maybe you can try this quick tutorial
launch terminal and type those commands :
cd ~/projects
git clone
https://bitbucket.org/eldraco2000/crazy ... ograms.git
copy -R crazyflie-pc-client/lib/* crazyflie-programs
cd crazyflie-programs
./keyboard_control.py
Re: New program to control the crazyflie with your keyboard
Posted: Mon Feb 03, 2014 7:04 pm
by brownyoda
orcinus wrote:It appears the script tends to crash after you reach a certain throttle level (i'm assuming due to an overflow of some kind).
I believe the overflow is caused by line 237
Code: Select all
elif key == 's' and (thrust - thrust_increment >= min_roll):
instead of min_roll it should be min_thrust
Code: Select all
elif key == 's' and (thrust - thrust_increment >= min_thrust):
Re: New program to control the crazyflie with your keyboard
Posted: Thu May 15, 2014 10:25 am
by c1a1
Here's another linux newbie looking for help!
I tried kikill's tutorial and got this message:
Code: Select all
Initializing drivers
Searching for available devices
Connecting to interface with URI [radio://0/10/250k] and name
Traceback (most recent call last):
File "./keyboard_control.py", line 288, in <module>
TestFlight()
File "./keyboard_control.py", line 93, in __init__
self.crazyflie.connectSetupFinished.add_callback(self.connectSetupFinished)
AttributeError: Crazyflie instance has no attribute 'connectSetupFinished'
No handlers could be found for logger "cflib.crazyflie.toccache"
What should I do?
Re: New program to control the crazyflie with your keyboard
Posted: Thu May 15, 2014 11:02 pm
by ToeBee
I just tried this and ran into a problem with the current master of cfclient on GitHub. Looks like they changed the name of a callback. It couldn't find connectSetupFinished so I changed this line (93):
Code: Select all
self.crazyflie.connectSetupFinished.add_callback(self.connectSetupFinished)
to this:
Code: Select all
self.crazyflie.connected.add_callback(self.connectSetupFinished)
It works. Not exactly easy to control in a small room but it works
Now I need to get hover mode working...
Re: New program to control the crazyflie with your keyboard
Posted: Fri May 16, 2014 1:21 am
by c1a1
ToeBee wrote:I just tried this and ran into a problem with the current master of cfclient on GitHub. Looks like they changed the name of a callback. It couldn't find connectSetupFinished so I changed this line (93):
Code: Select all
self.crazyflie.connectSetupFinished.add_callback(self.connectSetupFinished)
to this:
Code: Select all
self.crazyflie.connected.add_callback(self.connectSetupFinished)
It works. Not exactly easy to control in a small room but it works
Now I need to get hover mode working...
It crashes sometimes but anyway it works! Thanks a lot!
Re: New program to control the crazyflie with your keyboard
Posted: Wed Jun 11, 2014 3:52 pm
by klopfie
hello
sry for this easy question but where must i put the files when i dont use a VM ?