gtsam  4.1.0
gtsam
expressions.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include <gtsam/geometry/Rot3.h>
13 #include <gtsam/slam/expressions.h>
14 
15 namespace gtsam {
16 
17 typedef Expression<NavState> NavState_;
18 typedef Expression<Velocity3> Velocity3_;
19 
20 namespace internal {
21 // define getters that return a value rather than a reference
22 Rot3 attitude(const NavState& X, OptionalJacobian<3, 9> H) {
23  return X.attitude(H);
24 }
25 Point3 position(const NavState& X, OptionalJacobian<3, 9> H) {
26  return X.position(H);
27 }
28 Velocity3 velocity(const NavState& X, OptionalJacobian<3, 9> H) {
29  return X.velocity(H);
30 }
31 } // namespace internal
32 
33 // overloads for getters
34 inline Rot3_ attitude(const NavState_& X) {
35  return Rot3_(internal::attitude, X);
36 }
37 inline Point3_ position(const NavState_& X) {
38  return Point3_(internal::position, X);
39 }
40 inline Velocity3_ velocity(const NavState_& X) {
41  return Velocity3_(internal::velocity, X);
42 }
43 
44 } // namespace gtsam
NavState.h
Navigation state composing of attitude, position, and velocity.
gtsam
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
gtsam::Velocity3
Vector3 Velocity3
Velocity is currently typedef'd to Vector3.
Definition: NavState.h:28
expressions.h
Common expressions, both linear and non-linear.
gtsam::Point3
Vector3 Point3
As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3...
Definition: Point3.h:35
expressions.h
Common expressions for solving geometry/slam/sfm problems.
Rot3.h
3D rotation represented as a rotation matrix or quaternion