豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 79477c1

Browse files
authored
fix: restore WSL release build for sensing server (#389)
fix: restore successful WSL release build for rust sensing server
2 parents 648ff52 + 1871ef3 commit 79477c1

File tree

4 files changed

+62
-12
lines changed

4 files changed

+62
-12
lines changed

docs/user-guide.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,20 @@ Example: `docker run -e CSI_SOURCE=esp32 -p 3000:3000 -p 5005:5005/udp ruvnet/wi
103103

104104
### From Source (Rust)
105105

106+
On Debian/Ubuntu-based Linux systems, install the native desktop prerequisites before the first Rust release build:
107+
108+
```bash
109+
sudo apt update
110+
sudo apt install -y \
111+
build-essential pkg-config \
112+
libglib2.0-dev libgtk-3-dev \
113+
libsoup-3.0-dev \
114+
libjavascriptcoregtk-4.1-dev \
115+
libwebkit2gtk-4.1-dev
116+
```
117+
118+
This prepares the native GTK/WebKit dependencies used by the desktop/Tauri crates in this workspace.
119+
106120
```bash
107121
git clone https://github.com/ruvnet/RuView.git
108122
cd RuView/rust-port/wifi-densepose-rs
@@ -1686,6 +1700,28 @@ rustup update stable
16861700
rustc --version
16871701
```
16881702

1703+
### Build: Linux native desktop prerequisites
1704+
1705+
If you are compiling the Rust workspace on a Debian/Ubuntu-based Linux system, install the native desktop development packages first:
1706+
1707+
```bash
1708+
sudo apt update
1709+
sudo apt install -y \
1710+
build-essential pkg-config \
1711+
libglib2.0-dev libgtk-3-dev \
1712+
libsoup-3.0-dev \
1713+
libjavascriptcoregtk-4.1-dev \
1714+
libwebkit2gtk-4.1-dev
1715+
```
1716+
1717+
Then rerun:
1718+
1719+
```bash
1720+
cargo build --release
1721+
```
1722+
1723+
This is the same Linux pre-step referenced in the Rust source build section and covers the common GTK/WebKit `pkg-config` requirements used by the desktop build.
1724+
16891725
### Windows: RSSI mode shows no data
16901726

16911727
Run the terminal as Administrator (required for `netsh wlan` access). Verified working on Windows 10 and 11 with Intel AX201 and Intel BE201 adapters.

rust-port/wifi-densepose-rs/crates/wifi-densepose-sensing-server/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ axum = { workspace = true }
2525
tower-http = { version = "0.5", features = ["fs", "cors", "set-header"] }
2626
tokio = { workspace = true, features = ["full", "process"] }
2727
futures-util = "0.3"
28+
ruvector-mincut = { workspace = true }
2829

2930
# Serialization
3031
serde = { workspace = true }

rust-port/wifi-densepose-rs/crates/wifi-densepose-sensing-server/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ pub mod vital_signs;
88
pub mod rvf_container;
99
pub mod rvf_pipeline;
1010
pub mod graph_transformer;
11+
#[allow(dead_code)]
1112
pub mod trainer;
1213
pub mod dataset;
1314
pub mod sona;
1415
pub mod sparse_inference;
16+
#[allow(dead_code)]
1517
pub mod embedding;

rust-port/wifi-densepose-rs/crates/wifi-densepose-sensing-server/src/main.rs

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//! - Serves the static UI files (port 8080)
88
//!
99
//! Replaces both ws_server.py and the Python HTTP server.
10+
#![allow(dead_code)]
1011

1112
mod adaptive_classifier;
1213
pub mod cli;
@@ -1658,9 +1659,11 @@ async fn windows_wifi_task(state: SharedState, tick_ms: u64) {
16581659

16591660
// Populate persons from the sensing update (Kalman-smoothed via tracker).
16601661
let raw_persons = derive_pose_from_sensing(&update);
1662+
let mut last_tracker_instant = s.last_tracker_instant.take();
16611663
let tracked = tracker_bridge::tracker_update(
1662-
&mut s.pose_tracker, &mut s.last_tracker_instant, raw_persons,
1664+
&mut s.pose_tracker, &mut last_tracker_instant, raw_persons,
16631665
);
1666+
s.last_tracker_instant = last_tracker_instant;
16641667
if !tracked.is_empty() {
16651668
update.persons = Some(tracked);
16661669
}
@@ -1794,9 +1797,11 @@ async fn windows_wifi_fallback_tick(state: &SharedState, seq: u32) {
17941797
};
17951798

17961799
let raw_persons = derive_pose_from_sensing(&update);
1800+
let mut last_tracker_instant = s.last_tracker_instant.take();
17971801
let tracked = tracker_bridge::tracker_update(
1798-
&mut s.pose_tracker, &mut s.last_tracker_instant, raw_persons,
1802+
&mut s.pose_tracker, &mut last_tracker_instant, raw_persons,
17991803
);
1804+
s.last_tracker_instant = last_tracker_instant;
18001805
if !tracked.is_empty() {
18011806
update.persons = Some(tracked);
18021807
}
@@ -3224,7 +3229,7 @@ async fn adaptive_status(State(state): State<SharedState>) -> Json<serde_json::V
32243229
"trained_frames": model.trained_frames,
32253230
"accuracy": model.training_accuracy,
32263231
"version": model.version,
3227-
"classes": adaptive_classifier::CLASSES,
3232+
"classes": model.class_names,
32283233
"class_stats": model.class_stats,
32293234
})),
32303235
None => Json(serde_json::json!({
@@ -3610,9 +3615,9 @@ async fn udp_receiver_task(state: SharedState, udp_port: u16) {
36103615
};
36113616

36123617
// Feed field model calibration if active (use per-node history for ESP32).
3613-
if let Some(ref mut fm) = s.field_model {
3614-
if let Some(ns) = s.node_states.get(&node_id) {
3615-
field_bridge::maybe_feed_calibration(fm, &ns.frame_history);
3618+
if let Some(frame_history) = s.node_states.get(&node_id).map(|ns| ns.frame_history.clone()) {
3619+
if let Some(ref mut fm) = s.field_model {
3620+
field_bridge::maybe_feed_calibration(fm, &frame_history);
36163621
}
36173622
}
36183623

@@ -3695,9 +3700,11 @@ async fn udp_receiver_task(state: SharedState, udp_port: u16) {
36953700
};
36963701

36973702
let raw_persons = derive_pose_from_sensing(&update);
3703+
let mut last_tracker_instant = s.last_tracker_instant.take();
36983704
let tracked = tracker_bridge::tracker_update(
3699-
&mut s.pose_tracker, &mut s.last_tracker_instant, raw_persons,
3705+
&mut s.pose_tracker, &mut last_tracker_instant, raw_persons,
37003706
);
3707+
s.last_tracker_instant = last_tracker_instant;
37013708
if !tracked.is_empty() {
37023709
update.persons = Some(tracked);
37033710
}
@@ -3858,9 +3865,9 @@ async fn udp_receiver_task(state: SharedState, udp_port: u16) {
38583865
};
38593866

38603867
// Feed field model calibration if active (use per-node history for ESP32).
3861-
if let Some(ref mut fm) = s.field_model {
3862-
if let Some(ns) = s.node_states.get(&node_id) {
3863-
field_bridge::maybe_feed_calibration(fm, &ns.frame_history);
3868+
if let Some(frame_history) = s.node_states.get(&node_id).map(|ns| ns.frame_history.clone()) {
3869+
if let Some(ref mut fm) = s.field_model {
3870+
field_bridge::maybe_feed_calibration(fm, &frame_history);
38643871
}
38653872
}
38663873

@@ -3905,9 +3912,11 @@ async fn udp_receiver_task(state: SharedState, udp_port: u16) {
39053912
};
39063913

39073914
let raw_persons = derive_pose_from_sensing(&update);
3915+
let mut last_tracker_instant = s.last_tracker_instant.take();
39083916
let tracked = tracker_bridge::tracker_update(
3909-
&mut s.pose_tracker, &mut s.last_tracker_instant, raw_persons,
3917+
&mut s.pose_tracker, &mut last_tracker_instant, raw_persons,
39103918
);
3919+
s.last_tracker_instant = last_tracker_instant;
39113920
if !tracked.is_empty() {
39123921
update.persons = Some(tracked);
39133922
}
@@ -4041,9 +4050,11 @@ async fn simulated_data_task(state: SharedState, tick_ms: u64) {
40414050

40424051
// Populate persons from the sensing update (Kalman-smoothed via tracker).
40434052
let raw_persons = derive_pose_from_sensing(&update);
4053+
let mut last_tracker_instant = s.last_tracker_instant.take();
40444054
let tracked = tracker_bridge::tracker_update(
4045-
&mut s.pose_tracker, &mut s.last_tracker_instant, raw_persons,
4055+
&mut s.pose_tracker, &mut last_tracker_instant, raw_persons,
40464056
);
4057+
s.last_tracker_instant = last_tracker_instant;
40474058
if !tracked.is_empty() {
40484059
update.persons = Some(tracked);
40494060
}

0 commit comments

Comments
 (0)