Go to the documentation of this file.
32 cout <<
"biasHat [" << biasHat_.transpose() <<
"]" << endl;
33 cout <<
" PreintMeasCov [ " << preintMeasCov_ <<
" ]" << endl;
37 bool PreintegratedAhrsMeasurements::equals(
39 return PreintegratedRotation::equals(
other,
tol) &&
44 void PreintegratedAhrsMeasurements::resetIntegration() {
45 PreintegratedRotation::resetIntegration();
46 preintMeasCov_.setZero();
50 void PreintegratedAhrsMeasurements::integrateMeasurement(
53 PreintegratedRotation::integrateGyroMeasurement(
measuredOmega, biasHat_,
60 preintMeasCov_ = Fr * preintMeasCov_ * Fr.transpose() +
p().gyroscopeCovariance *
deltaT;
67 const Rot3 biascorrected = biascorrectedDeltaRij(biasOmegaIncr,
H);
68 Matrix3 D_omega_biascorrected;
69 const Vector3 omega = Rot3::Logmap(biascorrected,
H ? &D_omega_biascorrected : 0);
70 if (
H) (*H) = D_omega_biascorrected * (*H);
74 Vector PreintegratedAhrsMeasurements::DeltaAngles(
75 const Vector& msr_gyro_t,
const double msr_dt,
81 Vector body_t_omega_body = msr_gyro_t;
85 R_t_to_t0 = R_t_to_t0 *
Rot3::Expmap(body_t_omega_body * msr_dt);
86 return Rot3::Logmap(R_t_to_t0);
92 AHRSFactor::AHRSFactor(
96 preintegratedMeasurements.preintMeasCov_),
98 _PIM_(preintegratedMeasurements) {}
102 return std::static_pointer_cast<gtsam::NonlinearFactor>(
109 cout <<
s <<
"AHRSFactor(" << keyFormatter(this->key<1>()) <<
","
110 << keyFormatter(this->key<2>()) <<
"," << keyFormatter(this->key<3>()) <<
",";
138 const Rot3 fRrot = correctedDeltaRij.
between(actualRij);
161 const Matrix3 JbiasOmega = D_cDeltaRij_cOmega * (*H3);
163 (*H3) << D_fR_fRrot * (-fRrot.
transpose() * JbiasOmega);
182 return rot_i.
compose(correctedDeltaRij);
190 :
Base(noiseModel::
Gaussian::Covariance(pim.preintMeasCov_), rot_i, rot_j,
193 auto p = std::make_shared<PreintegratedAhrsMeasurements::Params>(pim.
p());
203 auto p = std::make_shared<PreintegratedAhrsMeasurements::Params>(pim.
p());
204 p->omegaCoriolis = omegaCoriolis;
double Gaussian(double mu, double sigma, double z)
Gaussian density function.
static Rot3 predict(const Rot3 &rot_i, const Vector3 &bias, const PreintegratedAhrsMeasurements &pim, const Vector3 &omegaCoriolis, const std::optional< Pose3 > &body_P_sensor={})
Class between(const Class &g) const
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
std::shared_ptr< This > shared_ptr
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
void print(const std::string &s, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
print
Array< double, 1, 3 > e(1./3., 0.5, 2.)
double error(const Values &c) const override
bool equals(const NonlinearFactor &, double tol=1e-9) const override
equals
Class compose(const Class &g) const
const Vector3 bias(1, 2, 3)
bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
SharedNoiseModel noiseModel_
static Pose3 body_P_sensor(Rot3::RzRyRx(-M_PI_2, 0.0, -M_PI_2), Point3(0.25, -0.10, 1.0))
Matrix3 skewSymmetric(double wx, double wy, double wz)
Vector3 predict(const Vector3 &bias, OptionalJacobian< 3, 3 > H={}) const
static Matrix3 LogmapDerivative(const Vector3 &x)
Derivative of Logmap.
Vector evaluateError(const Rot3 &rot_i, const Rot3 &rot_j, const Vector3 &bias, OptionalMatrixType H1, OptionalMatrixType H2, OptionalMatrixType H3) const override
vector of errors
gtsam::NonlinearFactor::shared_ptr clone() const override
bool equals(const PreintegratedAhrsMeasurements &, double tol=1e-9) const
equals
static const double deltaT
Pose2_ Expmap(const Vector3_ &xi)
const Vector3 measuredOmega
Vector3 integrateCoriolis(const Rot3 &rot_i) const
Integrate coriolis correction in body frame rot_i.
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
PreintegratedAhrsMeasurements _PIM_
bool equals(const NonlinearFactor &f, double tol=1e-9) const override
static Matrix3 ExpmapDerivative(const Vector3 &x)
Derivative of Expmap.
static Rot3 Expmap(const Vector3 &v, OptionalJacobian< 3, 3 > H={})
std::function< Vector9(const NavState &, const bool &)> coriolis
Matrix3 transpose() const
static Rot3 Predict(const Rot3 &rot_i, const Vector3 &bias, const PreintegratedAhrsMeasurements &pim)
static Vector3 Logmap(const Rot3 &R, OptionalJacobian< 3, 3 > H={})
Matrix * OptionalMatrixType
void print(const std::string &s="Preintegrated Measurements: ") const
print
std::uint64_t Key
Integer nonlinear key type.
std::shared_ptr< Params > p_
Parameters.
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:01:48