ar-drivers

Crates.ioar-drivers
lib.rsar-drivers
version0.4.3
sourcesrc
created_at2023-01-25 19:25:55.819748
updated_at2023-10-11 10:10:10.324896
descriptionOpensource driver for Rokid, Nreal and some other AR glasses
homepage
repositoryhttps://github.com/badicsalex/ar-drivers-rs
max_upload_size
id767727
size124,591
Alex Badics (badicsalex)

documentation

https://docs.rs/ar-drivers

README

AR driver library for Rust

Crates.io Docs.rs

This repository contains is a simplified Rust SDK for the following glasses:

  • XREAL Air
  • XREAL Light
  • Rokid Air
  • Rokid Max
  • Grawoow G530 (a.k.a. Metavision M53)
  • Mad Gaze Glow

It supports getting basic sensor data and setting up the display.

While only the these glasses is supported right now, if I could get my hands on some other ones, I'd happily support them too.

There's are two somewhat detailed blog posts documenting the various protocols too. So if you're only interested in that, you won't even need to read Rust code :)

3D SBS mode switching

Some people only need programmatic mode switching. For that, all you need to do is:

Install dependencies (rust and libudev)

sudo apt install cargo libudev-dev libstdc++-12-dev
cargo update

Optional: add the udev scripts to your udev config, so the glasses are available to regular users:

sudo cp udev/* /etc/udev/rules.d/
sudo udevadm control --reload

Run the code directly:

cargo run --example set_to_3d

Or build and then run:

cargo build --release --example set_to_3d
target/release/examples/set_to_3d

The executable is statically linked so you can copy it around, even to other PCs.

Contribution

I appreciate reported bugs, feature requests and of course pull request.

License

Licensed under the MIT license

Legal stuff

Some parts of the protocols were obtained with reverse engineering.

Reverse engineering explicitly allowed in the EU for interworking purposes. It's probably fair use everywhere else, but you should check your own country's laws.

The project is not affiliated with any of the manufacturers or their related entities.

Commit count: 83

cargo fmt