Go to the documentation of this file.
17 using namespace gtsam;
41 double range11 =
std::sqrt(4.0 + 4.0), range21 = 2.0, range32 = 2.0;
70 auto marginalCluster = std::shared_ptr<Cluster>(
new Cluster(variableIndex, {
x1}, &
graph));
71 auto landmarkCluster = std::shared_ptr<Cluster>(
new Cluster(variableIndex, {
l1,
l2}, &
graph));
72 auto rootCluster = std::shared_ptr<Cluster>(
new Cluster(variableIndex, {
x2,
x3}, &
graph));
83 auto gfg = marginalCluster->linearize(
initial);
89 const auto [bn, fg] = gfg->eliminatePartialSequential(
ordering);
92 throw std::runtime_error(
"Expected HessianFactor");
95 auto actual = marginalCluster->linearizeAndEliminate(
initial);
109 auto marginalCluster = std::shared_ptr<Cluster>(
new Cluster(variableIndex, {
x1}, &
graph));
110 auto landmarkCluster = std::shared_ptr<Cluster>(
new Cluster(variableIndex, {
l1,
l2}, &
graph));
111 auto rootCluster = std::shared_ptr<Cluster>(
new Cluster(variableIndex, {
x2,
x3}, &
graph));
115 clusterTree.
addRoot(rootCluster);
116 rootCluster->addChild(landmarkCluster);
117 landmarkCluster->addChild(marginalCluster);
143 for (
size_t i = 0;
i < 4;
i++)
static int runAllTests(TestResult &result)
A Gaussian factor using the canonical parameters (information form)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
#define EXPECT_LONGS_EQUAL(expected, actual)
#define EXPECT(condition)
static Rot2 fromDegrees(double theta)
Named constructor from angle in degrees.
static shared_ptr Sigmas(const Vector &sigmas, bool smart=true)
DecisionTreeFactor factor(D &C &B &A, "0.0 0.0 0.0 0.60658897 0.61241912 0.61241969 0.61247685 0.61247742 0.0 " "0.0 0.0 0.99995287 1.0 1.0 1.0 1.0")
const sharedFactor at(size_t i) const
Pose2 odometry(2.0, 0.0, 0.0)
void addRoot(const std::shared_ptr< Cluster > &cluster)
const HybridBayesNet bayesNet
static const Symbol x2('x', 2)
void addPrior(Key key, const T &prior, const SharedNoiseModel &model=nullptr)
static const Symbol x3('x', 3)
Values planarSLAMValues()
static const Symbol x1('x', 1)
static enum @1096 ordering
NonlinearFactorGraph planarSLAMGraph()
Values updateCholesky(const Values &values)
static const Symbol l2('l', 2)
TEST(SmartFactorBase, Pinhole)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
NonlinearFactorGraph graph
static NonlinearClusterTree Construct()
static const Symbol l1('l', 1)
Jet< T, N > sqrt(const Jet< T, N > &f)
IsDerived< DERIVEDFACTOR > emplace_shared(Args &&... args)
Emplace a shared pointer to factor of given type.
a single factor contains both the bearing and the range to prevent handle to pair bearing and range f...
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:16:47