Removed some unneeded namespace qualifications
parent
c9a7796fc3
commit
2baa593458
|
@ -46,8 +46,8 @@ using namespace gtsam;
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
|
|
||||||
// Create the set of ground-truth
|
// Create the set of ground-truth
|
||||||
std::vector<gtsam::Point3> points = createPoints();
|
vector<Point3> points = createPoints();
|
||||||
std::vector<gtsam::Pose3> poses = createPoses();
|
vector<Pose3> poses = createPoses();
|
||||||
|
|
||||||
// Create the factor graph
|
// Create the factor graph
|
||||||
NonlinearFactorGraph graph;
|
NonlinearFactorGraph graph;
|
||||||
|
|
|
@ -64,10 +64,10 @@ int main(int argc, char* argv[]) {
|
||||||
noiseModel::Isotropic::shared_ptr measurementNoise = noiseModel::Isotropic::Sigma(2, 1.0); // one pixel in u and v
|
noiseModel::Isotropic::shared_ptr measurementNoise = noiseModel::Isotropic::Sigma(2, 1.0); // one pixel in u and v
|
||||||
|
|
||||||
// Create the set of ground-truth landmarks
|
// Create the set of ground-truth landmarks
|
||||||
std::vector<gtsam::Point3> points = createPoints();
|
vector<Point3> points = createPoints();
|
||||||
|
|
||||||
// Create the set of ground-truth poses
|
// Create the set of ground-truth poses
|
||||||
std::vector<gtsam::Pose3> poses = createPoses();
|
vector<Pose3> poses = createPoses();
|
||||||
|
|
||||||
// Create an iSAM2 object. Unlike iSAM1, which performs periodic batch steps to maintain proper linearization
|
// Create an iSAM2 object. Unlike iSAM1, which performs periodic batch steps to maintain proper linearization
|
||||||
// and efficient variable ordering, iSAM2 performs partial relinearization/reordering at each step. A parameter
|
// and efficient variable ordering, iSAM2 performs partial relinearization/reordering at each step. A parameter
|
||||||
|
|
|
@ -64,10 +64,10 @@ int main(int argc, char* argv[]) {
|
||||||
noiseModel::Isotropic::shared_ptr measurementNoise = noiseModel::Isotropic::Sigma(2, 1.0); // one pixel in u and v
|
noiseModel::Isotropic::shared_ptr measurementNoise = noiseModel::Isotropic::Sigma(2, 1.0); // one pixel in u and v
|
||||||
|
|
||||||
// Create the set of ground-truth landmarks
|
// Create the set of ground-truth landmarks
|
||||||
std::vector<gtsam::Point3> points = createPoints();
|
vector<Point3> points = createPoints();
|
||||||
|
|
||||||
// Create the set of ground-truth poses
|
// Create the set of ground-truth poses
|
||||||
std::vector<gtsam::Pose3> poses = createPoses();
|
vector<Pose3> poses = createPoses();
|
||||||
|
|
||||||
// Create a NonlinearISAM object which will relinearize and reorder the variables every "relinearizeInterval" updates
|
// Create a NonlinearISAM object which will relinearize and reorder the variables every "relinearizeInterval" updates
|
||||||
int relinearizeInterval = 3;
|
int relinearizeInterval = 3;
|
||||||
|
|
|
@ -71,10 +71,10 @@ int main(int argc, char* argv[]) {
|
||||||
noiseModel::Isotropic::shared_ptr measurementNoise = noiseModel::Isotropic::Sigma(2, 1.0); // one pixel in u and v
|
noiseModel::Isotropic::shared_ptr measurementNoise = noiseModel::Isotropic::Sigma(2, 1.0); // one pixel in u and v
|
||||||
|
|
||||||
// Create the set of ground-truth landmarks
|
// Create the set of ground-truth landmarks
|
||||||
std::vector<gtsam::Point3> points = createPoints();
|
vector<Point3> points = createPoints();
|
||||||
|
|
||||||
// Create the set of ground-truth poses
|
// Create the set of ground-truth poses
|
||||||
std::vector<gtsam::Pose3> poses = createPoses();
|
vector<Pose3> poses = createPoses();
|
||||||
|
|
||||||
// Create a factor graph
|
// Create a factor graph
|
||||||
NonlinearFactorGraph graph;
|
NonlinearFactorGraph graph;
|
||||||
|
@ -99,7 +99,7 @@ int main(int argc, char* argv[]) {
|
||||||
graph.push_back(PriorFactor<Point3>(Symbol('l', 0), points[0], pointNoise)); // add directly to graph
|
graph.push_back(PriorFactor<Point3>(Symbol('l', 0), points[0], pointNoise)); // add directly to graph
|
||||||
graph.print("Factor Graph:\n");
|
graph.print("Factor Graph:\n");
|
||||||
|
|
||||||
// Create the data structure to hold the initialEstimate estimate to the solution
|
// Create the data structure to hold the initial estimate to the solution
|
||||||
// Intentionally initialize the variables off from the ground truth
|
// Intentionally initialize the variables off from the ground truth
|
||||||
Values initialEstimate;
|
Values initialEstimate;
|
||||||
for (size_t i = 0; i < poses.size(); ++i)
|
for (size_t i = 0; i < poses.size(); ++i)
|
||||||
|
|
Loading…
Reference in New Issue