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 /* ************************************************************************* */
TestRegistry::runAllTests
static int runAllTests(TestResult &result)
Definition: TestRegistry.cpp:27
TestHarness.h
gtsam::Matrix
Eigen::MatrixXd Matrix
Definition: base/Matrix.h:39
gtsam::Vector3
Eigen::Vector3d Vector3
Definition: Vector.h:44
EquivInertialNavFactor_GlobalVel.h
Equivalent inertial navigation factor (velocity in the global frame).
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:39
pruning_fixture::factor
DecisionTreeFactor factor(D &C &B &A, "0.0 0.0 0.0 0.60658897 0.61241912 0.61241969 0.61247685 0.61247742 0.0 " "0.0 0.0 0.99995287 1.0 1.0 1.0 1.0")
Key.h
bias1
Bias bias1(biasAcc1, biasGyro1)
main
int main()
Definition: testEquivInertialNavFactor_GlobalVel.cpp:67
numericalDerivative.h
Some functions to compute numerical derivatives.
gtsam::EquivInertialNavFactor_GlobalVel
Definition: EquivInertialNavFactor_GlobalVel.h:88
TEST
TEST(EquivInertialNavFactor_GlobalVel, Constructor)
Definition: testEquivInertialNavFactor_GlobalVel.cpp:33
gtsam::SharedGaussian
noiseModel::Gaussian::shared_ptr SharedGaussian
Definition: NoiseModel.h:763
g
void g(const string &key, int i)
Definition: testBTree.cpp:41
TestResult
Definition: TestResult.h:26
ImuBias.h
gtsam::imuBias::ConstantBias
Definition: ImuBias.h:32
gtsam
traits
Definition: SFMdata.h:40
poseKey2
static Key poseKey2(X(2))
std
Definition: BFloat16.h:88
poseKey1
static Key poseKey1(X(1))
gtsam::Key
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:97
Values.h
A non-templated config holding any types of Manifold-group elements.
Pose3.h
3D Pose manifold SO(3) x R^3 and group SE(3)


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:16:14