25 #ifndef INCLUDED_CannedIMUMeasurement_h_GUID_98C6C454_C977_4081_2065_A89E6A62C8FA 26 #define INCLUDED_CannedIMUMeasurement_h_GUID_98C6C454_C977_4081_2065_A89E6A62C8FA 32 #include <boost/assert.hpp> 46 void setYawCorrection(
util::Angle y) { m_yawCorrection = y; }
47 util::Angle getYawCorrection()
const {
return m_yawCorrection; }
49 Eigen::Vector3d
const &variance) {
50 Eigen::Vector4d::Map(m_quat.data()) = quat.
coeffs();
51 Eigen::Vector3d::Map(m_quatVar.data()) = variance;
52 m_orientationValid =
true;
54 bool orientationValid()
const {
return m_orientationValid; }
59 "restoring quat on an invalid orientation measurement!");
60 quat.
coeffs() = Eigen::Vector4d::Map(m_quat.data());
63 void restoreQuatVariance(Eigen::Vector3d &var)
const {
64 BOOST_ASSERT_MSG(orientationValid(),
"restoring quat variance on " 65 "an invalid orientation " 67 var = Eigen::Vector3d::Map(m_quatVar.data());
70 void setAngVel(Eigen::Vector3d
const &angVel,
71 Eigen::Vector3d
const &variance) {
72 Eigen::Vector3d::Map(m_angVel.data()) = angVel;
73 Eigen::Vector3d::Map(m_angVelVar.data()) = variance;
77 bool angVelValid()
const {
return m_angVelValid; }
78 void restoreAngVel(Eigen::Vector3d &angVel)
const {
79 BOOST_ASSERT_MSG(angVelValid(),
"restoring ang vel on " 82 angVel = Eigen::Vector3d::Map(m_angVel.data());
84 void restoreAngVelVariance(Eigen::Vector3d &var)
const {
85 BOOST_ASSERT_MSG(angVelValid(),
"restoring ang vel variance on " 88 var = Eigen::Vector3d::Map(m_angVelVar.data());
93 bool m_orientationValid =
false;
94 std::array<double, 4> m_quat;
95 std::array<double, 3> m_quatVar;
96 bool m_angVelValid =
false;
97 std::array<double, 3> m_angVel;
98 std::array<double, 3> m_angVelVar;
102 #endif // INCLUDED_CannedIMUMeasurement_h_GUID_98C6C454_C977_4081_2065_A89E6A62C8FA AngleRadiansd Angle
Default angle type.
Definition: Angles.h:63
const Coefficients & coeffs() const
Definition: Quaternion.h:93
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
Header wrapping include of <Eigen/Core> and <Eigen/Geometry> for warning quieting.
A safe way to store and transport an orientation measurement or an angular velocity measurement witho...
Definition: CannedIMUMeasurement.h:44
Definition: Quaternion.h:47