Commit f5748334 authored by CoolPhilChen's avatar CoolPhilChen

fix a minor bug about maximum HFO distance in `feature_extractor.cpp`

parent 19e3cd72
...@@ -29,8 +29,8 @@ FeatureExtractor::FeatureExtractor(int num_teammates, ...@@ -29,8 +29,8 @@ FeatureExtractor::FeatureExtractor(int num_teammates,
penaltyAreaWidth = SP.penaltyAreaWidth(); penaltyAreaWidth = SP.penaltyAreaWidth();
// Maximum possible radius in HFO // Maximum possible radius in HFO
maxHFORadius = sqrtf(pitchHalfLength * pitchHalfLength + maxHFODist = sqrtf(pitchHalfLength * pitchHalfLength +
pitchHalfWidth * pitchHalfWidth); pitchWidth * pitchWidth);
} }
FeatureExtractor::~FeatureExtractor() {} FeatureExtractor::~FeatureExtractor() {}
...@@ -68,7 +68,7 @@ void FeatureExtractor::addLandmarkFeatures(const rcsc::Vector2D& landmark, ...@@ -68,7 +68,7 @@ void FeatureExtractor::addLandmarkFeatures(const rcsc::Vector2D& landmark,
} else { } else {
Vector2D vec_to_landmark = landmark - self_pos; Vector2D vec_to_landmark = landmark - self_pos;
addAngFeature(vec_to_landmark.th() - self_ang); addAngFeature(vec_to_landmark.th() - self_ang);
addDistFeature(vec_to_landmark.r(), maxHFORadius); addDistFeature(vec_to_landmark.r(), maxHFODist);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment