Go to the documentation of this file.
21 using namespace gtsam;
43 double theta =
atan2(landmark_p1.x(), landmark_p1.z());
44 double phi =
atan2(landmark_p1.y(),
sqrt(landmark_p1.x()*landmark_p1.x()+landmark_p1.z()*landmark_p1.z()));
45 double rho = 1./landmark_p1.norm();
static int runAllTests(TestResult &result)
std::shared_ptr< This > shared_ptr
PinholeCamera< Cal3_S2 > camera1(pose1, *sharedCal)
virtual const Values & optimize()
Point3 transformTo(const Point3 &point, OptionalJacobian< 3, 6 > Hself={}, OptionalJacobian< 3, 3 > Hpoint={}) const
takes point in world coordinates and transforms it to Pose coordinates
Array< double, 1, 3 > e(1./3., 0.5, 2.)
#define EXPECT(condition)
int optimize(const SfmData &db, const NonlinearFactorGraph &graph, const Values &initial, bool separateCalibration=false)
The most common 5DOF 3D->2D calibration.
A nonlinear optimizer that uses the Levenberg-Marquardt trust-region scheme.
static const SmartProjectionParams params
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
static const double sigma
Inverse Depth Factor based on Civera09tro, Montiel06rss. Landmarks are parameterized as (theta,...
const ValueType at(Key j) const
static Point3 landmark(0, 0, 5)
Base class for all pinhole cameras.
void insert(Key j, const Vector &value)
noiseModel::Base::shared_ptr SharedNoiseModel
std::shared_ptr< Cal3_S2 > shared_ptr
AnnoyingScalar atan2(const AnnoyingScalar &y, const AnnoyingScalar &x)
static Key poseKey2(X(2))
static const Pose3 pose1(Rot3(), Point3(0, 1, 0.5))
Factor Graph consisting of non-linear factors.
IsDerived< DERIVEDFACTOR > push_back(std::shared_ptr< DERIVEDFACTOR > factor)
Add a factor directly using a shared_ptr.
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
The most common 5DOF 3D->2D calibration.
TEST(InvDepthFactorVariant3, optimize)
Class retract(const TangentVector &v) const
retract as required by manifold concept: applies v at *this
static Key poseKey1(X(1))
NonlinearFactorGraph graph
std::uint64_t Key
Integer nonlinear key type.
static const Camera2 camera2(pose1, K2)
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
Jet< T, N > sqrt(const Jet< T, N > &f)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:07:47