Physical AI Edge Kit
Physical AI Edge Kit educational robotics environments kay liye ek mukammal monitoring aur control system faraham karta hai. Yeh kit real-time health monitoring, threshold-based alerting, aur safe shutdown capabilities ko mumkin banata hai physical AI systems ke liye jo educational settings mein deploy kiye gaye hain.
Jaiza (Overview)
Edge Kit ROS2 (Robot Operating System 2) par mabni hai aur yeh faraham karta hai:
- Real-time Health Monitoring: CPU, memory, disk, aur temperature metrics ki musalsal nigah-raani
- Threshold-based Alerting: WARNING, ERROR, aur CRITICAL severity levels ke saath configurable alerts
- Safe Shutdown Service: ROS2 service interface safe hardware shutdown procedures shuru karne ke liye
- Multi-node Deployment: Tagseem shuda Physical AI hardware components ki nigah-raani ke liye support
- Dashboard Integration: Bahari dashboard ke istemal ke liye REST API
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Physical AI Edge Kit │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────┐ │
│ │ HealthMonitor │───▶│ ThresholdMonitor│───▶│AlertPublisher│ │
│ │ (ROS2 Node) │ │ (ROS2 Node) │ │ (ROS2 Node) │ │
│ └────────┬────────┘ └─────────────────┘ └──────┬──────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────────┐ ┌─────────────────┐│
│ │ /health_status │ │ /alerts ││
│ │ (Topic) │ │ (Topic) ││
│ └─────────────────┘ └─────────────────┘│
│ │
│ ┌─────────────────────────────────────────────────────────────┐│
│ │ SafeShutdownService ││
│ │ /safe_shutdown ││
│ └─────────────────────────────────────────────────────────────┘│
│ │
│ ┌─────────────────────────────────────────────────────────────┐│
│ │ Flask Health API ││
│ │ REST API @ localhost:5000 ││
│ └─────────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────┘
Fori Aaghaz (Quick Start)
Pehlay ki Zaroorat (Prerequisites)
- Docker aur Docker Compose
- Kam se kam 2GB free disk space
- 4GB RAM tajweez karda
Tanseeb (Installation)
# Clone the repository
git clone https://github.com/Awais68/physical-AI-Homanoid-Book
# Navigate to the docker directory
cd docker
# Build the production image
docker compose build edge-kit-prod
# Start the deployment
docker compose up -d edge-kit-prod
Tanseeb ki Tasdeeq (Verify Installation)
# Check container status
docker compose ps
# Access health API
curl http://localhost:5000/health
curl http://localhost:5000/status
Tarteeb (Configuration)
Edge Kit YAML-based configuration ka istemal karta hai. Default configuration file location: edge-kit/config/edge_health_config.yaml
Threshold Configuration
node_name: "health_monitor"
publish_frequency: 1.0 # Health status published every 1 second
thresholds:
cpu:
warning: 80.0 # CPU usage warning threshold
critical: 90.0 # CPU usage critical threshold
memory:
warning: 85.0 # Memory usage warning threshold
critical: 95.0 # Memory usage critical threshold
disk:
warning: 80.0 # Disk usage warning threshold
critical: 90.0 # Disk usage critical threshold
temperature:
warning: 70.0 # Temperature warning threshold (Celsius)
critical: 85.0 # Temperature critical threshold
API Reference
REST Endpoints
| Endpoint | Method | Description |
|---|---|---|
/health | GET | Current health status |
/health/history | GET | Historical health data |
/health/aggregate | GET | Aggregated health statistics |
/alerts | GET | Current and recent alerts |
/status | GET | Overall system status summary |
Jawab ki Misalein (Example Responses)
GET /health
{
"cpu_percent": 5.2,
"memory_percent": 42.1,
"disk_percent": 35.7,
"temperature": 45.0,
"status": "OK",
"node_name": "health_monitor",
"timestamp": "2025-12-12T22:00:00Z"
}
GET /alerts
{
"data": [
{
"alert_id": "alert_001",
"severity": "WARNING",
"metric": "cpu_percent",
"value": 82.5,
"threshold": 80.0,
"timestamp": "2025-12-12T21:45:00Z",
"resolved": true
}
],
"count": 1
}
ROS2 Topics aur Services
Topics
| Topic | Message Type | Description |
|---|---|---|
/health_status | HealthStatus | Published at 1Hz with current system metrics |
/alerts | Alert | Published when thresholds are exceeded |
Services
| Service | Type | Description |
|---|---|---|
/safe_shutdown | SafeShutdown | Initiate safe hardware shutdown |
Misal: Safe Shutdown Service ko Call Karna
ros2 service call /safe_shutdown edge_health_interfaces/srv/SafeShutdown \
"{reason: 'CRITICAL_TEMPERATURE', requested_by: 'operator', timeout: 30.0}"
Multi-Node Deployment
Hardware components ki nigah-raani ke liye:
# Launch multiple monitoring nodes
ros2 launch edge_health multi_node_monitoring.launch.py
Har node ki apni configuration ho sakti hai:
edge_brain_config.yaml- Main computing unitsensor_node_config.yaml- Sensor monitoring nodesactuator_node_config.yaml- Actuator monitoring nodes
Nigah-raani kay Scripts (Monitoring Scripts)
Edge Kit mein khud-ba-khud nigah-raani ke liye kai scripts shaamil hain:
| Script | Purpose | Schedule |
|---|---|---|
health_check.sh | Container and node status | Har 5 minute |
collect_metrics.sh | Metrics collection | Har minute |
collect_alerts.sh | Alert aggregation | Har 5 minute |
backup_logs.sh | Rozana log backup | Rozana aadhi raat |
generate_7day_report.sh | Reliability report | 7-din ke test kay baad |
7-Din ka Reliability Test
Edge Kit mein 7-din ke musalsal operation test ke liye infrastructure shaamil hai taake system reliability ki tasdeeq ki ja sake.
Kaamyabi kay Paimane (Success Criteria)
- Uptime: Container 168 ghante lagatar chale aur 3 se kam restarts hon
- Reliability: Health metrics 99% se zyada expected rate (1Hz) par shaye hon
- Stability: Koi memory leak na ho (memory usage variance < 10%)
- Alerts: Zero unresolved CRITICAL alerts
- Performance: Average CPU usage < 10%
- Data Integrity: Tamam metrics 5 minute se zyada kay gaps ke baghair collect hon
Test Chalana
# Start the deployment
cd docker
docker compose up -d edge-kit-prod
# Set up monitoring cron jobs (see 7-DAY-DEPLOYMENT-PLAN.md)
# After 7 days, generate the report
./edge-kit/scripts/generate_7day_report.sh
Masail ka Hal (Troubleshooting)
Aam Masail (Common Issues)
Container shuru nahi ho raha
# Check container logs
docker compose logs edge-kit-prod
# Verify Docker resources
docker system df
ROS2 nodes publish nahi kar rahe
# Enter container
docker compose exec edge-kit-prod bash
# Check node status
source /opt/ros/humble/setup.bash
source /ros2_ws/install/setup.bash
ros2 node list
ros2 topic info /health_status
Flask API jawab nahi de rahi
# Check API process
curl -v http://localhost:5000/health
# Restart API service
docker compose restart edge-kit-prod
Taleemi Istemaal (Educational Use Cases)
Educators kay Liye
- Students ke physical AI systems ke saath interactions ki nigah-raani karein
- Age groups kay mutabiq safety thresholds set karein
- Classroom sessions se pehlay system health ka jaiza lein
- Masail ki fori notification ke liye alerts configure karein
Students kay Liye
- System monitoring concepts ke baare mein seekhein
- Threshold-based alerting ko samjhein
- ROS2 topics aur services ko daryaft karein
- Safe robotics operation ki mashq karein
Administrators kay Liye
- Edge Kit ko kai classroom environments mein deploy karein
- Tagseem shuda systems ke liye multi-node monitoring configure karein
- Tamam systems kay liye aggregated health metrics tak rasai hasil karein
- Compliance kay liye reliability reports generate karein
Wasaail (Resources)
Version ki Tareekh (Version History)
| Version | Date | Changes |
|---|---|---|
| 1.0 | 2025-12-12 | Initial release with health monitoring, alerting, and safe shutdown |
Roman Urdu translation by AI assistant