Landmark class
Type that implements a persistant SLAM feature.
Contents
We store the feature ID that should match the IDs in the trackers. Additionally if this is an anchored representation we store what clone timestamp this is anchored from and what camera. If this features should be marginalized its flag can be set and during cleanup it will be removed.
Base classes
Constructors, destructors, conversion operators
Public functions
- void update(const Eigen::VectorXd dx) override
- Overrides the default vector update rule We want to selectively update the FEJ value if we are using an anchored representation.
- auto get_xyz(bool getfej) -> Eigen::Matrix<double, 3, 1>
- Will return the position of the feature in the global frame of reference.
- void set_from_xyz(Eigen::Matrix<double, 3, 1> p_FinG, bool isfej)
- Will set the current value based on the representation.
Public variables
- size_t _featid
- Feature ID of this landmark (corresponds to frontend id)
- int _anchor_cam_id
- What camera ID our pose is anchored in!! By default the first measurement is the anchor.
- double _anchor_clone_timestamp
- Timestamp of anchor clone.
- bool has_had_anchor_change
- Boolean if this landmark has had at least one anchor change.
- bool should_marg
- Boolean if this landmark should be marginalized out.
-
FeatureRepresentation::
Representation _feat_representation - What feature representation this feature currently has.
Function documentation
void ov_core:: Landmark:: update(const Eigen::VectorXd dx) override
Overrides the default vector update rule We want to selectively update the FEJ value if we are using an anchored representation.
| Parameters | |
|---|---|
| dx | Additive error state correction |
Eigen::Matrix<double, 3, 1> ov_core:: Landmark:: get_xyz(bool getfej)
Will return the position of the feature in the global frame of reference.
| Parameters | |
|---|---|
| getfej | Set to true to get the landmark FEJ value |
| Returns | Position of feature either in global or anchor frame |
CASE: Global 3d feature representation CASE: Anchored 3D feature representation
CASE: Global inverse depth feature representation CASE: Anchored full inverse depth feature representation
CASE: Anchored MSCKF inverse depth feature representation
void ov_core:: Landmark:: set_from_xyz(Eigen::Matrix<double, 3, 1> p_FinG,
bool isfej)
Will set the current value based on the representation.
| Parameters | |
|---|---|
| p_FinG | Position of the feature either in global or anchor frame |
| isfej | Set to true to set the landmark FEJ value |
CASE: Global 3d feature representation CASE: Anchored 3d feature representation
CASE: Global inverse depth feature representation CASE: Anchored inverse depth feature representation
CASE: MSCKF anchored inverse depth representation