Skip to content
Design System
GitHub

Teleop pad

v0.23.1Beta

Drive a mobile robot by hand with a dead-man stick: it moves only while held and stops the moment input is let go or lost. Fixed-rate commands, dead zone, speed cap, keyboard.

API reference

Generated from the types. Every part also takes className.

TeleopPad

onCommandrequired
(command: TeleopCommand) => voidCalled at rateHz while the stick is held, the first time at the press, and once with zero at every stop.
onStop
(reason: TeleopStopReason) => voidCalled once when driving ends, after the zero command, with why.
deadZone
number = 0.1Fraction of the stick's travel that sends zero, so a resting thumb does not creep the robot. Default 0.1.
maxSpeed
number = 1Cap, 0…1: full stick sends this fraction of top speed. Below 1 the pad draws its scale and says the limit.
rateHz
number = 10Commands per second while held. Default 10. The robot should stop by itself when they stop arriving.
timeoutMs
number | false = 2000Stop when no pointer event arrives for this long, in ms. Default 2000. A held key is not timed: its release is reliable. A mouse held perfectly still sends no events, so it trips this too ("input lost": press again). false turns it off: only when the robot runs its own watchdog on the command stream (it stops when commands stop arriving), which rateHz keeps fed while the stick is held.
speed
numberThe robot's measured speed in m/s, shown while driving ("Driving · 0.4 m/s").
disabled
boolean = falseThe robot cannot be driven by hand now. Say why in disabledReason.
disabledReason
stringShown after "Disabled:", e.g. "robot in autonomous mode".
labels
Partial<TeleopPadLabels>