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>()) {
127 void print(
const std::string&
s =
"")
const;
139 return v.segment<3>(0);
142 return v.segment<3>(3);
145 return v.segment<3>(6);
148 return v.segment<3>(0);
151 return v.segment<3>(3);
154 return v.segment<3>(6);
163 Vector9 localCoordinates(
const NavState&
g,
178 Vector9
coriolis(
double dt,
const Vector3& omega,
bool secondOrder =
false,
184 const boost::optional<Vector3>& omegaCoriolis,
bool use2ndOrderCoriolis =
193 friend class boost::serialization::access;
194 template<
class ARCHIVE>
196 ar & BOOST_SERIALIZATION_NVP(R_);
197 ar & BOOST_SERIALIZATION_NVP(t_);
198 ar & BOOST_SERIALIZATION_NVP(v_);
void print(const Matrix &A, const string &s, ostream &stream)
std::pair< Point3, Velocity3 > PositionAndVelocity
Both ManifoldTraits and Testable.
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
Vector3 t() const
Return position as Vector3.
NavState(const Rot3 &R, const Point3 &t, const Velocity3 &v)
Construct from attitude, position, velocity.
const Vector3 & v() const
Return velocity as Vector3. Computation-free.
Rot3_ rotation(const Pose3_ &pose)
static const Velocity3 vel(0.4, 0.5, 0.6)
EIGEN_DEVICE_FUNC SegmentReturnType tail(Index n)
This is the const version of tail(Index).
static Eigen::Block< const Vector9, 3, 1 > dV(const Vector9 &v)
Vector3 Velocity3
Velocity is currently typedef'd to Vector3.
NavState(const Matrix3 &R, const Vector6 &tv)
Construct from SO(3) and R^6.
NavState()
Default constructor.
Rot2 R(Rot2::fromAngle(0.1))
static Eigen::Block< Vector9, 3, 1 > dP(Vector9 &v)
Point3 t_
position n_t, in nav frame
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange[*:*] noreverse nowriteback set trange[*:*] noreverse nowriteback set urange[*:*] noreverse nowriteback set vrange[*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
boost::function< Vector9(const NavState &, const bool &)> coriolis
void g(const string &key, int i)
Rot3 R_
Rotation nRb, rotates points/velocities in body to points/velocities in nav.
Velocity3 v_
velocity n_v in nav frame
static const Pose3 pose(Rot3(Vector3(1,-1,-1).asDiagonal()), Point3(0, 0, 0.5))
Base class and basic functions for Manifold types.
static Eigen::Block< Vector9, 3, 1 > dV(Vector9 &v)
Quaternion quaternion() const
Return quaternion. Induces computation in matrix mode.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static Eigen::Block< const Vector9, 3, 1 > dP(const Vector9 &v)
Velocity3_ velocity(const NavState_ &X)
void serialize(ARCHIVE &ar, const unsigned int)
typedef and functions to augment Eigen's VectorXd
Expression of a fixed-size or dynamic-size block.
ofstream os("timeSchurFactors.csv")
EIGEN_DEVICE_FUNC SegmentReturnType head(Index n)
This is the const version of head(Index).
The quaternion class used to represent 3D orientations and rotations.
Rot3_ attitude(const NavState_ &X)
Point3_ position(const NavState_ &X)
static Eigen::Block< const Vector9, 3, 1 > dR(const Vector9 &v)
Matrix3 R() const
Return rotation matrix. Induces computation in quaternion mode.
NavState(const Pose3 &pose, const Velocity3 &v)
Construct from pose and velocity.
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
gtsam::Quaternion toQuaternion() const
static Eigen::Block< Vector9, 3, 1 > dR(Vector9 &v)
Vector3 bodyVelocity(const Pose3 &w_t_b, const Vector3 &vec_w, OptionalJacobian< 3, 6 > Hpose=boost::none, OptionalJacobian< 3, 3 > Hvel=boost::none)