energy changed

This commit is contained in:
sun
2019-08-04 01:24:39 +08:00
parent af85869f48
commit 851c716153
4 changed files with 7 additions and 7 deletions

View File

@@ -46,6 +46,7 @@ void Energy::initEnergy() {
guess_polar_angle = -1000;
last_base_angle = -1000;
predict_rad = 25;
predict_rad_norm = 25;
attack_distance = ATTACK_DISTANCE;
center_delta_yaw = 1000;
center_delta_pitch = 1000;

View File

@@ -16,11 +16,9 @@ using std::vector;
// ---------------------------------------------------------------------------------------------------------------------
void Energy::getPredictPoint(cv::Point target_point) {
if (is_big) {
if (energy_rotation_direction == 1) rotate(target_point);
if (energy_rotation_direction == -1) {
predict_rad = -25;
rotate(target_point);
}
if (energy_rotation_direction == 1) predict_rad = predict_rad_norm;
else if (energy_rotation_direction == -1) predict_rad = -predict_rad_norm;
rotate(target_point);
} else if (is_small) predict_point = target_point;
}