diff --git a/Cargo.lock b/Cargo.lock index e627aea587..7f3c2f7046 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "aho-corasick" version = "0.7.15" @@ -285,9 +287,7 @@ dependencies = [ [[package]] name = "kinect" -version = "0.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f185ce99cfd26fb71672096f68709eabc8a20d20f42fece762fe7dd104b4fc40" +version = "0.0.6" dependencies = [ "k4a-sys-temp", ] diff --git a/Cargo.toml b/Cargo.toml index d861895318..d7954d3e15 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,8 +16,8 @@ bytes = "1.0.1" clap = "3.0.0-beta.1" env_logger = "0.7.1" k4a-sys-temp = "0.2.3" -#kinect = { path = "../kinect.rs" } -kinect = "0.0.5" +kinect = { path = "../kinect.rs" } +#kinect = "0.0.5" libc = "0.2.68" log = "0.4.11" num-traits = "0.2.14" diff --git a/build.rs b/build.rs index 5a02423863..e4473cf409 100644 --- a/build.rs +++ b/build.rs @@ -17,6 +17,11 @@ pub fn main() -> Result<(), BuildError> { let profile = std::env::var("PROFILE")?; let destination = format!("target/{}/deps/k4a.lib", &profile); fs::copy("vendor/k4a.lib", &destination)?; + } else { + // NB(2022-03-12): It's not finding the depth engine sofile on Linux. + // Maybe this will fix. This search path was installed by the Debian package, + // not building from source. + println!(r"cargo:rustc-link-search=/usr/lib/x86_64-linux-gnu/libk4a1.4/"); } Ok(()) diff --git a/src/main_zeromq.rs b/src/main_zeromq.rs index 98f8af5c04..eae86befd3 100644 --- a/src/main_zeromq.rs +++ b/src/main_zeromq.rs @@ -29,8 +29,11 @@ use zmq::{Error, Socket, Context, DONTWAIT}; use crate::zeromq::protocol::{encode_point_data, send_message}; -const SOCKET_ADDRESS : &'static str = "tcp://127.0.0.1:8888"; +//const SOCKET_ADDRESS : &'static str = "tcp://127.0.0.1:8888"; //const SOCKET_ADDRESS : &'static str = "tcp://192.168.50.3:8888"; +//const SOCKET_ADDRESS : &'static str = "tcp://192.168.4.64:8888"; +//const SOCKET_ADDRESS : &'static str = "tcp://10.154.106.143:8888"; +const SOCKET_ADDRESS : &'static str = "tcp://10.154.106.144:8888"; /// The command line args for the program. #[derive(Clap, Debug, Clone)] @@ -98,8 +101,9 @@ fn main() -> AnyhowResult<()> { println!("Opening device..."); thread::sleep(Duration::from_millis(100)); - let device = Device::open(1)?; + let device = Device::open(0)?; + println!("Configuring device..."); let mut config = DeviceConfiguration::init_disable_all(); let mut camera_fps = k4a_sys::k4a_fps_t_K4A_FRAMES_PER_SECOND_30; @@ -140,6 +144,8 @@ fn main() -> AnyhowResult<()> { let mut socket = context.socket(zmq::PUSH).unwrap(); //let mut socket = context.socket(zmq::REQ).unwrap(); + println!("Socket address: {}", SOCKET_ADDRESS); + //socket.bind(SOCKET_ADDRESS).unwrap(); socket.connect(SOCKET_ADDRESS).unwrap();