Getting SoftKinetic’s DepthSense SDK to work on Arch Linux

Now using 3D sensing technologies for my research activities, I’ve worked so far with well-known Microsoft Kinect and Asus Xtion cameras, both offering comparable technical characteristics, the latter being substantially more practical to use due to its limited size, but the former being definitely more USB 3.0-friendly, which is now a requirement for most recent computers without USB 2.0 ports. Anyway, although these sensors show decent performance for rather general applications, their depth sensing abilities are quite limited both in terms of resolution and range.

Looking fopr alternative depth sensors, I recently came across time-of-flight cameras from Belgian company SoftKinetic, and especially the DepthSense 325 designed for close-range observation, see for instance their YouTube video for a short (simplistic) technical comparison with Microsoft Kinect, also skip the part starting at 3:00 where they demonstrate their $1500 proprietary software. The camera itself is rather affordable, though, so the main question was more whether it would be technically be able to use it or not, fortunately an SDK for Linux has been made available mid-2013 and regularly updated since then, so I decided to give it a try!

Having received it just a few days after ordering it online, I quickly ran a few tests on my personal computer, which went fine. On another hand, the computer in question is running an old version of Ubuntu (which is actually a “good” thing as the SDK isn’t supporting recent releases, as reported by many users on SoftKinetic’s forum) and offers USB 2.0 ports (same remark). However, what I was more interested in knowing was whether the camera would be compatible my daily work computer’s Arch Linux and USB 3.0-only ports. Long story short, it eventually was, but getting everything to work was not so straightforward.

SoftKinetic’s products being rather unknown compared to Microsoft’s, they have unfortunately not attracted much attention by the open source community yet, so for now, we still have to stick to the proprietary drivers. At the time of writing this blog post, three files are available for download: precompiled binaries gathered in a tar.gz archive dated November 2013 (four months ago), or in .deb or .rpm packages last updated on January 31st 2014 (two weeks ago). After going through the process of installing the latter on Arch (see my GitHub repository for a tentative PKGBUILD), running the DepthSenseViewer demo program made it crash instantly with quite an obscure error message: “Unable to receive message (connection broken by peer)”. Of course with no further information in the console, else it would be no fun, would it? Now, using the four-month-old binaries yielded the same error, but with more details:

./DepthSenseViewer
=================================================================
DepthSenseServer log started Tue Feb 11 17:36:07 2014
=================================================================
Tue Feb 11 17:36:07 2014: [00007dac]: INFO: DepthSenseServer version 1.2.2.958 linux64 gcc (Release)
Tue Feb 11 17:36:07 2014: [00007dac]: INFO: logging to STDERR
Tue Feb 11 17:36:07 2014: [00007dad]: INFO: using default connection timeout
Tue Feb 11 17:36:07 2014: [00007dad]: INFO: listening on port 6909
Tue Feb 11 17:36:07 2014: [00007dae]: WARNING: Initialization Exception: no enumerator found, some dll files are missing
Tue Feb 11 17:36:07 2014: [00007dae]: ERROR: no enumerator found, some dll files are missing
Tue Feb 11 17:36:07 2014: [00007dae]: INFO: number of connections: 0
=================================================================

Apparently, this problem has been around for some time, as reported on SoftKinetic’s official forums, but for some reason, the official position seems to support Ubuntu 12.04 only. Anyway, a user named bzk found out this problem was is still due to a library problem, more specifically to the fact that the precompiled binaries rely on an outdated version of libudev.so.0, and won’t work with recent versions. From there, you need to retrieve the libraries that were used at the time of Ubuntu 12.04 (which you can find here), add them to your LD_LIBRARY_PATH, and voilà, you’re set for great depth sensing adventures!

V for Victory, depth map style

V for Victory, depth map style

Advertisements
7 comments
  1. Arunas said:

    I have found your contact on SoftKitetic forum.

    I am trying working with two DS325 simultaneously.
    Maybe you know the way how to grab color and dept data from both sensors?
    RE: arunas.lipnickas{eta}ktu.lt

  2. Peter said:

    Thanks, the udev bug solution was very helpfull

  3. Jack said:

    Hey concerning the udev problem, you can also create a symbolic link inside the driver to point to your version of libudev. It worked great for me:
    cd /opt/softkinetic/DepthSenseSDK/lib
    sudo ln -s /libudev.so.1 ./libudev.so.0

    • ph4m said:

      Right, this is also what I do under Ubuntu 14.04 :)

  4. Patric said:

    Yo that was my post there in the forum.. took me a longer while of debugging with strace and even reading source code until I had found it. Then some weeks passed, and again, and this in now like the 3rd time I rediscover my own solution due to your blog post, so thanks for writing this up! :)

    • ph4m said:

      Well, thanks for coming up with it in the first place!

  5. Herman said:

    I download your file “libudev.so.0” and copy it to /usr/lib
    then everything works!! thank you very much

    sudo cp /libudev.so.0 /usr/lib
    sudo ldconfig

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: