code-iai / iai_kinect2

Tools for using the Kinect One (Kinect v2) in ROS
Apache License 2.0
879 stars 520 forks source link

OpenCL Depth Registration Error #455

Open alek5k opened 7 years ago

alek5k commented 7 years ago

Hello!

I get the following error when I try to run the kinect2_grabber with default settings (ie. via the launch file):

[ERROR] [1510797861.965176596]: [DepthRegistrationOpenCL::init] depth_registration_opencl.cpp data->context = cl::Context(data->device, NULL, NULL, NULL, &err) failed: 999

Running Protonect works fine with openGL, but does not seem to work with openCL.

I have compiled libfreenect2 with the following flags, and it shows OpenCL as being included: -- Feature list: -- CUDA yes -- CXX11 yes -- Examples yes -- OpenCL yes -- OpenGL yes -- OpenNI2 yes -- TegraJPEG no -- Threading std::thread -- TurboJPEG yes -- VAAPI no -- VideoToolbox no (Apple only)

If i run the ros node with registration method parameter set to cpu, the kinect bridge works. Ie:

rosrun kinect2_bridge kinect2_bridge _reg_method:=cpu

I am assuming it fails because the underlying libfreenect2 isn't playing ball with openCL. I want to leave this issue here for visibility in case someone else runs into the same issue.

Otherwise, any ideas for getting it to run with OpenCL?