Class Slam
Defined in File slam.hpp
Class Documentation
-
class Slam
Main entry point for running the SLAM pipeline.
Public Types
Shared ownership pointer type.
Public Functions
-
Slam(const std::string &settingsPath_)
Constructs the SLAM pipeline.
- Parameters:
settingsPath_ – Path to the settings YAML file.
-
inline Slam()
Constructs the SLAM pipeline using default settings.
-
~Slam()
Destroys the SLAM pipeline and releases all modules.
-
void add(data_type::SensorData::weak_ptr data_)
Pushes a new camera sample into the SLAM pipeline.
- Parameters:
data_ – Input camera sample (monocular or RGB-D).
-
void add(std::vector<double> imu_)
Pushes a new IMU reading into the SLAM pipeline.
- Parameters:
imu_ – IMU sample payload.
-
pair_t<rotation_t, translation_t> get_camera_pose() const
Returns the current camera pose in world coordinates.
- Returns:
Pair containing camera rotation and translation.
-
std::tuple<size_t, size_t, size_t, size_t, size_t> get_map_size() const
Get the size of the map.
- Returns:
Tuple with number of keyframes, number of map points, number of query cells, number of closest cells, and total number of cells.
Fills debug visualization data for the latest processed frame.
- Parameters:
data_ – Sensor sample associated with the visualization request.
outputData_ – Output structure filled with debug render content.
-
double get_frames_per_second()
Get the current slam fps.
- Returns:
Frames per second.
Public Static Functions
-
static inline Slam::unique_ptr make_unique(const std::string &settingsPath_)
Creates a
std::unique_ptr<Slam>.- Parameters:
settingsPath_ – Path to the settings file.
- Returns:
Unique pointer to a new
Slaminstance.
Private Types
Private Functions
-
template<typename transformation_t>
void __instanciate_modules() Instanciate graph, loop, and localization modules based on settings.
-
template<typename transformation_t>
void __terminate_modules() Terminate all SLAM modules and clear global state.
-
template<typename transformation_t>
void __add(data_type::SensorData::weak_ptr data_) Wrapper to run add() that handles the transformation type dispatching.
-
template<typename transformation_t>
pair_t<rotation_t, translation_t> __get_camera_pose() const Wrapper to run get_camera_pose() that handles the transformation type dispatching.
Wrapper to the get image visualization data function that handles the transformation type dispatching.
Private Members
-
transformation_t _type = transformation_t::UNDEFINED
Internal transformation type used for dispatching module implementations.