File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 66 "github.com/RoboCup-SSL/ssl-game-controller/internal/app/state"
77 "github.com/RoboCup-SSL/ssl-game-controller/pkg/timer"
88 "google.golang.org/protobuf/types/known/timestamppb"
9+ "math"
910 "strings"
1011 "time"
1112)
@@ -221,6 +222,13 @@ func (e *Engine) readyToContinueFromStop() (issues []string) {
221222 ballToPlacementPosDist , e .gameConfig .BallPlacementRequiredDistance ))
222223 }
223224 }
225+
226+ ballPos := e .trackerStateGc .Ball .Pos .ToVector2 ()
227+ if math .Abs (float64 (* ballPos .X )) > e .getGeometry ().FieldLength / 2 ||
228+ math .Abs (float64 (* ballPos .Y )) > e .getGeometry ().FieldWidth / 2 {
229+ issues = append (issues , fmt .Sprintf ("Ball is outside of field: %v" , ballPos ))
230+ }
231+
224232 if ! e .trackerStateGc .Ball .IsSteady () {
225233 issues = append (issues , "Ball position is not steady" )
226234 }
You can’t perform that action at this time.
0 commit comments