This example describes entire setup that allows for launching multi-azure-recorder on Jetson Nano in local and distributed cases
Clone repo
git clone --recurse-submodules https://github.com/MobileRoboticsSkoltech/multi-azure-recorder
Install components
sudo apt-get update
sudo apt-get install ninja-build \
libssl-dev \
libxinerama-dev \
libxcursor-dev \
libboost-all-dev \
libsoundio-dev \
libjpeg-dev \
libvulkan-dev \
libudev-dev \
curl \
libk4a1.4-dev
Add Microsoft repo
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/multiarch/prod
sudo apt-get update
Add Depth Engine support
sudo apt-get install libk4a1.4-dev
sudo ln -s /usr/lib/aarch64-linux-gnu/libk4a1.4/libdepthengine.so.2.0 /lib/aarch64-linux-gnu/libdepthengine.so.2.0
Add temporary images streaming to RAM
sudo mkdir /mnt/mrob_tmpfs
sudo mount -t tmpfs -o size=512m tmpfs /mnt/mrob_tmpfs
echo 'tmpfs /mnt/mrob_tmpfs tmpfs nodev,nosuid,noexec,nodiratime,size=512M 0 0' | sudo tee -a /etc/fstab
Add possibility to run azure software without sudo
sudo cp ../scripts/99-k4a.rules /etc/udev/rules.d/
Build
mkdir build && cd build
cmake .. -GNinja
ninja
(For distributed case only) Support remote control
sudo apt install python3.8 # python>=3.6 for websockets>=10 during uvicorn[standard] install
sudo apt-get install python3.8-dev
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
sudo apt install python3-pip
pip3 install fastapi
pip3 install uvicorn[standard]
On Jetson Nano (server)
Can be setup by cron, etc to launch during every boot
sudo sh -c 'echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb' # increase USB buf size
export DISPLAY=:0 # if through SSH to avoid errors
./recorder.py --distributed TRUE
On server (Jetson Nano)
Can be setup by cron, etc to launch during every boot
sudo sh -c 'echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb' # increase USB buf size
export DISPLAY=:0
uvicorn server:app --host 0.0.0.0 # for distributed case only, in another terminal
On Client (project assumed to be already installed)
./recorder.py --distributed TRUE