luxonis / depthai-viewer

Log images, point clouds, etc, and visualize them effortlessly. Built in Rust using egui
https://rerun.io
Apache License 2.0
28 stars 2 forks source link

Support on NVIDIA TX2 #70

Closed tchomes-dev closed 4 months ago

tchomes-dev commented 4 months ago

Like the title says I'm unable to get the viewer to run on a Jetson TX2. There is the rust workaround from an older thread but was wondering if it has a native build.

I've tried installing the wheel for aarch64 but I get a not supported wheel on platform error.

tchomes-dev commented 4 months ago

I might have found a solution but ran into a runtime error after connecting an OAK-D S2. Will come back later to post a solution.

tchomes-dev commented 4 months ago

Heres a solution to running depthai-viewer on an Orbitty/Quasar breakout board with a NVIDIA TX2 running Ubuntu 18.04.

Initial steps are to download and flash a custom OS image using Nvidia's SDK manager following the steps provided by Connect-Tech's BSP installation instructions here. You may skip this step if you've already done so.

  1. Next is to update & upgrade current packages as well as install CURL $ sudo apt-get update && apt-get upgrade $ sudo apt-get install curl

  2. After installing CURL we shall install pyenv so it's easier to manage different Python builds. First is to install prerequisites for pyenv to install correctly. $ sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ xz-utils tk-dev libffi-dev liblzma-dev python-openssl git Then to install pyenv and a new environment using Python 3.9.19 $ curl https://pyenv.run | bash You may have to follow further instructions provided in the terminal in regards to PATH and restart the current shell. $ pyenv install 3.9.19 $ pyenv virtualenv 3.9.19 depthai Then activate your pyenv with $ pyenv activate depthai

  3. Next is to install RUST and maturin 0.14.10 following similar instructions from this other issue. $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh $ python3 -m pip install maturin==0.14.10

  4. Clone the depthai-viewer repo and enter the newly downloaded folder $ git clone https://github.com/luxonis/depthai-viewer.git $ cd ./depthai-viewer

  5. Update RUST version in the repo folder as it overrides the one installed a few steps before for some reason. A reliable way of making sure the next steps work is to edit the rust-toolchain file to run the lastest RUST version. Change _channel = "1.74"_ to _channel = "1.79"_ or whatever the latest rust version is. Or you can try $ rustup update stable

  6. Next is to build using maturin maturin build --compatibility manylinux_2_31 --manifest-path rerun_py/Cargo.toml --release --no-default-features --features pypi --universal2 --out dist This step takes the longest so go grab food or a coffee.

  7. Lastly pip install rerun.py and restart your shell python3 -m pip install ./rerun.py

  8. After restarting the shell activate the pyenv and you should now be able to run the viewer :) $ pyenv activate depthai $ depthai-viewer

Let me know if you have any issues during the installation and I'll try to help as soon as possible.