Skip to content

Instantly share code, notes, and snippets.

@CrispyPin
Last active December 20, 2021 13:18
Show Gist options
  • Save CrispyPin/9d431b59c954bf0b99beeec7fffe1497 to your computer and use it in GitHub Desktop.
Save CrispyPin/9d431b59c954bf0b99beeec7fffe1497 to your computer and use it in GitHub Desktop.
Getting apriltags VR Fullbody working on Pop OS

Getting April Tag VR Fullbody Trackers working on Pop OS/Linux

This is probably fine for most distros but I have not tested it.

Compiling the main app

Install the dependencies libopencv-dev and libopencv-contrib-dev with your package manager
sudo apt install libopencv-dev libopencv-contrib-dev

Get the source code:
git clone https://github.com/ju1ce/April-Tag-VR-FullBody-Tracker
cd April-Tag-VR-FullBody-Tracker
git checkout linux
git submodule update --init

Compile it:
cmake -B build
cmake --build build -j8
replace 8 with number of cpu threads

The executable should now be at build/AprilTagTrackers/AprilTagTrackers so put that somewhere convenient. As far as I can tell you have to start it from a terminal (also it will spam errors but it's fine).

Compiling the driver

Download the driver source code
git clone https://github.com/ju1ce/Simple-OpenVR-Bridge-Driver
cd Simple-OpenVR-Bridge-Driver
git checkout linux
git submodule update --init

Update the linalg library to make it actually compile (should not be needed in the future)
cd libraries/linalg
git checkout main
cd ../..

Compile the driver
cmake -B build
cmake --build build

Now the driver files should be in build/apriltagtrackers but the binary has the wrong name (should be fixed in future), so rename it:
mv build/apriltagtrackers/bin/linux64/libdriver_apriltagtrackers.so build/apriltagtrackers/bin/linux64/driver_apriltagtrackers.so
(just the lib part is wrong)

Installing the driver

To add it to SteamVR you need to copy or symlink it to SteamVRs driver folder
cp -r build/apriltagtrackers ~/.steam/debian-installation/steamapps/common/SteamVR/drivers/

Then you need to make steamvr actually load it by editing ~/.steam/debian-installation/config/steamvr.vrsettings
add the line "activateMultipleDrivers" : true, under "steamvr": { (this section is near the end of the file).

Camera settings

For better tracking you need low exposure, and high brightness/gain to compensate. What is available varies from camera to camera but you should be able to use v4l2-ctl (from the package v4l-utils) assuming it's a USB camera.

Setup

See https://github.com/ju1ce/April-Tag-VR-FullBody-Tracker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment