Closed thebhatman closed 5 years ago
@thebhatman wont it create any bug on first call?
It doesn't create an error because I have also changed prev_target to be of Vector2D() instead of None. But because of that prev_target will be (0,0) in the very first call. This might cause one unnecessary replan in the beginning. I can change the initialisation of prev_target.
But what if the target is in the vicinity of (0,0), then it will not replan. That can be a problem in the initialisation of velocity instance.
May be u can initialise prev_target as Vector2D(-5000,-5000) //any random point outside the field
. Just see this once.
Closing this because of this change https://github.com/KRSSG/robocup/pull/62.
Prev_target was never really vector2D and checking isinstance was creating a problem. So this patch fixes it.