31 #define DISABLE_TIMING 37 static const double sigma = 0.1;
69 std::shared_ptr<Cameras> cameraRig(
new Cameras());
78 std::shared_ptr<Cameras> cameraRig(
new Cameras());
89 std::shared_ptr<Cameras> cameraRig(
new Cameras());
99 std::shared_ptr<Cameras> cameraRig(
new Cameras());
112 std::shared_ptr<Cameras> cameraRig(
new Cameras());
140 std::shared_ptr<Cameras> cameraRig(
new Cameras());
144 factor.
add(level_uv,
x1);
145 factor.
add(level_uv_right,
x2);
151 double actualError = factor.
error(values);
152 double expectedError = 0.0;
160 std::function<Vector(Point3)>
f =
161 std::bind(&SmartRigFactor::whitenedError<Point3>, factor, cameras,
162 std::placeholders::_1);
188 double actualError3 = b.squaredNorm();
197 std::shared_ptr<Cameras> cameraRig(
new Cameras());
201 Point2 pixelError(0.2, 0.2);
209 values.
insert(
x2, pose_right.compose(noise_pose));
213 factor->add(level_uv,
x1, cameraId1);
214 factor->add(level_uv_right,
x2, cameraId1);
216 double actualError1 = factor->error(values);
223 measurements.push_back(level_uv);
224 measurements.push_back(level_uv_right);
229 factor2->add(measurements, views, cameraIds);
230 double actualError2 = factor2->error(values);
239 Pose3 body_T_sensor =
241 std::shared_ptr<Cameras> cameraRig(
new Cameras());
246 Pose3 wTb1 =
cam1.pose() * sensor_T_body;
253 Point2Vector measurements_cam1, measurements_cam2, measurements_cam3;
275 smartFactor2.
add(measurements_cam2, views);
278 smartFactor3.
add(measurements_cam3, views);
280 const SharedDiagonal noisePrior = noiseModel::Isotropic::Sigma(6, 0.10);
294 gtValues.
insert(x3, wTb3);
295 double actualError = graph.
error(gtValues);
296 double expectedError = 0.0;
306 values.
insert(x3, wTb3 * noise_pose);
320 Pose3 body_T_sensor1 =
322 Pose3 body_T_sensor2 =
326 std::shared_ptr<Cameras> cameraRig(
new Cameras());
335 Pose3 wTb1 =
cam1.pose() * sensor_T_body1;
342 Point2Vector measurements_cam1, measurements_cam2, measurements_cam3;
359 smartFactor1.
add(measurements_cam1, views, cameraIds);
362 smartFactor2.
add(measurements_cam2, views, cameraIds);
365 smartFactor3.
add(measurements_cam3, views, cameraIds);
367 const SharedDiagonal noisePrior = noiseModel::Isotropic::Sigma(6, 0.10);
381 gtValues.
insert(x3, wTb3);
382 double actualError = graph.
error(gtValues);
383 double expectedError = 0.0;
393 values.
insert(x3, wTb3 * noise_pose);
405 Point2Vector measurements_cam1, measurements_cam2, measurements_cam3;
407 std::shared_ptr<Cameras> cameraRig(
new Cameras());
425 smartFactor1->add(measurements_cam1, views, cameraIds);
429 smartFactor2->add(measurements_cam2, views, cameraIds);
433 smartFactor3->add(measurements_cam3, views, cameraIds);
435 const SharedDiagonal noisePrior = noiseModel::Isotropic::Sigma(6, 0.10);
459 values.
insert(x3, pose_above * noise_pose);
461 Pose3(
Rot3(0, -0.0314107591, 0.99950656, -0.99950656, -0.0313952598,
462 -0.000986635786, 0.0314107591, -0.999013364, -0.0313952598),
488 measurements_cam1.push_back(
cam1.project(landmark1));
489 measurements_cam1.push_back(cam2.project(landmark1));
495 std::shared_ptr<Cameras> cameraRig(
new Cameras());
500 smartFactor1->add(measurements_cam1,
504 cameras.push_back(
cam1);
505 cameras.push_back(cam2);
508 CHECK(smartFactor1->triangulateSafe(cameras));
509 CHECK(!smartFactor1->isDegenerate());
510 CHECK(!smartFactor1->isPointBehindCamera());
511 auto p = smartFactor1->point();
519 zeroDelta.
insert(x2, delta);
524 perturbedDelta.
insert(x2, delta);
525 double expectedError = 2500;
530 A1 << -10, 0, 0, 0, 1, 0;
531 A2 << 10, 0, 1, 0, -1, 0;
534 Matrix expectedInformation;
537 Matrix66 G11 = 0.5 * A1.transpose() *
A1;
538 Matrix66 G12 = 0.5 * A1.transpose() * A2;
539 Matrix66 G22 = 0.5 * A2.transpose() * A2;
553 values.
insert(x2, cam2.pose());
555 std::shared_ptr<RegularHessianFactor<6>> actual =
556 smartFactor1->createHessianFactor(values, 0.0);
570 Point2Vector measurements_cam1, measurements_cam2, measurements_cam3;
578 std::shared_ptr<Cameras> cameraRig(
new Cameras());
583 smartFactor1->add(measurements_cam1, views, cameraIds);
587 smartFactor2->add(measurements_cam2, views, cameraIds);
591 smartFactor3->add(measurements_cam3, views, cameraIds);
593 const SharedDiagonal noisePrior = noiseModel::Isotropic::Sigma(6, 0.10);
611 values.
insert(x3, pose_above * noise_pose);
613 -0.99950656, -0.0313952598, -0.000986635786,
614 0.0314107591, -0.999013364, -0.0313952598),
628 double excludeLandmarksFutherThanDist = 2;
632 Point2Vector measurements_cam1, measurements_cam2, measurements_cam3;
646 std::shared_ptr<Cameras> cameraRig(
new Cameras());
652 smartFactor1->add(measurements_cam1, views, cameraIds);
656 smartFactor2->add(measurements_cam2, views, cameraIds);
660 smartFactor3->add(measurements_cam3, views, cameraIds);
662 const SharedDiagonal noisePrior = noiseModel::Isotropic::Sigma(6, 0.10);
678 values.
insert(x3, pose_above * noise_pose);
691 double excludeLandmarksFutherThanDist = 1e10;
692 double dynamicOutlierRejectionThreshold =
698 Point3 landmark4(5, -0.5, 1);
700 Point2Vector measurements_cam1, measurements_cam2, measurements_cam3,
708 measurements_cam4.at(0) =
709 measurements_cam4.at(0) +
Point2(10, 10);
717 std::shared_ptr<Cameras> cameraRig(
new Cameras());
723 smartFactor1->add(measurements_cam1, views, cameraIds);
727 smartFactor2->add(measurements_cam2, views, cameraIds);
731 smartFactor3->add(measurements_cam3, views, cameraIds);
735 smartFactor4->add(measurements_cam4, views, cameraIds);
737 const SharedDiagonal noisePrior = noiseModel::Isotropic::Sigma(6, 0.10);
768 Pose3
pose3 = pose2 * Pose3(Rot3::RzRyRx(-0.05, 0.0, -0.05),
Point3(0, 0, 0));
772 Point2Vector measurements_cam1, measurements_cam2, measurements_cam3;
783 std::shared_ptr<Cameras> cameraRig(
new Cameras());
789 smartFactor1->add(measurements_cam1, views, cameraIds);
793 smartFactor2->add(measurements_cam2, views, cameraIds);
797 smartFactor3->add(measurements_cam3, views, cameraIds);
806 Pose3 noise_pose = Pose3(Rot3::Ypr(-
M_PI / 100, 0., -
M_PI / 100),
813 values.
insert(x3, pose3 * noise_pose);
815 -0.991390265, -0.130426831, -0.0115837907,
816 0.130819108, -0.98278564, -0.130455917),
817 Point3(0.0897734171, -0.110201006, 0.901022872)),
818 values.
at<Pose3>(x3)));
820 std::shared_ptr<GaussianFactor>
factor1 = smartFactor1->linearize(values);
821 std::shared_ptr<GaussianFactor>
factor2 = smartFactor2->linearize(values);
822 std::shared_ptr<GaussianFactor>
factor3 = smartFactor3->linearize(values);
824 Matrix CumulativeInformation =
825 factor1->information() + factor2->information() + factor3->information();
827 std::shared_ptr<GaussianFactorGraph> GaussianGraph =
829 Matrix GraphInformation = GaussianGraph->hessian().first;
834 Matrix AugInformationMatrix = factor1->augmentedInformation() +
835 factor2->augmentedInformation() +
836 factor3->augmentedInformation();
839 Vector InfoVector = AugInformationMatrix.block(
856 measurements_cam1.push_back(cam1_uv1);
857 measurements_cam1.push_back(cam2_uv1);
859 std::shared_ptr<Cameras> cameraRig(
new Cameras());
869 smartFactor1->add(measurements_cam1, views, cameraIds);
877 std::shared_ptr<GaussianFactor> factor = smartFactor1->linearize(values);
889 std::shared_ptr<Cameras> cameraRig(
new Cameras());
906 Point3 landmark3(3, 0, 3.0);
908 Point2Vector measurements_cam1, measurements_cam2, measurements_cam3;
917 std::shared_ptr<Cameras> cameraRig(
new Cameras());
923 smartFactor1->add(measurements_cam1, views, cameraIds);
927 smartFactor2->add(measurements_cam2, views, cameraIds);
931 smartFactor3->add(measurements_cam3, views, cameraIds);
933 const SharedDiagonal noisePrior = noiseModel::Isotropic::Sigma(6, 0.10);
951 values.
insert(x3, pose_above * noise_pose);
953 Pose3(
Rot3(0, -0.0314107591, 0.99950656, -0.99950656, -0.0313952598,
954 -0.000986635786, 0.0314107591, -0.999013364, -0.0313952598),
969 hessianComparedToProjFactors_measurementsFromSamePose) {
982 measurements_lmk1_redundant.push_back(
983 measurements_lmk1.at(0));
988 std::shared_ptr<Cameras> cameraRig(
new Cameras());
994 smartFactor1->add(measurements_lmk1_redundant,
keys, cameraIds);
1003 values.
insert(
x3, pose_above * noise_pose);
1006 -0.0313952598, -0.000986635786, 0.0314107591,
1007 -0.999013364, -0.0313952598),
1018 std::shared_ptr<GaussianFactor> linearfactor1 =
1019 smartFactor1->linearize(values);
1020 Matrix actualHessian = linearfactor1->information();
1024 smartFactor1->triangulateSafe(smartFactor1->cameras(values));
1029 Matrix F = Matrix::Zero(2 * 4, 6 * 3);
1030 Matrix E = Matrix::Zero(2 * 4, 3);
1031 Vector b = Vector::Zero(2 * 4);
1034 TestProjectionFactor factor11(measurements_lmk1_redundant[0],
model, x1,
l0,
1036 Matrix HPoseActual, HEActual;
1040 -factor11.
evaluateError(pose1, *point, HPoseActual, HEActual);
1041 F.block<2, 6>(0, 0) = HPoseActual;
1042 E.block<2, 3>(0, 0) = HEActual;
1044 TestProjectionFactor factor12(measurements_lmk1_redundant[1],
model,
x2,
l0,
1047 -factor12.
evaluateError(pose2, *point, HPoseActual, HEActual);
1048 F.block<2, 6>(2, 6) = HPoseActual;
1049 E.block<2, 3>(2, 0) = HEActual;
1051 TestProjectionFactor factor13(measurements_lmk1_redundant[2],
model,
x3,
l0,
1054 -factor13.
evaluateError(pose3, *point, HPoseActual, HEActual);
1055 F.block<2, 6>(4, 12) = HPoseActual;
1056 E.block<2, 3>(4, 0) = HEActual;
1058 TestProjectionFactor factor14(measurements_lmk1_redundant[3],
model, x1,
l0,
1061 -factor11.
evaluateError(pose1, *point, HPoseActual, HEActual);
1062 F.block<2, 6>(6, 0) = HPoseActual;
1063 E.block<2, 3>(6, 0) = HEActual;
1066 F = (1 /
sigma) * F;
1067 E = (1 /
sigma) * E;
1068 b = (1 /
sigma) * b;
1072 F.transpose() * F - (F.transpose() * E * P * E.transpose() *
F);
1077 gfg.
add(linearfactor1);
1088 Vector expectedInfoVector = F.transpose() * (b - E * P * E.transpose() *
b);
1093 nfg_projFactors.
add(factor11);
1094 nfg_projFactors.
add(factor12);
1095 nfg_projFactors.
add(factor13);
1096 nfg_projFactors.
add(factor14);
1099 double actualError = smartFactor1->error(values);
1100 double expectedError = nfg_projFactors.
error(values);
1107 Point2Vector measurements_lmk1, measurements_lmk2, measurements_lmk3;
1116 std::shared_ptr<Cameras> cameraRig(
new Cameras());
1125 measurements_lmk1_redundant.push_back(
1126 measurements_lmk1.at(0));
1128 keys_redundant.push_back(
keys.at(0));
1132 smartFactor1->add(measurements_lmk1_redundant, keys_redundant,
1133 cameraIdsRedundant);
1137 smartFactor2->add(measurements_lmk2,
keys, cameraIds);
1141 smartFactor3->add(measurements_lmk3,
keys, cameraIds);
1143 const SharedDiagonal noisePrior = noiseModel::Isotropic::Sigma(6, 0.10);
1154 groundTruth.
insert(
x2, pose_right);
1155 groundTruth.
insert(x3, pose_above);
1167 values.
insert(x3, pose_above * noise_pose);
1170 -0.0313952598, -0.000986635786, 0.0314107591,
1171 -0.999013364, -0.0313952598),
1181 #ifndef DISABLE_TIMING 1196 Rot3 R = Rot3::Identity();
1202 std::shared_ptr<Cameras> cameraRig(
new Cameras());
1203 cameraRig->push_back(
Camera(body_P_sensorId, sharedKSimple));
1211 measurements_lmk1.push_back(
cam1.project(landmark1));
1212 measurements_lmk1.push_back(cam2.project(landmark1));
1214 size_t nrTests = 10000;
1216 for (
size_t i = 0;
i < nrTests;
i++) {
1219 smartRigFactor->add(measurements_lmk1[0],
x1, cameraId1);
1220 smartRigFactor->add(measurements_lmk1[1],
x1, cameraId1);
1225 gttic_(SmartRigFactor_LINEARIZE);
1226 smartRigFactor->linearize(values);
1227 gttoc_(SmartRigFactor_LINEARIZE);
1230 for (
size_t i = 0;
i < nrTests;
i++) {
1233 smartFactor->add(measurements_lmk1[0],
x1);
1234 smartFactor->add(measurements_lmk1[1],
x2);
1239 gttic_(SmartPoseFactor_LINEARIZE);
1240 smartFactor->linearize(values);
1241 gttoc_(SmartPoseFactor_LINEARIZE);
1248 TEST(SmartProjectionFactorP, optimization_3poses_sphericalCamera) {
1258 projectToMultipleCameras<Camera>(
cam1,
cam2,
cam3, landmark3,
1267 std::shared_ptr<Cameras> cameraRig(
new Cameras());
1277 smartFactor1->add(measurements_lmk1, keys);
1281 smartFactor2->add(measurements_lmk2, keys);
1285 smartFactor3->add(measurements_lmk3, keys);
1287 const SharedDiagonal noisePrior = noiseModel::Isotropic::Sigma(6, 0.10);
1298 groundTruth.
insert(
x2, pose_right);
1299 groundTruth.
insert(
x3, pose_above);
1310 values.
insert(
x3, pose_above * noise_pose);
1321 #ifndef DISABLE_TIMING 1329 TEST(SmartProjectionFactorP, timing_sphericalCamera) {
1331 Rot3 R = Rot3::Identity();
1339 SphericalCamera cam1_sphere(pose1, emptyK), cam2_sphere(pose2, emptyK);
1341 std::vector<Unit3> measurements_lmk1_sphere;
1342 measurements_lmk1_sphere.push_back(cam1_sphere.project(landmark1));
1343 measurements_lmk1_sphere.push_back(cam2_sphere.
project(landmark1));
1349 std::vector<Point2> measurements_lmk1;
1350 measurements_lmk1.push_back(
cam1.project(landmark1));
1351 measurements_lmk1.push_back(cam2.
project(landmark1));
1357 size_t nrTests = 1000;
1359 for (
size_t i = 0;
i < nrTests;
i++) {
1360 std::shared_ptr<CameraSet<SphericalCamera>> cameraRig(
1367 smartFactorP->
add(measurements_lmk1_sphere[0],
x1);
1368 smartFactorP->
add(measurements_lmk1_sphere[1],
x1);
1373 gttic_(SmartFactorP_spherical_LINEARIZE);
1375 gttoc_(SmartFactorP_spherical_LINEARIZE);
1378 for (
size_t i = 0;
i < nrTests;
i++) {
1379 std::shared_ptr<CameraSet<PinholePose<Cal3_S2>>> cameraRig(
1386 smartFactorP2->
add(measurements_lmk1[0],
x1);
1387 smartFactorP2->
add(measurements_lmk1[1],
x1);
1392 gttic_(SmartFactorP_pinhole_LINEARIZE);
1394 gttoc_(SmartFactorP_pinhole_LINEARIZE);
1401 TEST(SmartProjectionFactorP, 2poses_rankTol) {
1403 Rot3::Ypr(-
M_PI / 2, 0., -
M_PI / 2),
1422 std::shared_ptr<CameraSet<PinholePose<Cal3_S2>>> cameraRig(
1428 smartFactor1->add(cam1.project(landmarkL),
x1);
1429 smartFactor1->add(cam2.project(landmarkL),
x2);
1450 new Cal3_S2(1.0, 1.0, 0.0, 0.0, 0.0));
1460 std::shared_ptr<CameraSet<PinholePose<Cal3_S2>>> cameraRig(
1466 smartFactor1->add(cam1.project(landmarkL),
x1);
1467 smartFactor1->add(cam2.project(landmarkL),
x2);
1479 EXPECT(point.degenerate());
1487 new Cal3_S2(1.0, 1.0, 0.0, 0.0, 0.0));
1497 std::shared_ptr<CameraSet<PinholePose<Cal3_S2>>> cameraRig(
1503 smartFactor1->add(cam1.project(landmarkL),
x1);
1504 smartFactor1->add(cam2.project(landmarkL),
x2);
1522 TEST(SmartProjectionFactorP, 2poses_sphericalCamera_rankTol) {
1527 Rot3::Ypr(-
M_PI / 2, 0., -
M_PI / 2),
1536 std::shared_ptr<CameraSet<SphericalCamera>> cameraRig(
1550 smartFactor1->add(cam1.project(landmarkL),
x1);
1551 smartFactor1->add(cam2.project(landmarkL),
x2);
1563 EXPECT(point.degenerate());
1578 smartFactor1->add(cam1.project(landmarkL),
x1);
1579 smartFactor1->add(cam2.project(landmarkL),
x2);
void computeJacobians(FBlocks &Fs, Matrix &E, Vector &b, const Cameras &cameras, const POINT &point) const
bool triangulateAndComputeE(Matrix &E, const Cameras &cameras) const
static PinholeCamera< Cal3_S2 > cam1(pose3, cal1)
virtual const Values & optimize()
Camera cam3(interp_pose3, sharedK)
static int runAllTests(TestResult &result)
SmartProjectionParams params(gtsam::HESSIAN, gtsam::ZERO_ON_DEGENERACY)
const ValueType at(Key j) const
static StereoCamera cam2(pose3, cal4ptr)
#define DOUBLES_EQUAL(expected, actual, threshold)
IsDerived< DERIVEDFACTOR > push_back(std::shared_ptr< DERIVEDFACTOR > factor)
Add a factor directly using a shared_ptr.
static const Camera level_camera(level_pose, K2)
SmartProjectionRigFactor< Camera > SmartFactorP
void setEnableEPI(bool enableEPI)
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
CameraSet< Camera > Cameras
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
std::vector< MatrixZD, Eigen::aligned_allocator< MatrixZD > > FBlocks
Rot2 R(Rot2::fromAngle(0.1))
noiseModel::Isotropic::shared_ptr SharedIsotropic
static const std::shared_ptr< Cal3Bundler > sharedBundlerK(new Cal3Bundler(500, 1e-3, 1e-3, 1000, 2000))
Some functions to compute numerical derivatives.
iterator insert(const std::pair< Key, Vector > &key_value)
static const Camera level_camera_right(pose_right, K2)
static SharedIsotropic model(noiseModel::Isotropic::Sigma(2, sigma))
NonlinearFactorGraph graph
A set of cameras, all with their own calibration.
Point2 landmark1(5.0, 1.5)
Unit3 project(const Point3 &point, OptionalJacobian< 2, 6 > Dpose={}, OptionalJacobian< 2, 3 > Dpoint={}) const
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
#define EXPECT_DOUBLES_EQUAL(expected, actual, threshold)
EIGEN_DEVICE_FUNC const InverseReturnType inverse() const
IsDerived< DERIVEDFACTOR > add(std::shared_ptr< DERIVEDFACTOR > factor)
add is a synonym for push_back.
Pose3 inverse() const
inverse transformation with derivatives
GenericProjectionFactor< Pose3, Point3 > TestProjectionFactor
std::shared_ptr< GaussianFactorGraph > linearize(const Values &linearizationPoint) const
Linearize a nonlinear factor graph.
void addPrior(Key key, const T &prior, const SharedNoiseModel &model=nullptr)
const Pose3 & pose() const
pose
void setRankTolerance(double rankTol)
Implements a prior on the translation component of a pose.
void add(const MEASUREMENT &measured, const Key &poseKey, const size_t &cameraId=0)
static const double rankTol
void add(const GaussianFactor &factor)
Point2 project(const Point3 &pw, OptionalJacobian< 2, 6 > Dpose={}, OptionalJacobian< 2, 3 > Dpoint={}, OptionalJacobian< 2, DimK > Dcal={}) const
project a 3D point from world coordinates into the image
Point2 landmark2(7.0, 1.5)
std::shared_ptr< Cal3_S2 > shared_ptr
const Pose3 & pose() const
return pose, constant version
SmartProjectionPoseFactor< Cal3_S2 > SmartFactor
#define EXPECT(condition)
Base::Cameras cameras(const Values &values) const override
static Pose3 pose3(rt3, pt3)
Matrix information() const override
static Point2 measurement1(323.0, 240.0)
void projectToMultipleCameras(const CAMERA &cam1, const CAMERA &cam2, const CAMERA &cam3, Point3 landmark, typename CAMERA::MeasurementVector &measurements_cam)
LevenbergMarquardtParams lmParams
void setLandmarkDistanceThreshold(double landmarkDistanceThreshold)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
A nonlinear optimizer that uses the Levenberg-Marquardt trust-region scheme.
std::shared_ptr< This > shared_ptr
shorthand for a smart pointer to a factor
Array< double, 1, 3 > e(1./3., 0.5, 2.)
The most common 5DOF 3D->2D calibration.
StereoPoint2 project(const Point3 &point) const
Project 3D point to StereoPoint2 (uL,uR,v)
double error(const Values &values) const
static const Cal3_S2::shared_ptr sharedK(new Cal3_S2(fov, w, h))
Reprojection of a LANDMARK to a 2D point.
double error(const Values &values) const override
static const Pose3 pose1(Rot3(), Point3(0, 1, 0.5))
std::pair< Matrix, Vector > hessian(const Ordering &ordering) const
noiseModel::Diagonal::shared_ptr SharedDiagonal
static const double sigma
SmartProjectionRigFactor< Camera > SmartRigFactor
Vector evaluateError(const Pose3 &pose, const Point3 &point, OptionalMatrixType H1, OptionalMatrixType H2) const override
Evaluate error h(x)-z and optionally derivatives.
Calibration used by Bundler.
TriangulationResult point() const
void setDegeneracyMode(DegeneracyMode degMode)
std::vector< Point2, Eigen::aligned_allocator< Point2 > > Point2Vector
Pose3 g1(Rot3(), Point3(100.0, 0.0, 300.0))
static const Point2 level_uv_right
void insert(Key j, const Value &val)
void setLinearizationMode(LinearizationMode linMode)
std::shared_ptr< EmptyCal > shared_ptr
PinholePose< Cal3_S2 > Camera
static const Cal3_S2::shared_ptr sharedK2(new Cal3_S2(1500, 1200, 0, 640, 480))
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Point2Vector MeasurementVector
std::shared_ptr< This > shared_ptr
shorthand for a smart pointer to a factor
static const EmptyCal::shared_ptr emptyK(new EmptyCal())
Pose3 g2(g1.expmap(h *V1_g1))
void setDynamicOutlierRejectionThreshold(double dynOutRejectionThreshold)
static const Point2 level_uv
std::uint64_t Key
Integer nonlinear key type.
std::shared_ptr< GaussianFactor > linearize(const Values &values) const override
linearize
double totalReprojectionError(const Cameras &cameras, std::optional< Point3 > externalPoint={}) const
Vector unwhitenedError(const Cameras &cameras, const POINT &point, typename Cameras::FBlocks *Fs=nullptr, Matrix *E=nullptr) const
TEST(SmartProjectionRigFactor, Constructor)