Kinect v2 not working with OpenNi2 / ROS

asked 2016-04-20 11:00:49 -0500

jacksonkr_ gravatar image

I'm trying to run openni2.launch but it's running into issues. I'm able to test the camera with NiViewer2 so I know the camera is connected and working. Has anyone run into something like this before?

$ roslaunch openni2_launch openni2.launch 
... logging to /home/jackson/.ros/log/27e42b4e-0704-11e6-ac50-00904c0df43e/roslaunch-jackson-MacBookPro-22195.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://10.0.0.200:49560/

SUMMARY
========

PARAMETERS
 * /camera/camera_nodelet_manager/num_worker_threads: 4
 * /camera/depth_rectify_depth/interpolation: 0
 * /camera/driver/auto_exposure: True
 * /camera/driver/auto_white_balance: True
 * /camera/driver/color_depth_synchronization: False
 * /camera/driver/depth_camera_info_url: 
 * /camera/driver/depth_frame_id: camera_depth_opti...
 * /camera/driver/depth_registration: False
 * /camera/driver/device_id: #1
 * /camera/driver/rgb_camera_info_url: 
 * /camera/driver/rgb_frame_id: camera_rgb_optica...
 * /rosdistro: indigo
 * /rosversion: 1.11.16

NODES
  /camera/
    camera_nodelet_manager (nodelet/nodelet)
    depth_metric (nodelet/nodelet)
    depth_metric_rect (nodelet/nodelet)
    depth_points (nodelet/nodelet)
    depth_rectify_depth (nodelet/nodelet)
    depth_registered_sw_metric_rect (nodelet/nodelet)
    driver (nodelet/nodelet)
    points_xyzrgb_sw_registered (nodelet/nodelet)
    rectify_color (nodelet/nodelet)
    register_depth_rgb (nodelet/nodelet)
  /
    camera_base_link (tf/static_transform_publisher)
    camera_base_link1 (tf/static_transform_publisher)
    camera_base_link2 (tf/static_transform_publisher)
    camera_base_link3 (tf/static_transform_publisher)

ROS_MASTER_URI=http://10.0.0.200:11311

core service [/rosout] found
process[camera/camera_nodelet_manager-1]: started with pid [22213]
process[camera/driver-2]: started with pid [22214]
process[camera/rectify_color-3]: started with pid [22215]
process[camera/depth_rectify_depth-4]: started with pid [22216]
process[camera/depth_metric_rect-5]: started with pid [22218]
process[camera/depth_metric-6]: started with pid [22230]
process[camera/depth_points-7]: started with pid [22237]
process[camera/register_depth_rgb-8]: started with pid [22239]
process[camera/points_xyzrgb_sw_registered-9]: started with pid [22260]
process[camera/depth_registered_sw_metric_rect-10]: started with pid [22272]
process[camera_base_link-11]: started with pid [22275]
process[camera_base_link1-12]: started with pid [22276]
process[camera_base_link2-13]: started with pid [22283]
process[camera_base_link3-14]: started with pid [22296]
[ INFO] [1461167543.854776649]: Initializing nodelet with 4 worker threads.
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 11 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @2:4 with serial 038091735247
[Info] [Freenect2Impl] found 1 devices
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 11 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @2:4 with serial 038091735247
[Info] [Freenect2Impl] found 1 devices
[ INFO] [1461167544.155460288]: Device "freenect2://0" found.
[ INFO] [1461167544.155520043]: Device "freenect2://0?depth-size=640x480" found.
[ INFO] [1461167544.155534804]: Device "freenect2://0?depth-size=512x424" found.
[Error] [VaapiRgbPacketProcessorImpl] vaDisplayIsValid(display) failed
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 60*8*33792
[Info] [Freenect2DeviceImpl] opened
[ERROR] [1461167544.339020976]: Unsupported IR video mode - Resolution: 640x480@30Hz Format: Gray16
[ERROR] [1461167544.339116093]: Unsupported color video mode - Resolution: 640x480@30Hz Format: RGB888
[ERROR] [1461167544.339198440]: Unsupported depth video mode - Resolution: 1280x1024@15Hz Format: Depth 1mm
[ERROR] [1461167544.339372002]: Could not set auto exposure. Reason: void openni2_wrapper::OpenNI2Device::setAutoExposure(bool) @ /tmp/binarydeb/ros-indigo-openni2-camera-0.2.5/src/openni2_device.cpp @ 534 : Couldn't set auto exposure: 
    Stream setProperty(101) failed



[ERROR] [1461167544.339451200]: Could not set auto white balance. Reason: void openni2_wrapper::OpenNI2Device::setAutoWhiteBalance(bool) @ /tmp/binarydeb/ros-indigo-openni2-camera-0.2.5/src/openni2_device.cpp @ 550 : Couldn't set auto white balance: 
    Stream setProperty(100) failed
edit retag flag offensive close merge delete

Comments

I am facing same issue :-(, any clues?

anilmullapudi gravatar imageanilmullapudi ( 2016-07-08 14:42:17 -0500 )edit

Nothing yet.. I'm using a Kinect 360 but I'm planning on moving to a ZED or RealSense camera which will solve my issue. Worst case you might try recompiling openni2 with different options.

jacksonkr_ gravatar imagejacksonkr_ ( 2016-07-08 14:59:18 -0500 )edit

ok, thank you. I think i also need to switch to Kinect 360.

anilmullapudi gravatar imageanilmullapudi ( 2016-07-08 16:37:17 -0500 )edit