testEquivInertialNavFactor_GlobalVel.cpp
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
20 #include <gtsam/geometry/Pose3.h>
21 #include <gtsam/nonlinear/Values.h>
22 #include <gtsam/inference/Key.h>
24 
26 #include <iostream>
27 
28 using namespace std::placeholders;
29 using namespace std;
30 using namespace gtsam;
31 
32 /* ************************************************************************* */
34 {
35  Key poseKey1(11);
36  Key poseKey2(12);
37  Key velKey1(21);
38  Key velKey2(22);
39  Key biasKey1(31);
40 
41  // IMU accumulation variables
42  Vector delta_pos_in_t0 = Vector3(0.0, 0.0, 0.0);
43  Vector delta_vel_in_t0 = Vector3(0.0, 0.0, 0.0);
44  Vector delta_angles = Vector3(0.0, 0.0, 0.0);
45  double delta_t = 0.0;
46  Matrix EquivCov_Overall = Matrix::Zero(15,15);
47  Matrix Jacobian_wrt_t0_Overall = Matrix::Identity(15,15);
49 
50  // Earth Terms (gravity, etc)
51  Vector3 g(0.0, 0.0, -9.80);
52  Vector3 rho(0.0, 0.0, 0.0);
53  Vector3 omega_earth(0.0, 0.0, 0.0);
54 
55  // IMU Noise Model
56  SharedGaussian imu_model = noiseModel::Gaussian::Covariance(EquivCov_Overall.block(0,0,9,9));
57 
58  // Constructor
60  poseKey1, velKey1, biasKey1, poseKey2, velKey2,
61  delta_pos_in_t0, delta_vel_in_t0, delta_angles, delta_t,
62  g, rho, omega_earth, imu_model, Jacobian_wrt_t0_Overall, bias1);
63 
64 }
65 
66 /* ************************************************************************* */
67  int main() { TestResult tr; return TestRegistry::runAllTests(tr);}
68 /* ************************************************************************* */
static int runAllTests(TestResult &result)
Eigen::Vector3d Vector3
Definition: Vector.h:43
A non-templated config holding any types of Manifold-group elements.
Eigen::MatrixXd Matrix
Definition: base/Matrix.h:39
Definition: BFloat16.h:88
Some functions to compute numerical derivatives.
void g(const string &key, int i)
Definition: testBTree.cpp:41
Eigen::VectorXd Vector
Definition: Vector.h:38
Equivalent inertial navigation factor (velocity in the global frame).
static Key poseKey1(X(1))
traits
Definition: chartTesting.h:28
Bias bias1(biasAcc1, biasGyro1)
static Key poseKey2(X(2))
3D Pose
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:102
noiseModel::Gaussian::shared_ptr SharedGaussian
Definition: NoiseModel.h:742
TEST(EquivInertialNavFactor_GlobalVel, Constructor)


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:38:03