Closed narutojxl closed 4 years ago
Hi @narutojxl
I think according to the gtsam tutorial, the first pose_id is 1 instead of 0,
You can find the example from here. https://github.com/dongjing3309/gtsam-examples/blob/master/cpp/examples/Pose2SLAMExample.cpp
However, the array in cpp starts with 0, so here we need to add 1 to match the gtsam symbol.
Han
Hi doctor wang,
Thanks for your help, i didn't notice the fisrt node is marked as graph.push_back(gtsam::PriorFactor<gtsam::Pose3>(gtsam::Symbol('x', 1), pose_optimized_arr.front(), priorModel));
line 41 in code, thanks for your advice!
BTW, if we mark the origin node is gtsam::Symbol('x', 0)
, then we no need plus 1, right?
Hi @narutojxl
Yes I think so, but if you want to change this, you may have to change the corresponding ids in other function as well. However, it is not necessary to change this because changing ids does not affect the performance
Yes, i agree with you! Thanks doctor, my problem is solved.
Hi doctor wang, When
geometryConsistencyVerification()
in line 68 of iscOptimizationClass.cpp, return true, there is a true loop between history matched frame id and curr id. Why the code is this ? Thanks for your help !