badicsalex / ar-drivers-rs Goto Github PK
View Code? Open in Web Editor NEWOpensource Rust driver for various AR glasses
License: MIT License
Opensource Rust driver for various AR glasses
License: MIT License
Would you mind writing a few steps on how to use this driver? How to build and install it?
I'm happy to see you attempting to make Rokid work on linux, but I really don't know where to start yet.
Thanks
Is there an outside-of-source documentation of the Nreal HID Report formats? Could be something as simple as "sketches on a napkin".
I just got a Nreal Light and would like to compare my reverse engineering efforts on its HID reports with what you might have written down. Preferably without piecing it together from the parser code.
This may be a false alarm.
I almost finished the draft for AHRS fusion with magnetometer (still based on CF), but when running the first sanity test with read_sensors.rs
, I realised that magnetometer readings are ignored:
// TODO: magnetometer. It's in the same format, but it's non-trivially
// rotated.
// TODO: Check checksum
interestingly, it is also missing in Windows driver implementation:
but Linux driver has it, and it has the same update frequency as the other sensors:
I wonder if it is difficult to extract relevant data from the frame?
Obviously, the complete fusion algorithm could only be tested after it. Alternatively, I could switch to another glasses with an existing implementation
I'd like to introduce capabilities similar to the Windows counterpart of this project:
https://github.com/MSmithDev/AirAPI_Windows
Which defined 2 API functions:
float* GetQuaternion()
{
mtx.lock();
q[0] = qt.array[0];
q[1] = qt.array[1];
q[2] = qt.array[2];
q[3] = qt.array[3];
mtx.unlock();
return q;
}
float* GetEuler()
{
mtx.lock();
e[0] = euler.angle.pitch;
e[1] = euler.angle.roll;
e[2] = euler.angle.yaw;
mtx.unlock();
return e;
}
The returned data could be easily updated by fusing 3-axis compass & 3-axis gyroscope with EKF/UKF. This capability can be enabled for all glasses.
Would you like to review it once it is finished?
I'm uncertain about your plan for the following code:
fn display_matrices(&self) -> Result<(DisplayMatrices, DisplayMatrices)> {
Err(Error::NotImplemented)
}
is it supposed to be the rotation orthogonal matrix for IMU-only glasses and transformation matrix for tracked glasses? If so, we don't need to implement it immediately.
Running cargo build --target aarch64-linux-android --verbose
gives
cargo build --target aarch64-linux-android --verbose
Fresh autocfg v1.1.0
Fresh cc v1.0.79
Fresh pkg-config v0.3.27
Fresh bytemuck v1.13.1
Fresh num-traits v0.2.16
Fresh safe_arch v0.7.1
Fresh rawpointer v0.2.1
Fresh cfg-if v1.0.0
Fresh static_assertions v1.1.0
Fresh bitflags v1.3.2
Fresh scopeguard v1.2.0
Fresh libc v0.2.147
Fresh approx v0.5.1
Fresh num-integer v0.1.45
Fresh num-complex v0.4.3
Fresh wide v0.7.11
Fresh paste v1.0.14
Compiling hidapi v2.4.1
Fresh matrixmultiply v0.3.7
Fresh bitflags v2.0.2
Fresh tinyjson v2.5.1
Fresh byteorder v1.4.3
Running `/home/sn99/Downloads/ar-drivers-rs-master/target/debug/build/hidapi-244def70a3e3da47/build-script-build`
Fresh nix v0.26.2
Compiling simba v0.8.1
Fresh typenum v1.16.0
Fresh num-rational v0.4.1
Compiling libusb1-sys v0.6.4
Compiling rusb v0.9.2
Running `/home/sn99/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name simba --edition=2018 /home/sn99/.cargo/registry/src/index.crates.io-6f17d22bba15001f/simba-0.8.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=80 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="std"' --cfg 'feature="wide"' -C metadata=47ec6e6ace1412ee -C extra-filename=-47ec6e6ace1412ee --out-dir /home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps --target aarch64-linux-android -C linker=/home/sn99/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang -L dependency=/home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps -L dependency=/home/sn99/Downloads/ar-drivers-rs-master/target/debug/deps --extern approx=/home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps/libapprox-ef5258c943a15217.rmeta --extern num_complex=/home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps/libnum_complex-2675a163087bd6a6.rmeta --extern num_traits=/home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps/libnum_traits-6407d669dc13bf7f.rmeta --extern paste=/home/sn99/Downloads/ar-drivers-rs-master/target/debug/deps/libpaste-b8a4ca751342c3a9.so --extern wide=/home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps/libwide-1c39544f96c044a6.rmeta --cap-lints allow`
Compiling serialport v4.2.2
Running `/home/sn99/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name libusb1_sys --edition=2018 /home/sn99/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=80 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=201450028b344926 -C extra-filename=-201450028b344926 --out-dir /home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps --target aarch64-linux-android -C linker=/home/sn99/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang -L dependency=/home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps -L dependency=/home/sn99/Downloads/ar-drivers-rs-master/target/debug/deps --extern libc=/home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps/liblibc-ee138b075719b2ac.rmeta --cap-lints allow -L native=/home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/build/libusb1-sys-45fa8d6d74cfaa9d/out -l static=usb-vendored`
Running `/home/sn99/Downloads/ar-drivers-rs-master/target/debug/build/rusb-081683cded2a227a/build-script-build`
Running `/home/sn99/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name serialport --edition=2018 /home/sn99/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serialport-4.2.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=80 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="libudev"' -C metadata=61d56f0899571aa3 -C extra-filename=-61d56f0899571aa3 --out-dir /home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps --target aarch64-linux-android -C linker=/home/sn99/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang -L dependency=/home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps -L dependency=/home/sn99/Downloads/ar-drivers-rs-master/target/debug/deps --extern bitflags=/home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps/libbitflags-24e29694f72f86d5.rmeta --extern cfg_if=/home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps/libcfg_if-931c0cdcdfd6cc3b.rmeta --extern nix=/home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps/libnix-90801f53a5fdd38b.rmeta --extern scopeguard=/home/sn99/Downloads/ar-drivers-rs-master/target/aarch64-linux-android/debug/deps/libscopeguard-8d68803e22ce5110.rmeta --cap-lints allow`
error: failed to run custom build command for `hidapi v2.4.1`
Caused by:
process didn't exit successfully: `/home/sn99/Downloads/ar-drivers-rs-master/target/debug/build/hidapi-244def70a3e3da47/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-changed=etc/hidapi/linux/hid.c
cargo:rerun-if-env-changed=LIBUSB_1.0_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64-linux-android
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64_linux_android
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-linux-android
cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_linux_android
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-linux-android
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_linux_android
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
--- stderr
thread 'main' panicked at 'Unable to find libusb-1.0: "pkg-config has not been configured to support cross-compilation.\n\nInstall a sysroot for the target platform and configure it via\nPKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a\ncross-compiling wrapper for pkg-config and set it via\nPKG_CONFIG environment variable."', /home/sn99/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/build.rs:72:60
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
I went through this ruabmbua/hidapi-rs#122 issue too, to find any hints but alas.
My env looks something like this:
export ANDROID_HOME=$HOME/Android/Sdk
export ANDROID_NDK_HOME=/home/sn99/Android/Sdk/ndk/25.2.9519653
export TOOLCHAIN=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64
export TARGET=aarch64-linux-android
export API=33
export AR=$TOOLCHAIN/bin/llvm-ar
export CC=$TOOLCHAIN/bin/$TARGET$API-clang
export AS=$CC
export CXX=$TOOLCHAIN/bin/$TARGET$API-clang++
export LD=$TOOLCHAIN/bin/ld
export RANLIB=$TOOLCHAIN/bin/llvm-ranlib
export STRIP=$TOOLCHAIN/bin/llvm-strip
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin
export PATH=$PATH:$TOOLCHAIN/bin
And .cargo/config
looks like this:
[target.aarch64-linux-android]
linker = "/home/sn99/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang"
Just got my Rokid MAX yesterday, and some quick tests show it is detected by your driver as a Rokid AIR.
The 3d switching example app seems to work.
The Max has a few more options though, like changing screen modes to 1920x1200 120hz or 3840x1200.
The IMU example didn't seem to work, but I didn't spend long testing so that's not conclusive.
I guess the Rokid Air driver is going to need to detect which is which and change its behaviour accordingly, because USB PID/VID detection can't tell the difference. (I don't have an Air).
In your blog you say the native SDK is easy to get, I spent hours searching and couldn't find it, where does one get it?
I am hoping to contribute enhancements to support the Maxs extra features.
I'm having trouble putting my Lights into Stereo mode.
They're running firmware version 05.5.08.059_20230518
, which appears to be the latest.
I added the following to NrealLight::new_common to print the firmware version:
let res = result.run_command(Packet {
category: b'3',
cmd_id: b'5',
..Default::default()
})?;
println!("firmware version={}", String::from_utf8(res).map_err(|_| Error::Other("Firmware version was not utf-8")).unwrap());
Could you check what firmware version you're running on your glasses?
The following firmwares are available in the latest APK:
01.1.04.008_20200922.bin
02.1.04.008_20200922.bin
03.1.04.008_20200922.bin
05.1.08.003_20220523.bin
05.5.08.056_20230317.bin
05.5.08.059_20230518.bin
I intend to use the sources available here https://ota.xreal.com/en/light-activation.html to downgrade my glasses to whatever version you're using.
A Rust port should be easy enough and could be included in this repo if you'd like.
Just started testing it on Windows (x86 processor, running read_sensors example), both the glasses HID & IMU HID devices can be found. But on initialisation, read_timeout will return 0 bit of data (debugging screenshot attached)
this will lead to the following error:
thread 'main' panicked at examples\read_sensors.rs:8:37:
called `Result::unwrap()` on an `Err` value: NotFound
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\panicking.rs:647
1: core::panicking::panic_fmt
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\core\src\panicking.rs:72
2: core::result::unwrap_failed
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\core\src\result.rs:1649
3: enum2$<core::result::Result<alloc::boxed::Box<dyn$<ar_drivers::ARGlasses>,alloc::alloc::Global>,enum2$<ar_drivers::Error> > >::unwrap
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97\library\core\src\result.rs:1073
4: read_sensors::main
at .\examples\read_sensors.rs:8
5: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97\library\core\src\ops\function.rs:250
6: core::hint::black_box
at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97\library\core\src\hint.rs:334
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
I wonder if you have seen similar things on Windows? Is there a configuration I have to set before using it?
I was trying to integrate Rust code into a C++ project using the Corrosion tool. This was necessary because I needed to build the project using CMake.
Despite being able to integrate Rust code and also including external dependencies, when I add the "ar-drivers" package as a dependency, I get a compilation error when using any function that manipulates objects of type std::string
.
This happens even when "ar-drivers" is included as a transitive dependency. If I include code from "ar-drivers" in a library called "my-lib" and then add it as a dependency to the project built with Corrosion, I still get the same error.
This problem doesn't occur if I simply include the code of "ar-drivers"; I must include the code and also use any function that involves or returns std::string
, such as the format!
macro.
The error seems to depend on the fact that the compiler can't find a library that was previously working correctly and was being found.
The compilation doesn't show any errors in the code I wrote. The entire error trace doesn't point to a specific location in the code where the error is generated but only shows errors related to "not found definitions":
/usr/bin/ld: librust_lib.a(hid.o): in function `copy_udev_string':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:187: undefined reference to `udev_device_get_sysattr_value'
/usr/bin/ld: librust_lib.a(hid.o): in function `create_device_info_for_device':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:592: undefined reference to `udev_device_get_syspath'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:593: undefined reference to `udev_device_get_devnode'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:595: undefined reference to `udev_device_get_parent_with_subsystem_devtype'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:605: undefined reference to `udev_device_get_sysattr_value'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:662: undefined reference to `udev_device_get_parent_with_subsystem_devtype'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:682: undefined reference to `udev_device_get_sysattr_value'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:686: undefined reference to `udev_device_get_parent_with_subsystem_devtype'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:691: undefined reference to `udev_device_get_sysattr_value'
/usr/bin/ld: librust_lib.a(hid.o): in function `create_device_info_for_hid_device':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:793: undefined reference to `udev_new'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:800: undefined reference to `udev_device_new_from_devnum'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:810: undefined reference to `udev_device_unref'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:811: undefined reference to `udev_unref'
/usr/bin/ld: librust_lib.a(hid.o): in function `hid_enumerate':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:862: undefined reference to `udev_new'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:869: undefined reference to `udev_enumerate_new'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:870: undefined reference to `udev_enumerate_add_match_subsystem'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:871: undefined reference to `udev_enumerate_scan_devices'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:872: undefined reference to `udev_enumerate_get_list_entry'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:885: undefined reference to `udev_list_entry_get_name'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:899: undefined reference to `udev_device_new_from_syspath'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:919: undefined reference to `udev_device_unref'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:875: undefined reference to `udev_list_entry_get_next'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:922: undefined reference to `udev_enumerate_unref'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hidapi-2.4.1/etc/hidapi/linux/hid.c:923: undefined reference to `udev_unref'
/usr/bin/ld: librust_lib.a(serialport-a53cc5783c26bbda.serialport.19bcbf8f7a8625d1-cgu.0.rcgu.o): in function `libudev::enumerator::Enumerator::match_subsystem':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:56: undefined reference to `udev_enumerate_add_match_subsystem'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `<libudev::context::Context as core::clone::Clone>::clone':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/context.rs:26: undefined reference to `udev_ref'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `<libudev::context::Context as core::ops::drop::Drop>::drop':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/context.rs:35: undefined reference to `udev_unref'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::context::Context::new':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/context.rs:51: undefined reference to `udev_new'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::from_raw':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:15: undefined reference to `udev_device_get_udev'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:15: undefined reference to `udev_ref'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `<libudev::device::Device as core::ops::drop::Drop>::drop':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:29: undefined reference to `udev_device_get_udev'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:31: undefined reference to `udev_device_unref'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:32: undefined reference to `udev_unref'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::from_syspath':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:54: undefined reference to `udev_device_new_from_syspath'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::is_initialized':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:69: undefined reference to `udev_device_get_is_initialized'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::devnum':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:75: undefined reference to `udev_device_get_devnum'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::syspath':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:88: undefined reference to `udev_device_get_syspath'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::devpath':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:98: undefined reference to `udev_device_get_devpath'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::devnode':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:108: undefined reference to `udev_device_get_devnode'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::parent':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:114: undefined reference to `udev_device_get_parent'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:118: undefined reference to `udev_device_ref'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::subsystem':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:134: undefined reference to `udev_device_get_subsystem'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::sysname':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:145: undefined reference to `udev_device_get_sysname'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::sysnum':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:158: undefined reference to `udev_device_get_sysnum'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::devtype':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:173: undefined reference to `udev_device_get_devtype'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::driver':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:178: undefined reference to `udev_device_get_driver'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::property_value':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:186: undefined reference to `udev_device_get_property_value'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::attribute_value':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:199: undefined reference to `udev_device_get_sysattr_value'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::properties':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:233: undefined reference to `udev_device_get_properties_list_entry'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::device::Device::attributes':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:254: undefined reference to `udev_device_get_sysattr_list_entry'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `<libudev::device::Properties as core::iter::traits::iterator::Iterator>::next':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:272: undefined reference to `udev_list_entry_get_name'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:273: undefined reference to `udev_list_entry_get_value'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:275: undefined reference to `udev_list_entry_get_next'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `<libudev::device::Attributes as core::iter::traits::iterator::Iterator>::next':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:323: undefined reference to `udev_list_entry_get_name'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/device.rs:325: undefined reference to `udev_list_entry_get_next'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `<libudev::enumerator::Enumerator as core::ops::drop::Drop>::drop':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:22: undefined reference to `udev_enumerate_get_udev'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:24: undefined reference to `udev_enumerate_unref'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:25: undefined reference to `udev_unref'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::enumerator::Enumerator::new':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:35: undefined reference to `udev_enumerate_new'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:38: undefined reference to `udev_ref'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::enumerator::Enumerator::match_is_initialized':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:47: undefined reference to `udev_enumerate_add_match_is_initialized'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::enumerator::Enumerator::match_parent':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:101: undefined reference to `udev_enumerate_add_match_parent'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::enumerator::Enumerator::add_syspath':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:129: undefined reference to `udev_enumerate_add_syspath'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::enumerator::Enumerator::scan_devices':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:138: undefined reference to `udev_enumerate_scan_devices'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:144: undefined reference to `udev_enumerate_get_udev'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:145: undefined reference to `udev_enumerate_get_list_entry'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `<libudev::enumerator::Devices as core::iter::traits::iterator::Iterator>::next':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:165: undefined reference to `udev_list_entry_get_name'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:167: undefined reference to `udev_list_entry_get_next'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/enumerator.rs:169: undefined reference to `udev_device_new_from_syspath'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `<libudev::monitor::Monitor as core::ops::drop::Drop>::drop':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/monitor.rs:25: undefined reference to `udev_monitor_get_udev'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/monitor.rs:27: undefined reference to `udev_monitor_unref'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/monitor.rs:28: undefined reference to `udev_unref'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::monitor::Monitor::new':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/monitor.rs:38: undefined reference to `udev_monitor_new_from_netlink'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/monitor.rs:41: undefined reference to `udev_ref'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::monitor::Monitor::clear_filters':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/monitor.rs:78: undefined reference to `udev_monitor_filter_remove'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::monitor::Monitor::listen':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/monitor.rs:87: undefined reference to `udev_monitor_enable_receiving'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `<libudev::monitor::MonitorSocket as std::os::fd::raw::AsRawFd>::as_raw_fd':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/monitor.rs:112: undefined reference to `udev_monitor_get_fd'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::monitor::MonitorSocket::receive_event':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/monitor.rs:123: undefined reference to `udev_monitor_receive_device'
/usr/bin/ld: librust_lib.a(libudev-dcc135525207f98d.libudev.b8a15c9b902ba02f-cgu.0.rcgu.o): in function `libudev::monitor::Event::sequence_number':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libudev-0.3.0/src/monitor.rs:204: undefined reference to `udev_device_get_seqnum'
/usr/bin/ld: librust_lib.a(linux_udev.o): in function `linux_udev_start_event_monitor':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:49: undefined reference to `udev_new'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:55: undefined reference to `udev_monitor_new_from_netlink'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:61: undefined reference to `udev_monitor_filter_add_match_subsystem_devtype'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:67: undefined reference to `udev_monitor_enable_receiving'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:72: undefined reference to `udev_monitor_get_fd'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:121: undefined reference to `udev_monitor_unref'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:125: undefined reference to `udev_unref'
/usr/bin/ld: librust_lib.a(linux_udev.o): in function `linux_udev_stop_event_monitor':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:150: undefined reference to `udev_monitor_unref'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:155: undefined reference to `udev_unref'
/usr/bin/ld: librust_lib.a(linux_udev.o): in function `linux_udev_event_thread_main':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:197: undefined reference to `udev_monitor_receive_device'
/usr/bin/ld: librust_lib.a(linux_udev.o): in function `udev_device_info':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:214: undefined reference to `udev_device_get_devnode'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:219: undefined reference to `udev_device_get_sysname'
/usr/bin/ld: librust_lib.a(linux_udev.o): in function `udev_hotplug_event':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:237: undefined reference to `udev_device_get_action'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:262: undefined reference to `udev_device_unref'
/usr/bin/ld: librust_lib.a(linux_udev.o): in function `linux_udev_scan_devices':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:275: undefined reference to `udev_enumerate_new'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:281: undefined reference to `udev_enumerate_add_match_subsystem'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:282: undefined reference to `udev_enumerate_add_match_property'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:283: undefined reference to `udev_enumerate_scan_devices'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:284: undefined reference to `udev_enumerate_get_list_entry'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:288: undefined reference to `udev_list_entry_get_name'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:291: undefined reference to `udev_device_new_from_syspath'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:295: undefined reference to `udev_device_unref'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:300: undefined reference to `udev_device_unref'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:287: undefined reference to `udev_list_entry_get_next'
/usr/bin/ld: /home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:303: undefined reference to `udev_enumerate_unref'
/usr/bin/ld: librust_lib.a(linux_udev.o): in function `linux_udev_hotplug_poll':
/home/dario/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libusb1-sys-0.6.4/libusb/libusb/os/linux_udev.c:314: undefined reference to `udev_monitor_receive_device'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/test-imu-rokid.dir/build.make:98: test-imu-rokid] Error 1
make[1]: *** [CMakeFiles/Makefile2:1019: CMakeFiles/test-imu-rokid.dir/all] Error 2
make: *** [Makefile:121: all] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.