LARG / HFO

Half Field Offense in Robocup 2D Soccer
MIT License
228 stars 93 forks source link

Calculation of Landmark Features Maybe Wrong #73

Closed kxxwz closed 6 years ago

kxxwz commented 6 years ago

Hi @mhauskn. I think there may be a little misatke in your calculations of Landmark Features. Here is how you encode the landmark's proximity: https://github.com/LARG/HFO/blob/269c6b694e86ee5266c897f2727f2e0b7d5f10a0/src/feature_extractor.cpp#L71 And here is how you define maxHFORadius:

maxHFORadius = sqrtf(pitchHalfLength * pitchHalfLength + pitchHalfWidth * pitchHalfWidth)

https://github.com/LARG/HFO/blob/269c6b694e86ee5266c897f2727f2e0b7d5f10a0/src/feature_extractor.cpp#L32 I agree this is indeed the maximum radius in HFO playable area. However, maxHFORadius is not the maximum distance in HFO, which should be

maxHFODist = sqrtf(pitchHalfLength * pitchHalfLength + pitchWidth * pitchWidth)

Looking forward to your reply.

mhauskn commented 6 years ago

Yes, I think you are correct. Please submit a PR.