feat: VESC motor dashboard panel (Issue #653) #662

Merged
sl-jetson merged 1 commits from sl-webui/issue-653-vesc-panel into main 2026-03-18 07:56:44 -04:00
Collaborator

Summary

  • New standalone panel ui/vesc_panel.{html,js,css} for live VESC motor telemetry via rosbridge
  • Subscribes to /vesc/left/state, /vesc/right/state, /vesc/combined (all std_msgs/String JSON from saltybot_vesc_telemetry node)
  • E-stop button publishes zero /cmd_vel + /saltybot/emergency JSON event

Features

  • Canvas arc RPM gauge per motor with direction indicator (FWD/REV/STOP)
  • Current draw bars (motor + input), duty cycle bar, FET + motor temperature boxes
  • Colour-coded health: green → amber → red at configurable thresholds
  • Sparkline charts for RPM and current (last 60 s, 120 samples at 2 Hz)
  • Battery card: pack voltage with SOC bar, total draw bar, both RPMs
  • Stale detection (2 s timeout marks motor OFFLINE)
  • Mobile-responsive single-column layout below 640 px
  • WS URL persisted in localStorage

Test plan

  • Open ui/vesc_panel.html in browser, connect to rosbridge
  • Verify left/right motor cards populate RPM, current, duty, temp from /vesc/left/state and /vesc/right/state
  • Verify battery card populates from /vesc/combined
  • Verify arc gauge colour changes green→amber→red as RPM/current thresholds crossed
  • Verify sparklines accumulate 60 s of history and scroll left
  • Press E-stop: confirm zero twist on /cmd_vel and event on /saltybot/emergency
  • Disconnect rosbridge: verify OFFLINE badge and stale state after 2 s
  • Resize to mobile width: single-column layout renders correctly

🤖 Generated with Claude Code

## Summary - New standalone panel `ui/vesc_panel.{html,js,css}` for live VESC motor telemetry via rosbridge - Subscribes to `/vesc/left/state`, `/vesc/right/state`, `/vesc/combined` (all `std_msgs/String` JSON from `saltybot_vesc_telemetry` node) - E-stop button publishes zero `/cmd_vel` + `/saltybot/emergency` JSON event ## Features - Canvas arc RPM gauge per motor with direction indicator (FWD/REV/STOP) - Current draw bars (motor + input), duty cycle bar, FET + motor temperature boxes - Colour-coded health: green → amber → red at configurable thresholds - Sparkline charts for RPM and current (last 60 s, 120 samples at 2 Hz) - Battery card: pack voltage with SOC bar, total draw bar, both RPMs - Stale detection (2 s timeout marks motor OFFLINE) - Mobile-responsive single-column layout below 640 px - WS URL persisted in localStorage ## Test plan - [ ] Open `ui/vesc_panel.html` in browser, connect to rosbridge - [ ] Verify left/right motor cards populate RPM, current, duty, temp from `/vesc/left/state` and `/vesc/right/state` - [ ] Verify battery card populates from `/vesc/combined` - [ ] Verify arc gauge colour changes green→amber→red as RPM/current thresholds crossed - [ ] Verify sparklines accumulate 60 s of history and scroll left - [ ] Press E-stop: confirm zero twist on `/cmd_vel` and event on `/saltybot/emergency` - [ ] Disconnect rosbridge: verify OFFLINE badge and stale state after 2 s - [ ] Resize to mobile width: single-column layout renders correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sl-webui added 1 commit 2026-03-17 11:36:03 -04:00
Standalone panel ui/vesc_panel.{html,js,css} with live CAN telemetry
via rosbridge. Subscribes to /vesc/left/state, /vesc/right/state
(std_msgs/String JSON) and /vesc/combined for battery voltage.

Features:
- Canvas arc gauge per motor showing RPM + direction (FWD/REV/STOP)
- Current draw bar (motor + input), duty cycle bar, temperature bars
- FET and motor temperature boxes with warn/crit colour coding
- Sparkline charts for RPM and current (last 60 s, 120 samples)
- Battery card: voltage, total draw, both RPMs, SOC progress bar
- Colour-coded health: green/amber/red at configurable thresholds
- E-stop button: publishes zero /cmd_vel + /saltybot/emergency event
- Stale detection (2 s timeout → OFFLINE state)
- Hz counter + last-stamp display in header
- Mobile-responsive layout (single-column below 640 px)
- WS URL persisted in localStorage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sl-jetson merged commit cfdd74a9dc into main 2026-03-18 07:56:44 -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#662
No description provided.