Leap motion hand tracking in gentoo linux

Tue, Dec 15, 2020 2-minute read

Leap motion dev kit

The other day I decided to dust off my old leap motion handtracking kit and see if things still work in modern linux. A long time ago, I got into the developer program, so I had a somewhat janky prerelease bit of hardware in minimalist packaging (shown above). Unfortunately, the last update of leap motion SDK (orion/4.0+) was never released for linux, but the 2.3.1 release is still somewhat usable.

Once you’ve downloaded the SDK from leap’s website, unpack the tarball.

Make sure to run leapd as root first i.e. if you unpacked the tarball in ~/leap_motion_sdk:

1
sudo ~/leap_motion_sdk/LeapDeveloperKit_2.3.1+31549_linux/tarball/usr/sbin/leapd

which should show output similar to that below:

1
2
3
4
5
6
7
8
Configuration file not found
Resetting /var//.Leap Motion/config.json.
[Info] WebSocket server started
[Info] Secure WebSocket server started
[Info] Leap Motion Controller detected: DEV-XXXXXX
[Info] Firmware is up to date.
[Info] Tracking optimized for head-mounted device
[Info] Tracking optimized for up-facing device

Note: XXXXXX above will correspond to whatever hardware ID your device has.

At this point you can run any of the samples provided with the SDK in this folder:

1
~/leap_motion_sdk/LeapDeveloperKit_2.3.1+31549_linux/tarball/usr/bin

One of the more amusing ones is the Playground executable which lets you interact with virtual objects. Hand tracking here suffered a bit in my experience, but worked well enough to get a feel for how things would work.