AIOpMode

abstract class AIOpMode<R : Robot>(serverPort: Int = 8081) : VoltOpMode<R>

A VoltOpMode for controlling a robot with a Large Language Model.

Provides a WebSocket server interface for AI clients to execute robot actions remotely. Actions are queued and executed sequentially, with state updates broadcast to connected clients.

Parameters

R

the robot type

serverPort

the port for the AIServer (default: 8081)

Constructors

Link copied to clipboard
constructor(serverPort: Int = 8081)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Properties

Link copied to clipboard

used to share information across opmodes

Link copied to clipboard
val gamepad1: Gamepad

used to get information from gamepad one

Link copied to clipboard
val gamepad2: Gamepad

used to get information from gamepad two

Link copied to clipboard
val hardwareMap: HardwareMap

used to get hardware instances

Link copied to clipboard
val telemetry: Telemetry

used to log information to the driver station

Functions

Link copied to clipboard
open override fun begin()

Code to run when the op mode begins.

Link copied to clipboard
open fun end()

Optional code to run when the op mode ends.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun tick()

Main tick function called each loop iteration.