none
Kinect for windows doesn't work after ordinary switching it(start and stop kinect), about 130 times. RRS feed

  • Question

  • I have an application based on Kinect with SDK1.8 version, this application will be automatically rebooted by a 3-rd schedule application. each time I started and closed kinect correctly( when to start,the infrared light is up, after closed, it's off), after about 130 time, kinect cann't get the stream data again, but the infrared light is normally up/off. at that time, The kinect can work again when i unplugged and plugged it again, then my application can work again.

    I don't know what Kinnect happened, somebody also have the same issue?

    Friday, January 3, 2014 4:08 AM

Answers

All replies

  • Are you using managed or unmanaged code? As well, are you building for "Release" or "debug" version of the project?

    There is a current bug where if you call stop you can put the driver in a unknown state. It is best just to close the application without stop if that is an issue for you. As well, the only way to get out of this scenario, physically un-plug the sensor and reconnect. You should have code in your application to handle the disconnect scenarios so it should not affect the operation of the application.

    http://www.microsoft.com/en-us/kinectforwindows/develop/release-notes.aspx#_6._known_issues


    Carmine Sirignano - MSFT


    Tuesday, January 7, 2014 8:39 PM
  • Thanks for your reply.

    I use the managed code (WPF application), and I test it based on the "Release" version in 32-bit mode.

    the start code is very simple, use the SDK directly, as below:

                if (KinectSensor.KinectSensors.Count != 0)
                {
                    _kinect = KinectSensor.KinectSensors[0];
                    _kinect.SkeletonStream.Enable();
                    _kinect.SkeletonFrameReady += SkeletonsReady;
                    try
                    {
                        _kinect.Start();
                    }
                    catch (Exception ex)
                    {
                        logger.Error(ex.ToString(),ex.InnerException);
                    }
                }

    In my current scenario, the kinect device is not allowed to un-plug sensor and reconnect. could you have some suggestions for this issue or how to fix it based on .net ?  the following options could work.

    1. reverse this application with C++;
    2. write a windows service handling the kinect device to keep it alive as long as pc is on. the application get all the data from this service.

    what's your opinions?


    Wednesday, January 8, 2014 4:04 AM
  • Do not assume the sensor is index 0. You should be following the guidelines posted in the SDK docs. You must enumerate your sensors and check its status to ensure it is in a state you can use it.

    http://msdn.microsoft.com/en-us/library/hh973072.aspx

    private KinectSensor sensor;
    
      foreach (var potentialSensor in KinectSensor.KinectSensors)
      {
        if (potentialSensor.Status == KinectStatus.Connected)
        {
          this.sensor = potentialSensor;
          break;
        }
      }
    


    Carmine Sirignano - MSFT

    Thursday, January 9, 2014 6:06 PM