karlpauwels / simtrack

A simulation-based framework for tracking
BSD 3-Clause "New" or "Revised" License
103 stars 40 forks source link

Unable to launch Kinect V2 #31

Closed TrinhNC closed 7 years ago

TrinhNC commented 7 years ago

Hi, When I launch Kinect V2 by this command roslaunch simtrack_nodes main_kinect2.launch this error appears, while launching the kinect2_bridge (roslaunch kinect2_bridge kinect2_bridge.launch) works normally. I'm using Ubuntu 16.04, GPU: GTX 1060, Kinect v2. Please help!

[ INFO] [1508246409.974713887]: Loading nodelet /kinect2_bridge of type kinect2_bridge/kinect2_bridge_nodelet to manager kinect2 with the following remappings:
process[kinect2_points_xyzrgb_hd-6]: started with pid [12491]
process[simtrack-7]: started with pid [12514]
[ INFO] [1508246409.994208224]: waitForService: Service [/kinect2/load_nodelet] has not been advertised, waiting...
[ INFO] [1508246410.001852354]: Initializing nodelet with 4 worker threads.
[ INFO] [1508246410.015160900]: waitForService: Service [/kinect2/load_nodelet] is now available.
[ INFO] [1508246410.092816398]: [Kinect2Bridge::initialize] parameter:
        base_name: kinect2
           sensor: default
        fps_limit: -1
       calib_path: /home/tncong/catkin_ws/src/iai_kinect2/kinect2_bridge/data/
          use_png: false
     jpeg_quality: 90
        png_level: 1
     depth_method: default
     depth_device: 1
       reg_method: default
       reg_device: -1
        max_depth: 12
        min_depth: 0.1
       queue_size: 5
 bilateral_filter: true
edge_aware_filter: true
       publish_tf: false
     base_name_tf: kinect2
   worker_threads: 4
[Error] [CudaDepthPacketProcessorImpl] No CUDA device found
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
[Error] [VaapiRgbPacketProcessorImpl] vaInitialize(display, &major_ver, &minor_ver): unknown libva error
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 7 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @2:5 with serial 003177364147
[Info] [Freenect2Impl] found 1 devices
[ INFO] [1508246410.141869668]: [Kinect2Bridge::initDevice] Kinect2 devices found: 
[ INFO] [1508246410.141922343]: [Kinect2Bridge::initDevice]   0: 003177364147 (selected)
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 60*8*33792
[Info] [Freenect2DeviceImpl] opened
[ INFO] [1508246410.234500297]: [Kinect2Bridge::initDevice] starting kinect2
[Info] [Freenect2DeviceImpl] starting...
[Info] [Freenect2DeviceImpl] submitting rgb transfers...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
...
long rows of [Error] [DepthPacketStreamParser] Packet buffer is NULL
...
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Info] [Freenect2DeviceImpl] canceling depth transfers...
[Info] [Freenect2DeviceImpl] stopped
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware
(If you have multiple ICDs installed and OpenCL works, you can ignore this message)
[ INFO] [1508246411.100264117]: [DepthRegistration::New] Using OpenCL registration method!
[ INFO] [1508246411.100310863]: [DepthRegistration::New] Using OpenCL registration method!
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware
(If you have multiple ICDs installed and OpenCL works, you can ignore this message)
[ INFO] [1508246411.131432441]: [DepthRegistrationOpenCL::init] devices:
[ INFO] [1508246411.131676726]: [DepthRegistrationOpenCL::init]   0: GeForce GTX 1060 6GB
[ INFO] [1508246411.131751125]: [DepthRegistrationOpenCL::init] selected device: GeForce GTX 1060 6GB
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware
(If you have multiple ICDs installed and OpenCL works, you can ignore this message)
[ INFO] [1508246411.257405374]: [DepthRegistrationOpenCL::init] devices:
[ INFO] [1508246411.257566021]: [DepthRegistrationOpenCL::init]   0: GeForce GTX 1060 6GB
[ INFO] [1508246411.257661975]: [DepthRegistrationOpenCL::init] selected device: GeForce GTX 1060 6GB
[ INFO] [1508246411.367064580]: [Kinect2Bridge::main] waiting for clients to connect
[ INFO] [1508246411.560261181]: [Kinect2Bridge::callbackStatus] client connected. starting device...
[Info] [Freenect2DeviceImpl] starting...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Info] [Freenect2DeviceImpl] started
[Info] [Freenect2DeviceImpl] stopping...
[Info] [Freenect2DeviceImpl] canceling depth transfers...
[Error] [DepthPacketStreamParser] Packet buffer is NULL
JimmyDaSilva commented 7 years ago

As you have only one GPU you need to specify the use of the device 0 in the kinect launch file: https://github.com/karlpauwels/simtrack/blob/master/simtrack_nodes/launch/camera_kinect2.launch

TrinhNC commented 7 years ago

Hi Jimmy, I changed value to 0, now this error pop ups:

beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware
(If you have multiple ICDs installed and OpenCL works, you can ignore this message)
[ INFO] [1508252027.160521463]: [DepthRegistrationOpenCL::init] devices:
[ INFO] [1508252027.160696308]: [DepthRegistrationOpenCL::init]   0: GeForce GTX 1060 6GB
[ INFO] [1508252027.160780578]: [DepthRegistrationOpenCL::init] selected device: GeForce GTX 1060 6GB
[ INFO] [1508252027.267993453]: [Kinect2Bridge::main] waiting for clients to connect
[ INFO] [1508252027.534312640]: [Kinect2Bridge::callbackStatus] client connected. starting device...
[Info] [Freenect2DeviceImpl] starting...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Info] [Freenect2DeviceImpl] started
[Info] [Freenect2DeviceImpl] stopping...
[Info] [Freenect2DeviceImpl] canceling depth transfers...
[Info] [Freenect2DeviceImpl] stopped
[Info] [Freenect2DeviceImpl] starting...
[Info] [Freenect2DeviceImpl] submitting rgb transfers...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Info] [Freenect2DeviceImpl] started
[Info] [RgbPacketStreamParser] packetsize or sequence doesn't match!
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
terminate called after throwing an instance of 'std::runtime_error'
  what():  initializeCUDARuntime: CUDA initialization problem

[ INFO] [1508252028.495397886]: [Kinect2Bridge::callbackStatus] no clients connected. stopping device...
[Info] [Freenect2DeviceImpl] stopping...
[Info] [Freenect2DeviceImpl] canceling rgb transfers...
[simtrack-7] process has died [pid 24734, exit code -6, cmd /home/tncong/catkin_ws/devel/lib/simtrack_nodes/multi_rigid_node rgb:=/kinect2/hd/image_mono_rect rgb/compressed:=/kinect2/hd/image_mono_rect/compressed rgb_info:=/kinect2/hd/camera_info depth:=/kinect2/qhd/image_depth_rect depth/compressed:=/kinect2/qhd/image_depth_rect/compressed __name:=simtrack __log:=/home/tncong/.ros/log/f97f0694-b34a-11e7-a02f-107b4447c528/simtrack-7.log].
log file: /home/tncong/.ros/log/f97f0694-b34a-11e7-a02f-107b4447c528/simtrack-7*.log
[Info] [Freenect2DeviceImpl] canceling depth transfers...
[Info] [Freenect2DeviceImpl] stopped
JimmyDaSilva commented 7 years ago

And you say running roslaunch kinect2_bridge kinect2_bridge.launch works ?

With which depth methods? opencl, opengl, cuda ? Please try them all

TrinhNC commented 7 years ago

Yes, this roslaunch kinect2_bridge kinect2_bridge.launch works normally. I have tried opencl by replacing depth_method and reg_method in kinect2_bridge.launch to cpu, but same error occurred. How to try the others?

JimmyDaSilva commented 7 years ago

write opengl, or cudaas the depth_method

TrinhNC commented 7 years ago

Same error for both :(

JimmyDaSilva commented 7 years ago

Well you gotta solve your opencl/opengl/cuda configuration first then. I recommend you uninstall graphics drivers and reinstall cuda from scratch. Then follow the libfreenect2 instructions.

TrinhNC commented 7 years ago

Yeah, I will try that. But it's weird that roslaunch kinect2_bridge kinect2_bridge.launch works.

JimmyDaSilva commented 7 years ago

Well only in cpu mode. And simtrack needs cuda method

TrinhNC commented 7 years ago

Ah, by the "same error" that I mentioned in previous comments, I mean the error caused by simtrack command. The roslaunch kinect2_bridge kinect2_bridge.launch works with all of these depth_method opencl/opengl/cuda. Here is the output of kinect2_bridge.launch:

setting /run_id to c4d1a8e2-b3d2-11e7-a02f-107b4447c528
process[rosout-1]: started with pid [6655]
started core service [/rosout]
process[kinect2-2]: started with pid [6672]
process[kinect2_bridge-3]: started with pid [6673]
process[kinect2_points_xyzrgb_sd-4]: started with pid [6674]
process[kinect2_points_xyzrgb_qhd-5]: started with pid [6675]
[ INFO] [1508310348.988631488]: Loading nodelet /kinect2_bridge of type kinect2_bridge/kinect2_bridge_nodelet to manager kinect2 with the following remappings:
process[kinect2_points_xyzrgb_hd-6]: started with pid [6681]
[ INFO] [1508310348.992648796]: waitForService: Service [/kinect2/load_nodelet] has not been advertised, waiting...
[ INFO] [1508310349.010996064]: Initializing nodelet with 4 worker threads.
[ INFO] [1508310349.013520486]: waitForService: Service [/kinect2/load_nodelet] is now available.
[ INFO] [1508310349.060804056]: [Kinect2Bridge::initialize] parameter:
        base_name: kinect2
           sensor: default
        fps_limit: -1
       calib_path: /home/tncong/catkin_ws/src/iai_kinect2/kinect2_bridge/data/
          use_png: false
     jpeg_quality: 90
        png_level: 1
     depth_method: cpu
     depth_device: -1
       reg_method: default
       reg_device: -1
        max_depth: 12
        min_depth: 0.1
       queue_size: 5
 bilateral_filter: true
edge_aware_filter: true
       publish_tf: false
     base_name_tf: kinect2
   worker_threads: 4
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
[Error] [VaapiRgbPacketProcessorImpl] vaInitialize(display, &major_ver, &minor_ver): unknown libva error
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 7 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @2:7 with serial 003177364147
[Info] [Freenect2Impl] found 1 devices
[ INFO] [1508310349.077410521]: [Kinect2Bridge::initDevice] Kinect2 devices found: 
[ INFO] [1508310349.077434138]: [Kinect2Bridge::initDevice]   0: 003177364147 (selected)
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 60*8*33792
[Info] [Freenect2DeviceImpl] opened
[ INFO] [1508310349.174470210]: [Kinect2Bridge::initDevice] starting kinect2
[Info] [Freenect2DeviceImpl] starting...
[Info] [Freenect2DeviceImpl] submitting rgb transfers...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Info] [Freenect2DeviceImpl] started
[ INFO] [1508310349.634869107]: [Kinect2Bridge::initDevice] device serial: 003177364147
[ INFO] [1508310349.634945810]: [Kinect2Bridge::initDevice] device firmware: 4.0.3911.0
[Info] [Freenect2DeviceImpl] stopping...
[Info] [Freenect2DeviceImpl] canceling rgb transfers...
[Info] [Freenect2DeviceImpl] canceling depth transfers...
[Info] [Freenect2DeviceImpl] stopped
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware
(If you have multiple ICDs installed and OpenCL works, you can ignore this message)
[ INFO] [1508310350.114321731]: [DepthRegistration::New] Using OpenCL registration method!
[ INFO] [1508310350.114366371]: [DepthRegistration::New] Using OpenCL registration method!
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware
(If you have multiple ICDs installed and OpenCL works, you can ignore this message)
[ INFO] [1508310350.145241506]: [DepthRegistrationOpenCL::init] devices:
[ INFO] [1508310350.145367176]: [DepthRegistrationOpenCL::init]   0: GeForce GTX 1060 6GB
[ INFO] [1508310350.145481526]: [DepthRegistrationOpenCL::init] selected device: GeForce GTX 1060 6GB
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware
(If you have multiple ICDs installed and OpenCL works, you can ignore this message)
[ INFO] [1508310350.271944143]: [DepthRegistrationOpenCL::init] devices:
[ INFO] [1508310350.272063149]: [DepthRegistrationOpenCL::init]   0: GeForce GTX 1060 6GB
[ INFO] [1508310350.272146909]: [DepthRegistrationOpenCL::init] selected device: GeForce GTX 1060 6GB
[ INFO] [1508310350.411642437]: [Kinect2Bridge::main] waiting for clients to connect
TrinhNC commented 7 years ago

Looks closely to the error, I think this causes the problem:

HDF5-DIAG: Error detected in HDF5 (1.8.16) thread 139919912216320:
  #000: ../../../src/H5D.c line 358 in H5Dopen2(): not found
    major: Dataset
    minor: Object not found
  #001: ../../../src/H5Gloc.c line 430 in H5G_loc_find(): can't find object
    major: Symbol table
    minor: Object not found
  #002: ../../../src/H5Gtraverse.c line 861 in H5G_traverse(): internal path traversal failed
    major: Symbol table
    minor: Object not found
  #003: ../../../src/H5Gtraverse.c line 641 in H5G_traverse_real(): traversal operator failed
    major: Symbol table
    minor: Callback failed
  #004: ../../../src/H5Gloc.c line 385 in H5G_loc_find_cb(): object 'descriptors' doesn't exist
    major: Symbol table
    minor: Object not found
terminate called after throwing an instance of 'std::runtime_error'
  what():  HDF5File::readArray: variable descriptors doesn't seem to exist
[Info] [Freenect2DeviceImpl] stopping...
[Info] [Freenect2DeviceImpl] canceling rgb transfers...
[Info] [Freenect2DeviceImpl] canceling depth transfers...
[simtrack-7] process has died [pid 9657, exit code -6, cmd /home/tncong/catkin_ws/devel/lib/simtrack_nodes/multi_rigid_node rgb:=/kinect2/hd/image_mono_rect rgb/compressed:=/kinect2/hd/image_mono_rect/compressed rgb_info:=/kinect2/hd/camera_info depth:=/kinect2/qhd/image_depth_rect depth/compressed:=/kinect2/qhd/image_depth_rect/compressed __name:=simtrack __log:=/home/tncong/.ros/log/b22170cc-b3d4-11e7-a02f-107b4447c528/simtrack-7.log].
log file: /home/tncong/.ros/log/b22170cc-b3d4-11e7-a02f-107b4447c528/simtrack-7*.log
JimmyDaSilva commented 7 years ago

Well this shows it's cpu method running:

 depth_method: cpu

And there is a lot of errors showing up :

Please take a step back and correct your kinect2_bridge installation. We won't be able to help before that. By the way these issues should be posted on either iai_kinect2 or libfreenect2.

The first test is running: ./Protonect cuda in libfreenect2/build/bin folder to make sure that libfreenect2 works with cuda. Then install kinect2_bridge and try kinect2_bridge with cuda method.

If you don't get any errors until this point, then we will consider there a problem in simtrack, but I honestly doubt it. I tried it on several computer, different OS and versions and never got a problem.

PS: This last errors is because the .h5 of your object cannot be found. Which is normal because you need to create it before with rosrun interface cmd_line_generate_sift_model. But you can't because you need a correct install to solve #30. Take some time to make it all clean, it will be worth it

TrinhNC commented 7 years ago

Well this shows it's cpu method running:

 depth_method: cpu

Well I told you I could change to different depth_method and the kinect2_bridge.launch works fine. So I just did reinstall everything: Nvidia driver (try using different versions also), libfreenect2, iai_kinect2, but the error still appeared.

./Protonect cuda works fine, kinect2_bridge works ok with cuda (see the out put below). Output of kinect2_bridgeafter reinstall:

[ INFO] [1508321111.841782651]: Loading nodelet /kinect2_bridge of type kinect2_bridge/kinect2_bridge_nodelet to manager kinect2 with the following remappings:
[ INFO] [1508321111.849639280]: waitForService: Service [/kinect2/load_nodelet] has not been advertised, waiting...
[ INFO] [1508321111.855642823]: Initializing nodelet with 4 worker threads.
[ INFO] [1508321111.870579403]: waitForService: Service [/kinect2/load_nodelet] is now available.
[ INFO] [1508321111.937180057]: [Kinect2Bridge::initialize] parameter:
        base_name: kinect2
           sensor: default
        fps_limit: -1
       calib_path: /home/tncong/catkin_ws/src/iai_kinect2/kinect2_bridge/data/
          use_png: false
     jpeg_quality: 90
        png_level: 1
     depth_method: cuda
     depth_device: -1
       reg_method: opencl
       reg_device: -1
        max_depth: 12
        min_depth: 0.1
       queue_size: 5
 bilateral_filter: true
edge_aware_filter: true
       publish_tf: false
     base_name_tf: kinect2
   worker_threads: 4
[Info] [CudaDepthPacketProcessorImpl] device 0: GeForce GTX 1060 6GB @ 1847MHz Memory 6072MB
[Info] [CudaDepthPacketProcessorImpl] selected device 0
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
[Error] [VaapiRgbPacketProcessorImpl] vaInitialize(display, &major_ver, &minor_ver): unknown libva error
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 7 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @2:3 with serial 003177364147
[Info] [Freenect2Impl] found 1 devices
[ INFO] [1508321112.071309416]: [Kinect2Bridge::initDevice] Kinect2 devices found: 
[ INFO] [1508321112.071335557]: [Kinect2Bridge::initDevice]   0: 003177364147 (selected)
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 60*8*33792
[Info] [Freenect2DeviceImpl] opened
[ INFO] [1508321112.166718620]: [Kinect2Bridge::initDevice] starting kinect2
[Info] [Freenect2DeviceImpl] starting...
[Info] [Freenect2DeviceImpl] submitting rgb transfers...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Info] [Freenect2DeviceImpl] started
[ INFO] [1508321112.500087314]: [Kinect2Bridge::initDevice] device serial: 003177364147
[ INFO] [1508321112.500166475]: [Kinect2Bridge::initDevice] device firmware: 4.0.3911.0
[Info] [Freenect2DeviceImpl] stopping...
[Info] [Freenect2DeviceImpl] canceling rgb transfers...
[Info] [Freenect2DeviceImpl] canceling depth transfers...
[Info] [Freenect2DeviceImpl] stopped
[ WARN] [1508321112.828058760]: [Kinect2Bridge::initCalibration] using sensor defaults for color intrinsic parameters.
[ WARN] [1508321112.828086094]: [Kinect2Bridge::initCalibration] using sensor defaults for ir intrinsic parameters.
[ WARN] [1508321112.828094601]: [Kinect2Bridge::initCalibration] using defaults for rotation and translation.
[ WARN] [1508321112.828102120]: [Kinect2Bridge::initCalibration] using defaults for depth shift.
[ INFO] [1508321112.970143854]: [DepthRegistration::New] Using OpenCL registration method!
[ INFO] [1508321112.970186329]: [DepthRegistration::New] Using OpenCL registration method!
[ INFO] [1508321113.001371882]: [DepthRegistrationOpenCL::init] devices:
[ INFO] [1508321113.001525792]: [DepthRegistrationOpenCL::init]   0: GeForce GTX 1060 6GB
[ INFO] [1508321113.001630657]: [DepthRegistrationOpenCL::init] selected device: GeForce GTX 1060 6GB
[ INFO] [1508321113.126585093]: [DepthRegistrationOpenCL::init] devices:
[ INFO] [1508321113.126767239]: [DepthRegistrationOpenCL::init]   0: GeForce GTX 1060 6GB
[ INFO] [1508321113.126840988]: [DepthRegistrationOpenCL::init] selected device: GeForce GTX 1060 6GB
[ INFO] [1508321113.234679270]: [Kinect2Bridge::main] waiting for clients to connect

Error from running roslaunch simtrack_nodes main_kinect2.launch:

[ INFO] [1508321243.801350388]: Initializing nodelet with 4 worker threads.
[ INFO] [1508321243.823011727]: waitForService: Service [/kinect2/load_nodelet] is now available.
[ INFO] [1508321243.916519607]: [Kinect2Bridge::initialize] parameter:
        base_name: kinect2
           sensor: default
        fps_limit: -1
       calib_path: /home/tncong/catkin_ws/src/iai_kinect2/kinect2_bridge/data/
          use_png: false
     jpeg_quality: 90
        png_level: 1
     depth_method: cuda
     depth_device: 0
       reg_method: opencl
       reg_device: -1
        max_depth: 12
        min_depth: 0.1
       queue_size: 5
 bilateral_filter: true
edge_aware_filter: true
       publish_tf: false
     base_name_tf: kinect2
   worker_threads: 4
[Info] [CudaDepthPacketProcessorImpl] device 0: GeForce GTX 1060 6GB @ 1847MHz Memory 6072MB
[Info] [CudaDepthPacketProcessorImpl] selected device 0
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
[Error] [VaapiRgbPacketProcessorImpl] vaInitialize(display, &major_ver, &minor_ver): unknown libva error
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 7 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @2:3 with serial 003177364147
[Info] [Freenect2Impl] found 1 devices
[ INFO] [1508321244.069073932]: [Kinect2Bridge::initDevice] Kinect2 devices found: 
[ INFO] [1508321244.069109114]: [Kinect2Bridge::initDevice]   0: 003177364147 (selected)
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 60*8*33792
[Info] [Freenect2DeviceImpl] opened
[ INFO] [1508321244.166086660]: [Kinect2Bridge::initDevice] starting kinect2
[Info] [Freenect2DeviceImpl] starting...
[Info] [Freenect2DeviceImpl] submitting rgb transfers...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Info] [Freenect2DeviceImpl] started
[ INFO] [1508321244.478676285]: [Kinect2Bridge::initDevice] device serial: 003177364147
[ INFO] [1508321244.478772233]: [Kinect2Bridge::initDevice] device firmware: 4.0.3911.0
[Info] [Freenect2DeviceImpl] stopping...
[Info] [Freenect2DeviceImpl] canceling rgb transfers...
[Info] [Freenect2DeviceImpl] canceling depth transfers...
[Info] [Freenect2DeviceImpl] stopped
[ WARN] [1508321244.796023760]: [Kinect2Bridge::initCalibration] using sensor defaults for color intrinsic parameters.
[ WARN] [1508321244.796052787]: [Kinect2Bridge::initCalibration] using sensor defaults for ir intrinsic parameters.
[ WARN] [1508321244.796083883]: [Kinect2Bridge::initCalibration] using defaults for rotation and translation.
[ WARN] [1508321244.796107016]: [Kinect2Bridge::initCalibration] using defaults for depth shift.
[ INFO] [1508321244.938193504]: [DepthRegistration::New] Using OpenCL registration method!
[ INFO] [1508321244.938239004]: [DepthRegistration::New] Using OpenCL registration method!
[ INFO] [1508321244.968734732]: [DepthRegistrationOpenCL::init] devices:
[ INFO] [1508321244.968913001]: [DepthRegistrationOpenCL::init]   0: GeForce GTX 1060 6GB
[ INFO] [1508321244.969026031]: [DepthRegistrationOpenCL::init] selected device: GeForce GTX 1060 6GB
[ INFO] [1508321245.094374954]: [DepthRegistrationOpenCL::init] devices:
[ INFO] [1508321245.094577561]: [DepthRegistrationOpenCL::init]   0: GeForce GTX 1060 6GB
[ INFO] [1508321245.094691730]: [DepthRegistrationOpenCL::init] selected device: GeForce GTX 1060 6GB
[ INFO] [1508321245.203090144]: [Kinect2Bridge::main] waiting for clients to connect
[ INFO] [1508321245.466784206]: [Kinect2Bridge::callbackStatus] client connected. starting device...
[Info] [Freenect2DeviceImpl] starting...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Info] [Freenect2DeviceImpl] started
[Info] [Freenect2DeviceImpl] stopping...
[Info] [Freenect2DeviceImpl] canceling depth transfers...
[Info] [Freenect2DeviceImpl] stopped
[Info] [Freenect2DeviceImpl] starting...
[Info] [Freenect2DeviceImpl] submitting rgb transfers...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Info] [Freenect2DeviceImpl] started
[Info] [RgbPacketStreamParser] packetsize or sequence doesn't match!
terminate called after throwing an instance of 'std::runtime_error'
  what():  initializeCUDARuntime: CUDA initialization problem

[ INFO] [1508321246.368332368]: [Kinect2Bridge::callbackStatus] no clients connected. stopping device...
[Info] [Freenect2DeviceImpl] stopping...
[Info] [Freenect2DeviceImpl] canceling rgb transfers...
[Info] [Freenect2DeviceImpl] canceling depth transfers...
[simtrack-6] process has died [pid 5056, exit code -6, cmd /home/tncong/catkin_ws/devel/lib/simtrack_nodes/multi_rigid_node rgb:=/kinect2/hd/image_mono_rect rgb/compressed:=/kinect2/hd/image_mono_rect/compressed rgb_info:=/kinect2/hd/camera_info depth:=/kinect2/qhd/image_depth_rect depth/compressed:=/kinect2/qhd/image_depth_rect/compressed __name:=simtrack __log:=/home/tncong/.ros/log/08dcfdd6-b3ea-11e7-9279-107b4447c528/simtrack-6.log].
log file: /home/tncong/.ros/log/08dcfdd6-b3ea-11e7-9279-107b4447c528/simtrack-6*.log
JimmyDaSilva commented 7 years ago

Ok. So it works now? What is the problem ? Did you managed to create the sift model rosrun interface cmd_line_generate_sift_model ?

TrinhNC commented 7 years ago

No it's still not working. I said: :(

but the error still appeared.

JimmyDaSilva commented 7 years ago

Error running what ? Did you created the .h5 sift files with rosrun interface cmd_line_generate_sift_model or not ?

TrinhNC commented 7 years ago

Error from running roslaunch simtrack_nodes main_kinect2.launch

This is the error:

[simtrack-6] process has died [pid 5056, exit code -6, cmd /home/tncong/catkin_ws/devel/lib/simtrack_nodes/multi_rigid_node rgb:=/kinect2/hd/image_mono_rect rgb/compressed:=/kinect2/hd/image_mono_rect/compressed rgb_info:=/kinect2/hd/camera_info depth:=/kinect2/qhd/image_depth_rect depth/compressed:=/kinect2/qhd/image_depth_rect/compressed __name:=simtrack __log:=/home/tncong/.ros/log/08dcfdd6-b3ea-11e7-9279-107b4447c528/simtrack-6.log].
log file: /home/tncong/.ros/log/08dcfdd6-b3ea-11e7-9279-107b4447c528/simtrack-6*.log

I'm still unable to create SIFT models too.

JimmyDaSilva commented 7 years ago

Well as I said, it cannot work without the sift models, so it's perfectly normal.

You can close this issue, and go the the other one #30. Do you have still the same errors there ?

TrinhNC commented 7 years ago

You can close this issue, and go the the other one #30. Do you have still the same errors there ?

Hmm, yes, error when creating SIFT model like in #30 still happens. What am I supposed to do then?

JimmyDaSilva commented 7 years ago

you mean you get this ?

X server found. dri2 connection failed! DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument Assuming 131072kB available aperture size. May lead to reduced performance or incorrect rendering. get chip id failed: -1 [22] param: 4, val: 0 beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware (If you have multiple ICDs installed and OpenCL works, you can ignore this message)

Then there is definitely something wrong with your configuration. Did you try to recompile since you reinstalled opencl/gl/cuda and all ?

I don't understand that beignet-opencl-icd errors. Beignet is for using the intel integrated graphics and it should not be used here because you use the Nvidia card

TrinhNC commented 7 years ago

Hi Jimmy, After reinstalling everything, the error you mentioned does not appear anymore. Now I got the error exactly like in #3 or:

rosrun interface cmd_line_generate_sift_model `pwd`/src/simtrack/data/object_models/ros_fuerte/ros_fuerte.obj
init done
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
FilterH:    invalid device function
FilterV:    invalid device function
terminate called after throwing an instance of 'std::length_error'
  what():  vector::_M_fill_insert
Aborted (core dumped)
JimmyDaSilva commented 7 years ago

Cool. So we are progressing. Please close this. You just need to fix #30.

TrinhNC commented 7 years ago

Yeah, I think the reason for error beignet-opencl-icd is that I made mistake when installing beignet and several packages for Intel only in libfreenect2 installation.

leviresende commented 5 years ago

I had the same issue, so I edited the parameters to:

depth_method to opengl reg_method to cpu

After that, it is working well.