g2o icon indicating copy to clipboard operation
g2o copied to clipboard

Correctly using EdgeSE3Expmap class

Open chait-desai opened this issue 7 years ago • 3 comments

Unless I am missing something, the EdgeSE3Expmap class implementation is not working the way it is supposed to.
I am setting up a simple optimization problem with just 2 vertices representing poses in SE3: the pose of one of the vertices is fixed and the other is free to change. The idea is to get the free vertex to converge to the pose of the fixed vertex. The "odometry measurement" between the 2 poses is the identity isometry (no rotation and no translation), so that the error associated with the edge in only a function of the difference between the 2 poses. I am able to get the optimization to behave correctly when the 2 vertices are represented using the VertexSE3 class and the edge is represented using the EdgeSE3 class. However, when I switch to VertexSE3Expmap and EdgeSE3Expmap, I get nonsensical results. Attached is the code (which should be added to the examples directory if you want to run the code) SE3test.tar.gz and the console output of running the code g2o

chait-desai avatar Nov 21 '18 20:11 chait-desai

I am experiencing the same thing. If you have resolved this or anyone can help, please help!

steplee avatar Dec 05 '18 20:12 steplee

@chait-desai ,do not forget to set the information of the edge, Eigen::MatrixXd Info = Eigen::MatrixXd::Identity(6,6); constraint->setInformation(Info); after add these code, your SE3test should get the right result. Tested on the current master branch.

winf avatar Jan 16 '19 15:01 winf

Unless I am missing something, the EdgeSE3Expmap class implementation is not working the way it is supposed to. I am setting up a simple optimization problem with just 2 vertices representing poses in SE3: the pose of one of the vertices is fixed and the other is free to change. The idea is to get the free vertex to converge to the pose of the fixed vertex. The "odometry measurement" between the 2 poses is the identity isometry (no rotation and no translation), so that the error associated with the edge in only a function of the difference between the 2 poses. I am able to get the optimization to behave correctly when the 2 vertices are represented using the VertexSE3 class and the edge is represented using the EdgeSE3 class. However, when I switch to VertexSE3Expmap and EdgeSE3Expmap, I get nonsensical results. Attached is the code (which should be added to the examples directory if you want to run the code) SE3test.tar.gz and the console output of running the code g2o

Have you figured it out?

LongruiDong avatar Dec 15 '20 05:12 LongruiDong