49 typedef std::pair<Point3, Velocity3> PositionAndVelocity;
56 t_(0, 0, 0), v_(Vector3::Zero()) {
64 R_(pose.rotation()), t_(pose.translation()), v_(v) {
68 R_(R), t_(tv.head<3>()), v_(tv.tail<3>()) {
75 static NavState FromPoseVelocity(
const Pose3& pose,
const Vector3& vel,
86 const Pose3 pose()
const {
87 return Pose3(attitude(), position());
107 const Vector3&
v()
const {
116 Matrix7 matrix()
const;
124 friend std::ostream &operator<<(std::ostream &os,
const NavState& state);
127 void print(
const std::string& s =
"")
const;
138 static Eigen::Block<Vector9, 3, 1> dR(Vector9& v) {
139 return v.segment<3>(0);
141 static Eigen::Block<Vector9, 3, 1> dP(Vector9& v) {
142 return v.segment<3>(3);
144 static Eigen::Block<Vector9, 3, 1> dV(Vector9& v) {
145 return v.segment<3>(6);
147 static Eigen::Block<const Vector9, 3, 1> dR(
const Vector9& v) {
148 return v.segment<3>(0);
150 static Eigen::Block<const Vector9, 3, 1> dP(
const Vector9& v) {
151 return v.segment<3>(3);
153 static Eigen::Block<const Vector9, 3, 1> dV(
const Vector9& v) {
154 return v.segment<3>(6);
158 NavState retract(
const Vector9& v,
159 OptionalJacobian<9, 9> H1 = boost::none, OptionalJacobian<9, 9> H2 =
163 Vector9 localCoordinates(
const NavState& g,
164 OptionalJacobian<9, 9> H1 = boost::none, OptionalJacobian<9, 9> H2 =
173 NavState update(
const Vector3& b_acceleration,
const Vector3& b_omega,
174 const double dt, OptionalJacobian<9, 9> F, OptionalJacobian<9, 3> G1,
175 OptionalJacobian<9, 3> G2)
const;
178 Vector9 coriolis(
double dt,
const Vector3& omega,
bool secondOrder =
false,
179 OptionalJacobian<9, 9> H = boost::none)
const;
183 Vector9 correctPIM(
const Vector9& pim,
double dt,
const Vector3& n_gravity,
184 const boost::optional<Vector3>& omegaCoriolis,
bool use2ndOrderCoriolis =
185 false, OptionalJacobian<9, 9> H1 = boost::none,
186 OptionalJacobian<9, 9> H2 = boost::none)
const;
193 friend class boost::serialization::access;
194 template<
class ARCHIVE>
195 void serialize(ARCHIVE & ar,
const unsigned int ) {
196 ar & BOOST_SERIALIZATION_NVP(R_);
197 ar & BOOST_SERIALIZATION_NVP(t_);
198 ar & BOOST_SERIALIZATION_NVP(v_);
NavState()
Default constructor.
Definition: NavState.h:55
const Vector3 & v() const
Return velocity as Vector3. Computation-free.
Definition: NavState.h:107
Base class and basic functions for Manifold types.
Matrix3 matrix() const
return 3*3 rotation matrix
Definition: Rot3M.cpp:180
Navigation state: Pose (rotation, translation) + velocity NOTE(frank): it does not make sense to make...
Definition: NavState.h:34
Both ManifoldTraits and Testable.
Definition: Manifold.h:120
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:141
Vector3 t() const
Return position as Vector3.
Definition: NavState.h:103
Template to create a binary predicate.
Definition: Testable.h:110
NavState(const Rot3 &R, const Point3 &t, const Velocity3 &v)
Construct from attitude, position, velocity.
Definition: NavState.h:59
Vector3 Velocity3
Velocity is currently typedef'd to Vector3.
Definition: NavState.h:28
NavState(const Matrix3 &R, const Vector9 tv)
Construct from SO(3) and R^6.
Definition: NavState.h:67
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition: OptionalJacobian.h:39
Quaternion quaternion() const
Return quaternion. Induces computation in matrix mode.
Definition: NavState.h:99
gtsam::Quaternion toQuaternion() const
Compute the quaternion representation of this rotation.
Definition: Rot3M.cpp:194
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
NavState(const Pose3 &pose, const Velocity3 &v)
Construct from pose and velocity.
Definition: NavState.h:63
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
Matrix3 R() const
Return rotation matrix. Induces computation in quaternion mode.
Definition: NavState.h:95
typedef and functions to augment Eigen's VectorXd