Skip to content

Commit

Permalink
Also remove robots independent from the ball during stop
Browse files Browse the repository at this point in the history
  • Loading branch information
g3force committed Jun 23, 2021
1 parent 7ce5fba commit 95c3486
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/simctl/handler_robot_count.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func (r *RobotCountHandler) handleRobotCount() {
}

if *r.c.lastRefereeMsg.Command != referee.Referee_HALT &&
*r.c.lastRefereeMsg.Command != referee.Referee_STOP &&
len(r.c.lastTrackedFrame.TrackedFrame.Balls) > 0 &&
math.Abs(float64(*r.c.lastTrackedFrame.TrackedFrame.Balls[0].Pos.X)) < 2 {
// Rule: The ball must be at least 2 meters away from the halfway line.
Expand Down

0 comments on commit 95c3486

Please sign in to comment.