vector<Key> -> keyVector
parent
bd10fcb0ea
commit
02c7d86dfc
|
@ -61,7 +61,7 @@ class SmartProjectionFactorP : public SmartProjectionFactor<CAMERA> {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// vector of keys (one for each observation) with potentially repeated keys
|
/// vector of keys (one for each observation) with potentially repeated keys
|
||||||
std::vector<Key> nonUniqueKeys_;
|
KeyVector nonUniqueKeys_;
|
||||||
|
|
||||||
/// shared pointer to calibration object (one for each observation)
|
/// shared pointer to calibration object (one for each observation)
|
||||||
std::vector<boost::shared_ptr<CALIBRATION> > K_all_;
|
std::vector<boost::shared_ptr<CALIBRATION> > K_all_;
|
||||||
|
@ -134,7 +134,7 @@ class SmartProjectionFactorP : public SmartProjectionFactor<CAMERA> {
|
||||||
* @param Ks vector of (fixed) intrinsic calibration objects
|
* @param Ks vector of (fixed) intrinsic calibration objects
|
||||||
* @param body_P_sensors vector of (fixed) extrinsic calibration objects
|
* @param body_P_sensors vector of (fixed) extrinsic calibration objects
|
||||||
*/
|
*/
|
||||||
void add(const MEASUREMENTS& measurements, const std::vector<Key>& poseKeys,
|
void add(const MEASUREMENTS& measurements, const KeyVector& poseKeys,
|
||||||
const std::vector<boost::shared_ptr<CALIBRATION>>& Ks,
|
const std::vector<boost::shared_ptr<CALIBRATION>>& Ks,
|
||||||
const std::vector<Pose3> body_P_sensors = std::vector<Pose3>()) {
|
const std::vector<Pose3> body_P_sensors = std::vector<Pose3>()) {
|
||||||
assert(poseKeys.size() == measurements.size());
|
assert(poseKeys.size() == measurements.size());
|
||||||
|
@ -159,7 +159,7 @@ class SmartProjectionFactorP : public SmartProjectionFactor<CAMERA> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// return (for each observation) the (possibly non unique) keys involved in the measurements
|
/// return (for each observation) the (possibly non unique) keys involved in the measurements
|
||||||
const std::vector<Key> nonUniqueKeys() const {
|
const KeyVector nonUniqueKeys() const {
|
||||||
return nonUniqueKeys_;
|
return nonUniqueKeys_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -833,7 +833,7 @@ TEST( SmartProjectionFactorP, hessianComparedToProjFactors_measurementsFromSameP
|
||||||
measurements_lmk1_redundant.push_back(measurements_lmk1.at(0)); // we readd the first measurement
|
measurements_lmk1_redundant.push_back(measurements_lmk1.at(0)); // we readd the first measurement
|
||||||
|
|
||||||
// create inputs
|
// create inputs
|
||||||
std::vector<Key> keys;
|
KeyVector keys;
|
||||||
keys.push_back(x1);
|
keys.push_back(x1);
|
||||||
keys.push_back(x2);
|
keys.push_back(x2);
|
||||||
keys.push_back(x3);
|
keys.push_back(x3);
|
||||||
|
@ -960,7 +960,7 @@ TEST( SmartProjectionFactorP, optimization_3poses_measurementsFromSamePose ) {
|
||||||
projectToMultipleCameras(cam1, cam2, cam3, landmark3, measurements_lmk3);
|
projectToMultipleCameras(cam1, cam2, cam3, landmark3, measurements_lmk3);
|
||||||
|
|
||||||
// create inputs
|
// create inputs
|
||||||
std::vector<Key> keys;
|
KeyVector keys;
|
||||||
keys.push_back(x1);
|
keys.push_back(x1);
|
||||||
keys.push_back(x2);
|
keys.push_back(x2);
|
||||||
keys.push_back(x3);
|
keys.push_back(x3);
|
||||||
|
@ -974,7 +974,7 @@ TEST( SmartProjectionFactorP, optimization_3poses_measurementsFromSamePose ) {
|
||||||
// make sure the redundancy in the keys does not create problems)
|
// make sure the redundancy in the keys does not create problems)
|
||||||
Camera::MeasurementVector& measurements_lmk1_redundant = measurements_lmk1;
|
Camera::MeasurementVector& measurements_lmk1_redundant = measurements_lmk1;
|
||||||
measurements_lmk1_redundant.push_back(measurements_lmk1.at(0)); // we readd the first measurement
|
measurements_lmk1_redundant.push_back(measurements_lmk1.at(0)); // we readd the first measurement
|
||||||
std::vector<Key> keys_redundant = keys;
|
KeyVector keys_redundant = keys;
|
||||||
keys_redundant.push_back(keys.at(0)); // we readd the first key
|
keys_redundant.push_back(keys.at(0)); // we readd the first key
|
||||||
std::vector < boost::shared_ptr < Cal3_S2 >> sharedKs_redundant = sharedKs;
|
std::vector < boost::shared_ptr < Cal3_S2 >> sharedKs_redundant = sharedKs;
|
||||||
sharedKs_redundant.push_back(sharedK);// we readd the first calibration
|
sharedKs_redundant.push_back(sharedK);// we readd the first calibration
|
||||||
|
@ -1096,7 +1096,7 @@ TEST( SmartProjectionFactorP, optimization_3poses_sphericalCamera ) {
|
||||||
projectToMultipleCameras<Camera>(cam1, cam2, cam3, landmark3, measurements_lmk3);
|
projectToMultipleCameras<Camera>(cam1, cam2, cam3, landmark3, measurements_lmk3);
|
||||||
|
|
||||||
// create inputs
|
// create inputs
|
||||||
std::vector<Key> keys;
|
KeyVector keys;
|
||||||
keys.push_back(x1);
|
keys.push_back(x1);
|
||||||
keys.push_back(x2);
|
keys.push_back(x2);
|
||||||
keys.push_back(x3);
|
keys.push_back(x3);
|
||||||
|
|
Loading…
Reference in New Issue