KRSSG / robocup

Main Code Base for SSL
20 stars 27 forks source link

Make Prev_target Vector2d #54

Closed thebhatman closed 5 years ago

thebhatman commented 5 years ago

Prev_target was never really vector2D and checking isinstance was creating a problem. So this patch fixes it.

saurabhkgp21 commented 5 years ago

@thebhatman wont it create any bug on first call?

thebhatman commented 5 years ago

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.

saurabhkgp21 commented 5 years ago

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.

thebhatman commented 5 years ago

Closing this because of this change https://github.com/KRSSG/robocup/pull/62.