A dashboard for passive monitoring of UDP communication between VIC (Vehicle Integrated Controller) and OCS (Operations Control Station).
Note: This system does not transmit control packets. It performs monitoring only.
- Real-time Packet Capture:
lo(local) oreno2/eno3(hardware) interfaces - ICD v1.0 Parsing: Interprets headers, operational status, device connections, and emergency stop causes
- Quality Metrics: Availability, Jitter (P95), Packet Loss Rate, and PPS
- Dashboard: Real-time UI based on Dash + Plotly (2-second polling)
- Bidirectional Capture: Switch between Status (VIC->OCS) and Control (OCS->VIC) directions
Mock mode, full-page capture (two frames ~3.5s apart — polling updates charts and log).
To refresh this asset after UI changes:
pip install -r requirements.txt playwright pillow
playwright install chromium
python3 scripts/capture_readme_assets.pyRequires Python 3.9+.
pip install -r requirements.txtpython3 run.py
python3 run.py --mode mock- Verifies UI with fake data
- No network privileges required
# CLI Argument Method (Recommended)
sudo python3 run.py --mode live --interface lo
sudo python3 run.py --mode live --interface eno2
# Environment Variable Method
export UGV_MON_USE_LIVE=true
export UGV_MON_INTERFACE=lo
sudo -E python3 run.pyhttp://localhost:8050
docker build -t ugv-mon:local .
docker run --rm -p 8050:8050 ugv-mon:local
# then open http://localhost:8050The default image command runs mock data only. Live packet capture in a container requires extra capabilities (NET_RAW, NET_ADMIN) and host networking; use native run.py --mode live for that.
python3 run.py --help
options:
--mode {mock,live}, -m Execution mode (default: mock)
--interface, -i Network interface (default: lo)
--port, -p Server port (default: 8050)
--debug Enable debug mode| Variable | Description | Default |
|---|---|---|
UGV_MON_USE_LIVE |
Live mode if true |
Mock mode |
UGV_MON_INTERFACE |
Capture interface | lo |
UGV_MON_PORT |
Server port | 8050 |
UGV_MON_DEBUG |
Debug mode | false |
RealTimeDashboard/
├── run.py # Unified entry point (CLI support)
├── requirements.txt # Dependencies list
│
├── tests/ # Unit tests
├── docs/ # Documentation
│
└── ugv_mon/ # Main Python package
├── app.py # Dash app factory
├── config.py # App configuration (env vars)
├── constants.py # Constant definitions
├── models.py # Data models (Enum, ICD parsing)
├── styles.py # UI style constants
│
├── pipeline/ # Data collection pipeline
│ ├── sniffer.py # PacketSniffer (Scapy)
│ ├── queue.py # PacketQueue (thread-safe)
│ ├── processor.py # PacketProcessor (parse+store)
│ └── icd_parser.py # ICDParser (ICD v1.0)
│
├── store/ # Data storage
│ └── packet_store.py # Unified storage (single deque)
│
├── services/ # Service layer
│ ├── capture_service.py # Capture control
│ ├── stats_service.py # Statistics/connection status
│ ├── ml_service.py # ML anomaly detection
│ ├── dashboard_builder.py # Dict(25 keys) builder
│ └── service_provider.py # Callback compatibility bridge
│
├── analysis/ # ML Anomaly Detection
│ ├── ml_pipeline.py
│ ├── ml_anomaly_detector.py
│ ├── rule_detector.py
│ └── feature_extractor.py
│
├── ui/ # UI Modules
│ ├── components/ # Reusable components
│ │ ├── kpi_card.py
│ │ ├── device_grid.py
│ │ ├── status_chip.py
│ │ └── log_table.py
│ ├── layouts/ # Layouts
│ │ ├── main_layout.py
│ │ ├── header.py
│ │ ├── panels.py
│ │ ├── charts.py
│ │ └── ml_charts.py
│ └── ml/ # ML Visualizations
│ ├── anomaly_3d.py
│ ├── anomaly_timeline.py
│ └── feature_importance.py
│
├── callbacks/ # Dash Callbacks
│ └── update_callbacks.py
│
└── mock/ # ⚠️ For Dev/Testing
├── mock_data.py
└── live_provider.py # LEGACY (for compatibility)
graph TD
UDP((UDP Packet)) --> Sniffer[PacketSniffer]
Sniffer -->|Push| Queue[PacketQueue]
Queue -->|Pop| Processor[PacketProcessor]
Processor -->|Parse| Parser[ICDParser]
Processor -->|Store| Store[PacketStore]
subgraph "Service Layer (SRP)"
Store --> Stats[StatsService]
Store --> ML[MLService]
Store --> Builder[DashboardBuilder]
end
subgraph "Presentation Layer"
Builder -->|Dict| Provider[ServiceProvider]
Provider -->|Callback| DashApp[Dash UI]
end
- Pipeline:
Sniffercaptures packets and pushes toQueue,Processorpops them, parses, and stores inStore. - Service:
StatsServiceandMLServiceanalyze data from theStore. - Presentation:
DashAppqueries analyzed data throughServiceProviderevery 2 seconds to update the UI.
pytest tests/python3 run.pyThis repo includes render.yaml for one-click setup on Render.
- Push this repository to GitHub.
- In Render, choose New + -> Blueprint and select this repo.
- Render will create
ugv-mon-demoweb service fromrender.yaml. - When deployment completes, copy the Render URL (e.g.
https://xxx.onrender.com).
This repo includes a static showcase at portfolio-site/index.html and a workflow at .github/workflows/pages.yml. The page can embed the dashboard preview GIF from docs/images/ so reviewers see visuals without waiting on a cold-started host.
What to share on a resume or portfolio: the GitHub repository URL plus your GitHub Pages site URL (after deploy). You do not need to lead with Render; free-tier live URLs are often slow or show a loading state.
- In GitHub repo settings, open Pages and set source to GitHub Actions.
- Push to
main(or edit underportfolio-site/**); theDeploy Portfolio Pageworkflow publishes to a URL likehttps://<your-github-id>.github.io/<repo-name>/— the exact link appears under Settings → Pages.
docs/00_PROJECT_OVERVIEW.md- Project Overviewdocs/01_ARCHITECTURE.md- Architecture Structuredocs/02_FILE_STRUCTURE.md- Roles by Filedocs/03_ICD_SPECIFICATION.md- Message format reference (portfolio demo; not an official ICD)docs/04_KPI_METRICS.md- KPI Definitions and Analysisdocs/05_ML_ANOMALY_DETECTION.md- ML Anomaly Detectiondocs/06_DATA_FLOW_GUIDE.md- Data Flow Guidedocs/07_OJT_WEEKLY_LOGS.md- OJT Weekly Logs (8 Weeks)docs/Final_Project_Report.md- Final Project Report
This project is licensed under the MIT License.
