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})
|
| PendulumFactorPk (Key pKey, Key qKey, Key qKey1, double h, double m=1.0, double r=1.0, double g=9.81, double alpha=0.0, double mu=1000.0) |
| Constructor.
|
|
virtual gtsam::NonlinearFactor::shared_ptr | clone () const |
|
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 |
| 1/h mr^2 (qk1-qk)+mgrh (1-a) sin((1-a)pk + a*pk1) - pk = 0, with optional derivatives
|
|
| NoiseModelFactor3 () |
| Default Constructor for I/O.
|
|
| NoiseModelFactor3 (const SharedNoiseModel &noiseModel, Key j1, Key j2, Key j3) |
| Constructor. More...
|
|
Key | key1 () const |
| methods to retrieve keys
|
|
Key | key2 () const |
|
Key | key3 () const |
|
virtual Vector | unwhitenedError (const Values &x, boost::optional< std::vector< Matrix > & > H=boost::none) const |
| Calls the 3-key specific version of evaluateError, which is pure virtual so must be implemented in the derived class. More...
|
|
| NoiseModelFactor () |
| Default constructor for I/O only.
|
|
virtual | ~NoiseModelFactor () |
| Destructor.
|
|
template<typename CONTAINER > |
| NoiseModelFactor (const SharedNoiseModel &noiseModel, const CONTAINER &keys) |
| Constructor.
|
|
virtual void | print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const |
| Print.
|
|
virtual bool | equals (const NonlinearFactor &f, double tol=1e-9) const |
| Check if two factors are equal.
|
|
virtual size_t | dim () const |
| get the dimension of the factor (number of rows on linearization)
|
|
const SharedNoiseModel & | noiseModel () const |
| access to the noise model
|
|
Vector | whitenedError (const Values &c) const |
| Vector of errors, whitened This is the raw error, i.e., i.e. More...
|
|
virtual double | error (const Values &c) const |
| Calculate the error of the factor. More...
|
|
boost::shared_ptr< GaussianFactor > | linearize (const Values &x) const |
| Linearize a non-linearFactorN to get a GaussianFactor, \( Ax-b \approx h(x+\delta x)-z = h(x) + A \delta x - z \) Hence \( b = z - h(x) = - \mathtt{error\_vector}(x) \).
|
|