From 0eac8930cf992780eded77439efe8fcfa4013404 Mon Sep 17 00:00:00 2001 From: Shengwen Cheng Date: Sat, 1 Jun 2024 16:59:44 +0800 Subject: [PATCH] Tune quadrotor PID controller --- user/quadrotor/quadrotor.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/user/quadrotor/quadrotor.c b/user/quadrotor/quadrotor.c index c0c1be3..92168e1 100644 --- a/user/quadrotor/quadrotor.c +++ b/user/quadrotor/quadrotor.c @@ -60,23 +60,23 @@ typedef struct { } pid_control_t; static pid_control_t pid_roll = { - .kp = 0.015f, - .kd = 0.003f, + .kp = 0.008f, + .kd = 0.0035f, .output_max = +1.0f, //+100% .output_min = -1.0f, //-100% .enable = true, }; static pid_control_t pid_pitch = { - .kp = 0.015f, - .kd = 0.003f, + .kp = 0.008f, + .kd = 0.0035f, .output_max = +1.0f, .output_min = -1.0f, .enable = true, }; static pid_control_t pid_yaw_rate = { - .kp = 0, + .kp = 0.02f, .output_max = +1.0f, .output_min = -1.0f, .enable = true,