SaDVIO
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
isae::ADataProvider Class Reference

ADataProvider class for managing data from various sensors. More...

#include <adataprovider.h>

Collaboration diagram for isae::ADataProvider:
Collaboration graph
[legend]

Public Member Functions

 ADataProvider (std::string path, Config slam_config)
 
std::shared_ptr< Framenext ()
 Return the next frame from the queue. More...
 
std::vector< std::shared_ptr< cam_config > > getCamConfigs ()
 
std::shared_ptr< imu_configgetIMUConfig ()
 
int getNCam ()
 
std::vector< std::shared_ptr< ImageSensor > > createImageSensors (const std::vector< cv::Mat > &imgs, const std::vector< cv::Mat > &masks={})
 From raw image to sensor objects. More...
 
std::shared_ptr< IMUcreateImuSensor (const Eigen::Vector3d &acc, const Eigen::Vector3d &gyr)
 From raw IMU measurements to an IMU sensor object. More...
 
void addFrameToTheQueue (std::vector< std::shared_ptr< ASensor >> sensors, double time)
 Create a frame from sensors and timestamp and add it to the queue. More...
 
void addFrameToTheQueue (std::shared_ptr< Frame > frame)
 

Protected Member Functions

void loadSensorsConfiguration (const std::string &path)
 
void loadCamConfig (YAML::Node cam_node)
 
void loadIMUConfig (YAML::Node imu_node)
 

Protected Attributes

std::shared_ptr< imu_config_imu_config
 IMU configuration. More...
 
std::vector< std::shared_ptr< cam_config > > _cam_configs
 Vector of camera configurations. More...
 
int _ncam
 Number of Image Sensors. More...
 
std::queue< std::shared_ptr< Frame > > _frame_queue
 Queue of frames to be processed. More...
 
Config _slam_config
 SLAM configuration. More...
 
int _nframes
 Frame counter. More...
 

Detailed Description

ADataProvider class for managing data from various sensors.

This class is responsible for loading sensor configurations, processing frames, and managing the queue of frames.

Constructor & Destructor Documentation

◆ ADataProvider()

isae::ADataProvider::ADataProvider ( std::string  path,
Config  slam_config 
)

Member Function Documentation

◆ addFrameToTheQueue() [1/2]

void isae::ADataProvider::addFrameToTheQueue ( std::shared_ptr< Frame frame)

◆ addFrameToTheQueue() [2/2]

void isae::ADataProvider::addFrameToTheQueue ( std::vector< std::shared_ptr< ASensor >>  sensors,
double  time 
)

Create a frame from sensors and timestamp and add it to the queue.

◆ createImageSensors()

std::vector< std::shared_ptr< ImageSensor > > isae::ADataProvider::createImageSensors ( const std::vector< cv::Mat > &  imgs,
const std::vector< cv::Mat > &  masks = {} 
)

From raw image to sensor objects.

◆ createImuSensor()

std::shared_ptr< IMU > isae::ADataProvider::createImuSensor ( const Eigen::Vector3d &  acc,
const Eigen::Vector3d &  gyr 
)

From raw IMU measurements to an IMU sensor object.

◆ getCamConfigs()

std::vector<std::shared_ptr<cam_config> > isae::ADataProvider::getCamConfigs ( )
inline

◆ getIMUConfig()

std::shared_ptr<imu_config> isae::ADataProvider::getIMUConfig ( )
inline

◆ getNCam()

int isae::ADataProvider::getNCam ( )
inline

◆ loadCamConfig()

void isae::ADataProvider::loadCamConfig ( YAML::Node  cam_node)
protected

◆ loadIMUConfig()

void isae::ADataProvider::loadIMUConfig ( YAML::Node  imu_node)
protected

◆ loadSensorsConfiguration()

void isae::ADataProvider::loadSensorsConfiguration ( const std::string &  path)
protected

◆ next()

std::shared_ptr< Frame > isae::ADataProvider::next ( )

Return the next frame from the queue.

Member Data Documentation

◆ _cam_configs

std::vector<std::shared_ptr<cam_config> > isae::ADataProvider::_cam_configs
protected

Vector of camera configurations.

◆ _frame_queue

std::queue<std::shared_ptr<Frame> > isae::ADataProvider::_frame_queue
protected

Queue of frames to be processed.

◆ _imu_config

std::shared_ptr<imu_config> isae::ADataProvider::_imu_config
protected

IMU configuration.

◆ _ncam

int isae::ADataProvider::_ncam
protected

Number of Image Sensors.

◆ _nframes

int isae::ADataProvider::_nframes
protected

Frame counter.

◆ _slam_config

Config isae::ADataProvider::_slam_config
protected

SLAM configuration.


The documentation for this class was generated from the following files: