39 Eigen::Matrix<double, 3, 1> p_invFinG = (getfej) ?
fej() :
value();
40 Eigen::Matrix<double, 3, 1> p_FinG;
41 p_FinG << (1 / p_invFinG(2)) * std::cos(p_invFinG(0)) * std::sin(p_invFinG(1)),
42 (1 / p_invFinG(2)) * std::sin(p_invFinG(0)) * std::sin(p_invFinG(1)), (1 / p_invFinG(2)) * std::cos(p_invFinG(1));
47 if (
_feat_representation == LandmarkRepresentation::Representation::ANCHORED_MSCKF_INVERSE_DEPTH) {
48 Eigen::Matrix<double, 3, 1> p_FinA;
49 Eigen::Matrix<double, 3, 1> p_invFinA =
value();
50 p_FinA << (1 / p_invFinA(2)) * p_invFinA(0), (1 / p_invFinA(2)) * p_invFinA(1), 1 / p_invFinA(2);
55 if (
_feat_representation == LandmarkRepresentation::Representation::ANCHORED_INVERSE_DEPTH_SINGLE) {
62 return Eigen::Vector3d::Zero();
86 double g_rho = 1 / p_FinG.norm();
87 double g_phi = std::acos(g_rho * p_FinG(2));
89 double g_theta = std::atan2(p_FinG(1), p_FinG(0));
90 Eigen::Matrix<double, 3, 1> p_invFinG;
91 p_invFinG(0) = g_theta;
104 if (
_feat_representation == LandmarkRepresentation::Representation::ANCHORED_MSCKF_INVERSE_DEPTH) {
107 Eigen::Matrix<double, 3, 1> p_invFinA_MSCKF;
108 p_invFinA_MSCKF(0) = p_FinG(0) / p_FinG(2);
109 p_invFinA_MSCKF(1) = p_FinG(1) / p_FinG(2);
110 p_invFinA_MSCKF(2) = 1 / p_FinG(2);
121 if (
_feat_representation == LandmarkRepresentation::Representation::ANCHORED_INVERSE_DEPTH_SINGLE) {
124 Eigen::VectorXd temp;
126 temp(0) = 1.0 / p_FinG(2);
virtual void set_value(const Eigen::MatrixXd &new_value)
Overwrite value of state's estimate.
Eigen::Vector3d uv_norm_zero_fej
First estimate normalized uv coordinate bearing of this measurement (used for single depth representa...
virtual void set_fej(const Eigen::MatrixXd &new_value)
Overwrite value of first-estimate.
Eigen::Vector3d uv_norm_zero
First normalized uv coordinate bearing of this measurement (used for single depth representation) ...
Dynamic type system types.
virtual const Eigen::MatrixXd & value() const
Access variable's estimate.
virtual const Eigen::MatrixXd & fej() const
Access variable's first-estimate.
void set_from_xyz(Eigen::Matrix< double, 3, 1 > p_FinG, bool isfej)
Will set the current value based on the representation.
LandmarkRepresentation::Representation _feat_representation
What feature representation this feature currently has.
Eigen::Matrix< double, 3, 1 > get_xyz(bool getfej) const
Will return the position of the feature in the global frame of reference.