So a bit ago I bought a DepthSense 325 camera. I’ve been pretty busy since then but today I finally sat down to get started with it. First thing, it was on my netbook so I had to resetup the software stack and SDK. The SDK is free from softkinetic and works on Linux (which is awesome, and also a big reason I bought this camera) but I think it’s more aimed at Ubuntu 12.04 so there was one or two extra steps to make it go on 13.10.
First, regardless of Ubuntu version, you need to add the DepthSense libraries to the LD_LOAD_PATH and the now recommended way is adding a file to /etc/ld.so.conf.d like this
sudo ldconfig to regenerate the ld.so cache or what ever. Now you can link agianst the libraries.
Next, at least for Ubuntu 13.10, you need to fake having libudev.so.0. Thankfully libudev.so.1 worked fine so run
sudo ln -s /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0
At this point DepthSenseViewer that comes with the SDK should work and you are good to go.
So today’s mission after getting set up was to get some code pulling form the camera and displaying using opencv (because I ultimately want to feed it through ROS filters and as was suggested on a forum post, the best way to hook the DS325 into ROS was through openCV and then the ros opencv bridge). Thankfully I found what I needed on the softkinetic forum in Example Linux/OpenCV Code to display/store DS325 data. The first code needed some slight fixes as detailed in the second (but slightly corrupted formatted) post. With a little poking and proding I had it compiling and working.
g++ ds_show.cxx -I /opt/softkinetic/DepthSenseSDK/include/ -L /opt/softkinetic/DepthSenseSDK/lib -lDepthSense -lopencv_core -lopencv_highgui ./a.out
Not actually that much coding today, but a lot of pieces in place.
See ds_show.cxx in /resources/ds_show.cxx