You are browsing as a guest. Sign up (or log in) to start making projects!

Rust Flight Controller

  • 3 Devlogs
  • 11 Total hours

A flight controller for the ESP32 platform, built on pure rust (complete with a simulator)

Open comments for this post

3h 54m 4s logged

First Drone Controller!

After a bit of trial and error, we have out first PID drone controller!!!
.
It works in ACRO mode, this means that joystick inputs are seen as a target angular velocity, which the controller turns into a torque and then into motor outputs.
.
The mixer scales down torque and throttle dynamically to not ever lose throttle or attitude controll.
.
On top of this, it is now easy to add auto leveling, with another PID stacked above, that turns a target rotation into a target angular velocity

0

Loading discussion…

0
1
Open comments for this post

7h 0m 27s logged

Physics Simulation and Data Analysis

I made a basic simulation with rust + rapier3d!

.

The simulation outputs drone state + flight controller code logs into a MessagePack file, taking in inputs in the form of a json file with timestamps and controls.

Struggled with size until I switched over from Json (future hint: dont ever use json on simulation data at 6kHz..)

.

To help visualize this data, i chose egui + egui_plot on rust.

Currently, the flight controller is an RNG :/, but eventually it will fly!

1

Loading discussion…

0
24
Open comments for this post

31m 40s logged

Multicore code on ESP32-S3. Working on Native Rust!

Unlike my previous esp32 projects, which relied on FreeRTOS and idf.py (The C++ IOT tooling by Espressif), this pure rust on esp-hal, so no-std

Will eventually come back to this, but until i have hardware it’s time to go back into simulating flight and getting some control going.

0

Loading discussion…

0
1

Followers

Loading…