feat: WebUI gamepad teleop panel (Issue #598) #603

Merged
sl-jetson merged 1 commits from sl-webui/issue-598-gamepad-teleop into main 2026-03-14 15:54:36 -04:00
Collaborator

Issue #598 — WebUI Gamepad Teleoperation Panel

Standalone ui/gamepad_panel.{html,js,css} — no build step required.

Features

Web Gamepad API

  • L-stick Y-axis → linear velocity (forward/reverse)
  • R-stick X-axis → angular velocity (turn left/right)
  • LT trigger → fine speed control (scales down to 50%)
  • B/Circle button → E-stop toggle
  • Start button → resume from E-stop
  • Live sidebar: axis bars + button state chips

Virtual Dual Joystick

  • Left stick: drive (forward/reverse)
  • Right stick: steer (angular)
  • Pointer Capture API for drag past canvas edge
  • Touch and mouse support
  • Deadzone ring drawn on canvas

Keyboard Input

  • W/S or Arrow Up/Down → linear velocity
  • A/D or Arrow Left/Right → angular velocity
  • Space → toggle E-stop

Speed Controls

  • Linear speed limiter slider (0–1.0 m/s)
  • Angular speed limiter slider (0–2.0 rad/s)
  • Deadzone slider (0–40%)

E-stop

  • Latches zero-velocity on activation
  • Blinking red overlay
  • Resume button / gamepad Start / Space key

ROS

  • Publishes geometry_msgs/Twist to /cmd_vel at 20 Hz
  • rosbridge WebSocket connection with auto-reconnect
  • localStorage WS URL persistence

Input Priority

gamepad > keyboard > virtual sticks

Responsive

  • Sidebar hidden ≤ 800px
  • Right stick hidden ≤ 560px
## Issue #598 — WebUI Gamepad Teleoperation Panel Standalone `ui/gamepad_panel.{html,js,css}` — no build step required. ## Features ### Web Gamepad API - L-stick Y-axis → linear velocity (forward/reverse) - R-stick X-axis → angular velocity (turn left/right) - LT trigger → fine speed control (scales down to 50%) - B/Circle button → E-stop toggle - Start button → resume from E-stop - Live sidebar: axis bars + button state chips ### Virtual Dual Joystick - Left stick: drive (forward/reverse) - Right stick: steer (angular) - Pointer Capture API for drag past canvas edge - Touch and mouse support - Deadzone ring drawn on canvas ### Keyboard Input - W/S or Arrow Up/Down → linear velocity - A/D or Arrow Left/Right → angular velocity - Space → toggle E-stop ### Speed Controls - Linear speed limiter slider (0–1.0 m/s) - Angular speed limiter slider (0–2.0 rad/s) - Deadzone slider (0–40%) ### E-stop - Latches zero-velocity on activation - Blinking red overlay - Resume button / gamepad Start / Space key ### ROS - Publishes `geometry_msgs/Twist` to `/cmd_vel` at 20 Hz - rosbridge WebSocket connection with auto-reconnect - localStorage WS URL persistence ## Input Priority gamepad > keyboard > virtual sticks ## Responsive - Sidebar hidden ≤ 800px - Right stick hidden ≤ 560px
sl-webui added 1 commit 2026-03-14 14:59:01 -04:00
- Standalone ui/gamepad_panel.{html,js,css} — no build step
- Web Gamepad API integration: L-stick=linear, R-stick=angular
  - LT trigger scales speed down (fine control)
  - B/Circle button toggles E-stop; Start button resumes
  - Live raw axis bars and button state in sidebar
- Virtual dual joystick (left=drive, right=steer) via Pointer Capture API
  - Deadzone ring drawn on canvas; configurable 0–40%
  - Touch and mouse support
- WASD/Arrow keyboard input (W/S=forward/reverse, A/D=turn, Space=E-stop)
- Speed limiter sliders: linear (0–1.0 m/s), angular (0–2.0 rad/s)
- Configurable deadzone slider (0–40%)
- E-stop: latches zero-velocity command, blinking overlay, resume button
- Publishes geometry_msgs/Twist to /cmd_vel at 20 Hz via rosbridge WebSocket
- Input priority: gamepad > keyboard > virtual sticks
- Live command display (m/s, rad/s) with color feedback
- Pub rate display (Hz) in sidebar
- localStorage WS URL persistence, auto-reconnect on load
- Mobile-responsive: sidebar hidden ≤800px, right stick hidden ≤560px

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sl-jetson merged commit 7e5f673f7d into main 2026-03-14 15:54:36 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#603
No description provided.