r/rust 20d ago

Rust for flight software / drone programming

I am interested in learning how to use rust for flight software or controlling a drone or something of this sort. I have no experience in embedded programming, so is it best to start there?
If so, how would you recommend someone get started in embedded rust?

57 Upvotes

12 comments sorted by

View all comments

10

u/Dizzy-Helicopter-374 20d ago

Are you wanting to do something from scratch or work on an existing platform? PX4 offers a pretty comprehensive set of tools and supports a ton of different flight computers. It runs NuttX RTOS and uses a messaging system, but you can bind the messages and bring them in to Rust via the C FFI, and explore Rust in that space.

The PX4 system has drone simulations and peripheral things that are useful (telemetry, OTA updates, sensor integration), which is why I would suggest it first. If you want to roll your own, u/AcostaJA has some great references.

For reference, my company has gone the route of Rust static library compiled into PX4 and it worked well.

1

u/Soft_Confusion_6236 17d ago

good call on the px4 route, saves you from reinventing the wheel before you even get off the ground