I am trying to reconstruct multiple objects at the same time by running multiple instances of surfelwarp.
I've encountered two problems so far. Simply creating another instace of surfelwarp will cause a failure upon trying to process a frame in the instance I first declared (e.g adding a SurfelWarpSerial fusion2 in main.cpp will cause this).
Perhaps this has to do with the cuda streams being coded in explicitly?
Simplified code:
SurfelWarpSerial fusion fusion2; // No failure when just declaring
// fusion.ProcessFirstFrame(); // This fails
fusion2.ProcessFirstFrame(); //This doesn't fail
Stack:
/surfelwarp/core/warp_solver/DensityForegroundJacobianResidual.cu:192: There is no foreground pixel
/surfelwarp/core/warp_solver/DensityForegroundJacobianResidual.cu:192: There is no foreground pixel
/surfelwarp/core/warp_solver/DensityForegroundJacobianResidual.cu:192: There is no foreground pixel
/surfelwarp/core/warp_solver/DensityForegroundJacobianResidual.cu:192: There is no foreground pixel
/surfelwarp/core/geometry/SurfelFusionHandler.cpp:91: Check failed: !containsNaN(m_fusion_geometry.live_vertex_confid.ArrayView())
The second issue has to do with threading. Suppose I were able to run the two systems sequentially and the above issue were solved. Calling Process on each of the systems would presumably be blocking due to CPU-bound code in the middle - so ideally since the two systems would be processing separate objects I'd them to work in parallel. Here I am getting an OpenGL error, presumably because the OpenGL context is bound to the thread.
Any suggestions on how I might get around these problems would be hugely appreciated.
Hi @weigao95,
I am trying to reconstruct multiple objects at the same time by running multiple instances of surfelwarp.
I've encountered two problems so far. Simply creating another instace of surfelwarp will cause a failure upon trying to process a frame in the instance I first declared (e.g adding a
SurfelWarpSerial fusion2
in main.cpp will cause this). Perhaps this has to do with the cuda streams being coded in explicitly?Simplified code:
Stack:
The second issue has to do with threading. Suppose I were able to run the two systems sequentially and the above issue were solved. Calling
Process
on each of the systems would presumably be blocking due to CPU-bound code in the middle - so ideally since the two systems would be processing separate objects I'd them to work in parallel. Here I am getting an OpenGL error, presumably because the OpenGL context is bound to the thread.Any suggestions on how I might get around these problems would be hugely appreciated.
Thanks