before sim

This commit is contained in:
franchioping 2026-04-20 03:13:52 +01:00
parent 435dfd4205
commit 79f2ac5450
2 changed files with 7 additions and 6 deletions

View File

@ -2,7 +2,8 @@
#include "DShotRMT.h"
#include "Eigen/Core"
#include "Eigen/Geometry" #include "driver/rmt_tx.h"
#include "Eigen/Geometry"
#include "driver/rmt_tx.h"
#include "drone_comms.h"
#include "drone_controller.h"
@ -49,16 +50,16 @@ dcont::ControllerConfig default_config() {
// Rotation Loop (Rotation/Accel -> Angular Rate)
config.stack.rotation_pid = {
.kp = {1.0f, 1.0f, 2.0f},
.ki = {0.01f, 0.01f, 0.02f},
.kd = {0.1f, 0.1f, 0.0f},
.kp = {1.0f, 10.0f, 2.0f},
.ki = {0.01f, 1.0f, 0.02f},
.kd = {0.1f, 0.0f, 0.0f},
.integral_cap = {4.0f, 4.0f, 4.0f},
.frequency = 200.0f,
};
// Rate Loop (Angular Rate -> Torque) - The "Inner" Loop
config.stack.rate_pid = {
.kp = {0.0f, 0.0f, 1.0f},
.kp = {0.0f, 0.5f, 0.0f},
.ki = {0.00f, 0.00f, 0.0f},
.kd = {0.000f, 0.000f, 0.0f},
.integral_cap = {1.0f, 1.0f, 1.0f},

View File

@ -88,7 +88,7 @@ struct drone_cont_state {
.yaw_input = 0.0,
.pitch_input = 0.0},
.acceleration = {0.0, 0.0, 0.0},
.rotation = {0.0, 0.05 * M_PI, 0.0},
.rotation = {0.0, 0.0, M_PI},
.velocity = {0.0, 0.0, 0.0},
.position = {0.0, 0.0, 0.0},
.mode = dcont::ModeInput::Rotation});