Add support for Kinect for Xbox 360 Model 1473 #316

Closed
hkzlab opened this Issue Jan 3, 2013 · 79 comments

Comments

Projects
None yet
@hkzlab

hkzlab commented Jan 3, 2013

Hello,
I write to open an issue on the missing support for this device.
The 1473 model does not work with libfreenect: I always get a "Could not open device" when trying to launch demos using the camera or the tilt motor.

Also, the Xbox NUI Motor doesn't show up when checking with lsusb (testing on Ubuntu 12.10, 32bit):
Bus 001 Device 086: ID 045e:02c2 Microsoft Corp.
Bus 001 Device 087: ID 045e:02ad Microsoft Corp. Xbox NUI Audio
Bus 001 Device 088: ID 045e:02ae Microsoft Corp. Xbox NUI Camera
If needed, I can provide more verbose lsusb logs.

@tong

This comment has been minimized.

Show comment
Hide comment
@tong

tong Jan 8, 2013

dunno.please!

tong commented Jan 8, 2013

dunno.please!

@a-m-p-m

This comment has been minimized.

Show comment
Hide comment
@a-m-p-m

a-m-p-m Jan 13, 2013

I have the same issue with Kinect for Xbox 360 Model 1473.
Ubuntu 12.04 32bit, 64bit; Linux Mint 13 32bit on different computers.

a-m-p-m commented Jan 13, 2013

I have the same issue with Kinect for Xbox 360 Model 1473.
Ubuntu 12.04 32bit, 64bit; Linux Mint 13 32bit on different computers.

@ansoto

This comment has been minimized.

Show comment
Hide comment
@ansoto

ansoto Jan 16, 2013

Hi,
I have the same issue... Have you found a solution ?

ansoto commented Jan 16, 2013

Hi,
I have the same issue... Have you found a solution ?

@JoshBlake

This comment has been minimized.

Show comment
Hide comment
@JoshBlake

JoshBlake Jan 16, 2013

Member

The solution is somewhat technically complicated and we're still discussing the right way to approach it. For more information check the OpenKinect mailing list: https://groups.google.com/group/openkinect

Member

JoshBlake commented Jan 16, 2013

The solution is somewhat technically complicated and we're still discussing the right way to approach it. For more information check the OpenKinect mailing list: https://groups.google.com/group/openkinect

@ansoto

This comment has been minimized.

Show comment
Hide comment
@ansoto

ansoto Jan 22, 2013

Is there any progress about that ?
Thanks

ansoto commented Jan 22, 2013

Is there any progress about that ?
Thanks

@vitaly-little

This comment has been minimized.

Show comment
Hide comment
@vitaly-little

vitaly-little Jan 25, 2013

I found solution in this topic http://forum.openframeworks.cc/index.php?topic=11632.0

here is a very rough fix for it in the libfrenect files in this branch:
https://github.com/ofTheo/ofxKinect/tree/kinect-device-fix
you can see the differences between the current develop branch:
ofTheo/ofxKinect@develop...kinect-device-fix

I found solution in this topic http://forum.openframeworks.cc/index.php?topic=11632.0

here is a very rough fix for it in the libfrenect files in this branch:
https://github.com/ofTheo/ofxKinect/tree/kinect-device-fix
you can see the differences between the current develop branch:
ofTheo/ofxKinect@develop...kinect-device-fix

@Exomene

This comment has been minimized.

Show comment
Hide comment
@Exomene

Exomene Feb 17, 2013

Thanks for finding this.
Can you explain how you proceeded?
I compiled and installed this fix but still have the "Unable to open" error while testing with glview with ubuntu 12.10 64bits.
Thanks

Exomene commented Feb 17, 2013

Thanks for finding this.
Can you explain how you proceeded?
I compiled and installed this fix but still have the "Unable to open" error while testing with glview with ubuntu 12.10 64bits.
Thanks

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Feb 18, 2013

The link doesn't work for me either, is anyone working on it?

ghost commented Feb 18, 2013

The link doesn't work for me either, is anyone working on it?

@chriswei

This comment has been minimized.

Show comment
Hide comment
@chriswei

chriswei Feb 21, 2013

I was able to build and run the openFrameworks example described in the previously mentioned post on my Xbox Kinect model 1473. I built the ofxKinect 'kinect-device-fix' branch in openFrameworks using Xcode on my MBPro.

The video and point cloud seemed to be working, but I was unable to take that code and successfully build and run a standalone version of libfreenect. In my attempt with Theo Watson's kinect-device-fix branch, the glview test app finds a device, prints out some debug information in the terminal, opens a window, then hangs. At least it gets past the "Could not open device" error! Unfortunately I don't have any time (and maybe not the skills) to dig deeper.

I'm very interested in a solution that gets libfreenect working with the 'new' Xbox Kinect model 1473. I'd hate to have to return it and go looking for an older model on eBay. I'm also considering trying to get one of the Prime Sense sensors, but they're $200 plus shipping from Israel and take 2-4 weeks to ship. I'd eventually like to get Processing talking to the Xbox Kinect model 1473 on OS X.

The "previously mentioned post": http://forum.openframeworks.cc/index.php?topic=11632.0

Thanks!

I was able to build and run the openFrameworks example described in the previously mentioned post on my Xbox Kinect model 1473. I built the ofxKinect 'kinect-device-fix' branch in openFrameworks using Xcode on my MBPro.

The video and point cloud seemed to be working, but I was unable to take that code and successfully build and run a standalone version of libfreenect. In my attempt with Theo Watson's kinect-device-fix branch, the glview test app finds a device, prints out some debug information in the terminal, opens a window, then hangs. At least it gets past the "Could not open device" error! Unfortunately I don't have any time (and maybe not the skills) to dig deeper.

I'm very interested in a solution that gets libfreenect working with the 'new' Xbox Kinect model 1473. I'd hate to have to return it and go looking for an older model on eBay. I'm also considering trying to get one of the Prime Sense sensors, but they're $200 plus shipping from Israel and take 2-4 weeks to ship. I'd eventually like to get Processing talking to the Xbox Kinect model 1473 on OS X.

The "previously mentioned post": http://forum.openframeworks.cc/index.php?topic=11632.0

Thanks!

@Exomene

This comment has been minimized.

Show comment
Hide comment
@Exomene

Exomene Feb 21, 2013

I'd like to use it with processing too. By the way, if you use openkinect in processing the IR in the kinect 1473 starts and it returns some results (I didn't get further).
I tried to follow the instructions on getting Theo Watson's branch to work with openFrameworks but failed (I got lost with code::blocks). Since it is a derivative, as far as I understood, I replaced the files in the source of openKinect by Theo's modified ones. It compiled on my ubuntu 12.10 but the problem remained the same.
Another question: I didn't understand the difference between freenect-glview and glview on the getting started page (http://openkinect.org/wiki/Getting_Started). It seems one should use glview when installed from the binaries and glview when installed from the sources. It's quite confusing for me, could'nt this be the source of some issues?

Exomene commented Feb 21, 2013

I'd like to use it with processing too. By the way, if you use openkinect in processing the IR in the kinect 1473 starts and it returns some results (I didn't get further).
I tried to follow the instructions on getting Theo Watson's branch to work with openFrameworks but failed (I got lost with code::blocks). Since it is a derivative, as far as I understood, I replaced the files in the source of openKinect by Theo's modified ones. It compiled on my ubuntu 12.10 but the problem remained the same.
Another question: I didn't understand the difference between freenect-glview and glview on the getting started page (http://openkinect.org/wiki/Getting_Started). It seems one should use glview when installed from the binaries and glview when installed from the sources. It's quite confusing for me, could'nt this be the source of some issues?

@dudefellah

This comment has been minimized.

Show comment
Hide comment
@dudefellah

dudefellah Mar 11, 2013

I've been messing around with this a bunch (I have a Kinect v 1473) and can get the demos sort of going by making one small change in freenect_fetch_zero_plane_info in src/cameras.c (note that this will break libfreenect with "old" Kinect versions):

--- a/src/cameras.c
+++ b/src/cameras.c
@@ -899,14 +899,13 @@ static int freenect_fetch_reg_const_shift(freenect_device *dev)
 static int freenect_fetch_zero_plane_info(freenect_device *dev)
 {
        freenect_context *ctx = dev->parent;
-
        char reply[0x200];
        uint16_t cmd[5] = {0}; // Offset is the only field in this command, and it's 0

        int res;
-       res = send_cmd(dev, 0x04, cmd, 10, reply, 322); //OPCODE_GET_FIXED_PARAMS = 4,
-       if (res != 322) {
-               FN_ERROR("freenect_fetch_zero_plane_info: send_cmd read %d bytes (expected 322)\n", res);
+       res = send_cmd(dev, 0x04, cmd, 10, reply, 334); //OPCODE_GET_FIXED_PARAMS = 4,
+       if (res != 334) {
+               FN_ERROR("freenect_fetch_zero_plane_info: send_cmd read %d bytes (expected 334)\n", res);
                return -1;
        }

and then I remove attempts to use the motor:

--- a/examples/glview.c
+++ b/examples/glview.c
@@ -412,7 +412,8 @@ int main(int argc, char **argv)
        }

        freenect_set_log_level(f_ctx, FREENECT_LOG_DEBUG);
-       freenect_select_subdevices(f_ctx, (freenect_device_flags)(FREENECT_DEVICE_MOTOR | FREENECT_DEVICE_CAMERA));
+       //freenect_select_subdevices(f_ctx, (freenect_device_flags)(FREENECT_DEVICE_MOTOR | FREENECT_DEVICE_CAMERA | FREENECT_DEVICE_AUDIO));
+       freenect_select_subdevices(f_ctx, (freenect_device_flags)(FREENECT_DEVICE_CAMERA | FREENECT_DEVICE_AUDIO));

        int nr_devices = freenect_num_devices (f_ctx);
        printf ("Number of devices found: %d\n", nr_devices);

I've read that there have been changes with the motor device in that it's somehow attached to the audio now? I'm not very experienced with libusb, but I would like to try to mess around and make it work if anybody has any ideas/suggestions.

I've been messing around with this a bunch (I have a Kinect v 1473) and can get the demos sort of going by making one small change in freenect_fetch_zero_plane_info in src/cameras.c (note that this will break libfreenect with "old" Kinect versions):

--- a/src/cameras.c
+++ b/src/cameras.c
@@ -899,14 +899,13 @@ static int freenect_fetch_reg_const_shift(freenect_device *dev)
 static int freenect_fetch_zero_plane_info(freenect_device *dev)
 {
        freenect_context *ctx = dev->parent;
-
        char reply[0x200];
        uint16_t cmd[5] = {0}; // Offset is the only field in this command, and it's 0

        int res;
-       res = send_cmd(dev, 0x04, cmd, 10, reply, 322); //OPCODE_GET_FIXED_PARAMS = 4,
-       if (res != 322) {
-               FN_ERROR("freenect_fetch_zero_plane_info: send_cmd read %d bytes (expected 322)\n", res);
+       res = send_cmd(dev, 0x04, cmd, 10, reply, 334); //OPCODE_GET_FIXED_PARAMS = 4,
+       if (res != 334) {
+               FN_ERROR("freenect_fetch_zero_plane_info: send_cmd read %d bytes (expected 334)\n", res);
                return -1;
        }

and then I remove attempts to use the motor:

--- a/examples/glview.c
+++ b/examples/glview.c
@@ -412,7 +412,8 @@ int main(int argc, char **argv)
        }

        freenect_set_log_level(f_ctx, FREENECT_LOG_DEBUG);
-       freenect_select_subdevices(f_ctx, (freenect_device_flags)(FREENECT_DEVICE_MOTOR | FREENECT_DEVICE_CAMERA));
+       //freenect_select_subdevices(f_ctx, (freenect_device_flags)(FREENECT_DEVICE_MOTOR | FREENECT_DEVICE_CAMERA | FREENECT_DEVICE_AUDIO));
+       freenect_select_subdevices(f_ctx, (freenect_device_flags)(FREENECT_DEVICE_CAMERA | FREENECT_DEVICE_AUDIO));

        int nr_devices = freenect_num_devices (f_ctx);
        printf ("Number of devices found: %d\n", nr_devices);

I've read that there have been changes with the motor device in that it's somehow attached to the audio now? I'm not very experienced with libusb, but I would like to try to mess around and make it work if anybody has any ideas/suggestions.

@zanemcca

This comment has been minimized.

Show comment
Hide comment
@zanemcca

zanemcca Mar 13, 2013

So I am brand new to github. Could you tell me how you compiled your changes after you put them in @dudefellah

I tried to make in the build directory but it did not seem to put the changes in. I also removed the object files and even tried removing the whole build directory and redoing cmake. Nothing seemed to work. Any help would be great.

So I am brand new to github. Could you tell me how you compiled your changes after you put them in @dudefellah

I tried to make in the build directory but it did not seem to put the changes in. I also removed the object files and even tried removing the whole build directory and redoing cmake. Nothing seemed to work. Any help would be great.

@dudefellah

This comment has been minimized.

Show comment
Hide comment
@dudefellah

dudefellah Mar 13, 2013

I've forked my own copy here: https://github.com/dudefellah/libfreenect.git

You can diff against your repo to see what's been changed (the changes are somewhat different from what I posted earlier... I'm still trying to figure this stuff out)

When you compile, you'll need to build audio and I've added a flag for building for the kinect ver 1473, so you'll need at least something like cmake -DBUILD_AUDIO:BOOL=ON -DBUILD_KINECT_1473:BOOL=ON

I didn't commit the changes in glview since I've been messing around with a whole bunch of stuff, but I think you'll probably need remove the FREENECT_DEVICE_MOTOR flag from freenect_select_subdevices and may (I can't remember exactly) need to add FREENECT_DEVICE_AUDIO. The glview.c change should be the same as I posted earlier.

Hope that helps a bit more.

Does nobody else have more information on what's needed to get everything working again?

I've forked my own copy here: https://github.com/dudefellah/libfreenect.git

You can diff against your repo to see what's been changed (the changes are somewhat different from what I posted earlier... I'm still trying to figure this stuff out)

When you compile, you'll need to build audio and I've added a flag for building for the kinect ver 1473, so you'll need at least something like cmake -DBUILD_AUDIO:BOOL=ON -DBUILD_KINECT_1473:BOOL=ON

I didn't commit the changes in glview since I've been messing around with a whole bunch of stuff, but I think you'll probably need remove the FREENECT_DEVICE_MOTOR flag from freenect_select_subdevices and may (I can't remember exactly) need to add FREENECT_DEVICE_AUDIO. The glview.c change should be the same as I posted earlier.

Hope that helps a bit more.

Does nobody else have more information on what's needed to get everything working again?

@dudefellah

This comment has been minimized.

Show comment
Hide comment
@dudefellah

dudefellah Mar 14, 2013

Looks like my work so far is actually a dumber version of this: renewagner@06e48e5 . I'll probably end up using this code when I have time to play with libfreenect in the next week or so.

Looks like my work so far is actually a dumber version of this: renewagner@06e48e5 . I'll probably end up using this code when I have time to play with libfreenect in the next week or so.

@zanemcca

This comment has been minimized.

Show comment
Hide comment
@zanemcca

zanemcca Mar 15, 2013

Thanks that helps. I cannot find anything useful telling me why this thing will not rebuild properly.

If I edit glview.c I can see my changes right away. But I cannot get anything to happen when I change cameras.c. make says it is compiling it but nothing I do changes the output. I have installed, uninstalled and deleted everything countless times nothing I do has changed the output at all.

My most reason version of this is here:

--- a/src/cameras.c
+++ b/src/cameras.c
@@ -903,13 +903,29 @@ static int freenect_fetch_zero_plane_info(freenect_device *dev)
        uint16_t cmd[5] = {0}; // Offset is the only field in this command, and it's 0

        int res;
-       res = send_cmd(dev, 0x04, cmd, 10, reply, 322); //OPCODE_GET_FIXED_PARAMS = 4,
-       if (res != 322) {
-               FN_ERROR("freenect_fetch_zero_plane_info: send_cmd read %d bytes (expected 322)\n", res);
-               return -1;
-       }

-       memcpy(&(dev->registration.zero_plane_info), reply + 94, sizeof(dev->registration.zero_plane_info));
+        int expected_len = 0;
+        int struct_offset = 0;
+/*        switch(dev->hwrev) {
+          case HWREV_XBOX360_0:
+            expected_len = 322;
+            struct_offset = 94;
+            break;
+          case HWREV_K4W_0:
+          */
+            expected_len = 334;
+            struct_offset = 94;
+//            break;
+//        }
+
+        res = send_cmd(dev, 0x04, cmd, 10, reply, expected_len); //OPCODE_GET_FIXED_PARAMS = 4,
+        if (res != expected_len) {
+          //FN_ERROR("freenect_fetch_zero_plane_info: send_cmd read %d bytes (expected %d)\n", res, expected_len);
+          FN_ERROR("ERROR: THIS SHOULD PRINT ON THE SCREEN");
+           return -1;
+        }
+
+        memcpy(&(dev->registration.zero_plane_info), reply + struct_offset, sizeof(dev->registration.zero_plane_info));
        union {
                uint32_t ui;
                float f;
@@ -1261,7 +1277,9 @@ int freenect_set_video_mode(freenect_device* dev, const freenect_frame_mode mode
        dev->video_resolution = res;
        // Now that we've changed video format and resolution, we need to update
        // registration tables.
-       freenect_fetch_reg_info(dev);
+        if (res == FREENECT_RESOLUTION_MEDIUM) {
+           freenect_fetch_reg_info(dev);
+        }
        return 0;
 } 

When I run glview I get this:

Kinect camera test
Number of devices found: 1
Control cmd=0016 tag=0000 len=000a: 18
Control reply: 18
start_lines:    0
end_lines:      0
cropping_lines: 0
Control cmd=0004 tag=0001 len=000a: 18
Control reply: 18
send_cmd: Data buffer is 322 bytes long, but got 334 bytes
freenect_fetch_zero_plane_info: send_cmd read 334 bytes (expected 322)
freenect_camera_init(): Failed to fetch zero plane info for device
Could not open device

I do not know how it is possible for it to print 322 at all I have it hard coded to 334. I have tried this a million times. Please help, how do I get the changes to go through?

Thanks that helps. I cannot find anything useful telling me why this thing will not rebuild properly.

If I edit glview.c I can see my changes right away. But I cannot get anything to happen when I change cameras.c. make says it is compiling it but nothing I do changes the output. I have installed, uninstalled and deleted everything countless times nothing I do has changed the output at all.

My most reason version of this is here:

--- a/src/cameras.c
+++ b/src/cameras.c
@@ -903,13 +903,29 @@ static int freenect_fetch_zero_plane_info(freenect_device *dev)
        uint16_t cmd[5] = {0}; // Offset is the only field in this command, and it's 0

        int res;
-       res = send_cmd(dev, 0x04, cmd, 10, reply, 322); //OPCODE_GET_FIXED_PARAMS = 4,
-       if (res != 322) {
-               FN_ERROR("freenect_fetch_zero_plane_info: send_cmd read %d bytes (expected 322)\n", res);
-               return -1;
-       }

-       memcpy(&(dev->registration.zero_plane_info), reply + 94, sizeof(dev->registration.zero_plane_info));
+        int expected_len = 0;
+        int struct_offset = 0;
+/*        switch(dev->hwrev) {
+          case HWREV_XBOX360_0:
+            expected_len = 322;
+            struct_offset = 94;
+            break;
+          case HWREV_K4W_0:
+          */
+            expected_len = 334;
+            struct_offset = 94;
+//            break;
+//        }
+
+        res = send_cmd(dev, 0x04, cmd, 10, reply, expected_len); //OPCODE_GET_FIXED_PARAMS = 4,
+        if (res != expected_len) {
+          //FN_ERROR("freenect_fetch_zero_plane_info: send_cmd read %d bytes (expected %d)\n", res, expected_len);
+          FN_ERROR("ERROR: THIS SHOULD PRINT ON THE SCREEN");
+           return -1;
+        }
+
+        memcpy(&(dev->registration.zero_plane_info), reply + struct_offset, sizeof(dev->registration.zero_plane_info));
        union {
                uint32_t ui;
                float f;
@@ -1261,7 +1277,9 @@ int freenect_set_video_mode(freenect_device* dev, const freenect_frame_mode mode
        dev->video_resolution = res;
        // Now that we've changed video format and resolution, we need to update
        // registration tables.
-       freenect_fetch_reg_info(dev);
+        if (res == FREENECT_RESOLUTION_MEDIUM) {
+           freenect_fetch_reg_info(dev);
+        }
        return 0;
 } 

When I run glview I get this:

Kinect camera test
Number of devices found: 1
Control cmd=0016 tag=0000 len=000a: 18
Control reply: 18
start_lines:    0
end_lines:      0
cropping_lines: 0
Control cmd=0004 tag=0001 len=000a: 18
Control reply: 18
send_cmd: Data buffer is 322 bytes long, but got 334 bytes
freenect_fetch_zero_plane_info: send_cmd read 334 bytes (expected 322)
freenect_camera_init(): Failed to fetch zero plane info for device
Could not open device

I do not know how it is possible for it to print 322 at all I have it hard coded to 334. I have tried this a million times. Please help, how do I get the changes to go through?

@zanemcca

This comment has been minimized.

Show comment
Hide comment
@zanemcca

zanemcca Mar 15, 2013

Ok so I tried to edit the file on my MacAir and it worked. But it is still not responding on my RaspberryPi with RaspbianOS. I am guessing there is some other old definition of that code that is getting called but I have no idea where it is. I tried to go through my /usr and /bin directories and I deleted everything with libfreenect in it then I reinstalled everything but still nothing.

Ok so I tried to edit the file on my MacAir and it worked. But it is still not responding on my RaspberryPi with RaspbianOS. I am guessing there is some other old definition of that code that is getting called but I have no idea where it is. I tried to go through my /usr and /bin directories and I deleted everything with libfreenect in it then I reinstalled everything but still nothing.

@Exomene

This comment has been minimized.

Show comment
Hide comment
@Exomene

Exomene Mar 16, 2013

Thanks @dudefellah.
I tried René Wagner's branch and finally had the same message as @zanemcca though I removed all files related to libfreenect before.

Exomene commented Mar 16, 2013

Thanks @dudefellah.
I tried René Wagner's branch and finally had the same message as @zanemcca though I removed all files related to libfreenect before.

@leokoppel

This comment has been minimized.

Show comment
Hide comment
@leokoppel

leokoppel Mar 23, 2013

I got the camera to work by combining renewagner's and ofTheo's code. I saved this here https://github.com/theoceanwalker/libfreenect
The glview example doesn't seem to work (it shows a blank window, and running it somehow messes up subsequent attemps to access the kinect), though "regview" does. This doesn't really concern me as I am using the python wrappers which are now working.

I got the camera to work by combining renewagner's and ofTheo's code. I saved this here https://github.com/theoceanwalker/libfreenect
The glview example doesn't seem to work (it shows a blank window, and running it somehow messes up subsequent attemps to access the kinect), though "regview" does. This doesn't really concern me as I am using the python wrappers which are now working.

@zanemcca

This comment has been minimized.

Show comment
Hide comment
@zanemcca

zanemcca Mar 24, 2013

Hey @Exomene I am trying to figure out why we are having this error.

My theory is that there is some file that is linking to an old copy of the /src directory and our changes are actually getting compiled into another file.

But to narrow down the symptoms of our problem can you tell me what hardware/OS you are on?
I am on a RaspberryPi Rev B with RaspbianOS.

Also I tried to get the OpenFrameworks fix working, which could be the source of the error, did you try to install it as well?

Any other info you have should help. Thanks

Hey @Exomene I am trying to figure out why we are having this error.

My theory is that there is some file that is linking to an old copy of the /src directory and our changes are actually getting compiled into another file.

But to narrow down the symptoms of our problem can you tell me what hardware/OS you are on?
I am on a RaspberryPi Rev B with RaspbianOS.

Also I tried to get the OpenFrameworks fix working, which could be the source of the error, did you try to install it as well?

Any other info you have should help. Thanks

@leokoppel

This comment has been minimized.

Show comment
Hide comment
@leokoppel

leokoppel Mar 24, 2013

@zanemcca @Exomene odd issue but almost certainly has nothing to do with this library in particular, or what hardware you're on. The simplest explanations are

  • Your code is not actually being built (e.g., you did not run cmake to regenerate the Makefile after copying the source directory)
  • You have conflicting library paths (e.g. /usr/lib and /usr/local/lib)

What are you actually doing to build? The output of make will tell you what source directory it's using..

@zanemcca @Exomene odd issue but almost certainly has nothing to do with this library in particular, or what hardware you're on. The simplest explanations are

  • Your code is not actually being built (e.g., you did not run cmake to regenerate the Makefile after copying the source directory)
  • You have conflicting library paths (e.g. /usr/lib and /usr/local/lib)

What are you actually doing to build? The output of make will tell you what source directory it's using..

@Exomene

This comment has been minimized.

Show comment
Hide comment
@Exomene

Exomene Mar 24, 2013

Hi,
I'm just passing by and I'll come back after having test thoroughly but the problem I face may be due to the use of Kinect on USB 3 ports. As strange as it sounds I read that Kinect is an USB 2 only device and might not work correctly on USB 3. I'm on a PC running Ubuntu 12.10 64bit.

Exomene commented Mar 24, 2013

Hi,
I'm just passing by and I'll come back after having test thoroughly but the problem I face may be due to the use of Kinect on USB 3 ports. As strange as it sounds I read that Kinect is an USB 2 only device and might not work correctly on USB 3. I'm on a PC running Ubuntu 12.10 64bit.

@zanemcca

This comment has been minimized.

Show comment
Hide comment
@zanemcca

zanemcca Mar 24, 2013

Hi @theoceanwalker Thanks for the insight.
I have gotten mine to work by the rather crude reinstall my OS method, not a big hassle for me since it had almost nothing on it anyway. But I did not change my method for recompiling at all so I am confident that was not the issue. I think you are probably right about the /usr/lib and /usr/local/lib having conflicts. I tried as best as I could to track down any instances of libfreenect in the /usr and /etc directories but it is possible that I missed stuff.

But just for an FYI here are my outputs from making on my new install.

pi@raspberrypi ~/libfreenect/build $ cmake ..
-- Operating system is Linux
-- Got System Processor armv6l
-- libfreenect will be installed to /usr/local
-- Headers will be installed to /usr/local/include/libfreenect
-- Libraries will be installed to /usr/local/lib
-- Found libusb-1.0:
--  - Includes: /usr/include/libusb-1.0
--  - Libraries: /usr/lib/arm-linux-gnueabihf/libusb-1.0.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/libfreenect/build
pi@raspberrypi ~/libfreenect/build $ make
Scanning dependencies of target freenect
[  4%] Building C object src/CMakeFiles/freenect.dir/usb_libusb10.c.o
Linking C shared library ../lib/libfreenect.so
[ 23%] Built target freenect
Scanning dependencies of target freenectstatic
[ 28%] Building C object src/CMakeFiles/freenectstatic.dir/usb_libusb10.c.o
Linking C static library ../lib/libfreenect.a
[ 47%] Built target freenectstatic
Linking C shared library ../../lib/libfreenect_sync.so
[ 52%] Built target freenect_sync
Linking C executable ../bin/glpclview
[ 57%] Built target glpclview
Linking C executable ../bin/glview
[ 61%] Built target glview
Linking C executable ../bin/hiview
[ 66%] Built target hiview
Linking C executable ../bin/regtest
[ 71%] Built target regtest
Linking C executable ../bin/regview
[ 76%] Built target regview
Linking C executable ../bin/tiltdemo
[ 80%] Built target tiltdemo
[ 85%] Built target fakenect
Linking C executable ../bin/record
[ 90%] Built target record
[ 95%] Built target freenect_sync_static
Linking CXX executable ../../bin/cppview
[100%] Built target cppview
pi@raspberrypi ~/libfreenect/build $ sudo make install
[ 23%] Built target freenect
[ 47%] Built target freenectstatic
[ 52%] Built target freenect_sync
[ 57%] Built target glpclview
[ 61%] Built target glview
[ 66%] Built target hiview
[ 71%] Built target regtest
[ 76%] Built target regview
[ 80%] Built target tiltdemo
[ 85%] Built target fakenect
[ 90%] Built target record
[ 95%] Built target freenect_sync_static
[100%] Built target cppview
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/libfreenect.so.0.1.2
-- Up-to-date: /usr/local/lib/libfreenect.so.0.1
-- Up-to-date: /usr/local/lib/libfreenect.so
-- Installing: /usr/local/lib/libfreenect.a
-- Up-to-date: /usr/local/include/libfreenect/libfreenect.h
-- Up-to-date: /usr/local/include/libfreenect/libfreenect-registration.h
-- Up-to-date: /usr/local/lib/pkgconfig/libfreenect.pc
-- Installing: /usr/local/bin/glview
-- Removed runtime path from "/usr/local/bin/glview"
-- Installing: /usr/local/bin/regview
-- Removed runtime path from "/usr/local/bin/regview"
-- Installing: /usr/local/bin/hiview
-- Removed runtime path from "/usr/local/bin/hiview"
-- Installing: /usr/local/bin/glpclview
-- Removed runtime path from "/usr/local/bin/glpclview"
-- Installing: /usr/local/bin/tiltdemo
-- Removed runtime path from "/usr/local/bin/tiltdemo"
-- Up-to-date: /usr/local/lib/fakenect/libfreenect.so.0.1.2
-- Up-to-date: /usr/local/lib/fakenect/libfreenect.so.0.1
-- Up-to-date: /usr/local/lib/fakenect/libfreenect.so
-- Installing: /usr/local/bin/record
-- Removed runtime path from "/usr/local/bin/record"
-- Up-to-date: /usr/local/bin/fakenect
-- Installing: /usr/local/lib/libfreenect_sync.so.0.1.2
-- Up-to-date: /usr/local/lib/libfreenect_sync.so.0.1
-- Up-to-date: /usr/local/lib/libfreenect_sync.so
-- Removed runtime path from "/usr/local/lib/libfreenect_sync.so.0.1.2"
-- Up-to-date: /usr/local/lib/libfreenect_sync.a
-- Up-to-date: /usr/local/include/libfreenect/libfreenect_sync.h
-- Up-to-date: /usr/local/include/libfreenect.hpp
-- Installing: /usr/local/bin/cppview
-- Removed runtime path from "/usr/local/bin/cppview"

Thanks again.

Hi @theoceanwalker Thanks for the insight.
I have gotten mine to work by the rather crude reinstall my OS method, not a big hassle for me since it had almost nothing on it anyway. But I did not change my method for recompiling at all so I am confident that was not the issue. I think you are probably right about the /usr/lib and /usr/local/lib having conflicts. I tried as best as I could to track down any instances of libfreenect in the /usr and /etc directories but it is possible that I missed stuff.

But just for an FYI here are my outputs from making on my new install.

pi@raspberrypi ~/libfreenect/build $ cmake ..
-- Operating system is Linux
-- Got System Processor armv6l
-- libfreenect will be installed to /usr/local
-- Headers will be installed to /usr/local/include/libfreenect
-- Libraries will be installed to /usr/local/lib
-- Found libusb-1.0:
--  - Includes: /usr/include/libusb-1.0
--  - Libraries: /usr/lib/arm-linux-gnueabihf/libusb-1.0.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/libfreenect/build
pi@raspberrypi ~/libfreenect/build $ make
Scanning dependencies of target freenect
[  4%] Building C object src/CMakeFiles/freenect.dir/usb_libusb10.c.o
Linking C shared library ../lib/libfreenect.so
[ 23%] Built target freenect
Scanning dependencies of target freenectstatic
[ 28%] Building C object src/CMakeFiles/freenectstatic.dir/usb_libusb10.c.o
Linking C static library ../lib/libfreenect.a
[ 47%] Built target freenectstatic
Linking C shared library ../../lib/libfreenect_sync.so
[ 52%] Built target freenect_sync
Linking C executable ../bin/glpclview
[ 57%] Built target glpclview
Linking C executable ../bin/glview
[ 61%] Built target glview
Linking C executable ../bin/hiview
[ 66%] Built target hiview
Linking C executable ../bin/regtest
[ 71%] Built target regtest
Linking C executable ../bin/regview
[ 76%] Built target regview
Linking C executable ../bin/tiltdemo
[ 80%] Built target tiltdemo
[ 85%] Built target fakenect
Linking C executable ../bin/record
[ 90%] Built target record
[ 95%] Built target freenect_sync_static
Linking CXX executable ../../bin/cppview
[100%] Built target cppview
pi@raspberrypi ~/libfreenect/build $ sudo make install
[ 23%] Built target freenect
[ 47%] Built target freenectstatic
[ 52%] Built target freenect_sync
[ 57%] Built target glpclview
[ 61%] Built target glview
[ 66%] Built target hiview
[ 71%] Built target regtest
[ 76%] Built target regview
[ 80%] Built target tiltdemo
[ 85%] Built target fakenect
[ 90%] Built target record
[ 95%] Built target freenect_sync_static
[100%] Built target cppview
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/libfreenect.so.0.1.2
-- Up-to-date: /usr/local/lib/libfreenect.so.0.1
-- Up-to-date: /usr/local/lib/libfreenect.so
-- Installing: /usr/local/lib/libfreenect.a
-- Up-to-date: /usr/local/include/libfreenect/libfreenect.h
-- Up-to-date: /usr/local/include/libfreenect/libfreenect-registration.h
-- Up-to-date: /usr/local/lib/pkgconfig/libfreenect.pc
-- Installing: /usr/local/bin/glview
-- Removed runtime path from "/usr/local/bin/glview"
-- Installing: /usr/local/bin/regview
-- Removed runtime path from "/usr/local/bin/regview"
-- Installing: /usr/local/bin/hiview
-- Removed runtime path from "/usr/local/bin/hiview"
-- Installing: /usr/local/bin/glpclview
-- Removed runtime path from "/usr/local/bin/glpclview"
-- Installing: /usr/local/bin/tiltdemo
-- Removed runtime path from "/usr/local/bin/tiltdemo"
-- Up-to-date: /usr/local/lib/fakenect/libfreenect.so.0.1.2
-- Up-to-date: /usr/local/lib/fakenect/libfreenect.so.0.1
-- Up-to-date: /usr/local/lib/fakenect/libfreenect.so
-- Installing: /usr/local/bin/record
-- Removed runtime path from "/usr/local/bin/record"
-- Up-to-date: /usr/local/bin/fakenect
-- Installing: /usr/local/lib/libfreenect_sync.so.0.1.2
-- Up-to-date: /usr/local/lib/libfreenect_sync.so.0.1
-- Up-to-date: /usr/local/lib/libfreenect_sync.so
-- Removed runtime path from "/usr/local/lib/libfreenect_sync.so.0.1.2"
-- Up-to-date: /usr/local/lib/libfreenect_sync.a
-- Up-to-date: /usr/local/include/libfreenect/libfreenect_sync.h
-- Up-to-date: /usr/local/include/libfreenect.hpp
-- Installing: /usr/local/bin/cppview
-- Removed runtime path from "/usr/local/bin/cppview"

Thanks again.

@Exomene

This comment has been minimized.

Show comment
Hide comment
@Exomene

Exomene Mar 26, 2013

Hi @zanemcca,
Yes I tried the openFrameworks fix.
I thought you had a good idea by removing all the references to libfreenect and kinect before trying to reinstall @theoceanwalker 's branch.
So this is what's left concerning *nect on my computer before reinstalling libfreenect (I'm running ubuntu 12.10 64bits)

/etc/modprobe.d/blacklist-gspca-kinect.conf
/etc/udev/rules.d/51-kinect.rules
/lib/modules/3.2.0-32-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-18-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-19-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-21-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-22-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-23-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-25-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-26-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/usr/share/doc/opencv-doc/examples/cpp/kinect_maps.cpp.gz
/usr/share/pulseaudio/alsa-mixer/profile-sets/kinect-audio.conf
/usr/src/linux-headers-3.5.0-19-generic/include/config/usb/gspca/kinect.h
/usr/src/linux-headers-3.5.0-21-generic/include/config/usb/gspca/kinect.h
/usr/src/linux-headers-3.5.0-22-generic/include/config/usb/gspca/kinect.h
/usr/src/linux-headers-3.5.0-23-generic/include/config/usb/gspca/kinect.h
/usr/src/linux-headers-3.5.0-25-generic/include/config/usb/gspca/kinect.h
/usr/src/linux-headers-3.5.0-26-generic/include/config/usb/gspca/kinect.h

Is there still thing I should remove?

Regarding the result of cmake, here they are

-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Operating system is Linux
-- Got System Processor x86_64
-- Linux x86_64 Detected
-- libfreenect will be installed to /usr/local
-- Headers will be installed to /usr/local/include/libfreenect
-- Libraries will be installed to /usr/local/lib64
-- Found libusb-1.0:
--  - Includes: /usr/include/libusb-1.0
--  - Libraries: /usr/lib/x86_64-linux-gnu/libusb-1.0.so
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/exomene/libfreenect-master/build

And the results of make

Scanning dependencies of target freenect
[  4%] Building C object src/CMakeFiles/freenect.dir/core.c.o
[  9%] Building C object src/CMakeFiles/freenect.dir/tilt.c.o
[ 14%] Building C object src/CMakeFiles/freenect.dir/cameras.c.o
/home/exomene/libfreenect-master/src/cameras.c:749:17: attention : ‘read_register’ defined but not used [-Wunused-function]
/home/exomene/libfreenect-master/src/cameras.c: In function ‘freenect_set_smoothing_mode’:
/home/exomene/libfreenect-master/src/cameras.c:1338:1: attention : contrôle a atteint la fin non void de la fonction [-Wreturn-type]
[ 19%] Building C object src/CMakeFiles/freenect.dir/usb_libusb10.c.o
/home/exomene/libfreenect-master/src/usb_libusb10.c: In function ‘fnusb_open_subdevices’:
/home/exomene/libfreenect-master/src/usb_libusb10.c:382:1: attention : format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘struct libusb_device_handle *’ [-Wformat]
/home/exomene/libfreenect-master/src/usb_libusb10.c:385:1: attention : format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘struct libusb_device_handle *’ [-Wformat]
/home/exomene/libfreenect-master/src/usb_libusb10.c:178:25: attention : unused variable ‘nr_mot’ [-Wunused-variable]
[ 23%] Building C object src/CMakeFiles/freenect.dir/registration.c.o
Linking C shared library ../lib/libfreenect.so
[ 23%] Built target freenect
Scanning dependencies of target freenectstatic
[ 28%] Building C object src/CMakeFiles/freenectstatic.dir/core.c.o
[ 33%] Building C object src/CMakeFiles/freenectstatic.dir/tilt.c.o
[ 38%] Building C object src/CMakeFiles/freenectstatic.dir/cameras.c.o
/home/exomene/libfreenect-master/src/cameras.c:749:17: attention : ‘read_register’ defined but not used [-Wunused-function]
/home/exomene/libfreenect-master/src/cameras.c: In function ‘freenect_set_smoothing_mode’:
/home/exomene/libfreenect-master/src/cameras.c:1338:1: attention : contrôle a atteint la fin non void de la fonction [-Wreturn-type]
[ 42%] Building C object src/CMakeFiles/freenectstatic.dir/usb_libusb10.c.o
/home/exomene/libfreenect-master/src/usb_libusb10.c: In function ‘fnusb_open_subdevices’:
/home/exomene/libfreenect-master/src/usb_libusb10.c:382:1: attention : format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘struct libusb_device_handle *’ [-Wformat]
/home/exomene/libfreenect-master/src/usb_libusb10.c:385:1: attention : format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘struct libusb_device_handle *’ [-Wformat]
/home/exomene/libfreenect-master/src/usb_libusb10.c:178:25: attention : unused variable ‘nr_mot’ [-Wunused-variable]
[ 47%] Building C object src/CMakeFiles/freenectstatic.dir/registration.c.o
Linking C static library ../lib/libfreenect.a
[ 47%] Built target freenectstatic
Scanning dependencies of target freenect_sync
[ 52%] Building C object wrappers/c_sync/CMakeFiles/freenect_sync.dir/libfreenect_sync.c.o
Linking C shared library ../../lib/libfreenect_sync.so
[ 52%] Built target freenect_sync
Scanning dependencies of target glpclview
[ 57%] Building C object examples/CMakeFiles/glpclview.dir/glpclview.c.o
Linking C executable ../bin/glpclview
[ 57%] Built target glpclview
Scanning dependencies of target glview
[ 61%] Building C object examples/CMakeFiles/glview.dir/glview.c.o
Linking C executable ../bin/glview
[ 61%] Built target glview
Scanning dependencies of target hiview
[ 66%] Building C object examples/CMakeFiles/hiview.dir/hiview.c.o
Linking C executable ../bin/hiview
[ 66%] Built target hiview
Scanning dependencies of target regtest
[ 71%] Building C object examples/CMakeFiles/regtest.dir/regtest.c.o
Linking C executable ../bin/regtest
[ 71%] Built target regtest
Scanning dependencies of target regview
[ 76%] Building C object examples/CMakeFiles/regview.dir/regview.c.o
Linking C executable ../bin/regview
[ 76%] Built target regview
Scanning dependencies of target tiltdemo
[ 80%] Building C object examples/CMakeFiles/tiltdemo.dir/tiltdemo.c.o
Linking C executable ../bin/tiltdemo
[ 80%] Built target tiltdemo
Scanning dependencies of target fakenect
[ 85%] Building C object fakenect/CMakeFiles/fakenect.dir/fakenect.c.o
Linking C shared library ../lib/fakenect/libfreenect.so
[ 85%] Built target fakenect
Scanning dependencies of target record
[ 90%] Building C object fakenect/CMakeFiles/record.dir/record.c.o
Linking C executable ../bin/record
[ 90%] Built target record
Scanning dependencies of target freenect_sync_static
[ 95%] Building C object wrappers/c_sync/CMakeFiles/freenect_sync_static.dir/libfreenect_sync.c.o
Linking C static library ../../lib/libfreenect_sync.a
[ 95%] Built target freenect_sync_static
Scanning dependencies of target cppview
[100%] Building CXX object wrappers/cpp/CMakeFiles/cppview.dir/cppview.cpp.o
Linking CXX executable ../../bin/cppview
[100%] Built target cppview

Last question, I am supposed to do a make install after cmake and make?

Thank you all for your help,

Exomène

Exomene commented Mar 26, 2013

Hi @zanemcca,
Yes I tried the openFrameworks fix.
I thought you had a good idea by removing all the references to libfreenect and kinect before trying to reinstall @theoceanwalker 's branch.
So this is what's left concerning *nect on my computer before reinstalling libfreenect (I'm running ubuntu 12.10 64bits)

/etc/modprobe.d/blacklist-gspca-kinect.conf
/etc/udev/rules.d/51-kinect.rules
/lib/modules/3.2.0-32-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-18-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-19-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-21-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-22-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-23-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-25-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/lib/modules/3.5.0-26-generic/kernel/drivers/media/video/gspca/gspca_kinect.ko
/usr/share/doc/opencv-doc/examples/cpp/kinect_maps.cpp.gz
/usr/share/pulseaudio/alsa-mixer/profile-sets/kinect-audio.conf
/usr/src/linux-headers-3.5.0-19-generic/include/config/usb/gspca/kinect.h
/usr/src/linux-headers-3.5.0-21-generic/include/config/usb/gspca/kinect.h
/usr/src/linux-headers-3.5.0-22-generic/include/config/usb/gspca/kinect.h
/usr/src/linux-headers-3.5.0-23-generic/include/config/usb/gspca/kinect.h
/usr/src/linux-headers-3.5.0-25-generic/include/config/usb/gspca/kinect.h
/usr/src/linux-headers-3.5.0-26-generic/include/config/usb/gspca/kinect.h

Is there still thing I should remove?

Regarding the result of cmake, here they are

-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Operating system is Linux
-- Got System Processor x86_64
-- Linux x86_64 Detected
-- libfreenect will be installed to /usr/local
-- Headers will be installed to /usr/local/include/libfreenect
-- Libraries will be installed to /usr/local/lib64
-- Found libusb-1.0:
--  - Includes: /usr/include/libusb-1.0
--  - Libraries: /usr/lib/x86_64-linux-gnu/libusb-1.0.so
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/exomene/libfreenect-master/build

And the results of make

Scanning dependencies of target freenect
[  4%] Building C object src/CMakeFiles/freenect.dir/core.c.o
[  9%] Building C object src/CMakeFiles/freenect.dir/tilt.c.o
[ 14%] Building C object src/CMakeFiles/freenect.dir/cameras.c.o
/home/exomene/libfreenect-master/src/cameras.c:749:17: attention : ‘read_register’ defined but not used [-Wunused-function]
/home/exomene/libfreenect-master/src/cameras.c: In function ‘freenect_set_smoothing_mode’:
/home/exomene/libfreenect-master/src/cameras.c:1338:1: attention : contrôle a atteint la fin non void de la fonction [-Wreturn-type]
[ 19%] Building C object src/CMakeFiles/freenect.dir/usb_libusb10.c.o
/home/exomene/libfreenect-master/src/usb_libusb10.c: In function ‘fnusb_open_subdevices’:
/home/exomene/libfreenect-master/src/usb_libusb10.c:382:1: attention : format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘struct libusb_device_handle *’ [-Wformat]
/home/exomene/libfreenect-master/src/usb_libusb10.c:385:1: attention : format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘struct libusb_device_handle *’ [-Wformat]
/home/exomene/libfreenect-master/src/usb_libusb10.c:178:25: attention : unused variable ‘nr_mot’ [-Wunused-variable]
[ 23%] Building C object src/CMakeFiles/freenect.dir/registration.c.o
Linking C shared library ../lib/libfreenect.so
[ 23%] Built target freenect
Scanning dependencies of target freenectstatic
[ 28%] Building C object src/CMakeFiles/freenectstatic.dir/core.c.o
[ 33%] Building C object src/CMakeFiles/freenectstatic.dir/tilt.c.o
[ 38%] Building C object src/CMakeFiles/freenectstatic.dir/cameras.c.o
/home/exomene/libfreenect-master/src/cameras.c:749:17: attention : ‘read_register’ defined but not used [-Wunused-function]
/home/exomene/libfreenect-master/src/cameras.c: In function ‘freenect_set_smoothing_mode’:
/home/exomene/libfreenect-master/src/cameras.c:1338:1: attention : contrôle a atteint la fin non void de la fonction [-Wreturn-type]
[ 42%] Building C object src/CMakeFiles/freenectstatic.dir/usb_libusb10.c.o
/home/exomene/libfreenect-master/src/usb_libusb10.c: In function ‘fnusb_open_subdevices’:
/home/exomene/libfreenect-master/src/usb_libusb10.c:382:1: attention : format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘struct libusb_device_handle *’ [-Wformat]
/home/exomene/libfreenect-master/src/usb_libusb10.c:385:1: attention : format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘struct libusb_device_handle *’ [-Wformat]
/home/exomene/libfreenect-master/src/usb_libusb10.c:178:25: attention : unused variable ‘nr_mot’ [-Wunused-variable]
[ 47%] Building C object src/CMakeFiles/freenectstatic.dir/registration.c.o
Linking C static library ../lib/libfreenect.a
[ 47%] Built target freenectstatic
Scanning dependencies of target freenect_sync
[ 52%] Building C object wrappers/c_sync/CMakeFiles/freenect_sync.dir/libfreenect_sync.c.o
Linking C shared library ../../lib/libfreenect_sync.so
[ 52%] Built target freenect_sync
Scanning dependencies of target glpclview
[ 57%] Building C object examples/CMakeFiles/glpclview.dir/glpclview.c.o
Linking C executable ../bin/glpclview
[ 57%] Built target glpclview
Scanning dependencies of target glview
[ 61%] Building C object examples/CMakeFiles/glview.dir/glview.c.o
Linking C executable ../bin/glview
[ 61%] Built target glview
Scanning dependencies of target hiview
[ 66%] Building C object examples/CMakeFiles/hiview.dir/hiview.c.o
Linking C executable ../bin/hiview
[ 66%] Built target hiview
Scanning dependencies of target regtest
[ 71%] Building C object examples/CMakeFiles/regtest.dir/regtest.c.o
Linking C executable ../bin/regtest
[ 71%] Built target regtest
Scanning dependencies of target regview
[ 76%] Building C object examples/CMakeFiles/regview.dir/regview.c.o
Linking C executable ../bin/regview
[ 76%] Built target regview
Scanning dependencies of target tiltdemo
[ 80%] Building C object examples/CMakeFiles/tiltdemo.dir/tiltdemo.c.o
Linking C executable ../bin/tiltdemo
[ 80%] Built target tiltdemo
Scanning dependencies of target fakenect
[ 85%] Building C object fakenect/CMakeFiles/fakenect.dir/fakenect.c.o
Linking C shared library ../lib/fakenect/libfreenect.so
[ 85%] Built target fakenect
Scanning dependencies of target record
[ 90%] Building C object fakenect/CMakeFiles/record.dir/record.c.o
Linking C executable ../bin/record
[ 90%] Built target record
Scanning dependencies of target freenect_sync_static
[ 95%] Building C object wrappers/c_sync/CMakeFiles/freenect_sync_static.dir/libfreenect_sync.c.o
Linking C static library ../../lib/libfreenect_sync.a
[ 95%] Built target freenect_sync_static
Scanning dependencies of target cppview
[100%] Building CXX object wrappers/cpp/CMakeFiles/cppview.dir/cppview.cpp.o
Linking CXX executable ../../bin/cppview
[100%] Built target cppview

Last question, I am supposed to do a make install after cmake and make?

Thank you all for your help,

Exomène

@leokoppel

This comment has been minimized.

Show comment
Hide comment
@leokoppel

leokoppel Mar 27, 2013

@Exomene Yes. If you don't run make install or manually tell the system where to look for the library, it's not going to find it. It will find the old version. See this: http://tldp.org/LDP/LG/current/smith.html on the usual build process (though in this case cmake replaces the configure script) and this: http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html for details on shared libraries .

@Exomene Yes. If you don't run make install or manually tell the system where to look for the library, it's not going to find it. It will find the old version. See this: http://tldp.org/LDP/LG/current/smith.html on the usual build process (though in this case cmake replaces the configure script) and this: http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html for details on shared libraries .

@csotiriou

This comment has been minimized.

Show comment
Hide comment
@csotiriou

csotiriou Mar 27, 2013

Is there any news on the implementation of support of model 1473?
Is there anything we can use right now that actually works, until official support comes? I have seen suggestions in this thread, but I haven't got the time to test all of them. Yesterday, I found out that https://github.com/dudefellah/libfreenect.git does not work for me..

Has anyone been able to run openKinect with 1473 using any variant?

Is there any news on the implementation of support of model 1473?
Is there anything we can use right now that actually works, until official support comes? I have seen suggestions in this thread, but I haven't got the time to test all of them. Yesterday, I found out that https://github.com/dudefellah/libfreenect.git does not work for me..

Has anyone been able to run openKinect with 1473 using any variant?

@tong

This comment has been minimized.

Show comment
Hide comment
@tong

tong Mar 27, 2013

yes, @dudefellah version works for me on 1473, not the glview and i have to re-plug the kinect after each try.

tong commented Mar 27, 2013

yes, @dudefellah version works for me on 1473, not the glview and i have to re-plug the kinect after each try.

@csotiriou

This comment has been minimized.

Show comment
Hide comment
@csotiriou

csotiriou Mar 27, 2013

Maybe it's because the device's sensors are not properly closed after you try. I noticed that, too.

Anyone has any news on wether any fix will be implemented or if any effort is made by the official OpenKinect? So far it seems OpenNI is the only viable option, and even then, the newest 2.0 version needs the Kinect SDK ( = does not support Linux and OS X )

Maybe it's because the device's sensors are not properly closed after you try. I noticed that, too.

Anyone has any news on wether any fix will be implemented or if any effort is made by the official OpenKinect? So far it seems OpenNI is the only viable option, and even then, the newest 2.0 version needs the Kinect SDK ( = does not support Linux and OS X )

@lucky13bbq

This comment has been minimized.

Show comment
Hide comment
@lucky13bbq

lucky13bbq Mar 27, 2013

I also got it working like dudefellah by editing cameras.c, but I removed attempt to use the motor differently. Here are my 2 small changes:


diff --git a/include/libfreenect.h b/include/libfreenect.h
index 4dfb6b1..ceb9111 100644
--- a/include/libfreenect.h
+++ b/include/libfreenect.h
@@ -57,7 +57,7 @@ extern "C" {
 /// and motor support while letting OpenNI have access to the cameras.
 /// If a device is not supported on a particular platform, its flag will be ignored.
 typedef enum {
-   FREENECT_DEVICE_MOTOR  = 0x01,
+   FREENECT_DEVICE_MOTOR  = 0x00,
    FREENECT_DEVICE_CAMERA = 0x02,
    FREENECT_DEVICE_AUDIO  = 0x04,
 } freenect_device_flags;
diff --git a/src/cameras.c b/src/cameras.c
index 7886a33..915fd29 100644
--- a/src/cameras.c
+++ b/src/cameras.c
@@ -905,7 +905,7 @@ static int freenect_fetch_zero_plane_info(freenect_device *dev)
 
    int res;
    res = send_cmd(dev, 0x04, cmd, 10, reply, 322); //OPCODE_GET_FIXED_PARAMS = 4,
-   if (res != 322) {
+   if (res != 322 && res != 334) {
        FN_ERROR("freenect_fetch_zero_plane_info: send_cmd read %d bytes (expected 322)\n", res);
        return -1;
    }

I also got it working like dudefellah by editing cameras.c, but I removed attempt to use the motor differently. Here are my 2 small changes:


diff --git a/include/libfreenect.h b/include/libfreenect.h
index 4dfb6b1..ceb9111 100644
--- a/include/libfreenect.h
+++ b/include/libfreenect.h
@@ -57,7 +57,7 @@ extern "C" {
 /// and motor support while letting OpenNI have access to the cameras.
 /// If a device is not supported on a particular platform, its flag will be ignored.
 typedef enum {
-   FREENECT_DEVICE_MOTOR  = 0x01,
+   FREENECT_DEVICE_MOTOR  = 0x00,
    FREENECT_DEVICE_CAMERA = 0x02,
    FREENECT_DEVICE_AUDIO  = 0x04,
 } freenect_device_flags;
diff --git a/src/cameras.c b/src/cameras.c
index 7886a33..915fd29 100644
--- a/src/cameras.c
+++ b/src/cameras.c
@@ -905,7 +905,7 @@ static int freenect_fetch_zero_plane_info(freenect_device *dev)
 
    int res;
    res = send_cmd(dev, 0x04, cmd, 10, reply, 322); //OPCODE_GET_FIXED_PARAMS = 4,
-   if (res != 322) {
+   if (res != 322 && res != 334) {
        FN_ERROR("freenect_fetch_zero_plane_info: send_cmd read %d bytes (expected 322)\n", res);
        return -1;
    }
@dudefellah

This comment has been minimized.

Show comment
Hide comment
@dudefellah

dudefellah Mar 27, 2013

Yeah there's a number of ways to achieve the same ends. I still think renewagner@06e48e5 is a better option right now. There's still some stuff missing, of course. The stream seems to go out of sync quite easily. I'm guessing there's slight variations on what's being sent back and forth but I haven't had a whole lot of time lately, so I haven't really tried to figure it out. Whatever's changed in the data stream is causing glview to be a little jerky as the video stream is resynced.

I saw a thread a little while ago in my email (I can't seem to find it on github) referring to these: http://answers.ros.org/question/12876/kinect-for-windows/
http://answers.ros.org/answers/35351/revisions/
That might have a little more of what we're looking for on getting 1473 to work.

Yeah there's a number of ways to achieve the same ends. I still think renewagner@06e48e5 is a better option right now. There's still some stuff missing, of course. The stream seems to go out of sync quite easily. I'm guessing there's slight variations on what's being sent back and forth but I haven't had a whole lot of time lately, so I haven't really tried to figure it out. Whatever's changed in the data stream is causing glview to be a little jerky as the video stream is resynced.

I saw a thread a little while ago in my email (I can't seem to find it on github) referring to these: http://answers.ros.org/question/12876/kinect-for-windows/
http://answers.ros.org/answers/35351/revisions/
That might have a little more of what we're looking for on getting 1473 to work.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 2, 2013

Hi!
In my case, i tried dudefellas solution - the code of renewagner - but it still not worked.
I got the error

send_cmd: Data buffer is 322 bytes long, but got 334 bytes
freenect_fetch_zero_plane_info: send_cmd read 334 bytes (expected 322)
freenect_camera_init(): Failed to fetch zero plane info for device
Could not open device

Therefore I simply changed the code of camera.c like this

switch(dev->hwrev) {
    case HWREV_XBOX360_0:
-      expected_len = 322;
+      expected_len = 334;
      struct_offset = 94;
      break;

And it works.

BTW, with OpenNI-1.5. I have no problems to run model 1473.

ghost commented Apr 2, 2013

Hi!
In my case, i tried dudefellas solution - the code of renewagner - but it still not worked.
I got the error

send_cmd: Data buffer is 322 bytes long, but got 334 bytes
freenect_fetch_zero_plane_info: send_cmd read 334 bytes (expected 322)
freenect_camera_init(): Failed to fetch zero plane info for device
Could not open device

Therefore I simply changed the code of camera.c like this

switch(dev->hwrev) {
    case HWREV_XBOX360_0:
-      expected_len = 322;
+      expected_len = 334;
      struct_offset = 94;
      break;

And it works.

BTW, with OpenNI-1.5. I have no problems to run model 1473.

@csotiriou

This comment has been minimized.

Show comment
Hide comment
@csotiriou

csotiriou Apr 2, 2013

Yes. I think OpenNI is the only official viable solution for now.

Yes. I think OpenNI is the only official viable solution for now.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 3, 2013

Hi,
I found this page
http://learn.adafruit.com/hacking-the-kinect/verify-the-vid-and-pid

I followed the examples and my result is
Modell 1414

Xbox NUI Camera:
                  Product ID: 0x02ae
                  Vendor ID: 0x045e  (Microsoft Corporation)
                  Version:  1.0b
                  Serial Number: A00364803145051A
                  Speed: Up to 480 Mb/sec
                  Manufacturer: Microsoft
                  Location ID: 0xfd133000 / 8
                  Current Available (mA): 500
                  Current Required (mA): 16
                Xbox Kinect Audio, © 2011 Microsoft Corporation. All rights reserved.:
                  Product ID: 0x02ad
                  Vendor ID: 0x045e  (Microsoft Corporation)
                  Version: 1,00
                  Serial Number: A44884B05001051A
                  Speed: Up to 480 Mb/sec
                  Manufacturer: Microsoft
                  Location ID: 0xfd131000 / 7
                  Current Available (mA): 500
                  Current Required (mA): Unknown (Device has not been configured)
                Xbox NUI Motor:
                  Product ID: 0x02b0
                  Vendor ID: 0x045e  (Microsoft Corporation)
                  Version: 1,07
                  Speed: Up to 12 Mb/sec
                  Manufacturer: Microsoft
                  Location ID: 0xfd132000 / 6
                  Current Available (mA): 500
                  Current Required (mA): 100

Model 1473

Xbox NUI Camera:
                  Product ID: 0x02ae
                  Vendor ID: 0x045e  (Microsoft Corporation)
                  Version: 2,05
                  Serial Number: 0
                  Speed: Up to 480 Mb/sec
                  Manufacturer: Microsoft
                  Location ID: 0xfd132000 / 7
                  Current Available (mA): 500
                  Current Required (mA): 16
                Xbox Kinect Audio, © 2011 Microsoft Corporation. All rights reserved.:
                  Product ID: 0x02ad
                  Vendor ID: 0x045e  (Microsoft Corporation)
                  Version: 1,00
                  Serial Number: A70777X03897236A
                  Speed: Up to 480 Mb/sec
                  Manufacturer: Microsoft
                  Location ID: 0xfd131000 / 6
                  Current Available (mA): 500
                  Current Required (mA): Unknown (Device has not been configured)

Truly no motor.

ghost commented Apr 3, 2013

Hi,
I found this page
http://learn.adafruit.com/hacking-the-kinect/verify-the-vid-and-pid

I followed the examples and my result is
Modell 1414

Xbox NUI Camera:
                  Product ID: 0x02ae
                  Vendor ID: 0x045e  (Microsoft Corporation)
                  Version:  1.0b
                  Serial Number: A00364803145051A
                  Speed: Up to 480 Mb/sec
                  Manufacturer: Microsoft
                  Location ID: 0xfd133000 / 8
                  Current Available (mA): 500
                  Current Required (mA): 16
                Xbox Kinect Audio, © 2011 Microsoft Corporation. All rights reserved.:
                  Product ID: 0x02ad
                  Vendor ID: 0x045e  (Microsoft Corporation)
                  Version: 1,00
                  Serial Number: A44884B05001051A
                  Speed: Up to 480 Mb/sec
                  Manufacturer: Microsoft
                  Location ID: 0xfd131000 / 7
                  Current Available (mA): 500
                  Current Required (mA): Unknown (Device has not been configured)
                Xbox NUI Motor:
                  Product ID: 0x02b0
                  Vendor ID: 0x045e  (Microsoft Corporation)
                  Version: 1,07
                  Speed: Up to 12 Mb/sec
                  Manufacturer: Microsoft
                  Location ID: 0xfd132000 / 6
                  Current Available (mA): 500
                  Current Required (mA): 100

Model 1473

Xbox NUI Camera:
                  Product ID: 0x02ae
                  Vendor ID: 0x045e  (Microsoft Corporation)
                  Version: 2,05
                  Serial Number: 0
                  Speed: Up to 480 Mb/sec
                  Manufacturer: Microsoft
                  Location ID: 0xfd132000 / 7
                  Current Available (mA): 500
                  Current Required (mA): 16
                Xbox Kinect Audio, © 2011 Microsoft Corporation. All rights reserved.:
                  Product ID: 0x02ad
                  Vendor ID: 0x045e  (Microsoft Corporation)
                  Version: 1,00
                  Serial Number: A70777X03897236A
                  Speed: Up to 480 Mb/sec
                  Manufacturer: Microsoft
                  Location ID: 0xfd131000 / 6
                  Current Available (mA): 500
                  Current Required (mA): Unknown (Device has not been configured)

Truly no motor.

@karlun

This comment has been minimized.

Show comment
Hide comment
@karlun

karlun Apr 16, 2013

Sorry if this is off topic but I got the impression that part of the problem with the new model is to identify it as such. The vendor and product ids will not change between models, so also bcdDevice needs to be included when searching for the device, either to stop the driver from trying to interact with a model that it cannot support or to actually change the driver's behaviour depending on the model. The bcdDevice value for the camera changes from 1.0b to 2.05 between model 1414 and 1473. It does not change for the audio device, though.

karlun commented Apr 16, 2013

Sorry if this is off topic but I got the impression that part of the problem with the new model is to identify it as such. The vendor and product ids will not change between models, so also bcdDevice needs to be included when searching for the device, either to stop the driver from trying to interact with a model that it cannot support or to actually change the driver's behaviour depending on the model. The bcdDevice value for the camera changes from 1.0b to 2.05 between model 1414 and 1473. It does not change for the audio device, though.

@wizgrav

This comment has been minimized.

Show comment
Hide comment
@wizgrav

wizgrav Apr 22, 2013

Contributor

We can probably identify the new kinect for xbox by checking the .iSerialNumber string returned from the usb descriptor. Can someone with the new kinect check it out with something like:

unsigned char string_desc[256];
res = libusb_get_string_descriptor_ascii(dev->usb_cam.dev, desc.iSerialNumber, string_desc, 256);
printf("*RES=%d, DESC=%s*\n",res,string_desc);

This should go in usb_libusb10.c > fnusb_open_subdevices() right before

if (desc.idProduct == PID_NUI_CAMERA) {

Please paste the results so we can push the detection fix in renewagner's fork(along with the USB3 fix to make it current).

As for the raspberry I gave up on it a long time ago, the problem lies on the USB implementation on the board itself. It drops all packets from the cameras and the rasp devs seem unable to fix it in software so you should better consider other solution. The pandaboard and beagleboard work nicely, I'm also waiting for a cubieboard and beaglebone to arrive and will test there as well

Contributor

wizgrav commented Apr 22, 2013

We can probably identify the new kinect for xbox by checking the .iSerialNumber string returned from the usb descriptor. Can someone with the new kinect check it out with something like:

unsigned char string_desc[256];
res = libusb_get_string_descriptor_ascii(dev->usb_cam.dev, desc.iSerialNumber, string_desc, 256);
printf("*RES=%d, DESC=%s*\n",res,string_desc);

This should go in usb_libusb10.c > fnusb_open_subdevices() right before

if (desc.idProduct == PID_NUI_CAMERA) {

Please paste the results so we can push the detection fix in renewagner's fork(along with the USB3 fix to make it current).

As for the raspberry I gave up on it a long time ago, the problem lies on the USB implementation on the board itself. It drops all packets from the cameras and the rasp devs seem unable to fix it in software so you should better consider other solution. The pandaboard and beagleboard work nicely, I'm also waiting for a cubieboard and beaglebone to arrive and will test there as well

@karlun

This comment has been minimized.

Show comment
Hide comment
@karlun

karlun Apr 23, 2013

dev->usb_cam.dev is explicitly set to NULL in all versions of libfreenect I currently have clones of and I cannot see any line where that value would change. With the old Kinect device it crashes when retrieving the string and with the new model I get "RES=-2, DESC=7", which I assume is a fail.

karlun commented Apr 23, 2013

dev->usb_cam.dev is explicitly set to NULL in all versions of libfreenect I currently have clones of and I cannot see any line where that value would change. With the old Kinect device it crashes when retrieving the string and with the new model I get "RES=-2, DESC=7", which I assume is a fail.

@wizgrav

This comment has been minimized.

Show comment
Hide comment
@wizgrav

wizgrav Apr 23, 2013

Contributor

Sorry it's getting initialized in line 197, at least in the official tree. Indeed a -2 libusb response means invalid param.

res = libusb_open (devs[i], &dev->usb_cam.dev);
if (res < 0 || !dev->usb_cam.dev) {
                    FN_ERROR("Could not open camera: %d\n", res);
                    dev->usb_cam.dev = NULL;
                    break;
}

try putting the printf right after that (but be careful not to place it inside the #ifndef _WIN32 if you're building on windows)

Contributor

wizgrav commented Apr 23, 2013

Sorry it's getting initialized in line 197, at least in the official tree. Indeed a -2 libusb response means invalid param.

res = libusb_open (devs[i], &dev->usb_cam.dev);
if (res < 0 || !dev->usb_cam.dev) {
                    FN_ERROR("Could not open camera: %d\n", res);
                    dev->usb_cam.dev = NULL;
                    break;
}

try putting the printf right after that (but be careful not to place it inside the #ifndef _WIN32 if you're building on windows)

@karlun

This comment has been minimized.

Show comment
Hide comment
@karlun

karlun Apr 23, 2013

Yep, that worked better. Not much information there, through: "RES=16, DESC=0000000000000000". (With the old Kinect I get "RES=16, DESC=A00366A01397044A")

karlun commented Apr 23, 2013

Yep, that worked better. Not much information there, through: "RES=16, DESC=0000000000000000". (With the old Kinect I get "RES=16, DESC=A00366A01397044A")

@wizgrav

This comment has been minimized.

Show comment
Hide comment
@wizgrav

wizgrav Apr 23, 2013

Contributor

Thanks. That lack of information there is exactly what we need. I remember drew saying that the K4W also doesn't expose a desc so we should be able to catch that and set the correct zero_plane command just by that. I'll write a preliminary patch for the mainline tree. Of course I would appreciate if more people test with the printf code listed above to make sure that this assumption is correct

Contributor

wizgrav commented Apr 23, 2013

Thanks. That lack of information there is exactly what we need. I remember drew saying that the K4W also doesn't expose a desc so we should be able to catch that and set the correct zero_plane command just by that. I'll write a preliminary patch for the mainline tree. Of course I would appreciate if more people test with the printf code listed above to make sure that this assumption is correct

@karlun

This comment has been minimized.

Show comment
Hide comment
@karlun

karlun Apr 23, 2013

The bcdDevice (device release number in binary-coded decimal), however, is unique for both devices. I tried

printf("BCD=%d\n",res,desc.bcdDevice);

which gives me "BCD=517" for the new device and "BCD=267" with the old device.

karlun commented Apr 23, 2013

The bcdDevice (device release number in binary-coded decimal), however, is unique for both devices. I tried

printf("BCD=%d\n",res,desc.bcdDevice);

which gives me "BCD=517" for the new device and "BCD=267" with the old device.

@wizgrav

This comment has been minimized.

Show comment
Hide comment
@wizgrav

wizgrav Apr 23, 2013

Contributor

You have two arguments and only one placeholder in the format string of that printf but I'm sure it's just a typo. I'll check in this order (IF PID IS K4XBOX) -> (IS OLD BCD) If these fail(a new bcd or something) it will default to the K4W setting in which the motor will be auto disabled, for now

Contributor

wizgrav commented Apr 23, 2013

You have two arguments and only one placeholder in the format string of that printf but I'm sure it's just a typo. I'll check in this order (IF PID IS K4XBOX) -> (IS OLD BCD) If these fail(a new bcd or something) it will default to the K4W setting in which the motor will be auto disabled, for now

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 23, 2013

sry, that's similar to
renewagner@06e48e5

ghost commented Apr 23, 2013

sry, that's similar to
renewagner@06e48e5

@wizgrav

This comment has been minimized.

Show comment
Hide comment
@wizgrav

wizgrav Apr 23, 2013

Contributor

@m8n I've added some debugging please check it out again and paste the output

Contributor

wizgrav commented Apr 23, 2013

@m8n I've added some debugging please check it out again and paste the output

@karlun

This comment has been minimized.

Show comment
Hide comment
@karlun

karlun Apr 24, 2013

I get a lot of debug output from my own software, but I believe yours is this line, right?
With new Kinect: "desc.bcdDevice: 517, ctx->enabled_subdevices: 2, ctx->zero_plane_res: 334"
With old Kinect: "desc.bcdDevice: 267, ctx->enabled_subdevices: 3, ctx->zero_plane_res: 322"
Works with both devices! Great work!

Both devices take much longer to start producing usable data, though. With the new Kinect I get a lot of "Invalid magic ffff", but not with the old device. Still it takes several seconds before the image looks right. This is with my own software, through, since I have not been able to compile the examples yet.

karlun commented Apr 24, 2013

I get a lot of debug output from my own software, but I believe yours is this line, right?
With new Kinect: "desc.bcdDevice: 517, ctx->enabled_subdevices: 2, ctx->zero_plane_res: 334"
With old Kinect: "desc.bcdDevice: 267, ctx->enabled_subdevices: 3, ctx->zero_plane_res: 322"
Works with both devices! Great work!

Both devices take much longer to start producing usable data, though. With the new Kinect I get a lot of "Invalid magic ffff", but not with the old device. Still it takes several seconds before the image looks right. This is with my own software, through, since I have not been able to compile the examples yet.

@karlun

This comment has been minimized.

Show comment
Hide comment
@karlun

karlun Apr 24, 2013

Ignore my previous statement about the delay of usable data. That problem seems to have gone away.

karlun commented Apr 24, 2013

Ignore my previous statement about the delay of usable data. That problem seems to have gone away.

@wizgrav

This comment has been minimized.

Show comment
Hide comment
@wizgrav

wizgrav Apr 24, 2013

Contributor

@karlun Thanks for the feedback. I'm pretty certain that the detection will work for K4W as well. The motor is disabled for the newer versions for now. I'll do a pull request to main and start working on adding motor and led support for all kinects as well. Drew had posted a proof concept so I'll start from that. Is xtion support of any interest to anyone?

Contributor

wizgrav commented Apr 24, 2013

@karlun Thanks for the feedback. I'm pretty certain that the detection will work for K4W as well. The motor is disabled for the newer versions for now. I'll do a pull request to main and start working on adding motor and led support for all kinects as well. Drew had posted a proof concept so I'll start from that. Is xtion support of any interest to anyone?

@xxorde

This comment has been minimized.

Show comment
Hide comment
@xxorde

xxorde Apr 25, 2013

I have the same Problem with Ubuntu 64 and Model 1473

xxorde commented Apr 25, 2013

I have the same Problem with Ubuntu 64 and Model 1473

@wizgrav

This comment has been minimized.

Show comment
Hide comment
@wizgrav

wizgrav Apr 25, 2013

Contributor

@xxorde please specify some details. Have you built against this tree https://github.com/wizgrav/libfreenect and it doesn't work?

Contributor

wizgrav commented Apr 25, 2013

@xxorde please specify some details. Have you built against this tree https://github.com/wizgrav/libfreenect and it doesn't work?

@xxorde

This comment has been minimized.

Show comment
Hide comment
@xxorde

xxorde Apr 30, 2013

@wizgrav With the std. and your code I get " Kinect camera test Number of devices found: 1 Could not open device" when I run glview / regview / ect. With the code from https://github.com/theoceanwalker/libfreenect I can run regview. I get the correct image(s) but I can't control the tilt.

xxorde commented Apr 30, 2013

@wizgrav With the std. and your code I get " Kinect camera test Number of devices found: 1 Could not open device" when I run glview / regview / ect. With the code from https://github.com/theoceanwalker/libfreenect I can run regview. I get the correct image(s) but I can't control the tilt.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 30, 2013

@wizgrav code works. good work. ;) but i get no debugging output.

ghost commented Apr 30, 2013

@wizgrav code works. good work. ;) but i get no debugging output.

@killkrt

This comment has been minimized.

Show comment
Hide comment
@killkrt

killkrt May 5, 2013

@wizgrav I have the same problem as @xxorde, I built against your repository https://github.com/wizgrav/libfreenect , but I still get this output for many examples:

Kinect camera test
Number of devices found: 1
Could not open device

While other examples (such as tiltdemo, glpcview and regrets) write this:
Error: Invalid index [0]
Error: Kinect not connected?

I have tried to disconnect and reconnect Kinect, but it didn't solve the problem. As information I'm able to run Kinect examples made for openFramework using this repository (note is a branch of the ofxKinect repository): https://github.com/ofTheo/ofxKinect/tree/kinect-device-fix.

I'm under OS X 10.8.3.

Thank you.

P.S.:
Sorry, I know I've already write a comment on your repository, but since this thread is more popular I'd prefer to write here.

killkrt commented May 5, 2013

@wizgrav I have the same problem as @xxorde, I built against your repository https://github.com/wizgrav/libfreenect , but I still get this output for many examples:

Kinect camera test
Number of devices found: 1
Could not open device

While other examples (such as tiltdemo, glpcview and regrets) write this:
Error: Invalid index [0]
Error: Kinect not connected?

I have tried to disconnect and reconnect Kinect, but it didn't solve the problem. As information I'm able to run Kinect examples made for openFramework using this repository (note is a branch of the ofxKinect repository): https://github.com/ofTheo/ofxKinect/tree/kinect-device-fix.

I'm under OS X 10.8.3.

Thank you.

P.S.:
Sorry, I know I've already write a comment on your repository, but since this thread is more popular I'd prefer to write here.

@wizgrav

This comment has been minimized.

Show comment
Hide comment
@wizgrav

wizgrav May 5, 2013

Contributor

@xxorde @killkrt I suspect the problem lies in the absence of the motor device in the newer kinects. I haven't modified the examples to take that into account. As it's orthodox easter here and I'm pretty far from home right now, I won't be able to inspect that for a couple of days more. When I get back to my main box, I'd be grateful if either of you could spare some time for a hangout or skype session so we can close this one for good. Msg me at wizgrav@gmail.com if you're interested

Contributor

wizgrav commented May 5, 2013

@xxorde @killkrt I suspect the problem lies in the absence of the motor device in the newer kinects. I haven't modified the examples to take that into account. As it's orthodox easter here and I'm pretty far from home right now, I won't be able to inspect that for a couple of days more. When I get back to my main box, I'd be grateful if either of you could spare some time for a hangout or skype session so we can close this one for good. Msg me at wizgrav@gmail.com if you're interested

@csotiriou

This comment has been minimized.

Show comment
Hide comment
@csotiriou

csotiriou Jun 8, 2013

Wizgrav, me too, I build against your changes, and still no success. I get the usual "no devices found" error.

Wizgrav, me too, I build against your changes, and still no success. I get the usual "no devices found" error.

@timtro

This comment has been minimized.

Show comment
Hide comment
@timtro

timtro Jul 23, 2013

At the risk of simply restating everyone else's problem:

I just got a 1473 from Costco in Canada, and when I clone the libfreenect repo, compile and try to run any of the bins, they "Could not open device" or "Cannot get device", although "Number of devices found" is 1. Using up-to-date Mint 15.

Is there a word on when this might be fixed? I'm quite happy to help if my meagre programming skill might help, but I doubt it.

timtro commented Jul 23, 2013

At the risk of simply restating everyone else's problem:

I just got a 1473 from Costco in Canada, and when I clone the libfreenect repo, compile and try to run any of the bins, they "Could not open device" or "Cannot get device", although "Number of devices found" is 1. Using up-to-date Mint 15.

Is there a word on when this might be fixed? I'm quite happy to help if my meagre programming skill might help, but I doubt it.

@piedar

This comment has been minimized.

Show comment
Hide comment
@piedar

piedar Jul 23, 2013

Contributor

Support for this model has been completed by wizgrav in #325 and is currently in unstable pending the next release.

Contributor

piedar commented Jul 23, 2013

Support for this model has been completed by wizgrav in #325 and is currently in unstable pending the next release.

@piedar piedar closed this Jul 23, 2013

@wizgrav

This comment has been minimized.

Show comment
Hide comment
@wizgrav

wizgrav Jul 23, 2013

Contributor

@timtro try cloning the unstable branch ( git clone -b unstable https://github.com/OpenKinect/libfreenect.git )

Contributor

wizgrav commented Jul 23, 2013

@timtro try cloning the unstable branch ( git clone -b unstable https://github.com/OpenKinect/libfreenect.git )

@tong

This comment has been minimized.

Show comment
Hide comment
@tong

tong Jul 24, 2013

just tested unstable branch and cannot confirm the fix. still get same errors (on all examples).
./glview
Kinect camera test
Number of devices found: 1
Could not open camera: -3
Could not open device

tong commented Jul 24, 2013

just tested unstable branch and cannot confirm the fix. still get same errors (on all examples).
./glview
Kinect camera test
Number of devices found: 1
Could not open camera: -3
Could not open device

@wizgrav

This comment has been minimized.

Show comment
Hide comment
@wizgrav

wizgrav Jul 24, 2013

Contributor

-3 is libusb error LIBUSB_ERROR_ACCESS. This probably means you don't have rights to access the device. Try running as root or install the udev rules

Contributor

wizgrav commented Jul 24, 2013

-3 is libusb error LIBUSB_ERROR_ACCESS. This probably means you don't have rights to access the device. Try running as root or install the udev rules

@tong

This comment has been minimized.

Show comment
Hide comment
@tong

tong Jul 24, 2013

Ah .. forgot this as i moved to a new system, now everything is working!
Thank you very much!

tong commented Jul 24, 2013

Ah .. forgot this as i moved to a new system, now everything is working!
Thank you very much!

@timtro

This comment has been minimized.

Show comment
Hide comment
@timtro

timtro Jul 24, 2013

That worked brilliantly. Thanks!

Best regards,

Tim.
http://www.timteatro.net

On Tue, Jul 23, 2013 at 6:10 PM, Yannis Gravezas
notifications@github.comwrote:

@timtro https://github.com/timtro try cloning the unstable branch ( git
clone -b unstable https://github.com/OpenKinect/libfreenect.git )


Reply to this email directly or view it on GitHubhttps://github.com/OpenKinect/libfreenect/issues/316#issuecomment-21449998
.

timtro commented Jul 24, 2013

That worked brilliantly. Thanks!

Best regards,

Tim.
http://www.timteatro.net

On Tue, Jul 23, 2013 at 6:10 PM, Yannis Gravezas
notifications@github.comwrote:

@timtro https://github.com/timtro try cloning the unstable branch ( git
clone -b unstable https://github.com/OpenKinect/libfreenect.git )


Reply to this email directly or view it on GitHubhttps://github.com/OpenKinect/libfreenect/issues/316#issuecomment-21449998
.

ofTheo added a commit to ofTheo/libfreenect that referenced this issue Jan 23, 2014

This code sets the LED of a 1473 Kinect or K4W Kinect to red on start…
…up. This seems to fix a known issue for OS X users where the device renumerates within a small time period and causes a freeze. Closes #340 and addresses #316. Signed-off-by: Theodore Watson <theo@openframeworks.cc> (ofTheo)
@MihaiDogariu

This comment has been minimized.

Show comment
Hide comment
@MihaiDogariu

MihaiDogariu Sep 1, 2014

Hello! I have stumbled upon the same error and ended up at this site. I have tried @wizgrav 's proposed solution and it worked for me as I can now run the glview command. However I can't find any audio recording application as this is what I was searching for. Is this supported for the KINECT 1473 model or am I troubling for nothing? I know that the thread is old but still hoping for a response. Thanks in advance!

Hello! I have stumbled upon the same error and ended up at this site. I have tried @wizgrav 's proposed solution and it worked for me as I can now run the glview command. However I can't find any audio recording application as this is what I was searching for. Is this supported for the KINECT 1473 model or am I troubling for nothing? I know that the thread is old but still hoping for a response. Thanks in advance!

@piedar

This comment has been minimized.

Show comment
Hide comment
@piedar

piedar Sep 1, 2014

Contributor

@MihaiDogariu For audio support you'll need device-specific firmware. fwfetcher.py works for model 1414 but not 1473. Right now the easiest way to get 1473 firmware is from ofxKinectExtras. You can get a pointer to the firmware from ofxKinectExtras::getFWDatak4w and pass it to freenect_set_fw_address_k4w.

Contributor

piedar commented Sep 1, 2014

@MihaiDogariu For audio support you'll need device-specific firmware. fwfetcher.py works for model 1414 but not 1473. Right now the easiest way to get 1473 firmware is from ofxKinectExtras. You can get a pointer to the firmware from ofxKinectExtras::getFWDatak4w and pass it to freenect_set_fw_address_k4w.

@MihaiDogariu

This comment has been minimized.

Show comment
Hide comment
@MihaiDogariu

MihaiDogariu Sep 2, 2014

@piedar What I have tried is written in the following link: http://www.keyboardmods.com/2011/10/kinect-speech-recognition-in-linux.html under the "Integrating the kinect" section. It is similar to what you have pointed out and it worked for me. It now recognizes the kinect device as an audio input device and I can record audio from it using Linux's default microphone recorder or Audacity, for a greater degree of customization as I can choose on how many channels I want to record the sound. Thank you for your quick response!

@piedar What I have tried is written in the following link: http://www.keyboardmods.com/2011/10/kinect-speech-recognition-in-linux.html under the "Integrating the kinect" section. It is similar to what you have pointed out and it worked for me. It now recognizes the kinect device as an audio input device and I can record audio from it using Linux's default microphone recorder or Audacity, for a greater degree of customization as I can choose on how many channels I want to record the sound. Thank you for your quick response!

@dansupergameprogrammer

This comment has been minimized.

Show comment
Hide comment
@dansupergameprogrammer

dansupergameprogrammer Nov 14, 2014

I tried to pull the unstable branch and got the error

fatal: Remote branch unstable not found in upstream origin

Have the changes from the unstable branch been rolled into the master branch?

I tried to pull the unstable branch and got the error

fatal: Remote branch unstable not found in upstream origin

Have the changes from the unstable branch been rolled into the master branch?

@piedar

This comment has been minimized.

Show comment
Hide comment
@piedar

piedar Nov 17, 2014

Contributor

@dansupergameprogrammer
Yes, wizgrav's fix was merged to master before the unstable branch was deleted.

Contributor

piedar commented Nov 17, 2014

@dansupergameprogrammer
Yes, wizgrav's fix was merged to master before the unstable branch was deleted.

@dansupergameprogrammer

This comment has been minimized.

Show comment
Hide comment
@dansupergameprogrammer

dansupergameprogrammer Nov 17, 2014

Yes, awesome, thanks!

I was able to pull the build down with Homebrew using the --HEAD command and it works, the only driver I've found which does.

Now to write a Unity wrapper...

Yes, awesome, thanks!

I was able to pull the build down with Homebrew using the --HEAD command and it works, the only driver I've found which does.

Now to write a Unity wrapper...

yarikoptic added a commit to yarikoptic/libfreenect that referenced this issue Feb 14, 2015

Merge tag 'v0.4.0' into dfsg
libfreenect v0.4.0 Oracle

* tag 'v0.4.0':
  Update for v0.4.0
  All headers (including libfreenect.hpp) are installed to `$PREFIX/include/libfreenect/`. All libfreenect files have `#include "libfreenect.h"` rather than `#include <libfreenect.h>`.  This works during build and after installation all include files are in the same directory. Rename libfreenect-audio.h -> libfreenect_audio.h and libfreenect-registration.h -> libfreenect_registration.h.  This makes them consistent with other libraries.
  wrappers/cpp: Call freenect_process_events_timeout in loop to prevent freezes - fixes #223
  OpenNI2-FreenectDriver: Fix silly silly string bugs; improve logging Fix ebuild for filename change
  OpenNI2-FreenectDriver: Convert all printf and cout statements to log messages
  Invoke fwfetcher.py with python2 - fixes #370 Refine README.md
  Remove C99 syntax - fixes #369
  Shiny new README.md Beautify ebuild and add audio USE flag
  Read int from fgetc for EOF comparison - fixes #365
  Replaced missing variable - fixes #366
  Post-merge cleanup
  small changes to allow compile on windows / visual studio
  Removed memset() after free() causing sporadic crashes when unplugging devices
  Fix ebuild
  Supports loading audio fw from memory as well as disk. Supports tilt,accel and led for K4W and 1473 device. Adds keep alive for K4W and 1473. Signed-off-by: Theodore Watson theo@openframeworks.cc (ofTheo)
  This code sets the LED of a 1473 Kinect or K4W Kinect to red on startup. This seems to fix a known issue for OS X users where the device renumerates within a small time period and causes a freeze. Closes #340 and addresses #316. Signed-off-by: Theodore Watson <theo@openframeworks.cc> (ofTheo)
  Remove outdated ebuild
  Add manpages for fakenect and fakenect-record
  Prefix freenect- to the name of the installed demos
  Rename record binary of fakenect as fakenect-record
@leonardodsan

This comment has been minimized.

Show comment
Hide comment
@leonardodsan

leonardodsan Apr 4, 2017

Hello,

I'm trying to use a Kinect device 1473 on a CubieTruck board (OS Linaro 12.04), I got the same problem with the official https://github.com/OpenKinect/libfreenect repository of: "Could not open device". Would you like to know the final solution of this topic to solve the problem?

Hello,

I'm trying to use a Kinect device 1473 on a CubieTruck board (OS Linaro 12.04), I got the same problem with the official https://github.com/OpenKinect/libfreenect repository of: "Could not open device". Would you like to know the final solution of this topic to solve the problem?

@josuerocha

This comment has been minimized.

Show comment
Hide comment
@josuerocha

josuerocha Dec 27, 2017

I have the same problem on Ubuntu 16.04 with Kinect v1 1473. Any news upon solving this problem?

I have the same problem on Ubuntu 16.04 with Kinect v1 1473. Any news upon solving this problem?

@wizgrav

This comment has been minimized.

Show comment
Hide comment
@wizgrav

wizgrav Dec 27, 2017

Contributor

Wow this thread is still alive, that was a good flashback. Without further info from the console I think the first thing to try is checking if permissions are set ok. Try running the app as root. I have recently used the kinect on a raspberry 3 and can confirm that it works ok

Contributor

wizgrav commented Dec 27, 2017

Wow this thread is still alive, that was a good flashback. Without further info from the console I think the first thing to try is checking if permissions are set ok. Try running the app as root. I have recently used the kinect on a raspberry 3 and can confirm that it works ok

@josuerocha

This comment has been minimized.

Show comment
Hide comment
@josuerocha

josuerocha Dec 27, 2017

@wizgrav did you use the 1473 version?

@wizgrav did you use the 1473 version?

@wizgrav

This comment has been minimized.

Show comment
Hide comment
@wizgrav

wizgrav Dec 27, 2017

Contributor

@josuerocha I'm not sure to be honest and can't actually check right now, my kinect is in malta and I'm currently in greece for the holidays. It should work though I setup several gigs with kinects and raspberries on my previous employer and I believe at least one of them would be 1473. Have you tried running as root and it didn't work? I have used 1473 in the past on several devices with success

Contributor

wizgrav commented Dec 27, 2017

@josuerocha I'm not sure to be honest and can't actually check right now, my kinect is in malta and I'm currently in greece for the holidays. It should work though I setup several gigs with kinects and raspberries on my previous employer and I believe at least one of them would be 1473. Have you tried running as root and it didn't work? I have used 1473 in the past on several devices with success

@josuerocha

This comment has been minimized.

Show comment
Hide comment
@josuerocha

josuerocha Dec 27, 2017

Yes. I ran it as root and the same errors persist:

jr@JR-MOBILE:~$ sudo freenect-glview
Kinect camera test
Number of devices found: 1
Found sibling device [same parent]
Failed to set the LED of K4W or 1473 device: -1
Found sibling device [same parent]
Could not open device: -1
Could not open device

josuerocha commented Dec 27, 2017

Yes. I ran it as root and the same errors persist:

jr@JR-MOBILE:~$ sudo freenect-glview
Kinect camera test
Number of devices found: 1
Found sibling device [same parent]
Failed to set the LED of K4W or 1473 device: -1
Found sibling device [same parent]
Could not open device: -1
Could not open device

@har96

This comment has been minimized.

Show comment
Hide comment
@har96

har96 Feb 27, 2018

Has there been any update on this? I pulled from the master branch and am still getting the same error @josuerocha pasted above. Using a 1473; I've already corrected permissions and such.

har96 commented Feb 27, 2018

Has there been any update on this? I pulled from the master branch and am still getting the same error @josuerocha pasted above. Using a 1473; I've already corrected permissions and such.

@josuerocha

This comment has been minimized.

Show comment
Hide comment
@josuerocha

josuerocha Mar 1, 2018

@har96 I don't think so. I bought a Kinect 1414 and gave up on 1473 in order to save some project time.

@har96 I don't think so. I bought a Kinect 1414 and gave up on 1473 in order to save some project time.

@har96

This comment has been minimized.

Show comment
Hide comment
@har96

har96 Mar 1, 2018

Mine is actually started working. I uploaded the audio.bin firmware and I'm getting the video stream now.

har96 commented Mar 1, 2018

Mine is actually started working. I uploaded the audio.bin firmware and I'm getting the video stream now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment