mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-07 10:31:46 +00:00
This is what worked for the YC demo (zmq -> Unreal Engine)
This commit is contained in:
1 parent
bd8ca1c831
commit
497d941746
4 files changed
+18
-7
No files matched your search
Generated
+3
-3
@@ -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",
|
||||
]
|
||||
|
||||
+2
-2
@@ -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"
|
||||
|
||||
@@ -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(())
|
||||
|
||||
+8
-2
@@ -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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user