code-iai / iai_kinect2

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

iai_kinect2 docker compatibility #485

Closed itabr closed 6 years ago

itabr commented 6 years ago

I am trying to use iai_kinect2 within docker, i am using this component outside on same system and it works correctly but within docker container it fails. so when i run this within the container:

roslaunch kinect2_bridge kinect2_bridge.launch:

I get this error:

 /root/workspace/ros/devel/lib/kinect2_bridge/kinect2_bridge: /usr/local/cuda/lib64/libOpenCL.so.1: no version information available (required by /root/workspace/ros/devel/lib/libdepth_registration.so)
 /root/workspace/ros/devel/lib/kinect2_bridge/kinect2_bridge: /usr/local/cuda/lib64/libOpenCL.so.1: no version information available (required by /root/workspace/ros/devel/lib/libdepth_registration.so)
 /root/workspace/ros/devel/lib/kinect2_bridge/kinect2_bridge: /usr/local/cuda/lib64/libOpenCL.so.1: no version information available (required by /usr/local/lib/libfreenect2.so)
 /root/workspace/ros/devel/lib/kinect2_bridge/kinect2_bridge: /usr/local/cuda/lib64/libOpenCL.so.1: no version information available (required by /usr/local/lib/libfreenect2.so)
 [DepthRegistration::New] Using OpenCL registration method!
 [DepthRegistration::New] Using OpenCL registration method!
 [OpenCLDepthPacketProcessor::init] ERROR: clGetPlatformIDs(-1001)
 terminate called after throwing an instance of 'cl::Error'
   what():  clGetPlatformIDs
 Aborted (core dumped)

I run the contianer using like this :

  sudo docker run --rm -it\
    --net=host \
    --device /dev/bus/usb:/dev/bus/usb \
    --env="QT_X11_NO_MITSHM=1" \
    -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
    -e DISPLAY=$DISPLAY \

I was wondering if there is any other specific configuration that needed to be done to use iai_kinect2 within container.

FedericoDorado commented 1 year ago

Hello Itabr, how did you fix this problem?