#include </home/runner/work/mars_lib/mars_lib/source/mars/include/mars/type_definitions/core_state_type.h>
|
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | CoreStateType ()=default |
|
std::string | to_csv_string (const double ×tamp) const |
| to_csv_string export state to single csv string More...
|
|
|
Eigen::Vector3d | p_wi_ { Eigen::Vector3d::Zero() } |
|
Eigen::Vector3d | v_wi_ { Eigen::Vector3d::Zero() } |
|
Eigen::Quaternion< double > | q_wi_ { Eigen::Quaternion<double>::Identity() } |
|
Eigen::Vector3d | b_w_ { Eigen::Vector3d::Zero() } |
|
Eigen::Vector3d | b_a_ { Eigen::Vector3d::Zero() } |
|
Eigen::Vector3d | w_m_ { Eigen::Vector3d::Zero() } |
|
Eigen::Vector3d | a_m_ { Eigen::Vector3d::Zero() } |
|
◆ CoreStateType()
EIGEN_MAKE_ALIGNED_OPERATOR_NEW mars::CoreStateType::CoreStateType |
( |
| ) |
|
|
default |
◆ ApplyCorrection()
ApplyCorrection.
- Parameters
-
state_prior | |
correction | order [p_wi(0:2), v_wi(3:5), q_wi(6:8), b_w(9:11), b_a(12:14)] |
- Returns
- Corrected state
55 corrected_state.p_wi_ = state_prior.p_wi_ + correction.block(0, 0, 3, 1);
56 corrected_state.v_wi_ = state_prior.v_wi_ + correction.block(3, 0, 3, 1);
68 corrected_state.b_w_ = state_prior.b_w_ + correction.block(9, 0, 3, 1);
69 corrected_state.b_a_ = state_prior.b_a_ + correction.block(12, 0, 3, 1);
72 corrected_state.a_m_ = state_prior.a_m_;
73 corrected_state.w_m_ = state_prior.w_m_;
75 return corrected_state;
EIGEN_MAKE_ALIGNED_OPERATOR_NEW CoreStateType()=default
static Eigen::Quaterniond ApplySmallAngleQuatCorr(const Eigen::Quaterniond &q_prior, const Eigen::Vector3d &correction)
ApplySmallAngleQuatCorr.
◆ get_csv_state_header_string()
static std::string mars::CoreStateType::get_csv_state_header_string |
( |
| ) |
|
|
inlinestatic |
97 os <<
"w_m_x, w_m_y, w_m_z, ";
98 os <<
"a_m_x, a_m_y, a_m_z, ";
99 os <<
"p_wi_x, p_wi_y, p_wi_z, ";
100 os <<
"v_wi_x, v_wi_y, v_wi_z, ";
101 os <<
"q_wi_w, q_wi_x, q_wi_y, q_wi_z, ";
102 os <<
"b_w_x, b_w_y, b_w_z, ";
103 os <<
"b_a_x, b_a_y, b_a_z";
◆ to_csv_string()
std::string mars::CoreStateType::to_csv_string |
( |
const double & |
timestamp | ) |
const |
|
inline |
to_csv_string export state to single csv string
- Parameters
-
- Returns
- string format [p_wi v_wi q_wi b_w b_a]
115 std::stringstream os;
119 os <<
", " <<
w_m_(0) <<
", " <<
w_m_(1) <<
", " <<
w_m_(2);
120 os <<
", " <<
a_m_(0) <<
", " <<
a_m_(1) <<
", " <<
a_m_(2);
124 Eigen::Vector4d q_wi =
q_wi_.coeffs();
125 os <<
", " << q_wi(3) <<
", " << q_wi(0) <<
", " << q_wi(1) <<
", " << q_wi(2);
127 os <<
", " <<
b_w_(0) <<
", " <<
b_w_(1) <<
", " <<
b_w_(2);
128 os <<
", " <<
b_a_(0) <<
", " <<
b_a_(1) <<
", " <<
b_a_(2);
Eigen::Vector3d w_m_
Definition: core_state_type.h:34
Eigen::Vector3d v_wi_
Definition: core_state_type.h:28
Eigen::Vector3d b_a_
Definition: core_state_type.h:31
Eigen::Vector3d b_w_
Definition: core_state_type.h:30
Eigen::Vector3d p_wi_
Definition: core_state_type.h:27
Eigen::Quaternion< double > q_wi_
Definition: core_state_type.h:29
Eigen::Vector3d a_m_
Definition: core_state_type.h:35
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const CoreStateType & |
data |
|
) |
| |
|
friend |
82 out <<
"p_wi:\t[ " << data.p_wi_.transpose() <<
" ]" << std::endl
83 <<
"v_wi:\t[ " << data.v_wi_.transpose() <<
" ]" << std::endl
84 <<
"q_wi:\t[ " << data.q_wi_.w() <<
" " << data.q_wi_.vec().transpose() <<
" ]" << std::endl
85 <<
"b_w:\t[ " << data.b_w_.transpose() <<
" ]" << std::endl
86 <<
"b_a:\t[ " << data.b_a_.transpose() <<
" ]" << std::endl
87 <<
"w_m:\t[ " << data.w_m_.transpose() <<
" ]" << std::endl
88 <<
"a_m:\t[ " << data.a_m_.transpose() <<
" ]" << std::endl;
◆ p_wi_
Eigen::Vector3d mars::CoreStateType::p_wi_ { Eigen::Vector3d::Zero() } |
◆ v_wi_
Eigen::Vector3d mars::CoreStateType::v_wi_ { Eigen::Vector3d::Zero() } |
◆ q_wi_
Eigen::Quaternion<double> mars::CoreStateType::q_wi_ { Eigen::Quaternion<double>::Identity() } |
◆ b_w_
Eigen::Vector3d mars::CoreStateType::b_w_ { Eigen::Vector3d::Zero() } |
◆ b_a_
Eigen::Vector3d mars::CoreStateType::b_a_ { Eigen::Vector3d::Zero() } |
◆ w_m_
Eigen::Vector3d mars::CoreStateType::w_m_ { Eigen::Vector3d::Zero() } |
◆ a_m_
Eigen::Vector3d mars::CoreStateType::a_m_ { Eigen::Vector3d::Zero() } |
◆ size_true_
constexpr int mars::CoreStateType::size_true_ = 16 |
|
staticconstexpr |
◆ size_error_
constexpr int mars::CoreStateType::size_error_ = 15 |
|
staticconstexpr |
The documentation for this class was generated from the following file: