Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kinect XBOX One doesnt work #6

Open
tansangxtt opened this issue Aug 17, 2017 · 50 comments
Open

Kinect XBOX One doesnt work #6

tansangxtt opened this issue Aug 17, 2017 · 50 comments

Comments

@tansangxtt
Copy link

tansangxtt commented Aug 17, 2017

I have tested it on Kinect One but it doesn't work properly. DirectX window is black and not responsing. Found out the code, it stucks at this line:

while (hr != S_OK) hr = m_pMultiSourceFrameReader->AcquireLatestFrame(&pMultiSourceFrame);

Line 41, KinectOneSensor.cpp

@tansangxtt
Copy link
Author

tansangxtt commented Aug 17, 2017

m_pMultiSourceFrameReader->AcquireLatestFrame(&pMultiSourceFrame) always return E_PENDING

@willfu
Copy link

willfu commented Aug 19, 2017

It is not stucked at this line, you can add break point later than that loop.

@tansangxtt
Copy link
Author

@willfu Have you enabled KinectOne compilation flag?

@dave101326
Copy link

I have the same problem, it seem that it only capture once.

Any idea?

default

@yaoy908
Copy link

yaoy908 commented Nov 9, 2017

hello
I try with Kinect one, and the command window stucked after running. My graphic card is gtx 960m. Do you have any progress? I can run with sens file after ignoring "cuda out ot memory" error. But I cannot run it with Kinect one nor realsense r200.

@yaoy908
Copy link

yaoy908 commented Nov 9, 2017

In my project, it stuck at line "ConditionManager::waitBundlerProcessedInput(ConditionManager::Recon);" in OnD3D11FrameRender.

@Jaiy
Copy link

Jaiy commented Dec 1, 2017

@dave101326
Hi, have you solved the problem? I meet the similar problem as your picture shows, then my comment show the error——cudaSafeCall() Runtime API error 74: misaligned address. Could you give me some suggestions? Thanks a lot.

@yaoy908
Copy link

yaoy908 commented Dec 4, 2017

@Jaiy
Update your video card or decrease parameters in zParametersDefault.txt.For example, increase the size of voxelsize.

@Jaiy
Copy link

Jaiy commented Dec 4, 2017

@yaoy908
Hi, when I increase the size of the voxelsize, the error above is not disappeared, the command window still stucked after running. If I use the CUDA 7.0, when I build the solution, it will meet many error like:"too many characters in constant", have you meet the problem?can you run the project successfully with the Kinect one? Have you solve the problem? Or can you run successfully with other device? Thank you for replying!

@yaoy908
Copy link

yaoy908 commented Dec 4, 2017

@Jaiy
I modify the sensfilereader class, to read my images from kinect, so I didn't try it with realtime-running.On my pc, kinectonesensor cannot work well. You can modify it, but my pc cannot affort a good fps with realtime-running, so I choose to read images from disk.

@ljilekor
Copy link

ljilekor commented Dec 6, 2017

Hello everyone

I'm using an old Kinect (s_sensorIdx = 0) on windows.

I got stuck at this error:
d:...\bundlefusion-master\friedliver\source\depthsensing\MarchingCubesSDFUtil.h(58) : cudaSafeCall() Runtime API error 2: out of memory.

The DirectX window doesn't pop up.

afbeelding

The problem occurs at MarchingCubesSDFUtil.h, line 58
afbeelding

Does anyone have an idea on how to get around this error please?

===SOLVED ==========================================================
Reducing s_marchingCubesMaxNumTriangles in zParametersDefault.txt did the trick.
I guess my gpu memory couldn't handle the default 3000000 maxtriangles.

Hope this helps.

@Jaiy
Copy link

Jaiy commented Dec 7, 2017

@yaoy908
Hi, thanks for your kind help, I have solve the problem by changing the CUDA version, it's strange, but it did work. Thanks again!

@carstenschwede
Copy link

@Jaiy Could be a bit more specific as to what you did to make it work with the Kinect One?

@CDElite
Copy link

CDElite commented Jan 18, 2018

@Jaiy
Which version of CUDA did you work with?

@quanqhow
Copy link

I run the FriedLiver.exe successfully at the first, but it stuck just a moment. I use the Kinect V1 for Xbox 360 to test FriedLiver.exe. My platform is windows10, CUDA 8.0. How did you test the application successfully in the past? Could you tell me how to do?
image

@quanqhow
Copy link

I also tested my Kinect V2 (for XBox One) under the FriedLiver.exe, but it still stuck at the moment. So I have tested both kinds of Kinect and the FriedLiver stuck at the two conditions. Are there anybody able to help me to solve this tough issue?

@junweiy2012
Copy link

@tansangxtt I met the same problem as yours. Also got stuck at
while (hr != S_OK) hr = m_pMultiSourceFrameReader->AcquireLatestFrame(&pMultiSourceFrame);

Have you solved this problem?

@junweiy2012
Copy link

@quanqhow Have you figured out the issue? I got exactly the same problem.

@quanqhow
Copy link

@junweiy2012 Sorry, I haven't solved this issue. Have you figured out some solutions?

@junweiy2012
Copy link

junweiy2012 commented Mar 30, 2018

@quanqhow try by commenting out the use_multi_thread option in GlobalAppState file. It works for me after commenting it out. I don't know why though. For Kinect v2, I still can't get it work. Let me know if you can get Kinect v2 work.

@nicole-antoine
Copy link

Hello, I'm currently trying to make this bundlefusion project work with KinectOne or Kinect v2 (since it seems not to work with structure sensor atm) but whichever I tried I got stuck with
image

would you have any clue why ?

@WuYingzheng
Copy link

@nicole-antoine
hi,
I got the same error. I have struggle several days to compile this project, and it succeed but fail to run. And i guess the reason is the CUDA compile parameter doesn't match you GPU. Change you CUDA compile parameter for a try. but i did't know if it works.

@nicole-antoine
Copy link

nicole-antoine commented Jun 20, 2018

@WuYingzheng are you talking about these lines ?

<ImportGroup Label="ExtensionSettings">
   <Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 8.0.props" />
 </ImportGroup>

@WuYingzheng
Copy link

@nicole-antoine no, I'm talking about CUDA setting in you MS-VS . Right click you project ,select property, then you will see the cuda settings. sorry, I am currently working in ubuntu os, can't show you a screen shot of vs.

@nicole-antoine
Copy link

@WuYingzheng I see what you mean though there's no many parameters I can modify like command line or code generation but I think it's unlikely to work, did it do the job for you ?

@WuYingzheng
Copy link

@nicole-antoine NO. My GPU is GeForce GTX 650, and cuda parameter is compute_30 sm_30.

@nicole-antoine
Copy link

@WuYingzheng Alright I changed compute_/sm_(35) to 30 and it did the trick thank you. Now I'm at the same step as @quanqhow was, it gets stuck after several frames. I tried as @junweiy2012 suggested by commenting "RUN_MULTITHREADED", the program isn't stuck anymore but the window becomes black after displaying the same number of frame.

@yasinalm
Copy link

I solved the "out of memory" error with changing parameters s_hashNumBuckets and s_hashNumSDFBlocks with smaller numbers. You can try this. My GPU is gtx 1050ti.

@lmlodda
Copy link

lmlodda commented Jul 31, 2018

i have a solutions that works for me with RUN_MULTITHREADED
In DepthSensing.cpp line 987 replace
bGotDepth = g_CudaImageManager->process()
with
bool bGotDepth;
while (!(bGotDepth = g_CudaImageManager->process()));

The problem that i investigated was that the kinect one provides 30fps max. If the frame is not ready to fetch, pDepthFrameReference->AcquireFrame returns a FAIL. This causes a dead lock in the process lock management. The while loops forces the CALLBACK to wait untill a new frame is available. Hope this helps.

@farray81
Copy link

@lmlodda Which version of CUDA, Visual Studio, Windows did you achieve that Kinect v2 work with? I am trying some things said in this post, included your suggestion, and the program doesn't work.

@tansangxtt
Copy link
Author

i have a solutions that works for me with RUN_MULTITHREADED
In DepthSensing.cpp line 987 replace
bGotDepth = g_CudaImageManager->process()
with
bool bGotDepth; while (!(bGotDepth = g_CudaImageManager->process()));

The problem that i investigated was that the kinect one provides 30fps max. If the frame is not ready to fetch, pDepthFrameReference->AcquireFrame returns a FAIL. This causes a dead lock in the process lock management. The while loops forces the CALLBACK to wait untill a new frame is available. Hope this helps.

Wonderful @lmlodda, I will try your solution

@farray81
Copy link

@tansangxtt Did you achieve it worked? I tried the solution purposed by @lmlodda and it didn't work for me.

@rapulu92
Copy link

@yaoy908
I modify the sensfilereader class, to read my images from kinect, so I didn't try it with realtime-running.On my pc, kinectonesensor cannot work well. You can modify it, but my pc cannot affort a good fps with realtime-running, so I choose to read images from disk.

Please how did you modify it?

@farray81
Copy link

farray81 commented Sep 30, 2019

@wuyingnan
Do you know (or anyone knows) if your modern port for BundleFusion solves the problems with Kinect One?

https://github.com/wuyingnan/BundleFusion

@rapulu92
Copy link

rapulu92 commented Oct 2, 2019 via email

@farray81
Copy link

farray81 commented Oct 2, 2019

Oh, great! As you see in the post, a lot of people were trying to use BundleFusion with the second version of the Kinect, the Kinect One, and we didn't achieved it. I hope I can try your version in the next days.

@carstenschwede
Copy link

@farray81 Please report back if https://github.com/wuyingnan/BundleFusion works with Kinect One. Looking forward to your results!

@farray81
Copy link

farray81 commented Oct 4, 2019

Unfortunately, it doesn't work in my case. I achieved to try this version (https://github.com/wuyingnan/BundleFusion) with VS2017, CUDA10.1 and Windows 8, but the same problem than before appeared. Black screen stuck, and if I change the code as @Imlodda said:

i have a solutions that works for me with RUN_MULTITHREADED
In DepthSensing.cpp line 987 replace
bGotDepth = g_CudaImageManager->process()
with
bool bGotDepth; while (!(bGotDepth = g_CudaImageManager->process()));

then the screen is not stuck, but when the program read 10 frames, the message INVALID CHUNK appears and the program finishes.

I don't know what happens, because I can use the Kinect One with https://github.com/niessner/VoxelHashing with no problems, that it's the previous project to BundleFusion. I'm always trying the Kinect in real-time, I don't know how to do to use the data from this sensor offline in BundleFusion, as @yaoy908 said;

I modify the sensfilereader class, to read my images from kinect, so I didn't try it with realtime- running.On my pc, kinectonesensor cannot work well. You can modify it, but my pc cannot affort a good fps with realtime-running, so I choose to read images from disk.

@wuyingnan
Copy link

I do not have a Kinect One sensor. This sensor is not tested. The code working with Kinect One is the same as original bundle fusion

@FishHe
Copy link

FishHe commented May 15, 2020

Same Problem I have met. Is there any solution?

@FishHe
Copy link

FishHe commented May 16, 2020

I follow the program, and it stops, for dubug, at SiftPyramid.cpp line 445:
ProgramCU::ComputeOrientation(ftex, got, key, sigma, sigma_step);
for release, at SiftPyramid.cpp in line 310:
unsigned int numFeatures = ProgramCU::ReshapeFeatureList(&_featureTexRaw[i], &_featureTexFinal[i], d_featureCount, keyLocScale);
I don't know what happened.. Hope for a solution.

@FishHe
Copy link

FishHe commented May 16, 2020

I can't compile your code with VS 2017, could you tell me how to do it? @wuyingnan

@chethanab16
Copy link

Hi I have this issue when i run the bundle fusion and i am using windows 10, visual studio 2013, and tried with CUDA 8 , 9 , and 11 version but has the same problem in the imaged could any body suggest how to solve it

bundle fusion stuck

@BruceWANGDi
Copy link

@chethanab16 Hi, I have the same problem with you, my environment is the same as yours(And my hardware is 2080Ti, I don't know whether my GPU can not work on CUDA 8.0). Have you figured out any solutions to solve it?
When I running my .exe, it stuck, then crash without any response.
Looking forward to your reply so much.

@chethanab16
Copy link

chethanab16 commented Oct 12, 2020

@BruceWANGDi try 1.#56 2. #6

this should solve the GPU Hang Issue and I tried with CUDA 10.2

@BruceWANGDi
Copy link

@chethanab16 Thank you so much!!! I changed my CUDA version8.0 to 10.0 and followed the #56 you give me. I can run the project finally!!
Overall, I think the most important thing is that my previous CUDA is too old so that my GPU can't work on it, and I think it's essential to change the code described by #56 when using 20 series graphic card.

@Jason-YJ
Copy link

Jason-YJ commented Mar 1, 2021

@chethanab16
Have you solved the problem by changing cuda version from 8.0 to 10.2?
My pc is just the same situation exactly, even a same GPU -1660Ti

@crud89
Copy link

crud89 commented Apr 1, 2022

For anyone still interested, I've got this running. A fixed version can be found here. I've also integrated the fixes #28, #31 and #56 by @stotko. Unfortunately, it currently only works in single-threaded mode. If anybody wants to provide a fix for this, be my guest, but I find the single-threaded performance more than sufficient.

The fork works on CUDA 11.5, but I also provide a description how to adjust the CUDA version. I suppose all versions newer than CUDA 7 will work.

I also wanted to integrate the changes by @wuyingnan (they are great!), but unfortunately, mLib does define a hard dependency on the legacy D3DX11 shader compiler, which requires manual patching, so I opted to rely on the DX SDK for simplicity reasons.

Furthermore I've updated the mLib dependency up to the last commit that is compatible with the externals they provide. More recent versions require you to manually update boost in the externals, so if you want to use it, you would have to keep this in mind!

image

@tansangxtt
Copy link
Author

Thanks @crud89 for your work, I will try it as soon as I get a Kinect XBox One

@MisEty
Copy link

MisEty commented Apr 18, 2023

For anyone still interested, I've got this running. A fixed version can be found here. I've also integrated the fixes #28, #31 and #56 by @stotko. Unfortunately, it currently only works in single-threaded mode. If anybody wants to provide a fix for this, be my guest, but I find the single-threaded performance more than sufficient.

The fork works on CUDA 11.5, but I also provide a description how to adjust the CUDA version. I suppose all versions newer than CUDA 7 will work.

I also wanted to integrate the changes by @wuyingnan (they are great!), but unfortunately, mLib does define a hard dependency on the legacy D3DX11 shader compiler, which requires manual patching, so I opted to rely on the DX SDK for simplicity reasons.

Furthermore I've updated the mLib dependency up to the last commit that is compatible with the externals they provide. More recent versions require you to manually update boost in the externals, so if you want to use it, you would have to keep this in mind!

image

I have test your code on two laptops. The building process is OK but only the debug build can work. The release type crashed on some frames and I don't know why. Anyway, Thanks for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests