soccer_strategy.robot_observed.RobotObserved

class soccer_strategy.robot_observed.RobotObserved(robot_id=0, team=Team.UNKNOWN, role=Role.UNASSIGNED, status=Status.DISCONNECTED)[source]

Bases: Robot

__init__(robot_id=0, team=Team.UNKNOWN, role=Role.UNASSIGNED, status=Status.DISCONNECTED)[source]

Initializes the robot structure

Parameters:
  • robot_id – Integer representing the robot’s id

  • team – Which team the robot is on

  • role – Which role on the field

  • status – What is the current status of the robot

  • position – X, Y position of the robot where Y is the short length of the field and X is the long length

Methods

__init__([robot_id, team, role, status])

Initializes the robot structure

robot_state_callback(r)

Callback function updates the information about other observed robots based on the robot :param r: Information about other robots

class Role(value)

Bases: IntEnum

An enumeration.

class Status(value)

Bases: IntEnum

An enumeration.

class Team(value)

Bases: IntEnum

An enumeration.

class TeamColor(value)

Bases: IntEnum

An enumeration.

robot_state_callback(r: RobotState)[source]

Callback function updates the information about other observed robots based on the robot :param r: Information about other robots