Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 60 additions & 44 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,68 @@ All notable changes to HotDog. Format: [Keep a Changelog](https://keepachangelog

## [Unreleased]

First complete version of HotDog: substation patrol and inspection on the Deep Robotics Lynx M20,
ROS 2 Foxy on Ubuntu 20.04, built on Dharma. CI builds the whole workspace on Foxy and runs
every test.

### Added

- `hotdog` from the Dharma template, on ROS 2 Foxy only.
- The Lynx M20 as the robot: `m20_bringup` started by `robot.launch.py`, its own odometry as
the odometry (`camera_init -> body`), no mapping, the odometry start as the map origin.
**Robot and stack**

- The bringup `hotdog` from the Dharma template: `robot.launch.py` starts `m20_bringup`, both
Airy, the UniPod MT11, the Dharma stack and the HotDog nodes, each switchable (`pod`,
`inspection`, `patrol`, `reports`, `alerts`); `sim.launch.py` runs the stack on dharma_sim.
- Odometry only: the M20's own odometry (`camera_init -> body`), no mapping, the dock as the map
origin, re-anchored before every patrol; `sites_dir` defaults to `~/.hotdog/sites`.
- `hotdog_base`: both RoboSense Airy through `rslidar_sdk`, merged, self-filtered and leveled
into `/lidar/points` for perception (360° sectors) and health.
into `/lidar/points` for the 360° sectors, the protective field and health.
- Layered configuration: the robot profile (`ROBOT_PARAMS`), `config/stack.yaml`, this robot's
and site's `/etc/hotdog/site.yaml` (`PARAMS_FILE`), the env file.

**Inspection**

- `hotdog_inspection` and `hotdog_interfaces`: inspection at every stop point (the follower's
hook), points matched by position from `<site>/inspection.yaml`, overheat analysis with the
UniPod MT11 (absolute, over ambient, between similar components), reports with thermal and
visible images, `inspection/add_target` to teach targets from the pod's view.
- The bringup starts `unipod_driver` (`pod`, `pod_ip`) and `inspection_node` (`inspection`);
`sites_dir` defaults to `~/.hotdog/sites` for every node.
- Partial discharge at acoustic targets with the Hertzinno HZ-FA-371 over its HTTP API (its
driver is ROS 1): one detection measured after the robot stopped, corona / surface /
floating judged by configurable severities and intensity, sound map and PRPD photos kept.
- `hotdog_patrol`: `patrol/start` from the dock (checks, `localization/assume_origin`, stand-up,
AUTO, route, follower), the patrol followed to the end of its route, a summary of the
inspections on the way, back to the dock with `charge_start`, patrols at fixed local times.
- Patrol watchdog: back to the dock below `abort.min_battery`, after `abort.max_duration_min`
or blocked for `abort.hold_timeout_sec`; stopped when off the route, lost or the follower is
hook), points matched by position from `<site>/inspection.yaml`, targets taught from the pod's
view (`inspection/add_target`).
- Overheat analysis with the UniPod MT11: absolute, over ambient and between similar components
(NETA MTS defaults), thermal and visible evidence.
- Partial discharge with the Hertzinno HZ-FA-371 over its HTTP API: one detection after the
robot stopped, corona / surface / floating by configurable severities and intensity, sound map
and PRPD kept.

**Patrols**

- `hotdog_patrol`: `patrol/start` from the dock on demand or at fixed local times (checks,
`localization/assume_origin`, stand-up, AUTO, route, follower), a summary with the report of
every inspection point, back to the dock with `charge_start`; without a route, the route
patrolled last on the site.
- The watchdog: back to the dock below `abort.min_battery`, after `abort.max_duration_min` or
blocked for `abort.hold_timeout_sec`; stopped when off the route, lost or the follower is
silent; an operator pause, the e-stop or REMOTE is never overruled.
- The way back to the dock: the taught route reversed from the earliest waypoint near the robot,
without stop points, to `abort.dock_clearance_m` before the dock, then `charge_start`;
`patrol/return` on request, `PatrolStatus.RETURNING`, `returned` and `battery`.
- A patrol started without a route runs the route patrolled last on the site.
- The patrol summary lists the report directories of its inspection points.
- `hotdog_reports`: a page per patrol with every point, finding, the change since the last
round of the same finding and the evidence images; day and front pages; retention by age
and free space; the reports served read-only on port 8088 (`reports`, `REPORTS`).
- `hotdog_alerts`: warning and critical findings with their thermal image or sound map, failed,
stopped, returned and finished patrols with the report link, health ERROR, to Telegram and a
JSON webhook; spooled on disk and retried while the uplink is down; English or Bahasa
Indonesia; `alerts/test` (`alerts`, `ALERTS`, `TELEGRAM_BOT_TOKEN`, `HOTDOG_WEBHOOK_TOKEN`).
- The `hotdog` command for operators (`scripts/hotdog.sh`, `scripts/setup.sh install cli`):
status, patrol, return, stop, pause, resume, estop, release, teach, routes, site, anchor,
dock, stand, sit, ambient, schedule, reports, alert-test, logs, restart; `ros2 run hotdog
status` prints the robot at a glance; `scripts/env.sh` gives a shell the service's
environment.
- The service deletes ROS logs older than `LOG_DAYS` (7) at each start.
- Guides as A5 PDFs built from Markdown (the Pashupati pipeline): the User Manual for operators,
the Technician Guide with the parameter reference, the Site Acceptance Test; the logo and
diagrams; CI builds them and warns when a committed PDF is older than its sources.
- `hotdog aim <yaw> <pitch> [zoom]` points the pod while teaching targets; `ROBOT_PARAMS` in
the env file for a robot's own profile.
- `PARAMS_FILE` in `/etc/hotdog/hotdog.env`: this robot's and site's parameters
(`/etc/hotdog/site.yaml`) on top of `config/stack.yaml`, so a schedule survives a restart.
- Guides: [commissioning](docs/commissioning.md) of a new M20 or substation and
[operations](docs/operations.md) for every shift.
- The way back: the taught route reversed from the nearest waypoint of its first pass, without
stop points, to `abort.dock_clearance_m` before the dock; `patrol/return` on request,
`PatrolStatus.RETURNING`, `returned` and `battery`.

**Results**

- `hotdog_reports`: a page per patrol with every finding against the last round and the
evidence, day and front pages, retention by age and free space, served read-only on port 8088.
- `hotdog_alerts`: warning and critical findings with their image, failed, stopped, returned and
finished patrols, health ERROR, to Telegram (English or Bahasa Indonesia) and a JSON webhook,
spooled on disk while the uplink is down; `alerts/test` (`TELEGRAM_BOT_TOKEN`,
`HOTDOG_WEBHOOK_TOKEN`).

**Operation**

- The `hotdog` command for operators (`scripts/hotdog.sh`): status, patrol, return, stop, pause,
resume, estop, release, teach, aim, routes, site, anchor, dock, stand, sit, ambient, schedule,
reports, alert-test, logs, restart; `ros2 run hotdog status` for the robot at a glance.
- `scripts/setup.sh` (tools, repos, rosdep, build, cli, service, timesync), a systemd service
that restarts HotDog and prunes old ROS logs, `scripts/env.sh`, tmux layouts for the robot and
the simulator, the Foxy dev container.

**Documentation**

- The User Manual, the Technician Guide with the parameter reference, and the Site Acceptance
Test as A5 PDFs built from Markdown (CI warns when one is stale); commissioning and operations
guides; a README in every package.
16 changes: 10 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ tests; check that `colcon test-result` reports your tests, not 0.
## Commits, branches and pull requests

- [Conventional Commits](https://www.conventionalcommits.org), one short line:
`fix(mux): rotation inside the field`, `refactor(follower): split the state machine`,
`feat(bringup)!: ...` for a breaking change.
`fix(patrol): the way back starts at the nearest point`, `feat(reports): retention`,
`feat(bringup)!: ...` for a breaking change. Scopes are the packages without `hotdog_`
(`bringup` for `hotdog`) and `scripts`, `docs`, `ci`, `docker`.
- Branches `fix/<topic>`, `feat/<topic>`, `refactor/<topic>`, `docs/<topic>`, `ci/<topic>`; one
topic per pull request into `main`, merged with a merge commit (no squash). CI must be green
on Foxy.
- A change across several repositories uses the **same branch name** in each: CI builds the
dependencies from that branch when it exists, so the pieces are tested together.
- A change that needs a Dharma change uses the **same branch name** in both repositories: CI
builds the `dharma_*` repositories from that branch when it exists, so they are tested
together; afterwards pin the merged Dharma commit in `dharma.repos`.
- Commits are authored by you, unsigned or signed with your own key.
- Safety-relevant changes (speeds, limits, e-stop, avoidance, the control mux, the robot
profile) need a test that drives the logic, a note on how it was tried on the robot (slow,
open area, someone at the e-stop) and a CHANGELOG entry.
Expand All @@ -54,5 +57,6 @@ tests; check that `colcon test-result` reports your tests, not 0.

Every repository follows [SemVer](https://semver.org) with a [Keep a
Changelog](https://keepachangelog.com) `CHANGELOG.md`. A release bumps `package.xml` (and
`setup.py`), moves `[Unreleased]` to `## [x.y.z] - date` and is tagged `vx.y.z` on `main`. The
stack moves together: products pin the released tags in their `dharma.repos`.
`setup.py`) of every package, moves `[Unreleased]` to `## [x.y.z] - date`, rebuilds the PDF
guides and is tagged `vx.y.z` on `main`. HotDog pins the Dharma commits it was tested with in
`dharma.repos` and the robot packages in `external.repos`.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ taught and repeated from the dock. The robot, its LiDARs and their drivers come
| [`hotdog`](src/hotdog) | the robot: profile, M20 driver settings, stack config, `robot.launch.py`, `sim.launch.py` |
| [`hotdog_base`](src/hotdog_base) | both RoboSense Airy as one leveled cloud in `base_link`, the shared launch helpers |
| [`hotdog_inspection`](src/hotdog_inspection) | inspection at the stop points: overheat (UniPod MT11), partial discharge (HZ-FA-371), reports, teaching |
| [`hotdog_patrol`](src/hotdog_patrol) | patrols from the dock, on demand or on a schedule, patrol summaries, back to the dock |
| [`hotdog_patrol`](src/hotdog_patrol) | patrols from the dock, on demand or on a schedule, the watchdog, the way back to the dock, patrol summaries |
| [`hotdog_reports`](src/hotdog_reports) | HTML patrol reports with the last round of every finding, retention, the report server on port 8088 |
| [`hotdog_alerts`](src/hotdog_alerts) | findings, patrols and health ERROR to Telegram (English or Bahasa Indonesia) and a webhook, spooled offline |
| [`hotdog_interfaces`](src/hotdog_interfaces) | findings, inspection reports and status, `AddTarget` |
Expand All @@ -69,8 +69,9 @@ taught and repeated from the dock. The robot, its LiDARs and their drivers come

```
┌────────────────────────────────────────────────────────────────────┐
HotDog │ patrol_node: dock -> route -> dock, schedule, patrol summaries │
HotDog │ patrol_node: dock -> route -> dock, schedule, watchdog, way back │
│ inspection_node: overheat (UniPod MT11), partial discharge (HZ-FA) │
│ report_node: pages on :8088 · alert_node: Telegram, webhook │
├────────────────────────────────────────────────────────────────────┤
Dharma │ path follower (stop points -> inspection hook) · avoidance │
│ sites and taught routes · localization (dock = map origin) │
Expand Down Expand Up @@ -109,16 +110,17 @@ the `dharma_*` repositories:

```bash
git clone git@github.com:DarmawanRobotics/HotDog.git ~/dev/HotDog && cd ~/dev/HotDog
scripts/setup.sh install # tools, repos, rosdep, build
scripts/setup.sh install service # /etc/hotdog/hotdog.env + systemd unit at boot
sudoedit /etc/hotdog/hotdog.env # ROBOT_IP, SITE, DRIVER_PARAMS, POD_IP, HERTZINO_PASSWORD
scripts/setup.sh install # tools, repos, rosdep, build, the hotdog command
scripts/setup.sh install service timesync # /etc/hotdog/hotdog.env, systemd unit, chrony
sudoedit /etc/hotdog/hotdog.env # ROBOT_IP, SITE, PARAMS_FILE, POD_IP, HERTZINO_PASSWORD,
# TELEGRAM_BOT_TOKEN
sudo systemctl start hotdog && journalctl -fu hotdog
scripts/setup.sh # every line ok?
```

The first time on a robot or a site: [docs/commissioning.md](docs/commissioning.md) (network,
M20 calibration, LiDARs, pod, acoustic camera, time). Day to day:
[docs/operations.md](docs/operations.md).
M20 calibration, LiDARs, pod, acoustic camera, alerts, time), then the
[Site Acceptance Test](docs/HotDog-Site-Acceptance-Test.pdf).

## Operate

Expand All @@ -128,16 +130,17 @@ On the robot computer, the `hotdog` command ([scripts/hotdog.sh](scripts/hotdog.
hotdog status # the robot at a glance
hotdog stand && hotdog teach start # teach from the dock, drive with the M20 remote
hotdog teach point # a stop point at each piece of equipment
hotdog teach target bay1_ds_clamps strips=3 acoustic # the pod's view there
hotdog aim 35 -10 4 # point the pod: yaw, pitch (deg), zoom
hotdog teach target bay1_ds_clamps strips=3 acoustic # what it sees there
hotdog teach stop && hotdog dock
hotdog patrol # the route patrolled last (or name one)
hotdog schedule on # times and route: patrol_node in the site file
hotdog return # back to the dock along the route
hotdog estop # latched, until `hotdog release`
```

Reports: `http://<robot>:8088/`. Alerts: the crew's Telegram group. Day to day:
[docs/operations.md](docs/operations.md).
Reports: `http://<robot>:8088/`. Alerts: the crew's Telegram group. Day to day: the
[User Manual](docs/HotDog-User-Manual.pdf) and [docs/operations.md](docs/operations.md).

## Develop

Expand Down
16 changes: 9 additions & 7 deletions docs/commissioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ permit; nothing else needs to be open towards the robot.

```bash
git clone git@github.com:DarmawanRobotics/HotDog.git ~/dev/HotDog && cd ~/dev/HotDog
scripts/setup.sh install
scripts/setup.sh install # tools, repos, rosdep, build, the hotdog command
scripts/setup.sh install service timesync
sudoedit /etc/hotdog/hotdog.env
source ~/.bashrc # the hotdog command in this shell
```

| Variable | |
Expand Down Expand Up @@ -104,21 +105,22 @@ known defect) and compare the report with the camera's own result.

The dock is the origin of everything HotDog teaches:

1. Put the M20 on its dock, start HotDog (`sudo systemctl start hotdog`), wait for
`/localization/status` `LOCALIZED` (the odometry start is the origin).
1. Put the M20 on its dock, start HotDog (`sudo systemctl start hotdog`); `hotdog status` shows
localize `LOCALIZED` (the odometry start is the origin).
2. Set the site: `SITE=<name>` in the env file (a new name creates the site), or
`ros2 service call /site/load dharma_interfaces/srv/LoadSite "{site: <name>}"`.
`hotdog site <name>`.
3. Teach the route from the dock ([docs/operations.md](operations.md#teach-a-route)), with a
target at each stop.
4. Set the day's air temperature (`thermal.ambient_c`), then run the first patrol at a low
cruise speed (`path_follower_node speed.cruise: 0.3` in the site file) and check the reports.
4. Set the day's air temperature (`hotdog ambient 33`), then run the first patrol at a low
cruise speed (`path_follower_node speed.cruise: 0.3` in the site file) and check the reports
(`http://<robot>:8088/`).

## 9. Alerts

[hotdog_alerts: Set up](../src/hotdog_alerts/README.md#set-up): the bot token in the env file,
the crew's group in `alert_node` `telegram.chat_ids` of the site file, `robot_name`,
`language: id` when the crew prefers it, and `report_url` as the crew's phones reach the
robot. `ros2 service call /alerts/test std_srvs/srv/Trigger` must arrive in the group.
robot. `hotdog alert-test` must arrive in the group.

## 10. Time

Expand Down
Loading
Loading