Live data from Hacker News

UFO: A Drone/UAV Programming Library for Rust

github.com

21–30 of 41 posts

Re: UFO: A Drone/UAV Programming Library for Rust

#21
post #18
post #4

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.

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.

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

Re: UFO: A Drone/UAV Programming Library for Rust

#22
post #14

Earlier quoted context omitted.

Two of your posts came up on the front page and set off some alarms in my head

Yeah I've been researching Rust a bunch for my own projects. Mostly around doing efficient reinforcement learning and physics engines so I've been finding lots of cool repos as I research.

I want you to know, that...know this, what you're doing is totally fine :)

Re: UFO: A Drone/UAV Programming Library for Rust

#23
post #13

Earlier quoted context omitted.

Why exactly does HN always accuse Rust-related posts of astroturfing? This is completely bizarre to me.

There are two posts from the same person on the front page linking to rust repos. It’s not insane to ask.

Let me get this straight: One person displaying an interest in two projects using the same language is a red flag for astroturfing?

Is it possible that it's someone who has invested in learning a language and is looking at projects in those languages?

If someone posted two repos of projects written in JS would you feel similarly? Two projects in Perl?

Re: UFO: A Drone/UAV Programming Library for Rust

#24
post #13

Earlier quoted context omitted.

There are two posts from the same person on the front page linking to rust repos. It’s not insane to ask.

Let me get this straight: One person displaying an interest in two projects using the same language is a red flag for astroturfing? Is it possible that it's someone who has invested in learning a language and is looking at projects in those languages? If someone posted two repos of projects written in JS would you feel similarly? Two projects in Perl?

At such a close interval, yes.

Re: UFO: A Drone/UAV Programming Library for Rust

#25
post #18

Earlier quoted context omitted.

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.

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

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.

Re: UFO: A Drone/UAV Programming Library for Rust

#26
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.

Re: UFO: A Drone/UAV Programming Library for Rust

#27
post #8

Does it work with the 3dr solo?

No, but 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.

thanks!

Re: UFO: A Drone/UAV Programming Library for Rust

#28

Earlier quoted context omitted.

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

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.

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.

Re: UFO: A Drone/UAV Programming Library for Rust

#29

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.

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

2) https://hackaday.io/project/56102-reverse-engineering-a-dron...

3) https://steemit.com/drone/@highonapples/reverse-engineering-...

(edited for formatting)

Re: UFO: A Drone/UAV Programming Library for Rust

#30
post #4

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.

Yes! I'm founder of a start-up (about 10 employees now) that makes flight controllers for Drones, and all the software that runs on them is written in Rust.

We don't use STM chips though. Since the way we do state estimation and fault tolerant control requires a lot of computational power, we settled on 64-bit ARM Cortex A series processors. Since there was nothing available that fit our requirements, we produce the hardware ourselves as well.

When we started a bit more than two years ago, we started in C++, but have been slowly switching to Rust starting less than a year later. Now that everything is in Rust, our productivity went up a lot, together with the reliability of our systems (which is our main selling point).

The thing we miss most from C++ is the Eigen library, but the alternatives in Rust are pretty okay, though less complete. We are adding features and optimizations to some of these libraries, which we'll publish open source in a few months probably.

Post reply on HN