31 throw std::invalid_argument(
"ScenarioRunner::Diagonal: not a diagonal");
46 const SharedParams
p_;
55 double imuSampleTime = 1.0 / 100.0,
const Bias&
bias =
Bias())
56 : scenario_(scenario),
58 imuSampleTime_(imuSampleTime),
59 sqrt_dt_(
std::
sqrt(imuSampleTime)),
62 gyroSampler_(
Diagonal(p->gyroscopeCovariance), 10),
63 accSampler_(
Diagonal(p->accelerometerCovariance), 29284) {}
82 return actualAngularVelocity(t) + estimatedBias_.
gyroscope() +
83 gyroSampler_.
sample() / sqrt_dt_;
86 return actualSpecificForce(t) + estimatedBias_.
accelerometer() +
87 accSampler_.
sample() / sqrt_dt_;
94 const Bias& estimatedBias =
Bias(),
95 bool corrupted =
false)
const;
99 const Bias& estimatedBias =
Bias())
const;
102 Matrix9 estimateCovariance(
double T,
size_t N = 1000,
103 const Bias& estimatedBias =
Bias())
const;
106 Matrix6 estimateNoiseCovariance(
size_t N = 1000)
const;
Simple class to test navigation scenarios.
virtual Vector3 omega_b(double t) const =0
angular velocity in body frame
imuBias::ConstantBias Bias
ScenarioRunner(const Scenario &scenario, const SharedParams &p, double imuSampleTime=1.0/100.0, const Bias &bias=Bias())
const double & imuSampleTime() const
Vector3 actualSpecificForce(double t) const
static shared_ptr Covariance(const Matrix &covariance, bool smart=true)
const Vector3 & gravity_n() const
noiseModel::Diagonal::shared_ptr model
Vector3 acceleration_b(double t) const
void diagonal(const MatrixType &m)
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
const Vector3 & accelerometer() const
Vector3 measuredSpecificForce(double t) const
Vector3 measuredAngularVelocity(double t) const
const Scenario & scenario_
sampling from a NoiseModel
ConstantTwistScenario scenario(Z_3x1, Vector3(v, 0, 0))
boost::shared_ptr< Diagonal > shared_ptr
Simple trajectory simulator.
const Vector3 & gyroscope() const
Matrix3 transpose() const
Vector3 actualAngularVelocity(double t) const
boost::shared_ptr< PreintegrationParams > SharedParams
imuBias::ConstantBias Bias
static noiseModel::Diagonal::shared_ptr Diagonal(const Matrix &covariance)
Rot3 rotation(double t) const
const Bias estimatedBias_
Vector sample() const
sample from distribution