energy changed
This commit is contained in:
@@ -26,13 +26,18 @@ void Energy::sendEnergy() {
|
|||||||
float pitch_I_component = BIG_PITCH_AIM_KI * sum_pitch;
|
float pitch_I_component = BIG_PITCH_AIM_KI * sum_pitch;
|
||||||
MINMAX(yaw_I_component, -3, 3);
|
MINMAX(yaw_I_component, -3, 3);
|
||||||
MINMAX(pitch_I_component, -3, 3);
|
MINMAX(pitch_I_component, -3, 3);
|
||||||
|
// MINMAX(yaw_I_component, -2, 2);
|
||||||
|
// MINMAX(pitch_I_component, -2, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
double tmp_yaw = yaw_rotation;
|
double tmp_yaw = yaw_rotation;
|
||||||
double tmp_pitch = pitch_rotation;
|
double tmp_pitch = pitch_rotation;
|
||||||
yaw_rotation = BIG_YAW_AIM_KP * yaw_rotation + BIG_YAW_AIM_KI * sum_yaw + BIG_YAW_AIM_KD * (yaw_rotation - last_yaw);
|
yaw_rotation = BIG_YAW_AIM_KP * yaw_rotation + BIG_YAW_AIM_KI * sum_yaw +
|
||||||
|
BIG_YAW_AIM_KD * (yaw_rotation - last_yaw);
|
||||||
pitch_rotation = BIG_PITCH_AIM_KP * pitch_rotation + BIG_PITCH_AIM_KI * sum_pitch +
|
pitch_rotation = BIG_PITCH_AIM_KP * pitch_rotation + BIG_PITCH_AIM_KI * sum_pitch +
|
||||||
BIG_PITCH_AIM_KD * (pitch_rotation - last_pitch);
|
BIG_PITCH_AIM_KD * (pitch_rotation - last_pitch);
|
||||||
|
// cout << BIG_YAW_AIM_KP * yaw_rotation << '\t' << BIG_YAW_AIM_KI * sum_yaw << '\t'
|
||||||
|
// << BIG_YAW_AIM_KD * (yaw_rotation - last_yaw) << endl;
|
||||||
last_yaw = tmp_yaw;
|
last_yaw = tmp_yaw;
|
||||||
last_pitch = tmp_pitch;
|
last_pitch = tmp_pitch;
|
||||||
if (ROBOT_ID == 7) {
|
if (ROBOT_ID == 7) {
|
||||||
|
|||||||
Reference in New Issue
Block a user