
UFO: A Drone/UAV Programming Library for Rust - formalsystem
https://github.com/ajmwagar/ufo
======
bri3d
Is anyone working on flight controllers in Rust? Now that the STM targets are
maturing it seems like a perfect target. I can only find stub projects and
blog posts right now.

~~~
blt
A low level flight controller needs only statically allocated memory, so one
of the main benefits of Rust is irrelevant. The syntax is still nice though.

~~~
bluejekyll
> so one of the main benefits of Rust is irrelevant

Not sure what you mean with this comment. Even in a context like this, Rust
has a lot of safety benefits, but yes you don't have access to the stdlib, and
are restricted to core.

~~~
perennate
I think parent meant "one of the main benefits" = safety not as useful because
anyway no dynamic allocations are needed to implement a basic flight control
algorithm.

~~~
bluejekyll
It also helps with other references, shared mutability, UB, etc.

Allocation and deallocation focuses on small sliver of safety, but yes, That’s
not a concern in that context.

------
impostir
Seems cool, especially since I know nothing about programming drones. I was
glancing through the code, and ibwas wondering if there was particular reason
you split flight commands into UDP and camera controls into TCP. As I said I
know nothing about drone programming, sorry if it is obvious.

~~~
saidinesh5
Hi, Not the maintainer of the above library, but this seems similar to a
reverse engineered library for a couple of other chinese wifi quads.

Someone created a chrome app for their specific model a couple of years ago,
and their notes are available here [1]:

> The commands are simple 8 byte packets sent continuously over UDP.

> The drone creates an unprotected wireless network and streams live video to
> an android or ios app named 'RC-Leading' (there are dozens of near-identical
> apps from the manufacturer)

> The drone's IP is always 172.16.10.1

> I've captured the communications between the drone and app and there seems
> to be several rounds of back and forth of ~100 bytes worth of non-
> intelligible data over the TCP 8888 port before the video streaming begins
> (I assume this is some kind of app level handshaking)

> It streams unencrypted video over TCP port 8888 (I can view video frame info
> using ffprobe on captured packets)

There was a similar hackaday project for this [2] and some of their notes are
at [3]:

1)
[https://www.reddit.com/r/HowToHack/comments/4512il/how_to_ha...](https://www.reddit.com/r/HowToHack/comments/4512il/how_to_hack_ip_camera_in_toy_drone/)

2) [https://hackaday.io/project/56102-reverse-engineering-a-
dron...](https://hackaday.io/project/56102-reverse-engineering-a-drone)

3) [https://steemit.com/drone/@highonapples/reverse-
engineering-...](https://steemit.com/drone/@highonapples/reverse-engineering-
a-drone-from-amazon-to-make-it-programmable)

(edited for formatting)

------
ada1981
This is awesome!

If anyone is interested in the software side of things, we have a fabrication
team and facility in the Pittsburgh area (proximity to CMU) right near an
airport. Early stage exploration of building personal transport drones.

Looking into a cooperative / holocracy type model. We could use some strong
engineers in our group!

------
leafario2
What hardware is required for this?

~~~
bri3d
As the README indicates, this is a networking client library to control JJRC
H61 drones over their built-in network control protocol, with the goal
apparently being to abstract over the control protocol for a variety of
drones.

------
erdleerdle
would love to talk to anyone that is big into drones and video. live streams
of builds, etc.

~~~
copterust
here is our old video of maiden flight
[https://twitter.com/copterust/status/1024724881680867328](https://twitter.com/copterust/status/1024724881680867328)

------
ingenieroariel
Does it work with the 3dr solo?

~~~
kam
No, but [https://github.com/3drobotics/rust-
mavlink](https://github.com/3drobotics/rust-mavlink) would. The enterprise
version of Solo actually ships with a Rust app running on the onboard computer
for camera control, which uses rust-mavlink to talk to the autopilot.

~~~
ingenieroariel
thanks!

