Robotics StackExchange | Archived questions

cannot store some *.g2o file

I use g2o examples tutorial_slam2d in my ros project. I use 'optimizer.save(file.g2o)' to save graph pose. And I only get empty file. While I debug this behavior, I found vertices and edges do exist.

Then I found G2OREGISTERTYPEGROUP is need, I add the following code: ``` G2OREGISTERTYPEGROUP(graph2d);

G2OREGISTERTYPE(TUTORIALVERTEXSE2, VertexSE2);

G2OREGISTERTYPE(TUTORIALEDGESE2, EdgeSE2);

G2OUSETYPE_GROUP(graph2d); ```

I also tried directly use

G2OUSETYPE_GROUP(slam2d);

G2OUSETYPE_GROUP(slam3d);

like the example simple_optimize.

It also does not work.

Do you have any hints to solve this problem? I must miss the key point.

Thanks

taiping

Asked by taiping.z on 2017-05-24 03:48:50 UTC

Comments

Answers