|
26 | 26 | #include "HEAR_ROS_BRIDGE/ROSUnit_ControlOutputSubscriber.hpp" |
27 | 27 |
|
28 | 28 |
|
29 | | -const float TAKE_OFF_HEIGHT = 1.25; |
| 29 | +const float TAKE_OFF_HEIGHT = 1.0; |
30 | 30 | const float LAND_HEIGHT = -0.01; |
31 | 31 |
|
32 | 32 | //#define STORE_KF_BIAS |
33 | 33 | //#define TRAJ_TEST |
34 | | -#define SLAM_TEST |
| 34 | +//#define SLAM_TEST |
35 | 35 | //#define AUTO_TEST |
36 | 36 | #define TESTING |
37 | 37 | //#define BIG_HEXA |
@@ -219,45 +219,45 @@ int main(int argc, char** argv) { |
219 | 219 |
|
220 | 220 | //*************Setting Flight Elements************* |
221 | 221 | #ifdef SMALL_HEXA |
222 | | - ((UpdateController*)update_controller_pid_x)->pid_data.kp = 14.33366959*0.9; //0.583430204; //0.8786*0.5; //0.51639 * 0.8; |
| 222 | + ((UpdateController*)update_controller_pid_x)->pid_data.kp = 12.67*0.5; //14.53157937; //0.583430204; //0.8786*0.5; //0.51639 * 0.8; |
223 | 223 | ((UpdateController*)update_controller_pid_x)->pid_data.ki = 0.0; |
224 | | - ((UpdateController*)update_controller_pid_x)->pid_data.kd = 5.208322871*0.9; //0.211996855; //0.3441*0.5; //0.21192 * 0.8; |
| 224 | + ((UpdateController*)update_controller_pid_x)->pid_data.kd = 5.69*0.5; //4.783743612; //0.211996855; //0.3441*0.5; //0.21192 * 0.8; |
225 | 225 | ((UpdateController*)update_controller_pid_x)->pid_data.kdd = 0.0; |
226 | 226 | ((UpdateController*)update_controller_pid_x)->pid_data.anti_windup = 0; |
227 | 227 | ((UpdateController*)update_controller_pid_x)->pid_data.en_pv_derivation = 1; |
228 | 228 | ((UpdateController*)update_controller_pid_x)->pid_data.dt = (float)1.0/120.0; |
229 | 229 | ((UpdateController*)update_controller_pid_x)->pid_data.id = block_id::PID_X; |
230 | 230 |
|
231 | | - ((UpdateController*)update_controller_pid_y)->pid_data.kp = 15.00427998*0.9; //0.592289033;// 0.6673*0.75;// 0.6714;// 0.51639 * 0.8; |
| 231 | + ((UpdateController*)update_controller_pid_y)->pid_data.kp = 12.3*0.5; // 14.96570691; //0.592289033;// 0.6673*0.75;// 0.6714;// 0.51639 * 0.8; |
232 | 232 | ((UpdateController*)update_controller_pid_y)->pid_data.ki = 0.0; |
233 | | - ((UpdateController*)update_controller_pid_y)->pid_data.kd = 5.451997767*0.9; //0.215215824;// 0.2583*0.75; //-0.2440;// * 0.8; |
| 233 | + ((UpdateController*)update_controller_pid_y)->pid_data.kd = 5.52*0.5; //4.926656836; //0.215215824;// 0.2583*0.75; //-0.2440;// * 0.8; |
234 | 234 | ((UpdateController*)update_controller_pid_y)->pid_data.kdd = 0.0; |
235 | 235 | ((UpdateController*)update_controller_pid_y)->pid_data.anti_windup = 0; |
236 | 236 | ((UpdateController*)update_controller_pid_y)->pid_data.en_pv_derivation = 1; |
237 | 237 | ((UpdateController*)update_controller_pid_y)->pid_data.dt = (float)1.0/120.0; |
238 | 238 | ((UpdateController*)update_controller_pid_y)->pid_data.id = block_id::PID_Y; |
239 | 239 |
|
240 | | - ((UpdateController*)update_controller_pid_z)->pid_data.kp = 27.62993448; //0.613969957; // 1.2414*0.75; |
| 240 | + ((UpdateController*)update_controller_pid_z)->pid_data.kp = 24.809892; //32.00005633*0.8; //0.613969957; // 1.2414*0.75; |
241 | 241 | ((UpdateController*)update_controller_pid_z)->pid_data.ki = 0.0; |
242 | | - ((UpdateController*)update_controller_pid_z)->pid_data.kd = 8.13692084; //0.214920534; // 0.3316*0.75; |
| 242 | + ((UpdateController*)update_controller_pid_z)->pid_data.kd = 7.4476; //8.328107017*0.8; //0.214920534; // 0.3316*0.75; |
243 | 243 | ((UpdateController*)update_controller_pid_z)->pid_data.kdd = 0.0; |
244 | 244 | ((UpdateController*)update_controller_pid_z)->pid_data.anti_windup = 0; |
245 | 245 | ((UpdateController*)update_controller_pid_z)->pid_data.en_pv_derivation = 1; |
246 | 246 | ((UpdateController*)update_controller_pid_z)->pid_data.dt = (float)1.0/120.0; |
247 | 247 | ((UpdateController*)update_controller_pid_z)->pid_data.id = block_id::PID_Z; |
248 | 248 |
|
249 | | - ((UpdateController*)update_controller_pid_roll)->pid_data.kp = 0.423827421; //0.225*0.8; //0.172195; //0.3302; //0.286708; //0.225 * 0.8; |
| 249 | + ((UpdateController*)update_controller_pid_roll)->pid_data.kp = 0.3336; // 0.423827421; //0.225*0.8; //0.172195; //0.3302; //0.286708; //0.225 * 0.8; |
250 | 250 | ((UpdateController*)update_controller_pid_roll)->pid_data.ki = 0.0; |
251 | | - ((UpdateController*)update_controller_pid_roll)->pid_data.kd = 0.063652685; //0.04*0.8; //0.042464; //0.0931; //0.056559; //0.04 * 0.8; |
| 251 | + ((UpdateController*)update_controller_pid_roll)->pid_data.kd = 0.0538; //0.063652685; //0.04*0.8; //0.042464; //0.0931; //0.056559; //0.04 * 0.8; |
252 | 252 | ((UpdateController*)update_controller_pid_roll)->pid_data.kdd = 0.0; |
253 | 253 | ((UpdateController*)update_controller_pid_roll)->pid_data.anti_windup = 0; |
254 | 254 | ((UpdateController*)update_controller_pid_roll)->pid_data.en_pv_derivation = 1; |
255 | 255 | ((UpdateController*)update_controller_pid_roll)->pid_data.dt = 1.f/200.f; |
256 | 256 | ((UpdateController*)update_controller_pid_roll)->pid_data.id = block_id::PID_ROLL; |
257 | 257 |
|
258 | | - ((UpdateController*)update_controller_pid_pitch)->pid_data.kp = 0.434061228; //0.225*0.8;// 0.3360; //0.2811;//0.275252; //0.225 * 0.8; |
| 258 | + ((UpdateController*)update_controller_pid_pitch)->pid_data.kp = 0.3561; // 0.434061228; //0.225*0.8;// 0.3360; //0.2811;//0.275252; //0.225 * 0.8; |
259 | 259 | ((UpdateController*)update_controller_pid_pitch)->pid_data.ki = 0.0; |
260 | | - ((UpdateController*)update_controller_pid_pitch)->pid_data.kd = 0.065189653; //0.04*0.8;//0.0684; //0.053100; //0.0868;// 0.051266; //0.04 * 0.8; |
| 260 | + ((UpdateController*)update_controller_pid_pitch)->pid_data.kd = 0.0574; // 0.065189653; //0.04*0.8;//0.0684; //0.053100; //0.0868;// 0.051266; //0.04 * 0.8; |
261 | 261 | ((UpdateController*)update_controller_pid_pitch)->pid_data.kdd = 0.0; |
262 | 262 | ((UpdateController*)update_controller_pid_pitch)->pid_data.anti_windup = 0; |
263 | 263 | ((UpdateController*)update_controller_pid_pitch)->pid_data.en_pv_derivation = 1; |
|
0 commit comments