feat: Rust sensing server with full DensePose-compatible API
Replace Python FastAPI + WebSocket servers with a single 2.1MB Rust binary (wifi-densepose-sensing-server) that serves all UI endpoints: - REST: /health/*, /api/v1/info, /api/v1/pose/current, /api/v1/pose/stats, /api/v1/pose/zones/summary, /api/v1/stream/status - WebSocket: /api/v1/stream/pose (pose_data with 17 COCO keypoints), /ws/sensing (raw sensing_update stream on port 8765) - Static: /ui/* with no-cache headers WiFi-derived pose estimation: derive_pose_from_sensing() generates 17 COCO keypoints from CSI/WiFi signal data with motion-driven animation. Data sources: ESP32 CSI via UDP :5005, Windows WiFi via netsh, simulation fallback. Auto-detection probes each in order. UI changes: - Point all endpoints to Rust server on :8080 (was Python :8000) - Fix WebSocket sensing URL to include /ws/sensing path - Remove sensingOnlyMode gating — all tabs init normally - Remove api.service.js sensing-only short-circuit - Fix clearPingInterval bug in websocket.service.js Also removes obsolete k8s/ template manifests. Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -67,11 +67,6 @@ export class ApiService {
|
||||
// Generic request method
|
||||
async request(url, options = {}) {
|
||||
try {
|
||||
// In sensing-only mode, skip all DensePose API calls
|
||||
if (backendDetector.sensingOnlyMode) {
|
||||
throw new Error('DensePose API unavailable (sensing-only mode)');
|
||||
}
|
||||
|
||||
// Process request through interceptors
|
||||
const processed = await this.processRequest(url, options);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* always shows something.
|
||||
*/
|
||||
|
||||
const SENSING_WS_URL = 'ws://localhost:8765';
|
||||
const SENSING_WS_URL = 'ws://localhost:8765/ws/sensing';
|
||||
const RECONNECT_DELAYS = [1000, 2000, 4000, 8000, 16000];
|
||||
const MAX_RECONNECT_ATTEMPTS = 10;
|
||||
const SIMULATION_INTERVAL = 500; // ms
|
||||
|
||||
@@ -309,8 +309,11 @@ export class WebSocketService {
|
||||
clearTimeout(connection.reconnectTimer);
|
||||
}
|
||||
|
||||
// Clear ping interval
|
||||
this.clearPingInterval(connection.url);
|
||||
// Clear heartbeat timer
|
||||
if (connection.heartbeatTimer) {
|
||||
clearInterval(connection.heartbeatTimer);
|
||||
connection.heartbeatTimer = null;
|
||||
}
|
||||
|
||||
// Close WebSocket
|
||||
if (connection.ws.readyState === WebSocket.OPEN) {
|
||||
|
||||
Reference in New Issue
Block a user