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) {
56 TEST( testPendulumFactorPk1, evaluateError) {
60 double pk1( 1/h * (
q2-
q1) );
Vector evaluateError(const double &pk, const double &qk, const double &qk1, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none, boost::optional< Matrix & > H3=boost::none) const override
Vector evaluateError(const double &vk1, const double &vk, const double &q, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none, boost::optional< Matrix & > H3=boost::none) const override
static int runAllTests(TestResult &result)
Vector evaluateError(const double &pk1, const double &qk, const double &qk1, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none, boost::optional< Matrix & > H3=boost::none) const override
Vector evaluateError(const double &qk1, const double &qk, const double &v, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none, boost::optional< Matrix & > H3=boost::none) const override
void g(const string &key, int i)
static const Line3 l(Rot3(), 1, 1)
#define EXPECT(condition)
Three-way factors for the pendulum dynamics as in [Stern06siggraph] for (1) explicit Euler method...
Array< double, 1, 3 > e(1./3., 0.5, 2.)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
TEST(LPInitSolver, InfiniteLoopSingleVar)
EIGEN_DEVICE_FUNC const SinReturnType sin() const