Skip to content

“Segmentation fault (core dumped)”when run the g2o::EdgeSim3* setMeasurement()  #493

@ZulunZhu

Description

@ZulunZhu

Hi
I met the Segmentation fault when I use the g2o imitating the ORB-SLAM2 to optimize my pose graph.

Eigen::Matrix<double,3,3> Rcw;
Eigen::Matrix<double,3,1> tcw;
Rcw<<0.999991,-0.00307419,-0.00307221,
0.00307749,0.999995,0.00106957,
0.00306891,-0.00107902,0.999995;
tcw<<-0.00634032,
-0.0152401,
0.849042;
g2o::Sim3 S_test(Rcw,tcw,1.0);
cout<<"S_test:"<<S_test<<endl;
g2o::EdgeSim3* e = new g2o::EdgeSim3();
cout << "e.nIDj " << nIDj << " e.nIDi " << nIDi << endl;
e->setVertex(1, dynamic_castg2o::OptimizableGraph::Vertex*(optimizer.vertex(nIDj)));
e->setVertex(0, dynamic_castg2o::OptimizableGraph::Vertex*(optimizer.vertex(nIDi)));
e->setMeasurement(S_test);

I tried a lot of value of setMeasurement(),but every time my code will go core dumping at this function.
It is very confusing that ORB-SLAM2 will not go down in that function.

Does anyone have the same problem? Appreciating if there is any help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions