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
1
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

Active member
Joined
Feb 28, 2019
Messages
26
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
1
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
 
  • Like
Reactions: Samuel

zantarob

Active member
Joined
Feb 28, 2019
Messages
26
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
1
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.
 

Samuel

New member
Joined
Aug 1, 2020
Messages
1
Reaction score
0
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
Hi, Kross
I'm new in this TelloPilots forum. I'm interested in sending commands and accessing video stream to/from Tello through python codes. Would you mind sharing you python codes or github library to me ? That would be highly appreciated.
 

New Threads

Members online

No members online now.

Forum statistics

Threads
5,110
Messages
36,939
Members
13,805
Latest member
Demo211