Hello Tello Pilot!
Join our DJI Tello community & remove this banner.
Sign up

Sending a stream of commands without time.sleep

kross787

New member
Joined
Jul 10, 2019
Messages
3
Reaction score
0
Hi All,

I wanted to know what is your approach to sending commands to the tello. currently I always have to pause the program to give the tello time to react before sending the next command. Is this how it is supposed to work? or is there a better way?

for example:

tello.sendTello('takeoff')
time.sleep(3)
tello.sendTello('forward 50')
time.sleep(3)
tello.sendTello('back 50')
time.sleep(3)
tello.sendTello('left 50')
time.sleep(3)
tello.sendTello('land')

Thanks!
 

zantarob

Member
Joined
Feb 28, 2019
Messages
18
Reaction score
4
Hi All,

I wanted to know what is your approach to sending commands to the tello. currently I always have to pause the program to give the tello time to react before sending the next command. Is this how it is supposed to work? or is there a better way?

for example:

tello.sendTello('takeoff')
time.sleep(3)
tello.sendTello('forward 50')
time.sleep(3)
tello.sendTello('back 50')
time.sleep(3)
tello.sendTello('left 50')
time.sleep(3)
tello.sendTello('land')

Thanks!
According to many users on this forum - Yes. Otherwise Tello may miss commands altogether.

I use the Gobot implementation at home and most of my commands are punctuated with a minimum of one second of sleep. does your time.sleep(3) refer to 3 seconds or 3 milliseconds?
 

kross787

New member
Joined
Jul 10, 2019
Messages
3
Reaction score
0
According to many users on this forum - Yes. Otherwise Tello may miss commands altogether.

I use the Gobot implementation at home and most of my commands are punctuated with a minimum of one second of sleep. does your time.sleep(3) refer to 3 seconds or 3 milliseconds?
Thanks, it refers to 3 seconds. Yesterday I implemented a different approach where I use a thread to receive the UDP messages and send the next command as soon as I receive the 'OK' from the previous. It's working very well at the moment. I know this solution will not be 100% reliable as I might never get the OK meesage but so far its working. at the moment I'm writing my own python library for commands, video, and telemetry and will upload to github if people would find it useful.

Khris
 

zantarob

Member
Joined
Feb 28, 2019
Messages
18
Reaction score
4
... at the moment I'm writing my own python library for commands, video, and telemetry and will upload to github if people would find it useful.

Khris
I'm sure they will, Will you be including "Taking Pictures" as I believe that is where tello really shines.
 

kross787

New member
Joined
Jul 10, 2019
Messages
3
Reaction score
0
I'm sure they will, Will you be including "Taking Pictures" as I believe that is where tello really shines.
I will, that bit I got working. Following inspiration from another post here I just tried some photogrammetry with my students and things are looking good. Will upload examples after we finish our sessions.
 

New Threads

Forum statistics

Threads
3,098
Messages
24,158
Members
7,882
Latest member
Lau7aro