Giter Club home page Giter Club logo

libfreenect2's Introduction

libfreenect2's People

Contributors

alberth avatar blen2r avatar brendandburns avatar christiankerl avatar davetcoleman avatar eric-schleicher avatar floe avatar fran6co avatar gaborpapp avatar goldhoorn avatar hanyazou avatar henningj avatar joshblake avatar laborer2008 avatar larshg avatar matthieu-ft avatar maxime-tournier avatar mugofpaul avatar rahulraw avatar rjw57 avatar saulthu avatar sirdifferential avatar sjdrc avatar smokhov avatar stfuchs avatar svenevs avatar tabjones avatar vinouz avatar xlz avatar yuanmingze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libfreenect2's Issues

Verbose mode

Just a small enhancement: I think it would be good to have an option to enable/disable the verbosity of the library, or to set the stream the info messages are written to, so that std::cout is free for the application messages.

OpenCL based DepthProcessor

Some month ago I reimplemented the CPUDepthProcessor in OpenCL and later updated the implementation based on the OpenGL implementation. Now I created a fork containing the OpenCL based implementation at: https://github.com/wiedemeyer/libfreenect2

As said, this implementation is similar to the OpenGL one, except that no GL context is needed. I only tested it with nVidia and AMD on Ubuntu 12.04 and 14.04. Intel has no OpenCL GPU driver for Linux, sadly (but there is an opensource one under development).

It could be added as another DepthProcessor to the libfreenect2 repository if it is of any use.

Greetings,
Thiemo

PS: I know it's not really an issue, but maybe someone is interested in it.

depthparser does not fire

No Depth or ir data

OpenGLDepthPacketProcessor::process is not called as libfreenect2::usb::TransferPool::DataRecievedCallback::onDataRecieved is not firing for depth or ir.

What could be causing this ?

Setup on ubuntu x64 as normal with the right usb 3 setup

libglfw3 is always built locally

From what I can see in CMakeLists.txt, libglfw3 is always (re-)built by cmake along with libfreenect2. Shouldn't this be handled in install_deps.sh? E.g. on my machine, I have libglfw 3.0.4 installed via the package manager, so I don't need the local build.

Not working on AMD USB 3.0 controller anymore

In June libfreenect2 was working on an AMD APU and its USB controller. But after I pulled the recent changes it is not working anymore. From the depth stream parser I only receive "image data too short!" and "not all subsequences received ..."

Since libusbx did not change, it is probably related to how the usb device is setup by libfreenect. This part changed a lot and it's hard to figure out the differences for me.

Does anyone has a hint for me, what changed for the ir stream setup, so I can try to get it back into a running state?

Regards,
Thiemo

Protonect says no device

Protonect failed to reset but found a device.

Exact error:

"no device connected or failure opening the default one!"

What do I do?

How to build libfreenect2 on Windows 8

I have already seen the instruction and how can I build sln in VS2013, there is no protonect2.h in the project.....

Is there any one can give me detailed tutorial about it? Thank you very much!

OpenGLDepthPacketProcessor not working on Intel GPUs (Mac/OS X)

Hello there!

I successfully compiled libfreenect2 on my MacBook Pro Retina (2013; QuadCore i7; Intel Iris GPU), but the IR/Depth Steam is just black. My first thought on this is a incompatible GPU … Does anybody have the same problem?

bildschirmfoto 2014-07-24 um 12 23 44

Some debugging code I added in SyncMultiFrameListener::onNewFrame(Frame::Type type, Frame *frame) (frame_listener_impl.cpp:69) outputted the following information:

if ( type == 4 ) {
  printf( "Got depth frame!\n" );
  printf( "width: %i\n", int(frame->width) );
  printf( "height: %i\n", int(frame->height) );
  printf( "bytes per pixel: %i\n", int(frame->bytes_per_pixel) );
  double sum;
  for (int i = 0; i < frame->width*frame->height*frame->bytes_per_pixel; ++i)
    sum += frame->data[i];
  printf( "sum: %f\n", sum );
}

Got depth frame!
width: 512
height: 424
bytes per pixel: 4
sum: 0

After skimming through the code I ended up looking at the different DepthPacketProcessors and swapped OpenGLDepthPacketProcessor with CpuDepthPacketProcessor (libfreenect.cpp:76) and commented out depth_packet_processor_(0) (libfreenect.cpp:277) to make Protonect compile again.

Now Protonect is outputting IR and Depth information, but turns my MacBook into a pocket heater:

bildschirmfoto 2014-07-24 um 12 25 08

Can not Link protonet_vs2013.sln

Error1error LNK2019: unresolved external symbol "public: __cdecl libfreenect2::Freenect2::Freenect2(void *)" (??0Freenect2@libfreenect2@@qeaa@PEAX@Z) referenced in function main C:\Users\feiyuyu\Documents\Kinect Studio\libfreenect2-master\build\msvc\projects\Protonect.obj protonect_vs2013

It always shows like that. It seems like missing a lib of freenect2, but where is it? And how can I generate it?

OS: Win8.1, Visual Studio2013

OpenGLDepthPacketProcessor window

Hi,
I am trying to implement a simple wrapper of libfreenect2 to use it later with PCL. Everything works except that I always get the OpenGLDepthPacketProcessor windows which displays the depth, ir, etc.. images (4 images to be precise), but I don't want to have this window.
How can I remove this window?

Thanks

Linux version doesn't work with Intel USB3 controller

This is more for documentations' sake - I currently have no idea if this bug is related to libfreenect2, libusbx or the Linux kernel, although I suspect the kernel. That being said, I was unable to get ISO transfers to work with this controller:

Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)

On the other hand, the following controller works on two separate machines:

NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)

Add support for Linux ARM to libfreenect2

Hi,
don't know if it works by default but with Jetson K1 having linux on arm with cuda etc.. and USB 3.0 I would like to run kinect2 once released on this platform jointly with VisionWorks and would be nice that both freenect and freenect2 libraries have support for Linux on ARM..

'filter' is reserved word in shader

➜ bin git:(mac_osx_fixes) ✗ ./Protonect
[Freenect2Impl] enumerating devices...
[Freenect2Impl] 4 usb devices connected
[Freenect2Impl] found 1 devices
[ShaderProgram::build] failed to compile fragment shader!
ERROR: 0:52: 'filter' : Reserved word.
ERROR: 0:52: 'filter' : syntax error syntax error

[ShaderProgram::build] failed to link shader program!
ERROR: One or more attached shaders not successfully compiled

[ShaderProgram::build] failed to compile fragment shader!
ERROR: 0:49: 'filter' : Reserved word.
ERROR: 0:49: 'filter' : syntax error syntax error

Renaming the function from filter to dofilter (or anything else) seems to fix the issue

turbojpeg.h file not found

/libfreenect2/libfreenect2/examples/protonect/src/turbo_jpeg_rgb_packet_processor.cpp:30:10: fatal error: 'turbojpeg.h' file
not found

include <turbojpeg.h>

     ^

1 error generated.
make[2]: *** [CMakeFiles/freenect2.dir/src/turbo_jpeg_rgb_packet_processor.cpp.o] Error 1
make[1]: *** [CMakeFiles/freenect2.dir/all] Error 2
make: *** [all] Error 2

I'm getting this error when running make && make install on mac. Anybody else had this?

Unable to build in Ubuntu 12.04

after trying to build with ccmake the CMakelists.txt in the protonect folder i receive the following message:

CMake Error at CMakeLists.txt:13 (INCLUDE):
include could not find load file:

 SetupLibfreenect2Threading

CMake Error at CMakeLists.txt:16 (INCLUDE):
include could not find load file:

 GenerateResources

CMake Error: Could not open file for write in copy operation
/home/ccoppola/kinect/libfreenect2/depends/glfw/docs/Doxyfile.tmp

CMake Error: : System Error: No such file or directory

ERROR: clCreateContextFromType(-1) when running Protonect

Hello,

the libfreenect2 package builds successfuly. However, when I run ./Protonect, I get:

[Freenect2Impl] enumerating devices...
[Freenect2Impl] 13 usb devices connected
[Freenect2Impl] found valid Kinect v2 @4:1 with serial 500431141942
[Freenect2Impl] found 1 devices
[Freenect2DeviceImpl] opening...
[Freenect2DeviceImpl] opened
[Freenect2DeviceImpl] starting...
[Freenect2DeviceImpl] ReadData0x14 response
92 bytes of raw data
0x0000: 00 00 12 00 00 00 00 00 01 00 00 00 43 c1 1f 41 ............C..A
0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0020: 0a 21 33 55 c2 00 17 20 00 08 00 00 10 00 00 00 .!3U... ........
0x0030: 00 01 00 00 00 10 00 00 00 00 80 00 01 00 00 00 ................
0x0040: 31 33 00 00 00 0a 08 06 47 4d 58 36 31 30 2e 31 13......GMX610.1
0x0050: 58 00 00 00 00 00 00 00 00 00 00 00 X...........

ERROR: clCreateContextFromType(-1)
terminate called after throwing an instance of 'cl::Error'
what(): clCreateContextFromType
Aborted (core dumped)

Note: I have a nvidia graphics controller with optumus technology in addition to an intel graphics controller. I am not sure if this is the problem, but it seems that on ubuntu the intel controller is used as the default and does not automatically switch to nvidia. Could this be the problem?

I tried installing and configuring the bumblebee package which allows to manually switch to the nvidia controller. However, running: optirun ./Protonect I get:

Xlib: extension "GLX" missing on display ":8".

Update

I realized that the bumblebee package wasn't working very well, which was causing the Xlib: extension "GLX" missing on display ":8". error. I uninstalled it and installed the nvidia-prime package which worked very well and was able to recognize and use the nvidia graphics card. Unfortunetly this did not solve my problem as I am still getting the first error (what(): clCreateContextFromType).

Any thoughts?

Thanks,
Khalid

color image transfer

hi, unfortunately I can't post to the mailing list yet. so I will post it here ;). as already mentioned on the mailing list the color images are transfered on endpoint 0x84. Each image is transfered as a couple of 16384 (0x4000) byte chunks. The last chunk is always smaller, that's the only way I was able to determine, where an image starts/ends. One image message has the following structure:

bytes 0-3 uint32_t sequence_number
bytes 4-7 uint32_t unknown
bytes 8-end JPEG image

I've attached 2 images. The first one is the raw message encoded as 8bit image (padded with 0). The second one is the data from byte 8 to end. As you can see, half is missing. The problem is that I used 8192 chunks on Linux. My windows usbpcap logs contain 16384 byte chunks. With the bigger chunks I also get the full resolution image on Linux.

a first implementation is here: christiankerl@5ab5324

42

decoded

improve OpenGL context handling

right now the OpenGLDepthPacketProcessor uses glfw and glewmx for opengl context creation and function loading. this can lead to problems when libfreenect2 is used in a project, which does not use glfw/glewmx, e.g., a library only uses the single threaded version of glew or uses glut for window handling instead of glfw. one solution could be to do the opengl calls on the main thread, but this would require to sync the raw data from the background usb thread to the main thread.

see #19 for some more details.

OS X // Building libjpeg-turbo fails

Hello there,

building libfreenects deps is currently failing under OS X 10.9.4 and it boils down to libjpeg-turbo.

I had to change three things inside install_mac.sh to make it work:

1.) Add LIBUSB_SOURCE_DIR=$DEPENDS_DIR/libusb_src after DEPENDS_DIR=...

2.) Copy missing config files from the right dir:

cp $LIBUSBX_SOURCE_DIR/config.guess ./
=> cp $LIBUSB_SOURCE_DIR/config.guess ./
cp $LIBUSBX_SOURCE_DIR/config.sub ./
=> cp $LIBUSB_SOURCE_DIR/config.sub ./

3.) And I had set the path of the NASM version installed via brew:

./configure --disable-dependency-tracking --host x86_64-apple-darwin NASM=/usr/local/Cellar/nasm/`brew info --json=v1 nasm | jq -r '.[0]["installed"][0]["version"]'`/bin/nasm --with-jpeg8 --prefix=$LIBJPEG_INSTALL_DIR 

I can create a PR for the first two changes, but I'm not sure if the third change is the proper way to tackle this problem ...

test_opengl fails with segmentation fault 11

Subj. OS X 10.8.5.

Also:

protonect: ./bin/Protonect
[Freenect2Impl] enumerating devices...
[Freenect2Impl] 10 usb devices connected
[Freenect2Impl] found valid Kinect v2 @21:1 with serial 501523541942
[Freenect2Impl] found 1 devices
[OpenGLContext] failed to initialize glew for the current context!
Segmentation fault: 11

Problem with depth and IR (and no mic too)

Hi,

I was able to install libfreenect2 on 10.00 but unable to get depth and IR but was able to get RGB working. Am I missing some thing? Also, how do I use the mics on the K24W? Is there something for that?

Thanks!

Shyamal

Build error regarding libjpegturbo.a on Ubuntu 14.04

On current Ubuntu 14.04 amd64, even with all dependencies installed, you can get the following build error:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libturbojpeg.a(libturbojpeg_la-turbojpeg.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libturbojpeg.a: error adding symbols: Bad value

This is due to a bug in the libturbojpeg package. A one-line fix is to execute:

sudo ln -s /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0.0.0 /usr/lib/x86_64-linux-gnu/libturbojpeg.so

K4W2 Official IDs are different

The official new PID/VID are:

VID: 0x045E
PID: 0x02D8

Should we try to open a libusb_open_device_with_vid_pid with the official PID/VID first, then the Preview PID/VID and then fail out of that doesn't work?

Depth/IR Image not working

Hi

I've successfully compiled libfreenect2 on my machine and I'm able to run Protonect, but only RGB image is shown, meanwhile IR and Depth images are black.
My configuration:
ManjaroLinux x64 0.8.10 with kernel 3.14.15 on a Lenovo IdeaPad u430.
I receive a lot of messages in the terminal, such as "skipping rgb packet!" or "image data too short!" or "not all subsequences received" and the OpenGLDepthPacketProcessor is relatively fast (~7.70ms -> ¨130Hz).
Device firmware: 2.3.3912.0.7

How can i solve this bug?

Kind regards

Can't read two cameras at the same time

I am connecting two Kinect2 cameras to each of the USB3 ports of a MacBooc Pro with OS X 10.9.4. Both of them appear in Mac System information and libfreenect2 can enumerate both of them and get their serial numbers successfully.

However, if I do

libfreenect2::Freenect2 m_freenect2;
m_freenect2.openDevice(0);
m_freenect2.openDevice(1);

I get the error [Freenect2Impl] failed to get device @21:1 (the device may already be open) and only one camera can be read.

Segfault due to an invalid sequence number

Hi,

first of all, thanks for the great work. I'm using libfreenect2 now for weeks and it works just fine (for this early stage in development). High resolution point clouds are looking really nice.

There is a segfault that occurs due to an invalid sequence number in the footer of the depth package in depth_packet_stream_parser.cpp line 137. Sometimes the sequence number is really high, so that the memcpy will copy data that lies outside of the fb buffer.

I don't know why there is this strange sequence number, but an easy solution would be to simple write "else" before that statement. So, if the check fails, it will not execute the memcpy.

https://github.com/OpenKinect/libfreenect2/blob/master/examples/protonect/src/depth_packet_stream_parser.cpp#L137

Best regards,
Thiemo

Target "glfw" has an INTERFACE_LINK_LIBRARIES property which differs from its LINK_INTERFACE_LIBRARIES properties

During building sln project on windows8.1 ,there is no error or warning in the configuration phase, but after generating.... There is a kind of warning saying protocol violation```
almostdone

Target "glfw" has an INTERFACE_LINK_LIBRARIES property which differs from
  its LINK_INTERFACE_LIBRARIES properties.

  INTERFACE_LINK_LIBRARIES:

    winmm;opengl32

  LINK_INTERFACE_LIBRARIES:

I ignore this info and try to build the vs solution then I came across error... Is this really a big matter? Wait for replying...

Depth-color registration parameters are unknown

I'm still trying to get the calibration/registration parameters sorted out, but I'm kinda stuck, so I'll try to write down what I think I know and hope that someone can provide some additional pointers...

The intrinsics for the depth camera seem pretty certain - for the two
devices I own, they are:

depth camera intrinsic parameters:
fx 368.096588, fy 368.096588, cx 261.696594, cy 202.522202
depth camera radial distortion coeffs:
k1 0.084061, k2 -0.271582, p1 0.000000, p2 0.000000, k3 0.101907

depth camera intrinsic parameters:
fx 365.402802, fy 365.402802, cx 260.925507, cy 205.594604
depth camera radial distortion coeffs:
k1 0.095575, k2 -0.277055, p1 0.000000, p2 0.000000, k3 0.097539

This is consistent with a camera having square pixels at a resolution of 512*424 (although cy seems a bit off-center to me).

Next are color camera intrinsics - there's a 25-value block which contains the following 5 initial values on both cameras:

1081.37 - might again be focal length in pixels - FOV?
 959.5  - exactly half the x resolution -> optical center x?
 539.5  - exactly half the y resolution -> optical center y?
 863    - not really a clue - perhaps x shift relative to depth cam?
  52    - perhaps y shift relative to depth cam?

About the 20 other values, I have no real clue, although part of them look like they might form a 4x4 transformation matrix...

Any additional comments/ideas?

error with glfw_src during build VS solution libfreenect2/examples/protonect/CmakeList.txt

[Urgent...]
I use libfreenect2, which is the current repository. And the build the protonect project, which is the only one project I can find CmakeList.txt...
The first time it noticed me to that not found depends folder...
original
The error occurs here in CmakeList.txt....
question1

Then I try to do some modification, like put libusb, glew and glfw_src build folders into /depends folder, which is based on the Cmakelist.txt line 29 to line 40...
original1
After that I start over again and configure the project... which gives me no error but some other interesting result...
firtimeconfig

Then I just press the configure button again and get this result...
errorconf

Then I found there is no way to configure the phthread, then I found it seems no error and generate it...
But it gives me a warning:
lastwarning
And the error occurs maybe this part in the CmakeList.txt....
errorconf2
Then I build the solution will gives me the error in VS like previous issue picture with 32 projects ...
Do I need to arrange the folders in this open project like putting extra folders (glew, libusb, glfw_src) into depends folder? Or could you please gives me a brief instruction...
depends

I will be so appreciated....

libfreenect2 on debian sid no data is being displayed.

Hi,
Im using a kinect2 with libfreenect on debian sid x64 with a GeForce 8800 GTS.
My motherboard is a asus b85-plus
usb:
USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)

I followed all the steps and the device is detected but no images are being displayed.
[Freenect2Impl] enumerating devices...
[Freenect2Impl] 12 usb devices connected
[Freenect2Impl] found valid Kinect v2 @2:1 with serial 507363442542
[Freenect2Impl] found 1 devices
[Freenect2DeviceImpl] opening...
[Freenect2DeviceImpl] opened
[Freenect2DeviceImpl] starting...
[Freenect2DeviceImpl] ReadData0x14 response
92 bytes of raw data
0x0000: 00 00 12 00 00 00 00 00 01 00 00 00 43 c1 1f 41 ............C..A
0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0020: 0a 21 33 55 c2 00 17 20 00 08 00 00 10 00 00 00 .!3U... ........
0x0030: 00 01 00 00 00 10 00 00 00 00 80 00 01 00 00 00 ................
0x0040: 31 33 00 00 00 08 0d 01 47 4d 53 33 35 32 2e 31 13......GMS352.1
0x0050: 58 00 00 00 00 00 00 00 00 00 00 00 X...........

[Freenect2DeviceImpl] ReadStatus0x090000 response
4 bytes of raw data
0x0000: 7f 26 00 00 �&..

[Freenect2DeviceImpl] ReadStatus0x090000 response
4 bytes of raw data
0x0000: 7f 26 00 00 �&..

[Freenect2DeviceImpl] enabling usb transfer submission...
[Freenect2DeviceImpl] submitting usb transfers...
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[TransferPool::submit] failed to submit transfer
[Freenect2DeviceImpl] started
device serial: 507363442542
device firmware: 2.3.3912.0.7
CREOOOOOOOO
[TurboJpegRgbPacketProcessor] avg. time: 16.7466ms -> ~59.7138Hz
[TurboJpegRgbPacketProcessor] avg. time: 16.5851ms -> ~60.2952Hz
[TurboJpegRgbPacketProcessor] avg. time: 16.6625ms -> ~60.015Hz
[TurboJpegRgbPacketProcessor] avg. time: 16.8561ms -> ~59.3259Hz
[TurboJpegRgbPacketProcessor] avg. time: 16.6779ms -> ~59.9597Hz
[TurboJpegRgbPacketProcessor] avg. time: 16.647ms -> ~60.0708Hz
[TurboJpegRgbPacketProcessor] avg. time: 16.5755ms -> ~60.33Hz

The Pronect seems to be block at listener.waitForNewFrame(frames) while other theads is displaying the TurboJpeg info. Only a black window named OpenGLDepthPacketProcessor is displayed.

my opengl version:
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL core profile version string: 3.3.0 NVIDIA 331.49
OpenGL core profile shading language version string: 3.30 NVIDIA via Cg compiler
OpenGL version string: 3.3.0 NVIDIA 331.49
OpenGL shading language version string: 3.30 NVIDIA via Cg compiler

¿any idea?

Won't compile on OSX

On https://github.com/OpenKinect/libfreenect2/blob/master/examples/protonect/src/opengl.cpp line 59 it mentions that thread_local won't compile on OSX. Fortunately libfreenect2 already include a compatibility library (tinythread) that emulates the C++11 thread_local functionality, the only problem is that cmake isn't properly setting the use of that library when compiling for Mac OSX

Fortunately the fix is simple, the patch is attached here: https://gist.github.com/RyanGordon/2e5b5769aa40ce04e0a1

This allows the test to fail properly on OSX and LIBFREENECT2_THREADING_STDLIB variable to be set to 0 and thus using the tinythread emulator library.

Problem with blocking method waitForNewFrame()

The waitForNewFrame() is blocking until frames are received. but if for example no depth images are received this call becomes an endless loop. I think there are at least two solutions to this problem. First solution would be to add a timeout to the waitForNewFrame() method of the FrameListener, the other solution would be to add another method hasNewFrame() so that the calling process can use own waiting functionality.

[Windows7] Kinect V2 open fail

Currently, I'm successful to building and running the protonect.
But I fail to run it with Kinect V2 when setting UsbControl::setIrInterfaceState. The driver seems installed successfully.
following is the error log from protonect. Would you have any advice?

image

error logs:
[Freenect2DeviceImpl] opening...
[UsbControl::claimInterfaces(IrInterfaceId)] failed! libusb error -12: LIBUSB_ERROR_NOT_SUPPORTED
[Freenect2DeviceImpl] closing...
[Freenect2DeviceImpl] deallocating usb transfer pools...
[Freenect2DeviceImpl] closing usb device...
[Freenect2DeviceImpl] closed
[Freenect2DeviceImpl] failed to open Kinect v2 @3:1!
no device connected or failure opening the default one!

or

[Freenect2DeviceImpl] opening...
[UsbControl::setIrInterfaceState] failed! libusb error -5: LIBUSB_ERROR_NOT_FOUND
[Freenect2DeviceImpl] closing...
[Freenect2DeviceImpl] releasing usb interfaces...
[UsbControl::releaseInterfaces(IrInterfaceId)] failed! libusb error -5: LIBUSB_ERROR_NOT_FOUND
[Freenect2DeviceImpl] deallocating usb transfer pools...
[Freenect2DeviceImpl] closing usb device...
[Freenect2DeviceImpl] closed
[Freenect2DeviceImpl] failed to open Kinect v2 @3:1!
no device connected or failure opening the default one!

osX : no depth / ir image, only rgb

Hello,

I just receive my kinect v2 and I'm on mac osX: macbook pro retina with usb3 port etc...

When i launch the program I get the rgb image but no depth / ir image ( full black )

Here the complete log :

[Freenect2Impl] enumerating devices...
[Freenect2Impl] 6 usb devices connected
[Freenect2Impl] found valid Kinect v2 @21:1 with serial 503644642542
[Freenect2Impl] found 1 devices
[Freenect2DeviceImpl] opening...
[Freenect2DeviceImpl] opened
[Freenect2DeviceImpl] starting...
[Freenect2DeviceImpl] ReadData0x14 response
92 bytes of raw data
0x0000: 00 00 12 00 00 00 00 00 01 00 00 00 43 c1 1f 41 ............C..A
0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0020: 0a 21 33 55 c2 00 17 20 00 08 00 00 10 00 00 00 .!3U... ........
0x0030: 00 01 00 00 00 10 00 00 00 00 80 00 01 00 00 00 ................
0x0040: 31 33 00 00 00 05 06 11 47 4d 46 31 36 38 2e 31 13......GMF168.1
0x0050: 58 00 00 00 00 00 00 00 00 00 00 00 X...........

[Freenect2DeviceImpl] ReadStatus0x090000 response
4 bytes of raw data
0x0000: 01 26 00 00 .&..

[Freenect2DeviceImpl] ReadStatus0x090000 response
4 bytes of raw data
0x0000: 03 26 00 00 .&..

[Freenect2DeviceImpl] enabling usb transfer submission...
[Freenect2DeviceImpl] submitting usb transfers...
[Freenect2DeviceImpl] started
device serial: 503644642542
device firmware: 2.3.3912.0.7
[DepthPacketStreamParser::handleNewData] not all subsequences received 0
[DepthPacketStreamParser::handleNewData] not all subsequences received 1020
[TurboJpegRgbPacketProcessor] avg. time: 13.8284ms -> ~72.315Hz
[OpenGLDepthPacketProcessor] avg. time: 20.509ms -> ~48.759Hz
[TurboJpegRgbPacketProcessor] avg. time: 13.8169ms -> ~72.3751Hz
[OpenGLDepthPacketProcessor] avg. time: 18.6104ms -> ~53.7333Hz
[TurboJpegRgbPacketProcessor] avg. time: 13.9269ms -> ~71.8036Hz
[OpenGLDepthPacketProcessor] avg. time: 16.4339ms -> ~60.8499Hz
[TurboJpegRgbPacketProcessor] avg. time: 13.751ms -> ~72.7219Hz
[OpenGLDepthPacketProcessor] avg. time: 21.1157ms -> ~47.358Hz
[RgbPacketStreamParser::handleNewData] skipping rgb packet!
[TurboJpegRgbPacketProcessor] avg. time: 13.9582ms -> ~71.6423Hz
[OpenGLDepthPacketProcessor] avg. time: 19.2451ms -> ~51.9612Hz
[TurboJpegRgbPacketProcessor] avg. time: 13.6928ms -> ~73.0311Hz
[OpenGLDepthPacketProcessor] avg. time: 17.9886ms -> ~55.5908Hz
[TurboJpegRgbPacketProcessor] avg. time: 13.6906ms -> ~73.0429Hz
[OpenGLDepthPacketProcessor] avg. time: 14.6015ms -> ~68.4861Hz
[TurboJpegRgbPacketProcessor] avg. time: 13.8692ms -> ~72.102Hz
[OpenGLDepthPacketProcessor] avg. time: 7.30153ms -> ~136.958Hz
[DepthPacketStreamParser::handleNewData] image data too short!
[DepthPacketStreamParser::handleNewData] image data too short!
[DepthPacketStreamParser::handleNewData] not all subsequences received 1022
[TurboJpegRgbPacketProcessor] avg. time: 13.7293ms -> ~72.8372Hz
[OpenGLDepthPacketProcessor] avg. time: 6.1599ms -> ~162.34Hz
[TurboJpegRgbPacketProcessor] avg. time: 13.858ms -> ~72.1604Hz
[OpenGLDepthPacketProcessor] avg. time: 10.2794ms -> ~97.2819Hz
[TurboJpegRgbPacketProcessor] avg. time: 13.8706ms -> ~72.0952Hz
[Freenect2DeviceImpl] stopping...
[Freenect2DeviceImpl] disabling usb transfer submission...
[Freenect2DeviceImpl] canceling usb transfers...
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[DepthPacketStreamParser::handleNewData] not all subsequences received 255
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[Freenect2DeviceImpl] stopped
[Freenect2DeviceImpl] closing...
[Freenect2DeviceImpl] releasing usb interfaces...
[Freenect2DeviceImpl] deallocating usb transfer pools...
[Freenect2DeviceImpl] closing usb device...
[Freenect2DeviceImpl] closed
[Freenect2DeviceImpl] closing...
[Freenect2DeviceImpl] already closed, doing nothing

Problems with glew when executing protonect

After executing 'sudo ./Protonect' I get the following warning

[OpenGLContext] failed to initialize glew for the current context!

and after that the program crashes. Backtracing with gdb gave the following information:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff7a14d6e in bindToUnit (unit=33984, this=0x695998)

at /home/hciadmin/Downloads/libfreenect2/examples/protonect/src/opengl_depth_packet_processor.cpp:218

#2 libfreenect2::Texture<libfreenect2::ImageFormat<2ul, 33332u, 36244u, 5123u> >::allocate (this=0x695998, new_width=352, new_height=4240)

at /home/hciadmin/Downloads/libfreenect2/examples/protonect/src/opengl_depth_packet_processor.cpp:235

#3 0x00007ffff7a15d0f in libfreenect2::OpenGLDepthPacketProcessorImpl::initialize (this=0x695840)

at /home/hciadmin/Downloads/libfreenect2/examples/protonect/src/opengl_depth_packet_processor.cpp:387

#4 0x00007ffff7a1310d in libfreenect2::OpenGLDepthPacketProcessor::OpenGLDepthPacketProcessor (this=0x69a040, parent_opengl_context_ptr=)

at /home/hciadmin/Downloads/libfreenect2/examples/protonect/src/opengl_depth_packet_processor.cpp:719

#5 0x00007ffff7a065a6 in libfreenect2::DefaultPacketPipeline::DefaultPacketPipeline (this=0x67b9d0)

at /home/hciadmin/Downloads/libfreenect2/examples/protonect/src/packet_pipeline.cpp:48

#6 0x00007ffff7a1e8a8 in libfreenect2::Freenect2::openDevice (this=this@entry=0x7fffffffe100, idx=idx@entry=0)

at /home/hciadmin/Downloads/libfreenect2/examples/protonect/src/libfreenect2.cpp:633

#7 0x00007ffff7a1e961 in libfreenect2::Freenect2::openDefaultDevice (this=this@entry=0x7fffffffe100)

at /home/hciadmin/Downloads/libfreenect2/examples/protonect/src/libfreenect2.cpp:754

#8 0x0000000000401b86 in main (argc=, argv=) at /home/hciadmin/Downloads/libfreenect2/examples/protonect/Protonect.cpp:61

Seems to be a problem with glew...
I use the current version of Ubuntu Desktop 64-bit 14.04.1 LTS. Any idea what is going wrong?
Glew version is 1.10

Ubuntu 14.04 error

Hi, I have clone the git and installed the dependencies. I am working on ubuntu 14.04.

At first I had to change the vendor id to
Bus 009 Device 006: ID 045e:02d9 Microsoft Corp.
since it was set to 045e:02d8.

After that protonect got stucked at :

 libusb_get_string_descriptor_ascii(dev_handle, dev_desc.iSerialNumber, buffer, sizeof(buffer));

which gave me always the -2 error.
I googled a bit and I found out that with xusb I could get the right serial number, so I substituted the code with the following :

r = libusb_get_string_descriptor(dev_handle, 0, 0, string, 128);
              if (r > 0) {
                  nb_strings = string[0];
                  for (int i=1; i<nb_strings; i++) {
                          if (libusb_get_string_descriptor_ascii(dev_handle, (uint8_t)i, string, 128) >= 0) {
                                  printf("   String (%d/%d): \"%s\"\n", i, nb_strings-1, string);
                          }
                  }
              }

and this worked printing:
String (1/3): "Microsoft Corporation "
String (2/3): "NuiSensor Adaptor "

Going on the program crashes when checking the IrInterfaceId in the following call

UsbControl::ResultCode UsbControl::claimInterfaces()
{
  UsbControl::ResultCode code = Success;
  int r;

  r = libusb_claim_interface(handle_, ControlAndRgbInterfaceId);
  code = checkLibusbResult("claimInterfaces(ControlAndRgbInterfaceId)", r);

  if(code == Success)
  {
    r = libusb_claim_interface(handle_, IrInterfaceId);
    code = checkLibusbResult("claimInterfaces(IrInterfaceId)", r);
  }

  return code;
}

in usb_control.cpp
getting:
[UsbControl::claimInterfaces(IrInterfaceId)] failed! libusb error -5: LIBUSB_ERROR_NOT_FOUND.

The complete output is:

gf@Pelars-GF:~/Libraries/libfreenect2/examples/protonect/bin$ sudo ./Protonect
[Freenect2Impl] enumerating devices...
[Freenect2Impl] 15 usb devices connected
String (1/3): "Microsoft Corporation "
String (2/3): "NuiSensor Adaptor "
[Freenect2Impl] found valid Kinect v2 @9:4 with serial NuiS
[Freenect2Impl] found 1 devices
[Freenect2DeviceImpl] opening...
[UsbControl::claimInterfaces(IrInterfaceId)] failed! libusb error -5: LIBUSB_ERROR_NOT_FOUND
[Freenect2DeviceImpl] closing...
[Freenect2DeviceImpl] deallocating usb transfer pools...
[Freenect2DeviceImpl] closing usb device...
[Freenect2DeviceImpl] closed
[Freenect2DeviceImpl] failed to open Kinect v2 @9:4!
no device connected or failure opening the default one!

and lsusb gives me:

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 046d:c31f Logitech, Inc.
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 001 Device 003: ID 1307:0330 Transcend Information, Inc. 63-in-1 Multi-Card Reader/Writer
Bus 001 Device 002: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 006: ID 045e:02d9 Microsoft Corp.
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 010 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

usb controller:

01:00.0 USB controller: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller (rev 03)

Thank you very much!

Protonect crash on startup on OS X 10.10

Just got my Kinect Adapter yesterday. After the project was built without error and running Protonect the following is dumped to stdout.

[Freenect2Impl] enumerating devices...
[Freenect2Impl] 5 usb devices connected
[Freenect2Impl] found valid Kinect v2 @20:1 with serial 032187733747
[Freenect2Impl] found 1 devices
[Freenect2Impl] failed to reset Kinect v2 @20:1!
no device connected or failure opening the default one!

A black window (I'm guessing the GL Window) flashes during this process. If I run test_opengl, the resulting stack trace seems to point to libGL as the source of the error. I think Apple changed things around with the GL frameworks in 10.10, so that might be the source of the crash, but I am ultimately unsure.

Here's the full dump after running test_opengl: https://gist.github.com/aamedina/15efdc445edbb8f617c8

build error on current Ubuntu 14.04

I'm getting the following build error on Ubuntu 14.04:

Linking CXX executable ../bin/Protonect
/usr/bin/ld: CMakeFiles/Protonect.dir/src/tinythread/tinythread.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/Protonect] Error 1
make[1]: *** [CMakeFiles/Protonect.dir/all] Error 2
make: *** [all] Error 2

Can be fixed by adding "pthread" to "LIBFREENECT2_THREADING_LIBRARIES" in SetupLibfreenect2Threading.cmake, however, I'm not sure if this would cause problems on Win/Mac.

Define public API

As we have the basic functionality now, the next step should be to define a public API. People could start working on nice applications using libfreenect2 and we can continue tinkering on the internals.

I guess most people would prefer a C API as in libfreenect for maximum portability? The functions should probably resemble the libfreenect API so switching is as seamless as possible? Are there any flaws in the libfreenect API, which should be avoided in libfreenect2?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.