eisensheng / python-fedrone

Control your Ar.Drone with Python!
https://bitbucket.org/eisensheng/python-fedrone
4 stars 2 forks source link

Deal with competitive events #6

Open vasylnakvasiuk opened 12 years ago

vasylnakvasiuk commented 12 years ago

I try to run next script:


from fedrone.drone import ArDrone

drone = ArDrone()

for i in range(5):
    print('takeoff')
    drone.takeoff()
    print('land')
    drone.land()

And drone do nothing.

When I insert some sleep between events, my drone 5 times made takeoff and land. Is that right?

eisensheng commented 12 years ago

That could happen if commands are going to the drone fastern than it can process them. I guess the library needs an asynchron version of those commands like takeoff, land and reset. Am 22.08.2012 08:40 schrieb "Vasyl Nakvasiuk" notifications@github.com:

I try to run next script:

from fedrone.drone import ArDrone drone = ArDrone() for i in range(5): print('takeoff') drone.takeoff() print('land') drone.land()

And drone do nothing.

When I insert some sleep between events, my drone 5 times made takeoffand land. Is that right?

— Reply to this email directly or view it on GitHubhttps://github.com/EisenSheng/python-fedrone/issues/6.

vasylnakvasiuk commented 12 years ago

Interesting... I thought, that if drone catch 5 fast command takeoff, land, takeoff, land..., drone must ignore other commands, but run the last one. Ok. Great idea about asynchron version.