diff --git a/gtsam/slam/SmartProjectionFactorP.h b/gtsam/slam/SmartProjectionFactorP.h index 370df31bb..4cfe87513 100644 --- a/gtsam/slam/SmartProjectionFactorP.h +++ b/gtsam/slam/SmartProjectionFactorP.h @@ -61,7 +61,7 @@ class SmartProjectionFactorP : public SmartProjectionFactor { protected: /// vector of keys (one for each observation) with potentially repeated keys - std::vector nonUniqueKeys_; + KeyVector nonUniqueKeys_; /// shared pointer to calibration object (one for each observation) std::vector > K_all_; @@ -134,7 +134,7 @@ class SmartProjectionFactorP : public SmartProjectionFactor { * @param Ks vector of (fixed) intrinsic calibration objects * @param body_P_sensors vector of (fixed) extrinsic calibration objects */ - void add(const MEASUREMENTS& measurements, const std::vector& poseKeys, + void add(const MEASUREMENTS& measurements, const KeyVector& poseKeys, const std::vector>& Ks, const std::vector body_P_sensors = std::vector()) { assert(poseKeys.size() == measurements.size()); @@ -159,7 +159,7 @@ class SmartProjectionFactorP : public SmartProjectionFactor { } /// return (for each observation) the (possibly non unique) keys involved in the measurements - const std::vector nonUniqueKeys() const { + const KeyVector nonUniqueKeys() const { return nonUniqueKeys_; } diff --git a/gtsam/slam/tests/testSmartProjectionFactorP.cpp b/gtsam/slam/tests/testSmartProjectionFactorP.cpp index 92172c520..8b6337cb4 100644 --- a/gtsam/slam/tests/testSmartProjectionFactorP.cpp +++ b/gtsam/slam/tests/testSmartProjectionFactorP.cpp @@ -833,7 +833,7 @@ TEST( SmartProjectionFactorP, hessianComparedToProjFactors_measurementsFromSameP measurements_lmk1_redundant.push_back(measurements_lmk1.at(0)); // we readd the first measurement // create inputs - std::vector keys; + KeyVector keys; keys.push_back(x1); keys.push_back(x2); keys.push_back(x3); @@ -960,7 +960,7 @@ TEST( SmartProjectionFactorP, optimization_3poses_measurementsFromSamePose ) { projectToMultipleCameras(cam1, cam2, cam3, landmark3, measurements_lmk3); // create inputs - std::vector keys; + KeyVector keys; keys.push_back(x1); keys.push_back(x2); keys.push_back(x3); @@ -974,7 +974,7 @@ TEST( SmartProjectionFactorP, optimization_3poses_measurementsFromSamePose ) { // make sure the redundancy in the keys does not create problems) Camera::MeasurementVector& measurements_lmk1_redundant = measurements_lmk1; measurements_lmk1_redundant.push_back(measurements_lmk1.at(0)); // we readd the first measurement - std::vector keys_redundant = keys; + KeyVector keys_redundant = keys; keys_redundant.push_back(keys.at(0)); // we readd the first key std::vector < boost::shared_ptr < Cal3_S2 >> sharedKs_redundant = sharedKs; sharedKs_redundant.push_back(sharedK);// we readd the first calibration @@ -1096,7 +1096,7 @@ TEST( SmartProjectionFactorP, optimization_3poses_sphericalCamera ) { projectToMultipleCameras(cam1, cam2, cam3, landmark3, measurements_lmk3); // create inputs - std::vector keys; + KeyVector keys; keys.push_back(x1); keys.push_back(x2); keys.push_back(x3);