Kintinuous icon indicating copy to clipboard operation
Kintinuous copied to clipboard

Works with Microsoft Kinect?

Open mp3guy opened this issue 8 years ago • 39 comments

You can get it to work by adding the freenect driver to OpenNI2

git clone https://github.com/OpenKinect/libfreenect.git cd libfreenect mkdir build cd build cmake .. -DBUILD_OPENNI2_DRIVER=ON make

ln -s lib/OpenNI2-FreenectDriver/libFreenectDriver.so ../../ElasticFusion/deps/OpenNI2/Bin/x64-Release/OpenNI2/Drivers/

mp3guy avatar Mar 11 '16 14:03 mp3guy

Any idea about running Kintinuous with Kinect v2.0?

I have installed libfreenect2, and successfully run the test program of libfreenect2: ./bin/Protonect.

But there is no libFreenectDriver.so in lib.

jerry@tu1504:~/libs/libfreenect2/build/lib$ ls
libfreenect2-openni2.so    libfreenect2.so      libfreenect2.so.0.2.0
libfreenect2-openni2.so.0  libfreenect2.so.0.2

And I tried to:

ln -s libfreenect2-openni2.so ~/lab/Kintinuous/deps/OpenNI2/Bin/x64-Release/OpenNI2/Drivers/

But that didn't work.

zry656565 avatar Apr 12 '16 10:04 zry656565

I haven't tried it with Kinect v2.0 I'm afraid. But I don't believe the libfreenect2 driver works with OpenNI2, you need to directly interface it.

mp3guy avatar Apr 14 '16 13:04 mp3guy

Okay, I'm trying to do this. If I success, I will record my steps here.

zry656565 avatar Apr 14 '16 13:04 zry656565

Great software, if Kinect v2 not compatible at this moment , any other camera support except Kinect v1?

veolata avatar Apr 23 '16 16:04 veolata

No, but it's easy to add.

mp3guy avatar Apr 23 '16 16:04 mp3guy

KinectV2 is working after installing freenect2 with OpenNI2 support. Depth intrinsic matrix can be passed as a file through cli.

robnsngh avatar Apr 29 '16 22:04 robnsngh

Oh well done ! Happy to hear that, have to play with !

stephane-lb avatar May 09 '16 13:05 stephane-lb

@robnsngh it's a big news for me~ It cheers me up !

ac4fun avatar May 13 '16 10:05 ac4fun

@zry656565 hey, buddy! have you succeeded in working with Kinect v2 using Kintinuous? I have build Kintinuous successfully on Ubuntu 14.04 and GTX970 and it can run with the demo klg . But it can't recognize the Kinect V2(I make sure the usb version is 3.0).

What' more, I tried to use the Logger2 but it did't work well . Could you please show me your record? @robnsngh

ac4fun avatar May 20 '16 07:05 ac4fun

Hi @mp3guy , Can you confirm what sensor works and has the best resolution with Kintinuous? (I'm looking to buy one) Does the Intel Realsense F200 or Kinect v2 supported?

Thank you for such great open source project!

Ben-Mack avatar May 20 '16 13:05 Ben-Mack

@kingsleynuaa No, I cannot run Kintinuous with my Kinect v2 for now, and I bought a ASUS Xtion PRO Live for current research.

zry656565 avatar May 20 '16 13:05 zry656565

Hi, @robnsngh Would you please tell us your detailed steps of making Kinect v2 working? I've tried ln -s libfreenect2-openni2.so ~/lab/Kintinuous/deps/OpenNI2/Bin/x64-Release/OpenNI2/Drivers/ like @zry656565 did and it didn't work either. What do you mean by Depth intrinsic matrix can be passed as a file through cli.? How did you link the libFreenectDriver.so file for libfreenect2? Thanks a lot!

Ps. I know this is not a big deal but I'm still a little confused, are we talking about Kintinuous or ElasticFusion? Because this is the Kintinuous repo and @mp3guy linked the ElasticFusion lib(ln -s lib/OpenNI2-FreenectDriver/libFreenectDriver.so ../../ElasticFusion/deps/OpenNI2/Bin/x64-Release/OpenNI2/Drivers/)...

JiamingSuen avatar May 26 '16 15:05 JiamingSuen

I'm attempting to get Kintinuous working with a Kinect. I've built the libfreenect driver and linked it to /usr/lib/OpenNI2/Drivers/. I assume this is the correct place to link, given that OpenNI2 is installed globally on my machine and not in a deps/ directory. However, I get a "no devices found" error when running Kintinuous. Is there something else I needed to do that I'm missing?

As a test, I did run glview from libfreenect, and it's working fine. So it's not a hardware problem.

speleophysics avatar Oct 09 '16 14:10 speleophysics

To follow up on my previous query. After hours of trying, I never got it working on my machine. Now I've re-installed Ubuntu (16.04), and it does work on a fresh install. Not sure what was creating the problem before (on an old 14.04 install). I compiled libfreenect midway through the standard build procedure. If I remember correctly, it was after OpenNI2 and ffmpeg.

speleophysics avatar Oct 27 '16 13:10 speleophysics

@speleophysics Hi, did you get it working with Kinect2? I'm able to get the driver working and got both rgb and depth image with NiViewer2. But I got this following error while running Kintinuous:

Kintinuous: /opt/rgbd/Kintinuous/src/utils/OpenNI2Interface.cpp:119: OpenNI2Interface::OpenNI2Interface(int, int, int): Assertion `findMode(width, height, fps) && "Sorry, mode not supported!"' failed.

At first glance I thought Kintinuous is trying to match the width/height between rgb and depth image, which are not equal when the resolution is 960x540 or 1920x1080.

riematrix avatar Nov 03 '16 03:11 riematrix

I am using an original connect, not a Kinect2.

speleophysics avatar Nov 03 '16 11:11 speleophysics

Hi @riematrix I came across the same problem as you did with Kinect 2. Did you solve the problem?

Point resolution: 11.7 millimetres Creating live capture... [Info] [Freenect2Impl] enumerating devices... [Info] [Freenect2Impl] 10 usb devices connected [Info] [Freenect2Impl] found valid Kinect v2 @2:11 with serial 016998250647 [Info] [Freenect2Impl] found 1 devices libva info: VA-API version 0.35.0 libva info: va_getDriverName() returns -1 libva error: va_getDriverName() failed with unknown libva error,driver_name=(null) [Error] [VaapiRgbPacketProcessorImpl] vaInitialize(display, &major_ver, &minor_ver): unknown libva error [Info] [Freenect2DeviceImpl] opening... [Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 2016384 ir: 608*33792 [Info] [Freenect2DeviceImpl] opened [Info] [Freenect2DeviceImpl] starting... [Info] [Freenect2DeviceImpl] submitting rgb transfers... [Info] [Freenect2DeviceImpl] submitting depth transfers... [Info] [Freenect2DeviceImpl] started Kintinuous: /Kintinuous/src/utils/OpenNI2Interface.cpp:119: OpenNI2Interface::OpenNI2Interface(int, int, int): Assertion `findMode(width, height, fps) && "Sorry, mode not supported!"' failed.

JunshengFu avatar Nov 22 '16 14:11 JunshengFu

@JunshengFu No. But i believe there should be a solution.

riematrix avatar Nov 30 '16 12:11 riematrix

I got the same error with you buddy... This may come from kinect v2's resolution. Thomas @mp3guy , may I ask where can I change these settings in Kintinuous?

Kintinuous: /home/wine/Kintinuous/src/utils/OpenNI2Interface.cpp:119: OpenNI2Interface::OpenNI2Interface(int, int, int): Assertion `findMode(width, height, fps) && "Sorry, mode not supported!"' failed. Aborted (core dumped)

wine3603 avatar Dec 09 '16 09:12 wine3603

That function queries the OpenNI api to ask if the resolution you requested is supported by the driver. Currently the system only supports depth and rgb streams that are the same size.

mp3guy avatar Dec 09 '16 14:12 mp3guy

Hello.Does anybody get it working with KinectV1? After I builded it,and run the Kintinuous GUI It can't find the device: "gaizixuan@Lenovo:~/build$ ./Kintinuous Point resolution: 11.7 millimetres Creating live capture... failed! DeviceOpen using default: no devices found" I am a totally new learner,and really hope anybody could help me...

gaizixuan0128 avatar Dec 30 '16 08:12 gaizixuan0128

@gaizixuan0128 I would suggest to debug as following steps

  1. make sure the libfreenect and openni 2 are working with kinect 1 after installing
  2. make sure the symbolic link are created probably. If there is a problem, instead of using the relative path as "ln -s lib/OpenNI2-FreenectDriver/libFreenectDriver.so ../../Kintinuous/deps/OpenNI2/Bin/x64-Release/OpenNI2/Drivers/", try to use the full path to create the symbolic link. Good luck!

JunshengFu avatar Dec 30 '16 09:12 JunshengFu

@JunshengFu Now the libfreenect and openni2 are working with kinect1,and the symbolic link already exists.But still get the same problem.... Could you explain how to use the full path to create? Thanks a lot!!!

gaizixuan0128 avatar Dec 30 '16 10:12 gaizixuan0128

@gaizixuan0128 By full path, I mean that refer a file by the path starting from "home" directory, e.g "/home/..../libFreenectDriver.so". If you are using linux, you simply copy the file and paste it to a text editor to see its full path.

in this case it should be: ln -s /home/yourPathTo/libFreenectDriver.so /home/yourPathTo/Drivers/

JunshengFu avatar Dec 30 '16 11:12 JunshengFu

@JunshengFu Thank you!I will try again

gaizixuan0128 avatar Dec 30 '16 12:12 gaizixuan0128

@JunshengFu libfreenect2 supports Color and Depth video mode of 512 x 424; you'll just have to change the initialization resolution for Elastic Fusion, in MainController.cpp ln 37: Resolution::getInstance(512, 424);//Resolution::getInstance(640, 480)

spyd3rweb avatar Jan 03 '17 01:01 spyd3rweb

@spyd3rweb Thanks for pointing it out :-) !

JunshengFu avatar Jan 03 '17 08:01 JunshengFu

@JunshengFu Hello, Are you succeed in getting it working with KinectV1? I tried it by your supposed steps, it can't find device. "Point resolution: 11.7 millimetres Creating live capture... failed! DeviceOpen using default: no devices found" Do you have any suggestion for it? Thanks!

taoxiaobin avatar Feb 10 '17 03:02 taoxiaobin

@taoxiaobin Yes, I got it working with Kinectv1. (1) Can you start Kinect successfully with openni2 or libfreenect? (2) I would recommend you to verify every dependence you installed for this project. For example, try to run their example code. Because, I built it again about a month ago, and I found some dependence libraries are updated, e.g. function names are changed. So, instead of downloading the latest dependence, I use the version which is compatible.

JunshengFu avatar Feb 11 '17 19:02 JunshengFu

@spyd3rweb

The change in resolution enables the use of the Kinect V2, however I can see 2 black horizontal strips in the RGB image, which then result in the point cloud having black texture.

Is there a way to overcome this issue?

snapshot1

roliveiradoteu avatar Feb 20 '17 00:02 roliveiradoteu