Hi
If I remember rightly it did take a fair bit of experimentation to get it working correctly.
Watch carefully when building freenect 2, as you will need to invoke the correct options for building with CUDA. Instructions you have probably seen already are here https://github.com/OpenKinect/libfreenect2/blob/master/README.md#linux but its easy to get lost!
You also need to follow the instructions for cmake to allow third party applications to make use of freenect2, as well as building with c++11 options enabled. If I remember rightly you can invoke the options from the cmakelists.txt (found in the top level directory of the freenect2 folder) or add them as parameters when you run cmake …
Allowing third party:
cmake .. -Dfreenect2_DIR=$HOME/freenect2/lib/cmake/freenect2
Invoking c++11
cmake .. -DENABLE_CXX11=ON
Also from the kinect2_bridge instructions is an option for building with CUDA
cmake .. -DENABLE_CXX11=ON -DCUDA_PROPAGATE_HOST_FLAGS=off
but I used cmakelists.txt as mentioned above as it lets you catch the CUDA ON and OpenCL OFF flags more easily. The section with the options around line 34 should look like this:
SET(MY_DIR ${libfreenect2_SOURCE_DIR})
SET(DEPENDS_DIR "${MY_DIR}/depends" CACHE STRING "dependency directory must be set to 'false' if external deps are used")
OPTION(BUILD_SHARED_LIBS "Build shared (ON) or static (OFF) libraries" ON)
OPTION(BUILD_EXAMPLES "Build examples" ON)
OPTION(BUILD_OPENNI2_DRIVER "Build OpenNI2 driver" ON)
OPTION(ENABLE_CXX11 "Enable C++11 support" ON)
OPTION(ENABLE_OPENCL "Enable OpenCL support" OFF)
OPTION(ENABLE_CUDA "Enable CUDA support" ON)
OPTION(ENABLE_OPENGL "Enable OpenGL support" OFF)
OPTION(ENABLE_VAAPI "Enable VA-API support" OFF)
OPTION(ENABLE_TEGRAJPEG "Enable Tegra HW JPEG support" OFF)
OPTION(ENABLE_PROFILING "Collect profiling stats (memory consuming)" OFF)
If you set some of these differently it may not make a difference, as kinect2_bridge will try the different available options when launching. So if you had OpenCL set to on, k2b might try to run with opencl but then see it cannot on the TX2, and default to cpu. Just make sure that CUDA and C++11 are on. I believe the build samples flag needs to be ON too. If things do not work, experimenting with these flags can help.
Unfortunately the support for kinect2_bridge is not stellar and I have similarly not had much response from libfreenect2 page either, so you may just have to persevere. It definitely does work on the TX2.
I am assuming that you have CUDA built and running on the TX2, you can check its working by following the verification steps here https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#verify-installation .
Hope this helps!