Open comments for this post
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
Open comments for this post
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!
Open comments for this post
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.