Expand description
wifi-densepose-worldmodel — OccWorld thin-client bridge (ADR-147).
Bridges wifi_densepose_worldgraph PersonTrack history to the OccWorld
Python inference subprocess and returns TrajectoryPriors that can be
injected into the Kalman pose tracker.
§Quick start
use wifi_densepose_worldmodel::{
OccWorldBridge, OccupancyWorldModelRequest, OccupancyGrid3D,
SceneBoundsJson, worldgraph_to_occupancy,
};
use wifi_densepose_worldmodel::occupancy::{PersonPosition, SceneBounds};
let bridge = OccWorldBridge::new("/tmp/occworld.sock");
let bounds = SceneBounds { min_e: -10.0, min_n: -10.0, max_e: 10.0, max_n: 10.0 };
let persons = vec![
PersonPosition { track_id: 1, east_m: 2.0, north_m: 3.0, up_m: 1.0 },
];
let frame = worldgraph_to_occupancy(&persons, &bounds, 0.1);
let request = OccupancyWorldModelRequest {
past_frames: vec![frame],
voxel_resolution_m: 0.1,
scene_bounds: SceneBoundsJson {
min_e: bounds.min_e, min_n: bounds.min_n,
max_e: bounds.max_e, max_n: bounds.max_n,
},
prediction_steps: 15,
};
let response = bridge.predict(request).await?;
println!("confidence={:.2}", response.confidence);
for prior in &response.trajectory_priors {
println!("track {} has {} waypoints", prior.track_id, prior.waypoints.len());
}Re-exports§
pub use bridge::default_socket_path;pub use bridge::OccWorldBridge;pub use error::WorldModelError;pub use occupancy::worldgraph_to_occupancy;
Modules§
- bridge
- Async Unix-socket client that sends an
OccupancyWorldModelRequestto the OccWorld Python inference server and receives anOccupancyWorldModelResponse(ADR-147). - error
- Error types for the OccWorld world-model bridge (ADR-147).
- occupancy
- Converts WorldGraph PersonTrack ENU positions into an
OccupancyGrid3Dtensor suitable for submission to the OccWorld inference server (ADR-147).
Structs§
- Occupancy
Grid3D - A 3-D occupancy grid whose voxel values are class indices (u8).
- Occupancy
World Model Request - JSON request sent from the Rust bridge to the OccWorld Python server.
- Occupancy
World Model Response - JSON response returned by the OccWorld Python server.
- Scene
Bounds Json - Axis-aligned scene footprint sent to the OccWorld server in the IPC
request. Mirrors
occupancy::SceneBoundsbut derivesSerialize/Deserializefor direct inclusion in the JSON payload. - Trajectory
Prior - Predicted future trajectory for one tracked person.
- Trajectory
Waypoint - A single point on a predicted trajectory, with a relative timestamp.
Functions§
- persons_
from_ worldgraph - Extracts all
PersonPositions from aWorldGraphby serialising the graph to its canonical JSON form (viaWorldGraph::to_json) and scanning thenodesarray forPersonTrackentries.