-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is the sequence number always set to 0? #94
Comments
Remember that this isn't an official package, and just like the Wiki you provided states, these are just reverse engineering's of the lower-level protocols of the Tello. This repo is a refactoriztion to Python of the Go version: https://gobot.io/blog/2018/04/20/hello-tello-hacking-drones-with-go/ With sequences also being featured in the video frame packets, I believe that it is for use at the firmware level for sequencing when need be. Some drones don't use the sequencing number, so maybe it can be used at the application level for those drones (i.e. the Tello). |
Thanks a lot for this, makes sense. |
@samlaf Not as much anymore (using Mavic Air 2 now), but I've been using this repo for Tello dev as of lately: https://github.com/damiafuentes/DJITelloPy |
Ya I've been working with that repo until now, but I've come to this one because I can't get rid of the 1-2s video latency on DJITelloPy. Did you figure out a way to get rid of it? |
I've seen this commit that discusses your issues, and has been tested by the project keeper with decreased latency, but it's not a perfect solution: damiafuentes/DJITelloPy@5a44e54 |
That commit seems to be related to controller input latency. |
Oh, the video lag is a known issue, and the WiFi can be interrupted/impeded by a variety of things. I think it also goes back down to the cost of the hardware components and what not (pretty cheap drone). Using this repo, I was able to get very minimal delay using ffmpeg for my video streaming, for example: My comment here talks about it here for Windows, and my PR talks about how to install it on Linux (as mplayer): https://github.com/hanyazou/TelloPy/blob/112fec56854a3ac3ede813b3d99de20e4e0bc95f/README.md#linux (Note: mplayer's underlying technology uses ffmpeg) Hope this helps! |
Oh gosh yes this does seem to help! Also I'm guessing you made a mistake since port 11111 is for the TelloPy library (this one uses 6038 for video transmission)? So your workflow for the other repo would look something like:
and
? |
For the speed up, I think it's because that uses As with the ffmpeg stuff, I was using that line as an example, but Tello users with phone apps typically run that line and stream from that to a player; however, in this API, a lot of stuff happens:
Links:
Now look at this function in keyboard-video example:
Looking here:
, a user defined video frame handler event is created to pass the processed frames from the recorder, add captioning of flight data to the frame, and then display it to the video player (i.e. That was a lot, but I was also reviewing for myself lol |
Thanks for this breakdown, it was useful! |
Definitely! With this being an example file, I think not much more than the bare minimum was given. Also, without having to really code anything, I could use |
Makes sense! The low-level protocol in this repo streams on port 6038 (though that is configurable). On the other hand, the official string-based protocol streams on port 11111 (not configurable). All in all, I can't figure out for the life of me why the official sdk is giving me a 2s latency whereas the low-level protocol has almost 0 latency. I'm really starting to wonder whether it's not DJI that is purposefully introducing latency in its official sdk to keep an edge with its official tello app (which uses the low-level protocol!) |
The tello wiki says that the sequence number is
In this code base, it's defined in tello.py as
self.pkt_seq_num = 0x01e4
and even printed when logging commands, for example
takeoff
logslog.info('takeoff (cmd=0x%02x seq=0x%04x)' % (TAKEOFF_CMD, self.pkt_seq_num))
However, two lines below,
fixup
never actually includes that information:pkt.fixup()
and since
fixup
is defined as (in protocol.py)def fixup(self, seq_num=0):
the sequence number that is sent to the actual tello is always 0!
Is there a reason for this? What exactly is this sequence number?
The text was updated successfully, but these errors were encountered: