From 3ba9e8f405f0eb93fb13892eb8cf3ca32b225f15 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Sun, 23 Nov 2014 15:24:55 -0800 Subject: [PATCH] Updated some usages that were missed --- examples/Pose2SLAMExample_g2o.cpp | 2 +- examples/Pose2SLAMExample_lago.cpp | 2 +- gtsam/geometry/tests/testRot3.cpp | 4 ++-- gtsam/slam/lago.cpp | 2 +- gtsam/slam/tests/testLago.cpp | 4 ++-- gtsam_unstable/slam/EquivInertialNavFactor_GlobalVel.h | 2 +- gtsam_unstable/slam/InertialNavFactor_GlobalVelocity.h | 2 +- .../timing/timeInertialNavFactor_GlobalVelocity.cpp | 6 +++--- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/Pose2SLAMExample_g2o.cpp b/examples/Pose2SLAMExample_g2o.cpp index 4ca0074d2..564930d74 100644 --- a/examples/Pose2SLAMExample_g2o.cpp +++ b/examples/Pose2SLAMExample_g2o.cpp @@ -64,7 +64,7 @@ int main(const int argc, const char *argv[]) { // Add prior on the pose having index (key) = 0 NonlinearFactorGraph graphWithPrior = *graph; noiseModel::Diagonal::shared_ptr priorModel = // - noiseModel::Diagonal::Variances((Vector(3) << 1e-6, 1e-6, 1e-8).finished()); + noiseModel::Diagonal::Variances(Vector3(1e-6, 1e-6, 1e-8)); graphWithPrior.add(PriorFactor(0, Pose2(), priorModel)); std::cout << "Adding prior on pose 0 " << std::endl; diff --git a/examples/Pose2SLAMExample_lago.cpp b/examples/Pose2SLAMExample_lago.cpp index f83babdc5..9507797eb 100644 --- a/examples/Pose2SLAMExample_lago.cpp +++ b/examples/Pose2SLAMExample_lago.cpp @@ -43,7 +43,7 @@ int main(const int argc, const char *argv[]) { // Add prior on the pose having index (key) = 0 NonlinearFactorGraph graphWithPrior = *graph; noiseModel::Diagonal::shared_ptr priorModel = // - noiseModel::Diagonal::Variances((Vector(3) << 1e-6, 1e-6, 1e-8).finished()); + noiseModel::Diagonal::Variances(Vector3(1e-6, 1e-6, 1e-8)); graphWithPrior.add(PriorFactor(0, Pose2(), priorModel)); graphWithPrior.print(); diff --git a/gtsam/geometry/tests/testRot3.cpp b/gtsam/geometry/tests/testRot3.cpp index 2737aa38a..358524488 100644 --- a/gtsam/geometry/tests/testRot3.cpp +++ b/gtsam/geometry/tests/testRot3.cpp @@ -499,7 +499,7 @@ TEST( Rot3, RQ) /* ************************************************************************* */ TEST( Rot3, expmapStability ) { - Vector w = (Vector(3) << 78e-9, 5e-8, 97e-7).finished(); + Vector w = Vector3(78e-9, 5e-8, 97e-7); double theta = w.norm(); double theta2 = theta*theta; Rot3 actualR = Rot3::Expmap(w); @@ -515,7 +515,7 @@ TEST( Rot3, expmapStability ) { /* ************************************************************************* */ TEST( Rot3, logmapStability ) { - Vector w = (Vector(3) << 1e-8, 0.0, 0.0).finished(); + Vector w = Vector3(1e-8, 0.0, 0.0); Rot3 R = Rot3::Expmap(w); // double tr = R.r1().x()+R.r2().y()+R.r3().z(); // std::cout.precision(5000); diff --git a/gtsam/slam/lago.cpp b/gtsam/slam/lago.cpp index 3f50a8240..b2528b9d8 100644 --- a/gtsam/slam/lago.cpp +++ b/gtsam/slam/lago.cpp @@ -37,7 +37,7 @@ static const Key keyAnchor = symbol('Z', 9999999); static const noiseModel::Diagonal::shared_ptr priorOrientationNoise = noiseModel::Diagonal::Sigmas((Vector(1) << 0).finished()); static const noiseModel::Diagonal::shared_ptr priorPose2Noise = - noiseModel::Diagonal::Variances((Vector(3) << 1e-6, 1e-6, 1e-8).finished()); + noiseModel::Diagonal::Variances(Vector3(1e-6, 1e-6, 1e-8)); /* ************************************************************************* */ /** diff --git a/gtsam/slam/tests/testLago.cpp b/gtsam/slam/tests/testLago.cpp index e889cd1f3..2d1793417 100644 --- a/gtsam/slam/tests/testLago.cpp +++ b/gtsam/slam/tests/testLago.cpp @@ -265,7 +265,7 @@ TEST( Lago, largeGraphNoisy_orientations ) { // Add prior on the pose having index (key) = 0 NonlinearFactorGraph graphWithPrior = *g; - noiseModel::Diagonal::shared_ptr priorModel = noiseModel::Diagonal::Variances((Vector(3) << 1e-2, 1e-2, 1e-4).finished()); + noiseModel::Diagonal::shared_ptr priorModel = noiseModel::Diagonal::Variances(Vector3(1e-2, 1e-2, 1e-4)); graphWithPrior.add(PriorFactor(0, Pose2(), priorModel)); VectorValues actualVV = lago::initializeOrientations(graphWithPrior); @@ -300,7 +300,7 @@ TEST( Lago, largeGraphNoisy ) { // Add prior on the pose having index (key) = 0 NonlinearFactorGraph graphWithPrior = *g; - noiseModel::Diagonal::shared_ptr priorModel = noiseModel::Diagonal::Variances((Vector(3) << 1e-2, 1e-2, 1e-4).finished()); + noiseModel::Diagonal::shared_ptr priorModel = noiseModel::Diagonal::Variances(Vector3(1e-2, 1e-2, 1e-4)); graphWithPrior.add(PriorFactor(0, Pose2(), priorModel)); Values actual = lago::initialize(graphWithPrior); diff --git a/gtsam_unstable/slam/EquivInertialNavFactor_GlobalVel.h b/gtsam_unstable/slam/EquivInertialNavFactor_GlobalVel.h index 6730a5218..614521e76 100644 --- a/gtsam_unstable/slam/EquivInertialNavFactor_GlobalVel.h +++ b/gtsam_unstable/slam/EquivInertialNavFactor_GlobalVel.h @@ -614,7 +614,7 @@ public: Rot3 R_ECEF_to_ENU( UEN_to_ENU * C2 * C1 ); - Vector omega_earth_ECEF((Vector(3) << 0.0, 0.0, 7.292115e-5).finished()); + Vector omega_earth_ECEF(Vector3(0.0, 0.0, 7.292115e-5)); omega_earth_ENU = R_ECEF_to_ENU.matrix() * omega_earth_ECEF; // Calculating g diff --git a/gtsam_unstable/slam/InertialNavFactor_GlobalVelocity.h b/gtsam_unstable/slam/InertialNavFactor_GlobalVelocity.h index d1a1faddd..805c0a71a 100644 --- a/gtsam_unstable/slam/InertialNavFactor_GlobalVelocity.h +++ b/gtsam_unstable/slam/InertialNavFactor_GlobalVelocity.h @@ -347,7 +347,7 @@ public: Rot3 R_ECEF_to_ENU( UEN_to_ENU * C2 * C1 ); - Vector omega_earth_ECEF((Vector(3) << 0.0, 0.0, 7.292115e-5).finished()); + Vector omega_earth_ECEF(Vector3(0.0, 0.0, 7.292115e-5)); omega_earth_ENU = R_ECEF_to_ENU.matrix() * omega_earth_ECEF; // Calculating g diff --git a/gtsam_unstable/timing/timeInertialNavFactor_GlobalVelocity.cpp b/gtsam_unstable/timing/timeInertialNavFactor_GlobalVelocity.cpp index 5227f8786..39481f929 100644 --- a/gtsam_unstable/timing/timeInertialNavFactor_GlobalVelocity.cpp +++ b/gtsam_unstable/timing/timeInertialNavFactor_GlobalVelocity.cpp @@ -31,7 +31,7 @@ gtsam::Rot3 world_R_ECEF( 0.85173, -0.52399, 0, 0.41733, 0.67835, -0.60471); -gtsam::Vector ECEF_omega_earth((Vector(3) << 0.0, 0.0, 7.292115e-5).finished()); +gtsam::Vector ECEF_omega_earth(Vector3(0.0, 0.0, 7.292115e-5)); gtsam::Vector world_omega_earth(world_R_ECEF.matrix() * ECEF_omega_earth); /* ************************************************************************* */ @@ -54,8 +54,8 @@ int main() { double measurement_dt(0.1); Vector world_g(Vector3(0.0, 0.0, 9.81)); - Vector world_rho((Vector(3) << 0.0, -1.5724e-05, 0.0).finished()); // NED system - gtsam::Vector ECEF_omega_earth((Vector(3) << 0.0, 0.0, 7.292115e-5).finished()); + Vector world_rho(Vector3(0.0, -1.5724e-05, 0.0)); // NED system + gtsam::Vector ECEF_omega_earth(Vector3(0.0, 0.0, 7.292115e-5)); gtsam::Vector world_omega_earth(world_R_ECEF.matrix() * ECEF_omega_earth); SharedGaussian model(noiseModel::Isotropic::Sigma(9, 0.1));