Go to the documentation of this file.
27 using namespace gtsam;
29 static const double tol = 1
e-5;
47 TEST( testBoundingConstraint, unary_basics_inactive1 ) {
66 TEST( testBoundingConstraint, unary_basics_inactive2 ) {
85 TEST( testBoundingConstraint, unary_basics_active1 ) {
100 TEST( testBoundingConstraint, unary_basics_active2 ) {
115 TEST( testBoundingConstraint, unary_linearization_inactive) {
126 TEST( testBoundingConstraint, unary_linearization_active) {
139 TEST( testBoundingConstraint, unary_simple_optimization1) {
143 Point2 start_pt(0.0, 1.0);
161 TEST( testBoundingConstraint, unary_simple_optimization2) {
165 Point2 start_pt(2.0, 3.0);
182 TEST( testBoundingConstraint, MaxDistance_basics) {
184 Point2 pt1(0,0), pt2(1.0, 0.0),
pt3(2.0, 0.0), pt4(3.0, 0.0);
221 TEST( testBoundingConstraint, MaxDistance_simple_optimization) {
223 Point2 pt1(0,0), pt2_init(5.0, 0.0), pt2_goal(2.0, 0.0);
245 TEST( testBoundingConstraint, avoid_demo) {
249 Point2 x1_pt(0,0), x2_init(2.0, 0.5), x2_goal(2.0, 1.0), x3_pt(4.0, 0.0), l1_pt(2.0, 0.0);
const Symbol key1('v', 1)
static int runAllTests(TestResult &result)
size_t dim() const override
Vector evaluateError(const X1 &x1, const X2 &x2, OptionalMatrixType H1, OptionalMatrixType H2) const override
virtual const Values & optimize()
Array< double, 1, 3 > e(1./3., 0.5, 2.)
double error(const Values &c) const override
#define EXPECT(condition)
A nonlinear optimizer that uses the Levenberg-Marquardt trust-region scheme.
iq2D::PoseXInequality constraint1(key, 1.0, true, mu)
bool isGreaterThan() const
void update(Key j, const Value &val)
Vector unwhitenedError(const Values &x, OptionalMatrixVecType H=nullptr) const override
Pose3 x3(Rot3::Ypr(M_PI/4.0, 0.0, 0.0), l2)
SharedDiagonal soft_model2_alt
std::shared_ptr< GaussianFactor > linearize(const Values &x) const override
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Matrix
bool isGreaterThan() const
bool active(const Values &c) const override
const Symbol key2('v', 2)
static Point3 pt3(1.0, 2.0, 3.0)
SharedDiagonal soft_model2
std::shared_ptr< This > shared_ptr
shared_ptr to this class
noiseModel::Diagonal::shared_ptr SharedDiagonal
Vector evaluateError(const X &x, OptionalMatrixType H) const override
detail::initimpl::constructor< Args... > init()
Binds an existing constructor taking arguments Args...
#define EXPECT_DOUBLES_EQUAL(expected, actual, threshold)
iq2D::PoseYInequality constraint4(key, 2.0, false, mu)
SharedDiagonal hard_model1
iq2D::PoseXInequality constraint3(key, 1.0, false, mu)
bool active(const Values &c) const override
Factor Graph consisting of non-linear factors.
Point2 odo(const Point2 &x1, const Point2 &x2)
odometry between two poses
void insert(Key j, const Value &val)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
NonlinearFactorGraph graph
std::uint64_t Key
Integer nonlinear key type.
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
iq2D::PoseYInequality constraint2(key, 2.0, true, mu)
Pose3 x2(Rot3::Ypr(0.0, 0.0, 0.0), l2)
measurement functions and constraint definitions for simulated 2D robot
IsDerived< DERIVEDFACTOR > emplace_shared(Args &&... args)
Emplace a shared pointer to factor of given type.
TEST(testBoundingConstraint, unary_basics_inactive1)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:07:19