before sim
This commit is contained in:
parent
435dfd4205
commit
79f2ac5450
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
#include "DShotRMT.h"
|
#include "DShotRMT.h"
|
||||||
#include "Eigen/Core"
|
#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_comms.h"
|
||||||
#include "drone_controller.h"
|
#include "drone_controller.h"
|
||||||
|
|
||||||
|
|
@ -49,16 +50,16 @@ dcont::ControllerConfig default_config() {
|
||||||
|
|
||||||
// Rotation Loop (Rotation/Accel -> Angular Rate)
|
// Rotation Loop (Rotation/Accel -> Angular Rate)
|
||||||
config.stack.rotation_pid = {
|
config.stack.rotation_pid = {
|
||||||
.kp = {1.0f, 1.0f, 2.0f},
|
.kp = {1.0f, 10.0f, 2.0f},
|
||||||
.ki = {0.01f, 0.01f, 0.02f},
|
.ki = {0.01f, 1.0f, 0.02f},
|
||||||
.kd = {0.1f, 0.1f, 0.0f},
|
.kd = {0.1f, 0.0f, 0.0f},
|
||||||
.integral_cap = {4.0f, 4.0f, 4.0f},
|
.integral_cap = {4.0f, 4.0f, 4.0f},
|
||||||
.frequency = 200.0f,
|
.frequency = 200.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Rate Loop (Angular Rate -> Torque) - The "Inner" Loop
|
// Rate Loop (Angular Rate -> Torque) - The "Inner" Loop
|
||||||
config.stack.rate_pid = {
|
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},
|
.ki = {0.00f, 0.00f, 0.0f},
|
||||||
.kd = {0.000f, 0.000f, 0.0f},
|
.kd = {0.000f, 0.000f, 0.0f},
|
||||||
.integral_cap = {1.0f, 1.0f, 1.0f},
|
.integral_cap = {1.0f, 1.0f, 1.0f},
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ struct drone_cont_state {
|
||||||
.yaw_input = 0.0,
|
.yaw_input = 0.0,
|
||||||
.pitch_input = 0.0},
|
.pitch_input = 0.0},
|
||||||
.acceleration = {0.0, 0.0, 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},
|
.velocity = {0.0, 0.0, 0.0},
|
||||||
.position = {0.0, 0.0, 0.0},
|
.position = {0.0, 0.0, 0.0},
|
||||||
.mode = dcont::ModeInput::Rotation});
|
.mode = dcont::ModeInput::Rotation});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue