Is it possible to connect multiple Kinects 360 on a raspberry pi 2?

Good day!

Is it possible to connect multiple Kinect v1 (Kinect 360) to a single Raspberry Pi 2?
I’m currently trying to access two of them, but only one of them is showing up at the same time.

Currently using OpenFrameworks 0.9.2 with Raspbian.

My code.

(note: using ofVideoGrabber instead of ofxKinect)

#include "ofApp.h"

//--------------------------------------------------------------
void ofApp::setup(){
    kinects.resize(2);
    for (int i = 0; i < kinects.size(); i++){
        cout << i << endl;
        kinects[i].setup(640, 480);
        //kinects[i].init();
        //kinects[i].open();
    }
}

//--------------------------------------------------------------
void ofApp::update(){
    for (int i = 0; i < kinects.size(); i++){
        kinects[i].update();
    }
}

//--------------------------------------------------------------
void ofApp::draw(){
    for (int i = 0; i < kinects.size(); i++){
        kinects[i].draw(i * kinects[i].getWidth(), 0);
    }
}

//--------------------------------------------------------------
void ofApp::keyPressed(int key){
    if (key == OF_KEY_UP){
        kinectSelect++;
        if (kinectSelect >= kinects.size()){
            kinectSelect = kinects.size();
        }
    }

    if (key == OF_KEY_DOWN){
        kinectSelect--;
        if (kinectSelect < 0){
            kinectSelect = 0;
        }
    }
}

//--------------------------------------------------------------
void ofApp::keyReleased(int key){

}

//--------------------------------------------------------------
void ofApp::mouseMoved(int x, int y){

}

//--------------------------------------------------------------
void ofApp::mouseDragged(int x, int y, int button){

}

//--------------------------------------------------------------
void ofApp::mousePressed(int x, int y, int button){

}

//--------------------------------------------------------------
void ofApp::mouseReleased(int x, int y, int button){

}

//--------------------------------------------------------------
void ofApp::mouseEntered(int x, int y){

}

//--------------------------------------------------------------
void ofApp::mouseExited(int x, int y){

}

//--------------------------------------------------------------
void ofApp::windowResized(int w, int h){

}

//--------------------------------------------------------------
void ofApp::gotMessage(ofMessage msg){

}

//--------------------------------------------------------------
void ofApp::dragEvent(ofDragInfo dragInfo){ 

}

My terminal shows this:

OST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0 libmpg123 
make: Warning: File 'config.make' has modification time 273 s in the future
[warning] ofAppEGLWindow: init(): X11 not availble on RPI yet, using a native window instead
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): screenRect: 1280x768
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): windowRect: 1024x768
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set 0x1
[notice ] ofAppEGLWindow: createSurface(): no current renderer selected
[notice ] ofAppEGLWindow: createSurface(): default renderer detected
[notice ] ofAppEGLWindow: createSurface(): surface created correctly
[notice ] ofAppEGLWindow: createSurface(): API bound correctly
[notice ] ofAppEGLWindow: createSurface(): -----EGL-----
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MAJOR = 1
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MINOR = 4
[notice ] ofAppEGLWindow: createSurface(): EGL_CLIENT_APIS = OpenGL_ES OpenVG
[notice ] ofAppEGLWindow: createSurface(): EGL_VENDOR = Broadcom
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION = 1.4
[notice ] ofAppEGLWindow: createSurface(): EGL_EXTENSIONS = EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_vg_parent_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_lock_surface 
[notice ] ofAppEGLWindow: createSurface(): GL_RENDERER = VideoCore IV HW
[notice ] ofAppEGLWindow: createSurface(): GL_VERSION  = OpenGL ES-CM 1.1
[notice ] ofAppEGLWindow: createSurface(): GL_VENDOR   = Broadcom
[notice ] ofAppEGLWindow: createSurface(): -------------
[notice ] ofAppEGLWindow: setupPeripherals(): peripheral setup complete
[notice ] ofAppEGLWindow: setupNativeUDev(): created udev object
[notice ] ofAppEGLWindow: setupMouse(): unabled to find mouse
[ error ] ofAppEGLWindow: setupMouse(): did not open mouse
[ error ] ofAppEGLWindow: setupMouse(): did not open mouse, mouse_fd < 0
[warning] ofAppEGLWindow: setupKeyboard(): unabled to find keyboard
[ error ] ofAppEGLWindow: setupKeyboard(): did not open keyboard
[ error ] ofAppEGLWindow: setupKeyboard(): did not open keyboard, keyboard_fd < 0
[notice ] ofAppEGLWindow: setupPeripherals(): native event setup complete
[notice ] ofGstVideoGrabber: Probing devices with udev...
[notice ] ofGstVideoGrabber: Found device 045e:02ae, getting capabilities...
[notice ] ofGstVideoGrabber: detected v4l2 device: Xbox NUI Camera
[notice ] ofGstVideoGrabber: driver: kinect, version: 262417
[notice ] ofGstVideoGrabber: Capabilities: 0x85200001
[notice ] ofGstVideoGrabber: Found device 045e:02ae, getting capabilities...
[notice ] ofGstVideoGrabber: detected v4l2 device: Xbox NUI Camera
[notice ] ofGstVideoGrabber: driver: kinect, version: 262417
[notice ] ofGstVideoGrabber: Capabilities: 0x85200001
[notice ] ofGstVideoGrabber: initGrabber(): selected device: Xbox NUI Camera
[notice ] ofGstVideoGrabber: initGrabber(): selected format: 640x480 video/x-raw RGB framerate: 100/1
[notice ] ofGstUtils: setPipelineWithSink(): gstreamer pipeline: v4l2src name=video_source device=/dev/video0 ! video/x-raw,format=RGB,width=640,height=480,framerate=100/1    ! appsink name=ofappsink enable-last-sample=0 caps="video/x-raw, format=RGB, width=640, height=480"
[notice ] ofGstVideoGrabber: Probing devices with udev...
[notice ] ofGstVideoGrabber: Found device 045e:02ae, getting capabilities...
[notice ] ofGstVideoGrabber: detected v4l2 device: Xbox NUI Camera
[notice ] ofGstVideoGrabber: driver: kinect, version: 262417
[notice ] ofGstVideoGrabber: Capabilities: 0x85200001
[notice ] ofGstVideoGrabber: Found device 045e:02ae, getting capabilities...
[notice ] ofGstVideoGrabber: detected v4l2 device: Xbox NUI Camera
[notice ] ofGstVideoGrabber: driver: kinect, version: 262417
[notice ] ofGstVideoGrabber: Capabilities: 0x85200001
[notice ] ofGstVideoGrabber: initGrabber(): selected device: Xbox NUI Camera
[notice ] ofGstVideoGrabber: initGrabber(): selected format: 640x480 video/x-raw RGB framerate: 100/1
[notice ] ofGstUtils: setPipelineWithSink(): gstreamer pipeline: v4l2src name=video_source device=/dev/video0 ! video/x-raw,format=RGB,width=640,height=480,framerate=100/1    ! appsink name=ofappsink enable-last-sample=0 caps="video/x-raw, format=RGB, width=640, height=480"
libv4l2: error setting pixformat: Device or resource busy
[ error ] ofGstUtils: gstHandleMessage(): embedded video playback halted for plugin, module video_source  reported: Device '/dev/video0' is busy
[notice ] ofGstVideoGrabber: Probing devices with udev...
[notice ] ofGstVideoGrabber: Found device 045e:02ae, getting capabilities...
[notice ] ofGstVideoGrabber: detected v4l2 device: Xbox NUI Camera
[notice ] ofGstVideoGrabber: driver: kinect, version: 262417
[notice ] ofGstVideoGrabber: Capabilities: 0x85200001
[notice ] ofGstVideoGrabber: Found device 045e:02ae, getting capabilities...
[notice ] ofGstVideoGrabber: detected v4l2 device: Xbox NUI Camera
[notice ] ofGstVideoGrabber: driver: kinect, version: 262417
[notice ] ofGstVideoGrabber: Capabilities: 0x85200001
[notice ] ofGstVideoGrabber: initGrabber(): selected device: Xbox NUI Camera
[notice ] ofGstVideoGrabber: initGrabber(): selected format: 640x480 video/x-raw RGB framerate: 100/1
[notice ] ofGstUtils: setPipelineWithSink(): gstreamer pipeline: v4l2src name=video_source device=/dev/video0 ! video/x-raw,format=RGB,width=640,height=480,framerate=100/1    ! appsink name=ofappsink enable-last-sample=0 caps="video/x-raw, format=RGB, width=640, height=480"
libv4l2: error setting pixformat: Device or resource busy
[ error ] ofGstUtils: gstHandleMessage(): embedded video playback halted for plugin, module video_source  reported: Device '/dev/video0' is busy
[notice ] ofGstVideoGrabber: Probing devices with udev...
[notice ] ofGstVideoGrabber: Found device 045e:02ae, getting capabilities...
[notice ] ofGstVideoGrabber: detected v4l2 device: Xbox NUI Camera
[notice ] ofGstVideoGrabber: driver: kinect, version: 262417
[notice ] ofGstVideoGrabber: Capabilities: 0x85200001
[notice ] ofGstVideoGrabber: Found device 045e:02ae, getting capabilities...
[notice ] ofGstVideoGrabber: detected v4l2 device: Xbox NUI Camera
[notice ] ofGstVideoGrabber: driver: kinect, version: 262417
[notice ] ofGstVideoGrabber: Capabilities: 0x85200001
[notice ] ofGstVideoGrabber: initGrabber(): selected device: Xbox NUI Camera
[notice ] ofGstVideoGrabber: initGrabber(): selected format: 640x480 video/x-raw RGB framerate: 100/1
[notice ] ofGstUtils: setPipelineWithSink(): gstreamer pipeline: v4l2src name=video_source device=/dev/video0 ! video/x-raw,format=RGB,width=640,height=480,framerate=100/1    ! appsink name=ofappsink enable-last-sample=0 caps="video/x-raw, format=RGB, width=640, height=480"
libv4l2: error setting pixformat: Device or resource busy
[ error ] ofGstUtils: gstHandleMessage(): embedded video playback halted for plugin, module video_source  reported: Device '/dev/video0' is busy

Thanks.

as I know, raspberry pi has a only one usb root hub. all usb port and ethernet port controlled by single chip. so maybe you can use only one kinect with one rPi.

check these links:
Problems with B+ and USB
USB device not working? Click here!

Looks like you are correct. According to this discussion here “At this time, the Kinect driver does not support multiple sensors on the same root hub.”. Since the RPi only has one usb root it can’t handle several kinects at the same time unfortunately… I hope someone can prove me wrong but it doesn’t seem likely.

1 Like

I checked new raspberry Pi 3’s hardware spec… and I cannot find multiple usb root hub update in official info… still new one support usb 2.0(not 3.0), 10/100Mbps ethernet connection.

raspberry pi’s 1st goal is cheap… so I can understand…

1 Like

Can’t you use one raspberry by kinect ?

I can, but my current project requires several Kinects side by side in the same direction, which means some overlapping in zones. Also the main computer is far away so we need to link up those kinects through ethernet, and the idea was to have the raspberry to process some of the data before sending it.