23 #include <boost/serialization/nvp.hpp> 37 static const size_t dimension = 6;
40 biasAcc_(0.0, 0.0, 0.0), biasGyro_(0.0, 0.0, 0.0) {
44 biasAcc_(biasAcc), biasGyro_(biasGyro) {
48 biasAcc_(v.
head<3>()), biasGyro_(v.
tail<3>()) {
54 v << biasAcc_, biasGyro_;
72 if (H1) (*H1) << -I_3x3, Z_3x3;
73 if (H2) (*H2) << I_3x3;
74 return measurement - biasAcc_;
81 if (H1) (*H1) << Z_3x3, -I_3x3;
82 if (H2) (*H2) << I_3x3;
83 return measurement - biasGyro_;
91 GTSAM_EXPORT
friend std::ostream&
operator<<(std::ostream&
os,
95 void print(
const std::string&
s =
"")
const;
119 return ConstantBias(biasAcc_ + v.head<3>(), biasGyro_ + v.tail<3>());
165 friend class boost::serialization::access;
166 template<
class ARCHIVE>
168 ar & BOOST_SERIALIZATION_NVP(biasAcc_);
169 ar & BOOST_SERIALIZATION_NVP(biasGyro_);
182 imuBias::ConstantBias> {
void print(const Matrix &A, const string &s, ostream &stream)
ConstantBias(const Vector6 &v)
ConstantBias(const Vector3 &biasAcc, const Vector3 &biasGyro)
ConstantBias operator-(const ConstantBias &b) const
ConstantBias operator+(const ConstantBias &b) const
VectorSpace provides both Testable and VectorSpaceTraits.
EIGEN_DEVICE_FUNC SegmentReturnType tail(Index n)
This is the const version of tail(Index).
static Vector6 Logmap(const ConstantBias &p)
const Vector3 & accelerometer() const
void serialize(ARCHIVE &ar, const unsigned int)
Vector3 biasGyro_
The units for stddev are σ = rad/s or rad √Hz/s.
ConstantBias compose(const ConstantBias &q)
std::ostream & operator<<(std::ostream &os, const ConstantBias &bias)
ostream operator
Vector3 biasAcc_
The units for stddev are σ = m/s² or m √Hz/s²
ConstantBias retract(const Vector6 &v)
ConstantBias operator+(const Vector6 &v) const
static ConstantBias identity()
Vector3 correctAccelerometer(const Vector3 &measurement, OptionalJacobian< 3, 6 > H1=boost::none, OptionalJacobian< 3, 3 > H2=boost::none) const
bool equals(const ConstantBias &expected, double tol=1e-5) const
Array< double, 1, 3 > e(1./3., 0.5, 2.)
EIGEN_DEVICE_FUNC const Scalar & q
Vector6 localCoordinates(const ConstantBias &q)
bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
const Vector3 & gyroscope() const
ofstream os("timeSchurFactors.csv")
EIGEN_DEVICE_FUNC SegmentReturnType head(Index n)
This is the const version of head(Index).
Expression< T > compose(const Expression< T > &t1, const Expression< T > &t2)
ConstantBias between(const ConstantBias &q)
static ConstantBias Expmap(const Vector6 &v)
Vector3 correctGyroscope(const Vector3 &measurement, OptionalJacobian< 3, 6 > H1=boost::none, OptionalJacobian< 3, 3 > H2=boost::none) const
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
Special class for optional Jacobian arguments.
Expression< T > between(const Expression< T > &t1, const Expression< T > &t2)
ConstantBias operator-() const