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.
Teleop pad default
Install
npx shadcn add @syncrobotic/teleop-pad Also installs: lucide-react, @syncrobotic/cn, @syncrobotic/feedback
Overview
A dead-man stick for driving a mobile robot by hand: it moves only while held, and stops the moment input is let go or lost.
When to use
- Driving a robot remotely from a phone or a control-room console: out of a corner, onto a dock, past an obstacle.
- Short manual moves during commissioning or maintenance.
Use something else
- Stopping a robot in an emergency: Emergency stop, beside the pad.
- Sending a robot somewhere: a mission or a goal on the map, not manual driving.
- Setting one speed or value: Slider or Number field.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
Teleop pad driving
Teleop pad speed limit
Teleop pad disabled
Teleop pad console
Usage rules
- Dead man: the robot moves only while the stick is held. Release, a cancelled pointer, lost focus, a hidden page or
timeoutMswithout pointer events send a zero command at once and call onStop with the reason. - Commands go out at a fixed rate (
rateHz, 10 by default) while held, so the robot can run its own watchdog: if commands stop arriving for a few periods, the robot must stop by itself. The pad cannot stop a robot whose link or tab has frozen. - Pressing never moves the robot: the stick starts where the finger lands, and only movement from there drives. A dead zone (10 % by default) keeps a resting thumb from creeping it.
- Not an emergency stop. Put StopButton beside it, above it on a phone, on every drive screen; the pad has no red.
maxSpeedcaps what full stick sends, and the pad draws its scale; the app still enforces the robot's own limits.- Disabled says why (
disabledReason), in words beside a lock, and keeps its size so nothing jumps when autonomy hands back. - Outputs follow ROS REP 103: linear forward is +, angular left (counter-clockwise) is +, both −1…1 of top speed.
Changelog
- 0.23.12026-11-21The latest stop is swapped in after each commit instead of during render, and the pointer-end handlers are no longer built in render, so it is safe under the React Compiler. No visible change.
- 0.23.02026-11-20First release: a dead-man stick (pointer: touch, mouse, pen) sending { linear, angular } at rateHz while held, zero and onStop with the reason on release, pointer cancel, blur, hidden page or timeoutMs; dead zone, maxSpeed shown as a scale, keyboard drive with arrows or W A S D and Space to stop, status with icon and words, glove density, reduced motion, haptic ticks.
timeoutMs={false}turns the pointer timeout off, for robots that run their own watchdog.