Represents a robot. Includes information about the current location as well as tooling for communication.

Hierarchy

Constructors

Properties

homeIndices: GridIndices

The location the robot lives in when its not in use.

id: string
startHeadingRadians: number = 0

Accessors

  • get headingRadians(): number
  • Returns number

  • set headingRadians(headingRadians: number): void
  • Parameters

    • headingRadians: number

    Returns void

Methods

  • Parameters

    • headingRadians: number

      An absolute heading to turn to, in radians. 0 is up (from white to black). CW is positive.

    Returns Promise<void>

  • Parameters

    • deltaHeadingRadians: number

      A relative heading to turn by, in radians.

    Returns Promise<void>

  • Send a packet to the robot indicating distance to drive. Returns a promise that finishes when the robot finishes the action.

    Parameters

    • tileDistance: number

      The distance to drive forward or backwards by. 1 is defined as the length of a tile.

    Returns Promise<void>

  • Send a packet to the robot indicating angle to turn. Returns a promise that finishes when the robot finishes the action.

    Parameters

    • deltaHeadingRadians: number

      A relative heading to turn by, in radians. May be positive or negative.

    Returns Promise<void>

Generated using TypeDoc