robocup-software icon indicating copy to clipboard operation
robocup-software copied to clipboard

Coordinate system is from opponents perspective for gameplay testing system and teams are swapped

Open liquidmetal9015 opened this issue 5 years ago • 0 comments

Description

I'm having some issues with the coordinate system in the testing framework and I think I know why.

TLDR: The coordinate system is from the other team's perspective (their goal as 0,0) and the teams are reversed (self.our_robots positions their robots and self.their_robots positions our robots), which I think was confusing us the last time we looked at this.

For example, when you run-sim normally the example.py, which should place the ball at 1,1 with a velocity of -5,-5. The ball is placed near the opponents goal with a velocity of 5,5. Indicating that the coordinates are from the yellow team's perspective. With that in mind, the robot positions are reversed.

If you make "self.our_robots" empty and put one point in "self.their_robots", you will notice that one of our robots changes position when the test is run, confirming that the teams are swapped.

There could be some other complication that I'm not aware of but I think that is at least the main one. I'm only testing regular sim, not sim2play.

liquidmetal9015 avatar May 08 '20 16:05 liquidmetal9015