Template Class Localization
Defined in File localization.hpp
Class Documentation
-
template<typename TransformationType>
class Localization Localization pipeline that creates frames, estimates pose, and maintains tracking state.
Consumes sensor data, matches current observations against local map data, computes camera pose, and orchestrates keyframe promotion.
Public Types
-
using LocalizationTyped = Localization<TransformationType>
Typed alias for the Localization class template.
-
using FramesBufferTyped = FramesBuffer<TransformationType>
Typed alias for the FramesBuffer class template.
-
using CovisibilityTyped = covisibility_graph::CovisibilityGraph<TransformationType>
Auxiliary typedefs for covisibility graph point definition.
-
using CovisibilityPointer = CovisibilityTyped::shared_ptr
Shared pointer alias for the covisibility graph.
-
using unique_ptr = std::unique_ptr<LocalizationTyped>
Unique pointer alias for Localization.
Shared pointer alias for Localization.
-
using weak_ptr = std::weak_ptr<LocalizationTyped>
Weak pointer alias for Localization.
Public Functions
-
~Localization()
Destructor of the Localization object.
-
void run(data_type::SensorData::weak_ptr data_)
This is the localization main function.
Note
Compute its pose in world coordinates using a local buffer. The created frame with the local buffer of frames will hold the most recent keyframes and decide with which to create keyframes.
- Parameters:
data_ – Input sensor data for the current timestep.
-
inline pose_t get_camera_world_pose()
Getter for the current camera pose in world reference.
- Returns:
Transformation from current frame to world frame.
-
inline bool is_lost() const
Function that can be used to tell if the localization module is lost or if it is still localization keypoints on the image.
- Returns:
True if lost, false otherwise.
Public Static Functions
Allocates a new object of type Localization.
- Parameters:
- Returns:
Unique pointer to the created Localization object.
Allocates a new object of type Localization.
- Parameters:
- Returns:
Shared pointer to the created Localization object.
Private Functions
Constructor for the Localization object.
- Parameters:
map_ – SLAM system map.
covisibilityGraph_ – Slam system covisibility graph.
-
output_t<Frame::shared_ptr> __create_frame(data_type::SensorData::weak_ptr data_)
Creates a new Frame object from the input data.
- Parameters:
data_ – Input sensor data.
- Returns:
Output structure with the created frame or error info.
Estimate world pose of current frame from local world-data buffer.
- Parameters:
frame_ – Current frame.
Estimate frame pose from 2D-3D correspondences.
- Parameters:
frame_ – Current frame.
worldData_ – Buffered world data used for matching.
inliers_ – Output inlier mask for selected correspondences.
matches_ – Output 2D-3D match list.
checkPoseLimits_ – Whether to enforce configured pose limits.
- Returns:
truewhen pose estimation succeeds, otherwisefalse.
Selects the reference keyframe for the current frame.
- Parameters:
frame_ – Current frame.
worldData_ – Observations and IDs for map 3D points.
inliers_ – Inlier mask from pose estimation.
matches_ – 2D-3D matches from pose estimation.
Private Members
-
map::Map::shared_ptr _map
Map pointer (under development)
-
CovisibilityPointer _covisibilityGraph
Covisibility graph object.
-
LocalizationState _state
Tracking state.
-
FramesBufferTyped::unique_ptr _framesBuffer
Local visual odometry frames.
-
using LocalizationTyped = Localization<TransformationType>