g2o icon indicating copy to clipboard operation
g2o copied to clipboard

VertexSE3Expmap vertex number must greater than 1?

Open dwindy opened this issue 3 years ago • 1 comments

Hi gusy,

I set a demo that contains: some VertexSBAPointXYZ vertex (landmarks) some VertexSE3Expmap vertex (camera pose) and some EdgeStereoSE3ProjectXYZ edge (the observation that connects the two types of vertexes above)

While I find out if I just add ONE VertexSE3Expmap to the optimizer, there will be a runtime error like the below:

ORBG2O2: /home/xin/Desktop/playground/ORBG2O/Thirdparty/g2o/g2o/core/block_solver.hpp:75: void g2o::BlockSolver<Traits>::resize(int*, int, int*, int, int) [with Traits = g2o::BlockSolverTraits<6, 3>]: Assertion `_sizePoses > 0 && "allocating with wrong size"' failed.

When I increase the VertexSE3Expmap to TWO and more, the g2o works fine.

Theroyicaly that I could optimize only one camera pose right? So it might be because I used the wrong type of vertex?

any idea or tips for this? Thanks in advance

dwindy avatar Apr 04 '22 19:04 dwindy

In principle yes. The assert here guards memory allocation that otherwise would allocate zero elements. Potentially, the Schur complement implementation can be refactored to allow for 0 poses as well.

RainerKuemmerle avatar Jun 15 '22 18:06 RainerKuemmerle