Skip to content

feat: the hotdog command for operators, status at a glance - #10

Merged
agus-darmawan merged 4 commits into
mainfrom
feat/ops-cli
Nov 1, 2026
Merged

agus-darmawan merged 4 commits into
mainfrom
feat/ops-cli

Conversation

@agus-darmawan

Copy link
Copy Markdown
Member

What and why

Operators at a substation shouldn't type ros2 service call /inspection/add_target hotdog_interfaces/srv/AddTarget "{...}". One command per task:

  • hotdog (scripts/hotdog.sh, alias by scripts/setup.sh install cli, now a default component):
    status, patrol [route], return, stop, pause/resume, estop/release, routes, site [name], anchor, teach start | point [dwell] | target <name> [thermal] [acoustic] [strips=N] [max=C] | stop, dock, stand/sit, ambient <degC>, schedule on|off|show, reports, alert-test, logs, restart.
    • Every call gives up after CALL_TIMEOUT (30 s) instead of hanging on a stack that isn't running; numbers are passed as floats (Foxy refuses 8 for a float field); strips=/max= imply a thermal target; bad numbers fail before any call.
  • ros2 run hotdog status: the robot at a glance in one screen — patrol (state, route, minutes, points, findings, next scheduled), health, localization drift, control (mode, e-stop, field), battery, inspection (pod / acoustic, ambient, last point), navigation, alerts waiting, report URL, disk free; colored on a terminal. Formatting in hotdog/status.py (pure, tested).
  • scripts/env.sh: a shell with the service's environment (+ hnode to run one node like the launch).
  • Service: ROS logs older than LOG_DAYS (7) deleted at each start (ExecStartPre), so ~/.ros/log never fills the disk.
  • Docs: operations and README are now CLI-first; CHANGELOG.

How it was tested

  • pre-commit run on every changed and new file (shellcheck incl.)
  • scripts/test (runs in CI's scripts job, Python 3.8): every command against a stand-in ros2 — the exact calls, float literals, implied thermal, bad numbers refused, unknown command
  • hotdog unit + style: 34 (status lines, nothing received, names, colors)
  • scripts/setup.sh install cli twice in a throw-away HOME: alias added once
  • On the robot: hotdog status with the stack running

Checklist

  • Conventional commit titles
  • Documented (operations, README, script header)
  • CHANGELOG entry
  • Safety-relevant: the commands only call the existing services (control mux, e-stop and protective field stay in charge)

Generated by Claude Code

@agus-darmawan
agus-darmawan merged commit 75202bc into main Nov 1, 2026
2 of 3 checks passed
agus-darmawan added a commit that referenced this pull request Nov 1, 2026
feat: the hotdog command for operators, status at a glance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant