# roboparty/robopi_analyze architecture

> Architecture diagram of the GitHub repository roboparty/robopi_analyze, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/roboparty/robopi_analyze
- Repository: https://github.com/roboparty/robopi_analyze

## Overview

robopi-analyze is a RoboPi diagnostics and maintenance toolkit. Its main workflow is to start a seven-dimension session, collect synchronized system, CAN, USB-CAN, HPM, and inference evidence, then analyze or export the session; operators can also save an emergency snapshot and inspect live communication status. The graph preserves the separately documented USB-CAN analysis tools and HPM maintenance tools. Most collection scripts and service wiring were not excerpted, so their documented relationships cite the README rather than implying uninspected implementation details.

Main entry points: [`capture/capture_seven_dimensions.sh`](https://github.com/roboparty/robopi_analyze/blob/main/capture/capture_seven_dimensions.sh) (Seven-dimension capture), [`analysis/analyze_seven_dimensions.py`](https://github.com/roboparty/robopi_analyze/blob/main/analysis/analyze_seven_dimensions.py) (Session timeline), [`bin/flash_hpm.sh`](https://github.com/roboparty/robopi_analyze/blob/main/bin/flash_hpm.sh) (HPM firmware flashing), [`analysis/compare_usbcan_captures.py`](https://github.com/roboparty/robopi_analyze/blob/main/analysis/compare_usbcan_captures.py) (Capture comparison)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Capture and status"]
  node_seven_capture["Seven-dimension capture"]
  node_usbcan_ring["USB-CAN ring capture"]
  node_hpm_uart_capture["HPM UART capture"]
  node_snapshot["Emergency snapshot"]
  node_dashboard["Live status dashboard"]
  node_capture_service["Capture service"]
end

subgraph group_dimensions["Diagnostic dimensions"]
  node_bms["BMS and power<br/>[01_bms_status.sh]"]
  node_can_details["CAN status details<br/>[02_can_details.sh]"]
  node_kernel_log["Kernel log<br/>[03_kernel_dmesg.sh]"]
  node_uart_dimension["HPM UART dimension<br/>[04_hpm_uart.sh]"]
  node_usb_pcap["USB-CAN PCAP<br/>[05_usb_pcap.sh]"]
  node_can_asc_capture["CAN ASC capture<br/>[06_can_asc.sh]"]
  node_inference["Inference screen"]
end

subgraph group_analysis["Offline analysis"]
  node_timeline["Session timeline"]
  node_asc_analysis["CAN ASC analysis<br/>[analyze_can_asc.py]"]
  node_urb_analysis["USB URB analysis"]
  node_echo_analysis["CAN echo analysis"]
  node_usb_timeline["USB traffic timeline"]
  node_capture_compare["Capture comparison"]
  node_error_windows["Error-window extraction"]
  node_ethercan_analysis["EtherCAN PCAP analysis"]
  node_export["Session export"]
end

subgraph group_operations["HPM and CAN operations"]
  node_hpm_service["HPM log service"]
  node_hpm_reset_service["HPM reset monitor<br/>[hpm-sreset.service]"]
  node_hpm_flash["HPM firmware flashing<br/>[flash_hpm.sh]"]
  node_hpmtool["HPM BootROM tool<br/>[hpmtool.py]"]
  node_firmware["Bundled firmware"]
  node_can_restart["CAN interface restart"]
end

node_operator(("Robot operator"))

node_operator -->|"starts session"| node_seven_capture
node_capture_service -->|"starts capture"| node_seven_capture
node_seven_capture -->|"collects dimension"| node_bms
node_seven_capture -->|"collects dimension"| node_can_details
node_seven_capture -->|"collects dimension"| node_kernel_log
node_seven_capture -->|"collects dimension"| node_uart_dimension
node_seven_capture -->|"collects dimension"| node_usb_pcap
node_seven_capture -->|"collects dimension"| node_can_asc_capture
node_seven_capture -->|"collects dimension"| node_inference
node_operator -->|"saves incident"| node_snapshot
node_operator -->|"views status"| node_dashboard
node_operator -->|"analyzes session"| node_timeline
node_timeline -->|"parses logs"| node_bms
node_timeline -->|"parses logs"| node_can_details
node_timeline -->|"parses logs"| node_kernel_log
node_timeline -->|"parses logs"| node_uart_dimension
node_timeline -->|"parses captures"| node_usb_pcap
node_timeline -->|"parses logs"| node_can_asc_capture
node_timeline -->|"parses output"| node_inference
node_operator -->|"analyzes ASC"| node_asc_analysis
node_operator -->|"analyzes URBs"| node_urb_analysis
node_operator -->|"checks TX echo"| node_echo_analysis
node_operator -->|"analyzes traffic"| node_usb_timeline
node_operator -->|"compares captures"| node_capture_compare
node_capture_compare -->|"calls analyzer"| node_urb_analysis
node_operator -->|"extracts errors"| node_error_windows
node_operator -->|"analyzes PCAP"| node_ethercan_analysis
node_operator -->|"exports session"| node_export
node_operator -->|"flashes HPM"| node_hpm_flash
node_hpm_flash -.->|"uses tool"| node_hpmtool
node_hpm_flash -.->|"uses firmware"| node_firmware
node_hpm_service -->|"captures UART"| node_hpm_uart_capture
node_operator -->|"restarts CAN"| node_can_restart

click node_seven_capture "https://github.com/roboparty/robopi_analyze/blob/main/capture/capture_seven_dimensions.sh"
click node_usbcan_ring "https://github.com/roboparty/robopi_analyze/blob/main/capture/capture_usbcan_ring.sh"
click node_hpm_uart_capture "https://github.com/roboparty/robopi_analyze/blob/main/capture/capture_hpm_uart.sh"
click node_snapshot "https://github.com/roboparty/robopi_analyze/blob/main/bin/save_usbcan_snapshot.sh"
click node_dashboard "https://github.com/roboparty/robopi_analyze/blob/main/bin/show_communication_dashboard.py"
click node_bms "https://github.com/roboparty/robopi_analyze/blob/main/dimensions/01_bms_status.sh"
click node_can_details "https://github.com/roboparty/robopi_analyze/blob/main/dimensions/02_can_details.sh"
click node_kernel_log "https://github.com/roboparty/robopi_analyze/blob/main/dimensions/03_kernel_dmesg.sh"
click node_uart_dimension "https://github.com/roboparty/robopi_analyze/blob/main/dimensions/04_hpm_uart.sh"
click node_usb_pcap "https://github.com/roboparty/robopi_analyze/blob/main/dimensions/05_usb_pcap.sh"
click node_can_asc_capture "https://github.com/roboparty/robopi_analyze/blob/main/dimensions/06_can_asc.sh"
click node_inference "https://github.com/roboparty/robopi_analyze/blob/main/dimensions/07_inference_screen.sh"
click node_timeline "https://github.com/roboparty/robopi_analyze/blob/main/analysis/analyze_seven_dimensions.py"
click node_asc_analysis "https://github.com/roboparty/robopi_analyze/blob/main/analysis/analyze_can_asc.py"
click node_urb_analysis "https://github.com/roboparty/robopi_analyze/blob/main/analysis/analyze_usbcan_urb.py"
click node_echo_analysis "https://github.com/roboparty/robopi_analyze/blob/main/analysis/analyze_usbcan_echo.py"
click node_usb_timeline "https://github.com/roboparty/robopi_analyze/blob/main/analysis/analyze_usbcan_timeline.py"
click node_capture_compare "https://github.com/roboparty/robopi_analyze/blob/main/analysis/compare_usbcan_captures.py"
click node_error_windows "https://github.com/roboparty/robopi_analyze/blob/main/analysis/extract_usbcan_error_windows.py"
click node_ethercan_analysis "https://github.com/roboparty/robopi_analyze/blob/main/bin/analyze_ethercan_pcap.py"
click node_export "https://github.com/roboparty/robopi_analyze/blob/main/bin/export_seven_dimensions.sh"
click node_hpm_service "https://github.com/roboparty/robopi_analyze/blob/main/etc/systemd/system/hpm-log-capture.service"
click node_hpm_reset_service "https://github.com/roboparty/robopi_analyze/blob/main/etc/systemd/system/hpm-sreset.service"
click node_hpm_flash "https://github.com/roboparty/robopi_analyze/blob/main/bin/flash_hpm.sh"
click node_hpmtool "https://github.com/roboparty/robopi_analyze/blob/main/bin/hpmtool.py"
click node_firmware "https://github.com/roboparty/robopi_analyze/blob/main/etc/firmware/ethercanfd_v1.1.0-20260914.bin"
click node_can_restart "https://github.com/roboparty/robopi_analyze/blob/main/bin/restart_can_interfaces.sh"
click node_capture_service "https://github.com/roboparty/robopi_analyze/blob/main/etc/systemd/system/usbcan-capture.service"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_seven_capture,node_usbcan_ring,node_hpm_uart_capture,node_snapshot,node_dashboard,node_capture_service toneBlue
class node_bms,node_can_details,node_kernel_log,node_uart_dimension,node_usb_pcap,node_can_asc_capture,node_inference toneAmber
class node_timeline,node_asc_analysis,node_urb_analysis,node_echo_analysis,node_usb_timeline,node_capture_compare,node_error_windows,node_ethercan_analysis,node_export toneMint
class node_hpm_service,node_hpm_reset_service,node_hpm_flash,node_hpmtool,node_firmware,node_can_restart toneRose
class node_operator toneIndigo
```

## Components

### Capture and status

- [Seven-dimension capture](https://github.com/roboparty/robopi_analyze/blob/main/capture/capture_seven_dimensions.sh): `capture/capture_seven_dimensions.sh`
- [USB-CAN ring capture](https://github.com/roboparty/robopi_analyze/blob/main/capture/capture_usbcan_ring.sh): `capture/capture_usbcan_ring.sh`
- [HPM UART capture](https://github.com/roboparty/robopi_analyze/blob/main/capture/capture_hpm_uart.sh): `capture/capture_hpm_uart.sh`
- [Emergency snapshot](https://github.com/roboparty/robopi_analyze/blob/main/bin/save_usbcan_snapshot.sh): `bin/save_usbcan_snapshot.sh`
- [Live status dashboard](https://github.com/roboparty/robopi_analyze/blob/main/bin/show_communication_dashboard.py): `bin/show_communication_dashboard.py`
- [Capture service](https://github.com/roboparty/robopi_analyze/blob/main/etc/systemd/system/usbcan-capture.service): `etc/systemd/system/usbcan-capture.service`

### Diagnostic dimensions

- [BMS and power](https://github.com/roboparty/robopi_analyze/blob/main/dimensions/01_bms_status.sh): `dimensions/01_bms_status.sh`
- [CAN status details](https://github.com/roboparty/robopi_analyze/blob/main/dimensions/02_can_details.sh): `dimensions/02_can_details.sh`
- [Kernel log](https://github.com/roboparty/robopi_analyze/blob/main/dimensions/03_kernel_dmesg.sh): `dimensions/03_kernel_dmesg.sh`
- [HPM UART dimension](https://github.com/roboparty/robopi_analyze/blob/main/dimensions/04_hpm_uart.sh): `dimensions/04_hpm_uart.sh`
- [USB-CAN PCAP](https://github.com/roboparty/robopi_analyze/blob/main/dimensions/05_usb_pcap.sh): `dimensions/05_usb_pcap.sh`
- [CAN ASC capture](https://github.com/roboparty/robopi_analyze/blob/main/dimensions/06_can_asc.sh): `dimensions/06_can_asc.sh`
- [Inference screen](https://github.com/roboparty/robopi_analyze/blob/main/dimensions/07_inference_screen.sh): `dimensions/07_inference_screen.sh`

### Offline analysis

- [Session timeline](https://github.com/roboparty/robopi_analyze/blob/main/analysis/analyze_seven_dimensions.py): `analysis/analyze_seven_dimensions.py`
- [CAN ASC analysis](https://github.com/roboparty/robopi_analyze/blob/main/analysis/analyze_can_asc.py): `analysis/analyze_can_asc.py`
- [USB URB analysis](https://github.com/roboparty/robopi_analyze/blob/main/analysis/analyze_usbcan_urb.py): `analysis/analyze_usbcan_urb.py`
- [CAN echo analysis](https://github.com/roboparty/robopi_analyze/blob/main/analysis/analyze_usbcan_echo.py): `analysis/analyze_usbcan_echo.py`
- [USB traffic timeline](https://github.com/roboparty/robopi_analyze/blob/main/analysis/analyze_usbcan_timeline.py): `analysis/analyze_usbcan_timeline.py`
- [Capture comparison](https://github.com/roboparty/robopi_analyze/blob/main/analysis/compare_usbcan_captures.py): `analysis/compare_usbcan_captures.py`
- [Error-window extraction](https://github.com/roboparty/robopi_analyze/blob/main/analysis/extract_usbcan_error_windows.py): `analysis/extract_usbcan_error_windows.py`
- [EtherCAN PCAP analysis](https://github.com/roboparty/robopi_analyze/blob/main/bin/analyze_ethercan_pcap.py): `bin/analyze_ethercan_pcap.py`
- [Session export](https://github.com/roboparty/robopi_analyze/blob/main/bin/export_seven_dimensions.sh): `bin/export_seven_dimensions.sh`

### HPM and CAN operations

- [HPM log service](https://github.com/roboparty/robopi_analyze/blob/main/etc/systemd/system/hpm-log-capture.service): `etc/systemd/system/hpm-log-capture.service`
- [HPM reset monitor](https://github.com/roboparty/robopi_analyze/blob/main/etc/systemd/system/hpm-sreset.service): `etc/systemd/system/hpm-sreset.service`
- [HPM firmware flashing](https://github.com/roboparty/robopi_analyze/blob/main/bin/flash_hpm.sh): `bin/flash_hpm.sh`
- [HPM BootROM tool](https://github.com/roboparty/robopi_analyze/blob/main/bin/hpmtool.py): `bin/hpmtool.py`
- [Bundled firmware](https://github.com/roboparty/robopi_analyze/blob/main/etc/firmware/ethercanfd_v1.1.0-20260914.bin): `etc/firmware/ethercanfd_v1.1.0-20260914.bin`
- [CAN interface restart](https://github.com/roboparty/robopi_analyze/blob/main/bin/restart_can_interfaces.sh): `bin/restart_can_interfaces.sh`

### Other components

- **Robot operator**

## Connections

- Robot operator → Seven-dimension capture: starts session (evidence: `README.md`)
- Capture service → Seven-dimension capture: starts capture (evidence: `README.md`)
- Seven-dimension capture → BMS and power: collects dimension (evidence: `README.md`)
- Seven-dimension capture → CAN status details: collects dimension (evidence: `README.md`)
- Seven-dimension capture → Kernel log: collects dimension (evidence: `README.md`)
- Seven-dimension capture → HPM UART dimension: collects dimension (evidence: `README.md`)
- Seven-dimension capture → USB-CAN PCAP: collects dimension (evidence: `README.md`)
- Seven-dimension capture → CAN ASC capture: collects dimension (evidence: `README.md`)
- Seven-dimension capture → Inference screen: collects dimension (evidence: `README.md`)
- Robot operator → Emergency snapshot: saves incident (evidence: `README.md`)
- Robot operator → Live status dashboard: views status (evidence: `README.md`)
- Robot operator → Session timeline: analyzes session (evidence: `README.md`)
- Session timeline → BMS and power: parses logs (evidence: `analysis/analyze_seven_dimensions.py`)
- Session timeline → CAN status details: parses logs (evidence: `analysis/analyze_seven_dimensions.py`)
- Session timeline → Kernel log: parses logs (evidence: `analysis/analyze_seven_dimensions.py`)
- Session timeline → HPM UART dimension: parses logs (evidence: `analysis/analyze_seven_dimensions.py`)
- Session timeline → USB-CAN PCAP: parses captures (evidence: `analysis/analyze_seven_dimensions.py`)
- Session timeline → CAN ASC capture: parses logs (evidence: `analysis/analyze_seven_dimensions.py`)
- Session timeline → Inference screen: parses output (evidence: `analysis/analyze_seven_dimensions.py`)
- Robot operator → CAN ASC analysis: analyzes ASC (evidence: `README.md`)
- Robot operator → USB URB analysis: analyzes URBs (evidence: `README.md`)
- Robot operator → CAN echo analysis: checks TX echo (evidence: `README.md`)
- Robot operator → USB traffic timeline: analyzes traffic (evidence: `README.md`)
- Robot operator → Capture comparison: compares captures (evidence: `README.md`)
- Capture comparison → USB URB analysis: calls analyzer (evidence: `analysis/compare_usbcan_captures.py`)
- Robot operator → Error-window extraction: extracts errors (evidence: `README.md`)
- Robot operator → EtherCAN PCAP analysis: analyzes PCAP (evidence: `README.md`)
- Robot operator → Session export: exports session (evidence: `README.md`)
- Robot operator → HPM firmware flashing: flashes HPM (evidence: `README.md`)
- HPM firmware flashing → HPM BootROM tool: uses tool
- HPM firmware flashing → Bundled firmware: uses firmware
- HPM log service → HPM UART capture: captures UART (evidence: `README.md`)
- Robot operator → CAN interface restart: restarts CAN (evidence: `README.md`)
