Go to the documentation of this file.
11 using namespace gtsam;
16 const double tol=1
e-5;
18 const double g = 9.81,
l = 1.0;
20 const double deg2rad =
M_PI/180.0;
21 double q1(deg2rad*30.0), q2(deg2rad*31.0);
27 TEST( testPendulumFactor1, evaluateError) {
36 TEST( testPendulumFactor2, evaluateError) {
45 TEST( testPendulumFactorPk, evaluateError) {
49 double pk( 1/
h * (q2-q1) +
h*
g*
sin(q1) );
56 TEST( testPendulumFactorPk1, evaluateError) {
60 double pk1( 1/
h * (q2-q1) );
static int runAllTests(TestResult &result)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Jet< T, N > sin(const Jet< T, N > &f)
#define EXPECT(condition)
Vector evaluateError(const double &pk, const double &qk, const double &qk1, OptionalMatrixType H1, OptionalMatrixType H2, OptionalMatrixType H3) const override
Three-way factors for the pendulum dynamics as in [Stern06siggraph] for (1) explicit Euler method,...
static const Line3 l(Rot3(), 1, 1)
Vector evaluateError(const double &qk1, const double &qk, const double &v, OptionalMatrixType H1, OptionalMatrixType H2, OptionalMatrixType H3) const override
void g(const string &key, int i)
TEST(SmartFactorBase, Pinhole)
Vector evaluateError(const double &pk1, const double &qk, const double &qk1, OptionalMatrixType H1, OptionalMatrixType H2, OptionalMatrixType H3) const override
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
Vector evaluateError(const double &vk1, const double &vk, const double &q, OptionalMatrixType H1, OptionalMatrixType H2, OptionalMatrixType H3) const override
gtsam
Author(s):
autogenerated on Thu Nov 28 2024 04:08:35