DynamicsPriors.h
Go to the documentation of this file.
1 
10 #pragma once
11 
14 
15 #include <cassert>
16 
17 namespace gtsam {
18 
19 // Indices of relevant variables in the PoseRTV tangent vector:
20 // [ rx ry rz tx ty tz vx vy vz ]
21 static const size_t kRollIndex = 0;
22 static const size_t kPitchIndex = 1;
23 static const size_t kHeightIndex = 5;
24 static const size_t kVelocityZIndex = 8;
25 static const std::vector<size_t> kVelocityIndices = { 6, 7, 8 };
26 
31 struct DHeightPrior : public gtsam::PartialPriorFactor<PoseRTV> {
33 
35  : Base(key, kHeightIndex, height, model) {}
36 };
37 
43 struct DRollPrior : public gtsam::PartialPriorFactor<PoseRTV> {
45 
48  : Base(key, kRollIndex, wx, model) { }
49 
52  : Base(key, kRollIndex, 0.0, model) { }
53 };
54 
60 struct VelocityPrior : public gtsam::PartialPriorFactor<PoseRTV> {
62 
65 };
66 
72 struct DGroundConstraint : public gtsam::PartialPriorFactor<PoseRTV> {
74 
80  Vector::Unit(4, 0)*height, model) {}
81 
87  assert(constraint.size() == 4);
88  }
89 };
90 
91 } // \namespace gtsam
gtsam::VelocityPrior::Base
gtsam::PartialPriorFactor< PoseRTV > Base
Definition: DynamicsPriors.h:61
PartialPriorFactor.h
A simple prior factor that allows for setting a prior only on a part of linear parameters.
gtsam::DGroundConstraint
Definition: DynamicsPriors.h:72
gtsam::DHeightPrior::Base
gtsam::PartialPriorFactor< PoseRTV > Base
Definition: DynamicsPriors.h:32
gtsam::kVelocityIndices
static const std::vector< size_t > kVelocityIndices
Definition: DynamicsPriors.h:25
gtsam::kVelocityZIndex
static const size_t kVelocityZIndex
Definition: DynamicsPriors.h:24
vel
static const Velocity3 vel(0.4, 0.5, 0.6)
gtsam::DRollPrior::DRollPrior
DRollPrior(Key key, const gtsam::SharedNoiseModel &model)
Definition: DynamicsPriors.h:51
gtsam::kPitchIndex
static const size_t kPitchIndex
Definition: DynamicsPriors.h:22
gtsam::Factor
Definition: Factor.h:70
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:39
gtsam::VelocityPrior
Definition: DynamicsPriors.h:60
gtsam::DRollPrior::DRollPrior
DRollPrior(Key key, double wx, const gtsam::SharedNoiseModel &model)
Definition: DynamicsPriors.h:47
gtsam::DGroundConstraint::DGroundConstraint
DGroundConstraint(Key key, double height, const gtsam::SharedNoiseModel &model)
Definition: DynamicsPriors.h:78
gtsam::DRollPrior
Definition: DynamicsPriors.h:43
PoseRTV.h
Pose3 with translational velocity.
gtsam::VelocityPrior::VelocityPrior
VelocityPrior(Key key, const gtsam::Vector &vel, const gtsam::SharedNoiseModel &model)
Definition: DynamicsPriors.h:63
gtsam::SharedNoiseModel
noiseModel::Base::shared_ptr SharedNoiseModel
Definition: NoiseModel.h:762
gtsam::DGroundConstraint::DGroundConstraint
DGroundConstraint(Key key, const Vector &constraint, const gtsam::SharedNoiseModel &model)
Definition: DynamicsPriors.h:85
gtsam::DGroundConstraint::Base
gtsam::PartialPriorFactor< PoseRTV > Base
Definition: DynamicsPriors.h:73
model
noiseModel::Diagonal::shared_ptr model
Definition: doc/Code/Pose2SLAMExample.cpp:7
gtsam
traits
Definition: SFMdata.h:40
gtsam::kHeightIndex
static const size_t kHeightIndex
Definition: DynamicsPriors.h:23
gtsam::DHeightPrior::DHeightPrior
DHeightPrior(Key key, double height, const gtsam::SharedNoiseModel &model)
Definition: DynamicsPriors.h:34
gtsam::DRollPrior::Base
gtsam::PartialPriorFactor< PoseRTV > Base
Definition: DynamicsPriors.h:44
gtsam::DHeightPrior
Definition: DynamicsPriors.h:31
gtsam::NoiseModelFactorN< PoseRTV >::key
Key key() const
Definition: NonlinearFactor.h:583
gtsam::kRollIndex
static const size_t kRollIndex
Definition: DynamicsPriors.h:21
gtsam::Key
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:97
gtsam::PartialPriorFactor
Definition: PartialPriorFactor.h:40


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:29