gtsam  4.0.0 gtsam
Pendulum.h File Reference

Three-way factors for the pendulum dynamics as in [Stern06siggraph] for (1) explicit Euler method, (2) implicit Euler method, and (3) sympletic Euler method. More...

Go to the source code of this file.

## Classes

class  gtsam::PendulumFactor1
This class implements the first constraint. More...

class  gtsam::PendulumFactor2
This class implements the second constraint the. More...

class  gtsam::PendulumFactorPk
This class implements the first position-momentum update rule p_k = -D_1 L_d(q_k,q_{k+1},h) = \frac{1}{h}mr^{2}\left(q_{k+1}-q_{k}\right)+mgrh(1-\alpha)\,\sin\left((1-\alpha)q_{k}+\alpha q_{k+1}\right) = (1/h)mr^2 (q_{k+1}-q_k) + mgrh(1-alpha) sin ((1-alpha)q_k+\alpha q_{k+1}) More...

class  gtsam::PendulumFactorPk1
This class implements the second position-momentum update rule p_k1 = D_2 L_d(q_k,q_{k+1},h) = \frac{1}{h}mr^{2}\left(q_{k+1}-q_{k}\right)-mgrh\alpha\sin\left((1-\alpha)q_{k}+\alpha q_{k+1}\right) = (1/h)mr^2 (q_{k+1}-q_k) - mgrh alpha sin ((1-alpha)q_k+\alpha q_{k+1}) More...

## Namespaces

gtsam
Global functions in a separate testing namespace.

## Detailed Description

Three-way factors for the pendulum dynamics as in [Stern06siggraph] for (1) explicit Euler method, (2) implicit Euler method, and (3) sympletic Euler method.

Note that all methods use the same formulas for the factors. They are only different in the way we connect variables using those factors in the graph.