Quick note:

libfreenect2 is used on Jetsons to talk to MS Kinect camera. It also interacts heavily with CUDA on jetsons, which makes building difficult for other devices.

Hence, there are some hoops to go through, to make any project interacting with libfreenect2 buildable on local computer, such that it also will compile and work when built on the Jetson...


  1. Install libfreenect2 on your device, in /opt directory. (Yes, really. Sorry. That's where Jetsons expect it to be).

  2. Build the PingCam-Kinect project on the Jetson.

    • Use the build pingcam kinect script in svn../code/scripts/jetson_scripts
    • Ensure that the project builds. If not, double-check the libfreenect2 installation directions
    • Run pingcam with the kinect connected, see if the kinect responds.
  3. On Your own Netbeans projects, make sure the following are true:

    • c++ 11, ofc.
    • C++ Compiler, include directories /opt/freenect2/include;/opt/freenect2/lib;/opt/freenect2;/usr/local/cuda-6.5/include;/usr/local/cuda-6.5/lib;/usr/local/cuda-6.5;/usr/lib/arm-linux-gnueabihf/tegra
    • C++ Linker, runtime search directories /opt/freenect2/lib
    • WHEN BUILDING LOCALLY (not on jetson): Additional Options: -L/usr/local/cuda-6.5/lib -L/opt/freenect2/lib -lfreenect2 -pthread
    • WHEN BUILDING ON JETSON: Additional Options: -L/usr/local/cuda-6.5/lib -L/opt/freenect2/lib -lcudart -lfreenect2 -pthread (note the presence of -lcudart!!)
  4. Whenever building locally, remove the -lcudart option; add it back before any commit to the svn, to make sure that the jetson build scripts work.

  5. When SSH-calling an applet, GLFW may error out and prevent functionality, if you just call the executable as-is. You may need to preface every call with DISPLAY=:0. E.g.
    ubuntu@tegra-ubuntu12:~...$: DISPLAY=:0 ./pingcam-kinect