DynamicsPriors.h
Go to the documentation of this file.
1 
10 #pragma once
11 
14 
15 namespace gtsam {
16 
17 // Indices of relevant variables in the PoseRTV tangent vector:
18 // [ rx ry rz tx ty tz vx vy vz ]
19 static const size_t kRollIndex = 0;
20 static const size_t kPitchIndex = 1;
21 static const size_t kHeightIndex = 5;
22 static const size_t kVelocityZIndex = 8;
23 static const std::vector<size_t> kVelocityIndices = { 6, 7, 8 };
24 
29 struct DHeightPrior : public gtsam::PartialPriorFactor<PoseRTV> {
31 
33  : Base(key, kHeightIndex, height, model) {}
34 };
35 
41 struct DRollPrior : public gtsam::PartialPriorFactor<PoseRTV> {
43 
46  : Base(key, kRollIndex, wx, model) { }
47 
50  : Base(key, kRollIndex, 0.0, model) { }
51 };
52 
58 struct VelocityPrior : public gtsam::PartialPriorFactor<PoseRTV> {
60 
63 };
64 
70 struct DGroundConstraint : public gtsam::PartialPriorFactor<PoseRTV> {
72 
78  Vector::Unit(4, 0)*height, model) {}
79 
85  assert(constraint.size() == 4);
86  }
87 };
88 
89 } // \namespace gtsam
gtsam::VelocityPrior::Base
gtsam::PartialPriorFactor< PoseRTV > Base
Definition: DynamicsPriors.h:59
PartialPriorFactor.h
A simple prior factor that allows for setting a prior only on a part of linear parameters.
gtsam::DGroundConstraint
Definition: DynamicsPriors.h:70
gtsam::DHeightPrior::Base
gtsam::PartialPriorFactor< PoseRTV > Base
Definition: DynamicsPriors.h:30
gtsam::kVelocityIndices
static const std::vector< size_t > kVelocityIndices
Definition: DynamicsPriors.h:23
gtsam::kVelocityZIndex
static const size_t kVelocityZIndex
Definition: DynamicsPriors.h:22
vel
static const Velocity3 vel(0.4, 0.5, 0.6)
gtsam::DRollPrior::DRollPrior
DRollPrior(Key key, const gtsam::SharedNoiseModel &model)
Definition: DynamicsPriors.h:49
gtsam::kPitchIndex
static const size_t kPitchIndex
Definition: DynamicsPriors.h:20
gtsam::Factor
Definition: Factor.h:70
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:38
gtsam::VelocityPrior
Definition: DynamicsPriors.h:58
gtsam::DRollPrior::DRollPrior
DRollPrior(Key key, double wx, const gtsam::SharedNoiseModel &model)
Definition: DynamicsPriors.h:45
gtsam::DGroundConstraint::DGroundConstraint
DGroundConstraint(Key key, double height, const gtsam::SharedNoiseModel &model)
Definition: DynamicsPriors.h:76
gtsam::DRollPrior
Definition: DynamicsPriors.h:41
PoseRTV.h
Pose3 with translational velocity.
gtsam::VelocityPrior::VelocityPrior
VelocityPrior(Key key, const gtsam::Vector &vel, const gtsam::SharedNoiseModel &model)
Definition: DynamicsPriors.h:61
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:83
gtsam::DGroundConstraint::Base
gtsam::PartialPriorFactor< PoseRTV > Base
Definition: DynamicsPriors.h:71
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:21
gtsam::DHeightPrior::DHeightPrior
DHeightPrior(Key key, double height, const gtsam::SharedNoiseModel &model)
Definition: DynamicsPriors.h:32
gtsam::DRollPrior::Base
gtsam::PartialPriorFactor< PoseRTV > Base
Definition: DynamicsPriors.h:42
gtsam::DHeightPrior
Definition: DynamicsPriors.h:29
gtsam::NoiseModelFactorN< PoseRTV >::key
Key key() const
Definition: NonlinearFactor.h:582
gtsam::kRollIndex
static const size_t kRollIndex
Definition: DynamicsPriors.h:19
gtsam::Key
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:97
gtsam::PartialPriorFactor
Definition: PartialPriorFactor.h:38


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:14