i failed to make it work as i hoped, i guess i miss some flight knowledge, in order to make the CF hovering

maybe you can try this quick tutorialbrownyoda 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.
I believe the overflow is caused by line 237orcinus 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).
Code: Select all
elif key == 's' and (thrust - thrust_increment >= min_roll):
Code: Select all
elif key == 's' and (thrust - thrust_increment >= min_thrust):
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"
Code: Select all
self.crazyflie.connectSetupFinished.add_callback(self.connectSetupFinished)
Code: Select all
self.crazyflie.connected.add_callback(self.connectSetupFinished)
It crashes sometimes but anyway it works! Thanks a lot!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):to this:Code: Select all
self.crazyflie.connectSetupFinished.add_callback(self.connectSetupFinished)
It works. Not exactly easy to control in a small room but it worksCode: Select all
self.crazyflie.connected.add_callback(self.connectSetupFinished)
Now I need to get hover mode working...