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